2009-11-05 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2009-11-05  Sebastien Pouliot  <sebastien@ximian.com>
2
3         * class.c: When CoreCLR is enabled don't call mono_init_com_types
4         if MONO_CLASS_IS_IMPORT return true unless the type reside in 
5         platform (trusted) code. Instead we return a TypeLoadException to
6         be thrown later. This is the exception thrown by Silverlight 2 if
7         a type, inside application (user) code is marked with [ComImport]
8
9 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
10
11         * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
12         mono_is_debugger_attached () too.
13
14         * mono-debug.c (mono_is_debugger_attached): New helper function.
15         (mono_set_is_debugger_attached): Ditto.
16
17 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
18
19         * class.c: Add missing check for load errors after every
20         call to mono_class_setup_fields
21
22         Fixes #552282.
23
24 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
25
26         metadata-verify.c (verify_tables_schema): Fix the error message.
27
28 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
29
30         * metadata.c: Change event table schema to use TDOR for event type
31         as this is what it's meant to be.
32
33         * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
34         to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
35         entry.
36
37         * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
38         longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
39         rows in MONO_TABLE_GENERICPARAM.
40
41         Fixes #552289.
42
43 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
44
45         * class.c (mono_image_add_to_name_cache): Assert on duplicate
46         insertion.
47
48         * reflection.c (mono_reflection_setup_internal_class): Avoid
49         registering a gc root the same MonoClass multiple times.
50         Don't register nested types on the global scope as they should
51         not be available there.
52
53 2009-11-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>
54
55         * culture-info-tables.h: regenerated.
56
57 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
58
59         * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
60
61 2009-11-04  Sebastien Pouliot  <sebastien@ximian.com>
62
63         * string-icalls.c|h: Remove string internal calls that are not 
64         used anymore by the class libraries.
65         * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
66         which is not used in the class librairies.
67         * icall-def.h: Update tables.
68
69 2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
70
71         * class.h: Move mono_class_inflate_generic_type_checked...
72
73         * class-internals.h: to here and make it internal. We don't want to
74         further expose MonoGenericContext. 
75
76 2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
77
78         * verify.c (mono_method_verify): Improve error message.
79
80 2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
81
82         * reflection.c (fieldref_encode_signature): If field_image is NULL then
83         the token is already properly encoded. Fixs 4.0 build.
84
85 2009-11-04  Rolf Bjarne Kvinge  <RKvinge@novell.com>
86
87         * locales.c (construct_number_format): Check if the number index is
88         valid before trying to use it, if not, just return.
89         
90 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
91
92         * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
93         since that loses the abort state. Fixes #539394.
94
95 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
96
97         * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
98         explicit this argument to the call signature.
99         (mono_marshal_get_icall_wrapper): Ditto.
100
101 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
102
103         * reflection.c (fieldref_encode_signature): Add new field_image parameter
104         to indicate which assembly to use when resolving a custom-mod.
105
106         Fixes handling of volatile fields used across assemblies as reported in #551513.
107
108 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
109
110         * loader.c: Improve error messages.
111
112 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
113
114         * class.c (mono_class_setup_methods): Only give a slot for virtual methods
115         of interfaces. Fixes IKVM.
116
117         * class.c (mono_class_setup_vtable_general): Improve debug spew.
118
119 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
120
121         * verify.c (verifier_inflate_type): Return the inflated type on success.
122
123 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
124
125         * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
126
127         * threads.c (mono_thread_attach): Call the profiler thread start callback.
128
129         * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
130
131         * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
132         flag set.
133
134         * profiler.c: Add new profiler callbacks for runtime invoke.
135
136         * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
137
138 2009-11-01  Mark Probst  <mark.probst@gmail.com>
139
140         * sgen-gc.c: Keep track of the reason for a major collection and
141         write it to the heap-dump file.
142
143 2009-10-31  Miguel de Icaza  <miguel@novell.com>
144
145         * threads.c: refactor the code that initializes the
146         thread_start_args into a reusable function and use this in the two
147         methods that start up threads.
148
149 2009-10-31  Zoltan Varga  <vargaz@gmail.com>
150
151         * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
152         Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
153
154 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
155
156         * mono-perfcounters.c: add the "_Total" instance for CPU counters.
157         Until now, we only had the per-cpu(core) counters.
158
159 2009-10-28  Mark Probst  <mark.probst@gmail.com>
160
161         * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
162         mono_gc_get_suspend_signal(), which returns the suspend signal
163         number used by the GC.
164
165 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
166
167         * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
168
169         * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
170         signalling start_notify.
171
172 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
173
174         * appdomain.c: do not test the st_mode field for shadow-copies.
175         Fixes bug #545276.
176
177 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
178
179         * threadpool.[ch]: added hooks for thread start/finish and item
180         processing begin/end. For monotouch use only.
181
182 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
183
184         * threads.c (mono_thread_get_name): New helper function.
185
186         * reflection.c (resolve_object): Set handle_class for strings too.
187         (mono_reflection_create_custom_attr_data_args): New helper function to decode
188         a cattr blob into a set of arrays and structures without creating the custom
189         attributes themselves.
190         (create_custom_attr_data): Simplify using create_custom_attr_data_args.
191
192         * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
193
194         * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
195         function.
196
197 2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
198
199         * verify.c: Replace calls to mono_class_inflate_generic_type with
200         mono_class_inflate_generic_type_checked. Fixes #480005.
201
202 2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
203
204         * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
205         object since not all paths lead to callees initing it.
206
207 2009-10-23  Alp Toker  <alp@nuanti.com>
208
209         Fix embedding API breakage from r144688. mono-compiler.h is an internal
210         header and should not be shipped:
211
212         * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
213         which is specific to the mono build. Not going to work.
214
215 2009-10-23  Sebastien Pouliot  <sebastien@ximian.com>
216
217         * security-manager.c: Report if core-clr is active from
218         ves_icall_System_Security_SecurityManager_get_SecurityEnabled
219         to allow Moonlight BCL to behave appropriately (both in browser
220         and outside, e.g. smcs)
221
222 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
223
224         * mono-config.c: ignore UTF-8 BOM and report parser errors.
225         Fixes bug #549108.
226
227 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
228
229         * class.c: fix typo.
230
231 2009-10-22  Rodrigo Kumpera  <rkumpera@novell.com>
232
233         * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
234         a MonoError parameter.
235
236         * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
237         version that can does proper error handling.
238
239         * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
240
241         * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
242
243         * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
244
245 2009-10-20  Zoltan Varga  <vargaz@gmail.com>
246
247         * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
248         NO_UNALIGNED_ACCESS is defined.
249
250 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
251
252         * marshal.c (mono_string_builder_to_utf16): Applied patch from
253         Hib Eris  <hib@hiberis.nl>. Return empty string for empty string builders.
254         Fixes #549173.
255
256 2009-10-22  Mark Probst  <mark.probst@gmail.com>
257
258         * sgen-gc.c: Shorten sections whenever possible.
259
260 2009-10-22  Mark Probst  <mark.probst@gmail.com>
261
262         * sgen-gc.c: Use our portable semaphore #defines.
263
264 2009-10-22  Mark Probst  <mark.probst@gmail.com>
265
266         * sgen-gc.c: A debug option for dumping the heap layout to a file
267         after each collection.
268
269 2009-10-21  Mark Probst  <mark.probst@gmail.com>
270
271         * sgen-gc.c: Make managed write barriers atomic via
272         thread-restarts.
273
274 2009-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
275
276         * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
277         methods. Fixes #543021.
278
279 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
280
281         * socket-io.[ch]: fix VS build.
282
283 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
284
285         * icall-def.h:
286         * socket-io.[ch]: implemented SendFile.
287
288 2009-10-20  Zoltan Varga  <vargaz@gmail.com>
289
290         * class.c (mono_class_create_from_typedef): Initialize class->element_class
291         before the interfaces to avoid crashes later if class initialization fails.
292         Fixes #548417.
293
294         * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
295         Fixes #548276.
296
297 2009-10-20  Marek Safar  <marek.safar@gmail.com>
298
299         * domain.c: Bump 4.0 version.
300
301 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
302
303         * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
304         code is known. (parse_public_key) Remove duplicate (unneeded) NULL
305         check since 'pubkey' can't be NULL at this stage
306         * icall.c (ves_icall_System_Array_FastCopy): Add comment about
307         the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
308         initialization of 'iter'
309
310 2009-10-16  Bill Holmes  <billholmes54@gmail.com>
311
312         * cominterop.c : Search the interface parts of vtable to find 
313           method matches.  Fixes 547030.
314
315         Code is contributed under MIT/X11 license.
316
317 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
318
319         * marshal.c: BeginInvoke cannot be called on multicast delegates with
320         multiple targets. Fixes bug #574426.
321
322 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
323
324         * profiler.h: Put here the definition of
325         MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
326         (and fix the build...).
327
328 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
329
330         * profiler.c, profiler.h, profiler-private.h:
331         Added support for different ways of getting call chains in stat mode.
332
333 2009-10-12  Mark Probst  <mark.probst@gmail.com>
334
335         * object.c, object-internals.h: New function for computing the
336         size of an array, factored out of mono_array_new_full().  Use
337         SGen's functions for allocating arrays and vectors.
338
339         * sgen-gc.c, gc-internal.h: Special functions for allocating
340         arrays and vectors without race conditions.  A managed array
341         allocator method.
342
343         * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
344
345 2009-10-12  Mark Probst  <mark.probst@gmail.com>
346
347         * object.c, object.h, icall.c: Write barriers do the copying now,
348         as well, so no need for an additional memcpy.
349
350         * sgen-gc.c: Lock when storing remsets.  Do the memory
351         copying/moving in the write barriers.
352
353         * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
354
355         * reflection.c: Added an assert.
356
357 2009-10-12  Mark Probst  <mark.probst@gmail.com>
358
359         * threads.c, process.c: A few missing write barriers.
360
361 2009-10-12  Joel W. Reed <joelwreed@gmail.com>
362
363         * mono-perfcounters.c, mono-perfcounters-def.h: Add
364         network performance counters for bytes sent per second, bytes
365         received per second, and bytes total per second.
366
367         Code is contributed under MIT/X11 license.
368
369 2009-10-09  Mark Probst  <mark.probst@gmail.com>
370
371         * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
372         Fix warning.
373
374 2009-10-09  Mark Probst  <mark.probst@gmail.com>
375
376         * threads.c, object-internals.h, object.c: Move code for
377         transferring an object to a different domain (via
378         serialization/remoting) to object.c.
379
380         * object.c (call_unhandled_exception_delegate): If the exception
381         is in a different domain than the delegate, transfer the exception
382         to that domain.
383
384 2009-10-07  Zoltan Varga  <vargaz@gmail.com>
385
386         * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
387         Fixes #322934.
388
389 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
390
391         * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
392
393 2009-10-06  Mark Probst  <mark.probst@gmail.com>
394
395         * object.c (mono_method_return_message_restore): Handle the case
396         where the argument is an instance of a generic type.  Fixes
397         #544446.
398
399 2009-10-06  Mark Probst  <mark.probst@gmail.com>
400
401         * object.c (set_value): Write barrier fix - we must pass the
402         count, not the size.
403
404 2009-10-05  Zoltan Varga  <vargaz@gmail.com>
405
406         * domain.c (mono_init_internal): Print a useful error message when encountering
407         an old mscorlib, instead of crashing. Fixes #544307.
408
409 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
410
411         * appdomain.c (copy_app_domain_setup): Fix a warning.
412
413         * debug-helpers.c (dis_one): Ditto.
414
415 2009-10-04  Mark Probst  <mark.probst@gmail.com>
416
417         * domain-internals.h, appdomain.c: The AppDomainSetup is copied
418         into the new domain, instead of referencing the original one.
419
420         * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
421         non-static.
422
423         * appdomain.c: Corlib version bump.
424
425 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
426
427         * threadpool.c: one more...
428
429 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
430
431         * threadpool.c: forgot a LeaveCriticalSection when telling the idle
432         threads to die because we're shutting down. delgate5.exe works again.
433
434 2009-10-01  Bill Holmes  <billholmes54@gmail.com>
435
436         * cominterop.c (mono_marshal_free_ccw_entry): Updating the
437           ccw_interface_hash table when a ccw is finalized.
438
439         Code is contributed under MIT/X11 license.
440
441 2009-09-30  Mark Probst  <mark.probst@gmail.com>
442
443         * assembly.c, domain.c, image.c, metadata-internals.h: Split
444         domain and image unloading into two steps.  We must do this
445         because clearing the domain in SGen requires the class metadata to
446         be intact, but we need to free the mono_g_hash_tables in case a
447         collection occurs during domain unloading and the roots would trip
448         up the GC.
449
450 2009-09-30  Mark Probst  <mark.probst@gmail.com>
451
452         * object-internals.h: Remove serialized culture fields from
453         MonoInternalThread.
454
455         * icall-def.h, thread-types.h, threads.c: Remove serialized
456         culture icalls.
457
458         * appdomain.c: Corlib version bump.
459
460 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
461
462         * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
463         Fixes #543133.
464
465 2009-09-30  Mark Probst  <mark.probst@gmail.com>
466
467         * sgen-gc.c: Try to shorten the new section after a major
468         allocation to avoid ever-growing sections.
469
470 2009-10-13  Martin Baulig  <martin@ximian.com>
471
472         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
473         `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
474         `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
475         `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
476
477         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
478
479 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
480
481         * threadpool.c: fixed the order in which 'completed' and the wait
482         handle, if any, are set.  Fixes bug #542933 and delegate2.exe
483         No need to use the wait_handle field of ASyncCall. Make sure the
484         threadpool is active when adding a job or queueing an idle thread.
485
486 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
487
488         * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
489
490         * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
491         when using --compile-all.
492
493 2009-09-27  Mark Probst  <mark.probst@gmail.com>
494
495         * metadata.c (free_generic_class): Unregister the field_objects
496         roots if we're using SGen.
497
498 2009-09-27  Mark Probst  <mark.probst@gmail.com>
499
500         * reflection.c (mono_dynamic_image_free): Deregister the GC root
501         for GenericParamTableEntry.gparam.
502
503 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
504
505         * marshal.c: don't create the handle when calling. It is created later
506         if needed.
507
508 2009-09-26  Mark Probst  <mark.probst@gmail.com>
509
510         * sgen-gc.c: Warning fixes.
511
512 2009-09-26  Mark Probst  <mark.probst@gmail.com>
513
514         * sgen-gc.c: New debug option "xdomain-checks", which scans the
515         whole heap for cross-domain references before each collection.
516
517         * sgen-scan-object.h: The scan action can now use SCAN to scan the
518         object.
519
520         * threadpool-internals.h, threadpool.c: New function
521         mono_thread_pool_is_queue_array() for checking whether a given
522         array is used as a (cross-domain) queue by the thread pool code.
523
524 2009-09-26  Mark Probst  <mark.probst@gmail.com>
525
526         * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
527         searches the whole heap for objects containing a specific
528         reference.  Only for debugging.
529
530 2009-09-26  Mark Probst  <mark.probst@gmail.com>
531
532         * appdomain.c (MONO_CORLIB_VERSION): Bumped.
533
534         * icall-def.h, threads.c, threads-types.h: New icalls for copying
535         byte arrays between domains.
536
537 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
538
539         * threadpool.c:
540         * class-internals.h:
541         * mono-perfcounters-def.h:
542         * mono-perfcounters.c:
543         -There is a list of idle threads
544         -Each of those idle threads wait on their own WaitHandle instead
545         of all of them using the same semaphore. When a new work item is
546         added, the job is assigned directly to an idle thread or a newly
547         created one if possible and then the handle for that thread is
548         signaled. Compare that to the current approach where all the
549         threads in the pool compete to dequeue a job from the same
550         queue.
551         -New struct ThreadPool that brings together the bunch of static
552         variable for each threadpool (IO and regular).
553         -New performance counters: # of items added and its rate per
554         threadpool. The rate will be used later, perhaps together with
555         other perf. counters, to decide when idle threads should exit.
556
557 2009-09-25  Jonathan Chambers  <joncham@gmail.com>
558
559         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal): 
560         Fix typo on Windows build.      
561         (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
562         
563         Code is contributed under MIT/X11 license.
564
565 2009-09-25  Mark Probst  <mark.probst@gmail.com>
566
567         * object-internals.h: The Thread class is split up into Thread and
568         InternalThread now.  We have exactly one InternalThread per
569         thread, and at most one Thread per appdomain per thread.  Most
570         data is stored in InternalThread.  All InternalThread objects live
571         in the root domain.
572
573         * class-internals.h: Add internal_thread_class to MonoDefaults.
574
575         * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
576         domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
577         socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
578         resulting from the split of the Thread class.
579
580         * gc-internal.h: Prototype for new function for checking whether a
581         thread is the finalizer thread.
582
583         * appdomain.c: Corlib version bump.
584
585 2009-09-25  Rolf Bjarne Kvinge  <RKvinge@novell.com>
586
587         * appdomain.c|h: Add a mono_domain_try_unload method which is
588         equivalent to mono_domain_unload, except that it returns an exception
589         instead of throwing it. Make mono_domain_unload use the
590         mono_domain_try_unload method to avoid code-duplication.
591
592 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
593
594         * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
595         a problem.
596
597 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
598
599         * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
600         aborting when a conversion is not implemented.
601
602 2009-09-23  Miguel de Icaza  <miguel@novell.com>
603
604         * verify.c: when comparing culture strings, use g_ascii_strcmp
605
606         * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
607         when comparing public key tokens to use memcmp on 16 bytes.   I do
608         not believe this ever worked as advertised in the past.
609
610         The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
611         which would have always failed earlier.
612
613 2009-06-25  Miguel de Icaza  <miguel@novell.com>
614
615         * gc.c: Raise a NullArgumentException if the object passed is
616         null.
617
618 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
619
620         * image.c (mono_image_close): Atomically decrement the reference count and
621         remove the image from the hash tables, to prevent another thread from seeing a
622         dying MonoImage. Fixes #541194.
623
624 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
625
626         * threadpool.c: actually use the minimum number of 'completion ports'
627         (for us is just a potential worker thread).
628
629 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
630
631         * threadpool.c: remove ares_htable. It does not make sense any more
632         since the same objects are now stored in GC-tracked arrays while they are
633         in the queue.
634
635 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
636
637         * threadpool.c: increase the minimum length of the queues to 128.
638         Remove warning.
639
640 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
641
642         * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
643         return the modified signature used by string ctors.
644
645 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
646
647         * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
648         to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
649         method, to be used by full-aot.
650
651 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
652
653         Since the runtime supports lazy initialization of a type's vtable and this can cause a type
654         to fail, we need to ensure that the vtable is properly initialized at spots were the type must
655         be known to be good.
656
657         * class.c (mono_class_init): Fail array types if their element type fails initialization
658         as well.
659
660         * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
661         initialization, additionally we request the element_type vtable to be initialized as well.
662
663         This is fine and should not increase the working set in any meaningful way since it's reasonable
664         to assume       that most code will create an array and eventually populate it, which will require the
665         type's vtable to be initialized.
666
667         * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
668
669 2009-09-17  Atsushi Enomoto  <atsushi@ximian.com>
670
671         * normalization-tables.h : regenerated.
672
673 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
674
675         * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
676         a leb128 encoding can take up to 5 bytes.
677
678 2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>
679
680         * class.c (verify_class_overrides): Remove useless argument.
681
682         * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
683         before interface enumeration as this is no longer required.
684
685 2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>
686
687         * class.c: New function mono_class_is_assignable_from_slow that is safe to be
688         used under mono_class_init context. This functions avoid any code path that
689         calls mono_class_init, which leads it to be slow as some things like the interface
690         bitmap are not available.
691
692         * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
693         of it's own broken version. Fixes the verifier part of #538588.
694
695         * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
696         API.
697
698 2009-09-15  Mark Probst  <mark.probst@gmail.com>
699
700         * class.c (mono_class_init): Always set an exception in a class if
701         vtable setup fails.  Fixes #538577.
702
703         * generic-sharing.c: Raise an exception if mono_class_vtable()
704         returns NULL.
705
706 2009-09-13  Zoltan Varga  <vargaz@gmail.com>
707
708         * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance 
709         methods of vtypes, as they could be incorrectly shared with static methods
710         taking an IntPtr argument.
711
712 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
713
714         * domain.c:
715         * object.c:
716         * class-internals.h: renamed waithandle_class to
717         manualresetevent_class.
718         * marshal.c: propagate the exception if a remoting BeginInvoke call
719         fails.
720
721 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
722
723         * object.c: Properly handle vtable failures.
724
725 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
726
727         * socket-io.c: Assert on vtable failure.
728
729         * mono-mlist.c: Assert on vtable failure.
730
731 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
732
733         * marshal.c: Assert on vtable failure.
734
735 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
736
737         * icall.c: Properly handle vtable failures.
738
739 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
740
741         * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
742
743 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
744
745         * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
746
747         * console-unix.c (do_console_cancel_event): Same.
748
749 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
750
751         * class-internals.h: Add mono_class_vtable_full function that allows control
752         if an exception should be raised or not.
753
754         * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
755         to do what its documentation say, that is to return NULL and set exception_type on
756         failure.
757
758         * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
759         and change the code to honor it.
760
761 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
762
763         * verify.c: Fix typo in error message.
764
765 2009-09-10  Sebastien Pouliot  <sebastien@ximian.com>
766
767         * security-core-clr.c: Fix default_platform_check so it can run
768         the runtime coreclr tests (without an infinite recursion when
769         throwing an exception).
770
771 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
772
773         object.c (mono_delegate_ctor_with_method): Guard against null method.
774
775 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
776
777         * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
778         that should be replaced with error handling later.
779
780 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
781
782         * marshal.c (mono_delegate_end_invoke): Fix warning.
783
784 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
785
786         * loader.c (mono_field_from_token): Properly handle invalid
787         dynamic tokens.
788
789 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
790
791         * pedump.c (verify_image_file): Skip types that can't be
792         decoded.
793
794 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
795
796         * verify.c: Look for recursive valuetypes only against the
797         type been initialized as this is a lot simpler and works.
798
799 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
800
801         * verify.c: Ensure that fields are properly loaded before
802         checking them.
803
804 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
805
806         * object.c (mono_object_get_virtual_method) : Call 
807           mono_cominterop_get_invoke if the object is a COM object.
808
809         Code is contributed under MIT/X11 license.
810
811 2009-09-09  Rodrigo Kumpera  <rkumpera@novell.com>
812
813         * verify.c: Check for recursive valuetype definitions.
814
815 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
816
817         Use inheritance-aware interface offsets. Inherited types use the same offsets
818         of their parents. This reduce offset duplication in case more than one type in
819         the inheritance tree explicitly implements the same interface.
820
821         This also removes a source of vtable bubbles found in #532409. An abstract type
822         isn't required to provide abstract methods to all interfaces it implements, which
823         resulted in a bubble with the previous scheme as the child would get a non-full
824         vtable from its parent. We fail all concrete types with vtable bubbles, so this
825         should be fixed.
826
827         This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
828         it's expected to not cause any significant increase beyond that.
829
830         * class.c (setup_interface_offsets): Compute super class iface offsets
831         first to force sharing.
832
833         * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
834         dumping only the relevant ones.
835
836         * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
837         methods a new slot regardless if they belong to an interface or not. This allows
838         an inherited type to override the iface method separately from the class one.
839
840 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
841
842         * threadpool.c: make the Sleep() alertable to prevent delays exiting
843         applications that take less than 2s to execute.
844         Bug #524984 fixed.
845
846 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
847
848         * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
849
850         * object.c (mono_get_runtime_callbacks): New helper function to return
851         the runtime callbacks.
852
853         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
854         mono_get_runtime_build_info () as the display name.
855         
856 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
857
858         * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
859         argument, since NEWARR expects a native int. Fixes #481559.
860
861 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
862
863         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
864         against broken SRE methods.
865
866 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
867
868         * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
869         a NULL variable. Abort early on failure.
870
871 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
872
873         * class.c (can_access_type): Fail visibility test for non nested
874         types with nested visibility.
875
876 2009-09-02  Sebastien Pouliot  <sebastien@ximian.com>
877
878         * assembly.c (parse_public_key): Avoid allocating (and not 
879         freeing) the public key array when it's not requested by the 
880         caller.
881         * threads.c (mono_thread_manage, mono_thread_create_internal, 
882         ves_icall_System_Threading_Thread_Thread_internal): Free 
883         allocated memory on error.
884
885 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
886
887         * icall.c, icall-def.h: Remove some dead code from early SRE changes.
888
889 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
890
891         * class.c (mono_class_setup_fields): Remove duplicated local variable
892         named gklass.
893         Rename gklass to gtd to reflect the fact that it points to the generic
894         type definition.
895         Remove the duplicated call to mono_class_setup_fields on gtd and move
896         the error check to the beginning.
897
898 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
899
900         * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
901         Remove cruft of the previous patch.
902
903 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
904
905         * metadata-verify.c (verify_method_table): Check for abstract + final.
906         Fixes #534175.
907
908 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
909
910         * verify.c (verify_class_fields): Check for duplicate fields.
911
912 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
913
914         * metadata-verify.c: Verify the typeref table for duplicates.
915
916 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
917
918         This reverts r140936 and properly handles interfaces with static methods. The
919         right fix is to ensure vtables without bubles which is an easier to verify
920         constraint. We should avoid such special cases as of the reverted patch as those
921         only make the runtime more brittle.
922
923         * class.c (mono_class_setup_vtable_general): Revert previous change that handle
924         static methods on interfaces.
925
926         * class.c (setup_interface_offsets): Use the number of virtual methods when
927         calculating interface offsets instead of the number of methods. This way we
928         avoid bubles on the layout.
929
930 2009-08-31  Rodrigo Kumpera  <rkumpera@novell.com>
931
932         * metadata-verify.c (verify_metadata_header): Some very smart
933         obfuscators like to add extra stream headers. Ignore them.
934
935 2009-08-30  Zoltan Varga  <vargaz@gmail.com>
936
937         * class.c (mono_class_setup_vtable_general): Verify interfaces with static
938         methods correctly.
939
940 2009-08-29  Rodrigo Kumpera  <rkumpera@novell.com>
941
942         * metadata-verify.c: Verify for duplicated types.
943
944 2009-08-28  Rodrigo Kumpera  <rkumpera@novell.com>
945
946         * metadata-verify.c (verify_typedef_table): Verify for nested types
947         without an entry on the nested class table.
948
949 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
950
951         * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
952         <tom_hindle@sil.org>. Add locking around hash table accesses.
953
954 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
955
956         * verify.c (mono_verifier_verify_class): Verify all interface if
957         really are interfaces. Fixes #534184.
958
959 2009-08-27  Rodrigo Kumpera  <rkumpera@novell.com>
960
961         * pedump.c: Initialize all types during metadata validation so we report
962         errors only detected as part of class initialization.
963
964 2009-08-26  Rodrigo Kumpera  <rkumpera@novell.com>
965
966         * metadata-verify.c (verify_method_table): PInvoke requires method to
967         be static. Fixes #534189
968
969 2009-08-26  Zoltan Varga  <vargaz@gmail.com>
970
971         * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
972         being NULL.
973
974 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
975
976         * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
977         for holes or bad methods. Fixes #525314.
978
979 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
980
981         * class.c (setup_interface_offsets): Don't allocate slot
982         for the same interface multiple times. This creates bubbles
983         that waster space and make vtable verification harder.
984
985         The same interface get a slot multiple times since we need
986         to get the closure of all implemented interfaces, which means
987         the same interface is reported multiple times.
988
989 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
990
991         * verify.c (mono_verifier_verify_class): Don't check the fields
992         of generic instances since the context on which they got expanded
993         might lead to false positives.
994
995         Such thing happens when a generic type is inflated in the context
996         of a generic method and the inflated type of a field turns into a
997         generic method argument, which causes the checking code to think
998         it's an invalid class when it's not.
999
1000 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
1001
1002         * verify.c (mono_type_is_valid_in_context): Verify if type
1003         is NULL and remove duplicate test.
1004
1005 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
1006
1007         * verify.c (mono_verifier_verify_class): Check fields for
1008         invalid generic arguments.
1009
1010 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
1011
1012         * class.c (verify_class_overrides): Verify if for static
1013         and non virtual methods.
1014
1015 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
1016
1017         * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
1018         Check for errors after retrieving the vtable.
1019
1020 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
1021
1022         * class.c (mono_class_setup_vtable_general): Verify
1023         if method overrides are valid before processing them.
1024
1025 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
1026
1027         * marshal.c (mono_array_to_lparray): Fix minimal build with
1028         cominterop disabled.
1029
1030         * marshal.c (mono_free_lparray): Same.
1031
1032 2009-08-21  Mark Probst  <mark.probst@gmail.com>
1033
1034         * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
1035         the hash function for the ares_htable.
1036
1037 2009-08-20  Rodrigo Kumpera  <rkumpera@novell.com>
1038
1039         * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
1040         bit for assembly flags. MS is ok with it but there is no spec anywhere
1041         on its mean
1042
1043 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1044
1045         * class.c (mono_class_create_from_typedef): Emit profiler events
1046         in all cases.
1047
1048 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1049
1050         * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
1051         Release memory on failure.
1052
1053 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1054
1055         * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
1056         to the internal API.
1057
1058         * metadata.c (get_constraints): Use a single-linked table as we don't
1059         traverse it backward. Fail and return FALSE if only of the contraint types
1060         is not found.
1061
1062         * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
1063         to mono_metadata_load_generic_param_constraints except for having a return value.
1064         This has to be done since the later is part of the public API.
1065
1066         * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
1067         and fail the type.
1068
1069         * loader.c (mono_get_method_from_token): Properly check the loading of constraints
1070         and fail the method.
1071
1072 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1073
1074         * metadata-verify.c (is_valid_method_header): Add work-around to deal
1075         with MS broken behavior of emmitting EH section sizes without the
1076         header size added.
1077
1078 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1079
1080         * metadata.c (mono_type_create_from_typespec): Don't allocate image
1081         memory until we're sure that we'll need it. This avoids leaking for
1082         broken types or duplicated instantiation.
1083
1084 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1085
1086         * metadata-verify.c (is_valid_method_header): Fix stupid formating
1087         mistake.
1088
1089 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1090
1091         * metadata-verify.c (is_valid_method_header): Fix number of clauses
1092         and expected size calculation.
1093
1094 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1095
1096         * class.c (mono_class_get_field_idx): Add fixme for broken
1097         behavior for types with multiple fields with the same name.
1098         I would rather fix it, but have no idea on how to generate
1099         such artifact for testing.
1100
1101 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1102
1103         * verify.c (verifier_load_field): We should allow references to
1104         fields to be made using the generic type definition. It's up to
1105         the loader system to fail invalid ops.
1106
1107         * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
1108         are invalid.
1109
1110 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1111
1112         * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
1113
1114         * metadata-internals.h: Fix declaration of 
1115         mono_metadata_interfaces_from_typedef_full.
1116
1117         * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
1118         heap_alloc_result parameter that controls if the result should be
1119         g_malloc'd.
1120
1121         * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
1122         array be g_malloc'd and properly document this public API function.
1123
1124 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1125
1126         * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
1127         remove METHOD_HEADER_TINY_FORMAT1.
1128
1129         * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
1130
1131         * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
1132
1133         Both spec and MS uses only 2 bits to enumerate the kind of header.
1134         So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
1135         is superfluous, only used for tiny headers with odd code lengths.
1136
1137         This change also make sure that mono doesn't wronly interpret bit 2
1138         of fat header flags, which is currently reserved.
1139
1140 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1141
1142         * metadata.c (do_mono_metadata_parse_type): Do error
1143         checking for element types. Don't abort if presented
1144         with a broken type kind.
1145
1146 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1147
1148         * metadata.c (mono_metadata_parse_method_signature_full):
1149         Gracefully fail bad vararg signatures.
1150
1151 2009-08-18  Christian Hergert  <chris@dronelabs.com>
1152
1153         * profiler.c:
1154         * class.c: Fix warnings for uninitialized variables.
1155
1156 2009-08-18  Christian Hergert  <chris@dronelabs.com>
1157
1158         * icall.c: Fix _NSGetEnviron method declaration warning.
1159
1160 2009-08-18  Christian Hergert  <chris@dronelabs.com>
1161
1162         * icall.c:
1163         * reflection.c: Make bitwise checks explicit.
1164
1165 2009-08-18  Christian Hergert  <chris@dronelabs.com>
1166
1167         * debug-helpers.c:
1168         * marshal.c: Fix printf warnings.
1169
1170 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
1171
1172         * reflection.c (encode_cattr_value): Fix a warning.
1173
1174 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1175
1176         * metadata.c (mono_metadata_parse_array_full): Fix memory leak
1177         of array bounds.
1178
1179 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1180
1181         * loader.c (mono_method_signature): Don't assert on broken
1182         signature. Print a more useful error message.
1183
1184 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1185
1186         * loader.c (mono_method_get_marshal_info): Assert if
1187         signature is invalid. Bounds check stores to the
1188         mspecs array;
1189
1190 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1191
1192         * loader.c (field_from_memberref): Fix warning.
1193
1194 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1195
1196         * loader.c (mono_method_get_param_names): Check if signature
1197         is null. Don't store beyond the size of the name array.
1198
1199 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1200
1201         * loader.c (mono_get_method_constrained): Check if signature
1202         is null.
1203
1204 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1205
1206         * loader.c (mono_loader_set_error_bad_image): Improve
1207         error messages.
1208
1209 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1210
1211         * loader.c (mono_get_method_full): Convert an assertion
1212         into a loader error.
1213
1214 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
1215
1216         * class-internals.h, class.c: Better naming and documentation.
1217
1218 2009-08-17  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
1221         obj is NULL.
1222
1223 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
1224
1225         * loader.c (mono_method_get_signature_full): Fail gracefully if signature
1226         parsing fails.
1227
1228 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
1229
1230         * loader.c (mono_loader_error_prepare_exception): Handle missing field
1231         errors with no class set.
1232
1233         * loader.c (field_from_memberref): If the field signature is of the wrong
1234         type fail with a MissingFieldException instead of a BadImageException as
1235         this is the behavior observed on MS. 
1236
1237 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
1238
1239         * loader.c (field_from_memberref): Don't crash if either the field
1240         signature or the typespec class are invalid.
1241
1242 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
1243
1244         * verify.c (verifier_load_field): Don't allow field related
1245         ops to reference fields on generic type definition.
1246
1247 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
1248
1249         * metadata-verify.c: Add new warning level for errors specified
1250         by ECMA 335 but that MS ignores.
1251
1252         * metadata-verify.c (verify_method_table): Make compiler controled
1253         visibility + (rt)specialname error a warning as MS ignores this. Ignoring
1254         this check is safe because the end result will only be some visibility
1255         exceptions been thrown.
1256
1257 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
1258
1259         * verify.c (get_boxable_mono_type): Don't allow the
1260         use of the generic type definition on boxed type positions.
1261
1262         Fixes #531237.
1263
1264 2009-08-14  Mark Probst  <mark.probst@gmail.com>
1265
1266         * threadpool.c: Make sure no cross-domain references remain in
1267         ares_htable or the arrays that are thrown away when resizing.
1268
1269 2009-08-14  Mark Probst  <mark.probst@gmail.com>
1270
1271         * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
1272         list of classes for which we have to unregister reflection_info
1273         with the GC and which are not in the namespace cache.
1274
1275         * reflection.c (mono_reflection_initialize_generic_parameter): Add
1276         the class to the list.
1277
1278 2009-08-14  Mark Probst  <mark.probst@gmail.com>
1279
1280         * domain.c (mono_domain_free): Unregister the GC roots in
1281         MonoDomain.
1282
1283 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
1284
1285         * reflection.c (mono_reflection_type_get_handle): Fix typo.
1286
1287 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
1288
1289         * class.c: Add mono_class_get_field_from_name_full which does
1290         the same as mono_class_get_field_from_name but does check field
1291         signature as well.
1292
1293         * class-internals.h: Export mono_class_get_field_from_name_full as
1294         part of the internal API.
1295
1296         * loader.c (field_from_memberref): Search fields by name and signature
1297         as it's valid to have two fields with same name but different types.
1298
1299         Fixes #528055.
1300
1301 2009-08-10  Rodrigo Kumpera  <rkumpera@novell.com>
1302
1303         * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
1304
1305         * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
1306
1307         * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
1308         System.Type.
1309
1310 2009-08-13  Zoltan Varga  <vargaz@gmail.com>
1311
1312         * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
1313
1314         * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
1315
1316 2009-08-12  Mark Probst  <mark.probst@gmail.com>
1317
1318         * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
1319         to sgen-scan-object.h, which can be included and parameterized via
1320         macros.
1321
1322         * Makefile.am: sgen-scan-object.h added.
1323
1324 2009-08-12  Mark Probst  <mark.probst@gmail.com>
1325
1326         * gc.c: #define GC_dont_gc if we're compiling with SGen.
1327
1328 2009-08-12  Mark Probst  <mark.probst@gmail.com>
1329
1330         * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
1331         before clearing a domain in the GC.
1332
1333 2009-08-12  Mark Probst  <mark.probst@gmail.com>
1334
1335         * exception.c (mono_exception_from_name_domain): Actually create
1336         the exception in the specified domain.
1337
1338         * appdomain.c (mono_domain_create_appdomain_internal): Create the
1339         OutOfMemoryException a bit later so that the domain is inialized
1340         "enough" that it works.
1341
1342 2009-08-12  Mark Probst  <mark.probst@gmail.com>
1343
1344         * threads.c (thread_cleanup): Clean up the cached_culture_info
1345         array to prevent cross-domain references.
1346
1347 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1348
1349         * metadata.c: more documentation for MonoType accessors.
1350
1351 2009-08-11  Raja R Harinath  <harinath@hurrynot.org>
1352
1353         Fix incorrect size definitions where the tail array isn't a list
1354         of pointers
1355         * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
1356         define size.
1357         * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
1358         * metadata.h (MONO_SIZEOF_TYPE): Likewise.
1359         * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
1360
1361 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1362
1363         * reflection.h:
1364         * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
1365
1366 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1367
1368         * metadata.c:
1369         * loader.c:
1370         * metadata-internals.h:
1371         * method-builder.c:
1372         * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
1373
1374 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1375
1376         * cominterop.c:
1377         * metadata.c:
1378         * metadata.h:
1379         * loader.c:
1380         * marshal.c:
1381         * reflection.c: #define for sizeof in MonoType and
1382         MonoMethodSignature.
1383
1384 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1385
1386         * domain.c:
1387         * domain-internals.h: add and use #define's instead of sizeof()
1388         for MonoJitInfo and MonoJitInfoTable.
1389
1390 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1391
1392         * object.c:
1393         * class.h: use #define instead of sizeof() for MonoRemoteClass.
1394
1395 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1396
1397         * metadata.c:
1398         * metadata.h:
1399         * object.c:
1400         * class-internals.h:
1401         * generic-sharing.c:
1402         * marshal.c: use a #define instead of sizeof() for a few
1403         structures that use a zero-length array.
1404
1405 2009-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1406
1407         * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
1408         to handle inflated generic methods.
1409
1410         * appdomain.c: Bump corlib version.
1411
1412         * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
1413         instances.
1414
1415         * reflection.c (fixup_method): Same
1416
1417         * reflection.c (resolve_object): Same.
1418
1419         * reflection.c (inflate_method): Replace a g_assert_not_reached with a
1420         g_error and a decent message.
1421
1422 2009-08-06  Massimiliano Mantione  <massi@ximian.com>
1423
1424         * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
1425         from the object because it could not yet be available globally
1426         (it happens if the profiler tries to create a gchandle on the
1427         MonoThread object of a thread that is still registering itself
1428         with the runtime).
1429
1430 2009-08-04  Rodrigo Kumpera  <rkumpera@novell.com>
1431
1432         * reflection.c (mono_generic_class_get_object): Initialized the
1433         managed type arguments array.
1434
1435         * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
1436
1437         * appdomain.c: Bump corlib version.
1438
1439 2009-08-04  Zoltan Varga  <vargaz@gmail.com>
1440
1441         * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
1442         #527902.
1443
1444 2009-08-03  Zoltan Varga  <vargaz@gmail.com>
1445
1446         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
1447         Avoid a crash if synch_cs is not set.
1448         
1449         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
1450         Handle the case when the handle is 0.
1451
1452         * appdomain.c: Bump corlib version.
1453
1454 2009-08-02  Zoltan Varga  <vargaz@gmail.com>
1455
1456         * reflection.c (mono_type_get_object): Fix a warning.
1457
1458 2009-08-01  Mark Probst  <mark.probst@gmail.com>
1459
1460         * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
1461         descriptor here.  We assume it's already been computed.
1462
1463         * generic-sharing.c (instantiate_other_info): Compute the GC
1464         descriptor for info type MONO_RGCTX_INFO_KLASS.
1465
1466 2009-08-01  Mark Probst  <mark.probst@gmail.com>
1467
1468         * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
1469         type, so don't use MONO_OBJECT_SETREF to set a field.
1470
1471 2009-08-01  Mark Probst  <mark.probst@gmail.com>
1472
1473         * gc.c: We were missing one case where invoking a finalizer would
1474         not reset the domain.  Also, in the finalizer thread loop, assert
1475         that we're in the root domain.
1476
1477 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
1478
1479         * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
1480         if the type is not an array.
1481
1482 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
1483
1484         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
1485         method bound to the declaring type of the method. Raise an exception
1486         if the type is not a generic param.
1487
1488 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
1489
1490         * class.c (print_unimplemented_interface_method_info): Print the
1491         full type name.
1492
1493         * class.c (mono_class_setup_vtable_general): When dealing with a
1494         generic instance first check if the generic type definition is
1495         not broken.
1496
1497 2009-02-11 Tom Hindke <tom_hindle@sil.org>
1498
1499         * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
1500
1501         * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
1502
1503         * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
1504
1505         * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
1506
1507         * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
1508
1509         Code is contributed under MIT/X11 license
1510
1511 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
1512
1513         * verify.c: Fix naming of stelem and ldelem.
1514
1515 2009-07-30  Mark Probst  <mark.probst@gmail.com>
1516
1517         * generic-sharing.c: Replace the templates lock with the loader
1518         lock because of very hard to resolve deadlock issues.
1519
1520 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
1521
1522         * icall.c (ves_icall_Type_GetMethodsByName): Use 
1523         mono_class_get_vtable_size () instead of accessing klass->vtable_size
1524         directly. Fixes #525338.
1525
1526         * class.c (mono_class_get_vtable_size): New helper function.
1527
1528         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
1529         the field belongs to the type. Fixes #525733.
1530
1531 2009-07-30  Mark Probst  <mark.probst@gmail.com>
1532
1533         * sgen-gc.c: When we stop a thread and its stack top is not within
1534         its allocated stack (because it's in an altstack signal handler),
1535         restart it and stop it again, until it is.
1536
1537 2009-07-30  Mark Probst  <mark.probst@gmail.com>
1538
1539         * sgen-gc.c: Take a thread's stack top and registers from the
1540         sigcontext in the suspend signal handler.
1541
1542         * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
1543         stuff to sgen-archdep.h.
1544
1545         * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
1546         caller, because have code in sgen-archdep.h to acquire that data.
1547
1548 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
1549
1550         * profiler.c, profiler.h, profiler-private.h:
1551         Added support for keeping track of code chunks and buffers.
1552
1553 2009-07-29 Rodrigo Kumpera  <rkumpera@novell.com>
1554
1555         * metadata-verify.c: Fix endianness problems on decoding functions.
1556         Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
1557
1558 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
1559
1560         * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
1561         schema for vectors and one dimension SZARRAY.
1562
1563 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
1564
1565         * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
1566         schema for vectors and one dimension SZARRAY.
1567
1568 2009-07-27  Mark Probst  <mark.probst@gmail.com>
1569
1570         * icall-def.h, thread-types.h, threads.c: New separate icalls for
1571         Interlocked.(Compare)Exchange with object arguments, which invoke
1572         write barriers.
1573
1574 2009-07-26  Miguel de Icaza  <miguel@novell.com>
1575
1576         * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
1577         passed invalid arguments.   Fixes another crasher in the
1578         Silverlight test suite.
1579
1580         * class.c (mono_class_array_element_size): Return 0 for the size
1581         of the class;  This fixes the crasher exposed by :
1582
1583         typeof (void).MakeArrayType ();
1584
1585         * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
1586         if there is no method to dereference.    Put all the code that
1587         depends on this inside the if (method) block.
1588
1589         This fixes the crasher exposed by Microsoft's Silvelright CLR test
1590         suite  ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
1591
1592         With this change, we pass the test.
1593         
1594         * reflection.c (mono_reflection_sighelper_get_signature_local):
1595         Only dereference the assembly if it has been set.    Fixes a
1596         crasher exposed by #525328
1597
1598 2009-07-25  Mark Probst  <mark.probst@gmail.com>
1599
1600         * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
1601         don't perform the store in mono_gc_wbarrier_generic_nostore().
1602         Remove the second argument (value), which is not needed.
1603
1604 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
1605
1606         * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
1607         the build.
1608
1609         * boehm-gc.c: Ditto.
1610         
1611 2009-07-24  Mark Probst  <mark.probst@gmail.com>
1612
1613         * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
1614         not perform the store itself.  Introduce
1615         mono_gc_wbarrier_generic_nostore(), which is the same as
1616         mono_gc_wbarrier_generic_store(), except it doesn't perform the
1617         store.
1618
1619 2009-07-24  Mark Probst  <mark.probst@gmail.com>
1620
1621         * icall.c (ves_icall_System_Array_SetGenericValueImpl):
1622         mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
1623         we still need the memcpy().
1624
1625 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1626
1627         * sgen-gc.c: Align array bounds calculation to mono_array_size_t
1628         so that big arrays are handled correctly.  Always use
1629         safe_object_get_size() to calculate array object sizes, which
1630         takes bounds into account.
1631
1632 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1633
1634         * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
1635         GC descriptor is computed before we use it.
1636
1637 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1638
1639         * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
1640         write barrier if necessary.
1641
1642 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1643
1644         * icall-def.h, icall.c, thread-types.h: New separate icall for
1645         VolatileWrite(object&,object) that uses a write barrier.
1646
1647         * console-unix.c, file-io.c, icall.c, threads.c: Use write
1648         barriers in icalls which write to "ref" or "out" arguments.
1649
1650 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
1653         handler in a separate icall, to reduce the size of the wrappers.
1654
1655 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
1656
1657         * metadata-verify.c (is_valid_typespec_blob): Fix error message.
1658
1659 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
1660
1661         * metadata-verify.c (parse_field): Allow byref field.
1662
1663         * metadata-verify.c (parse_locals_signature): Allow byref locals.
1664
1665         * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
1666
1667 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
1668
1669         * verify.c (do_cast): Fail for any non reference type that isn't boxed.
1670         Fixes #522784.
1671
1672 2009-07-20  Robert Jordan  <robertj@gmx.net>
1673
1674         * cominterop.c (cominterop_get_managed_wrapper_adjusted):
1675         Fix invalid IL in valuetype handling (STOBJ must push the
1676         corresponding class). Fixes bug #523149.
1677
1678         Code is contributed under MIT/X11 license.
1679
1680 2009-07-20  Geoff Norton  <gnorton@novell.com>
1681
1682         * gc.c: Use proper semaphores where available on posix and darwin.
1683
1684 2009-07-19  Geoff Norton  <gnorton@novell.com>
1685
1686         * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
1687
1688 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
1689
1690         * refletion.c (is_sre_usertype): Change name to is_usertype and
1691         invert it's result so it returns true if the type is an user type
1692         and not the opposite.
1693
1694         * reflection.c (is_*_type): Change all of those to use new macro
1695         check_corlib_type_cached that cached the type lookup so we don't
1696         need to do string comparisons all the type. Changed the signature
1697         to take a MonoClass instead.
1698
1699         * reflection.c: Change mono_image_create_token and resolve_object
1700         to use is_sre_* functions.
1701
1702 2009-07-18  Mark Probst  <mark.probst@gmail.com>
1703
1704         * sgen-gc.c: Check for writes to the stack in the managed
1705         wbarrier as well.
1706
1707 2009-07-18  Mark Probst  <mark.probst@gmail.com>
1708
1709         * sgen-gc.c: When a thread is unregistered, don't free its remsets
1710         but put them on a list which is processed with the other thread's
1711         remsets.
1712
1713 2009-07-18  Mark Probst  <mark.probst@gmail.com>
1714
1715         * sgen-gc.c: Fix and enable the internal allocator instead of
1716         using malloc/free (which causes deadlocks).
1717
1718 2009-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
1719
1720         * refletion.c: Fix builds with SRE disabled by adding a minimal
1721         implementation of mono_reflection_type_get_handle.
1722
1723 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
1724
1725         * refletion.c: Make mono_reflection_type_get_handle non static.
1726
1727         * object-internals.h: Export mono_reflection_type_get_handle.
1728
1729         * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
1730         unmanaged handle using mono_reflection_type_get_handle.
1731
1732 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
1733
1734         * refletion.c: Replace all reads of MonoReflectionType::type with
1735         calls to mono_reflection_type_get_handle. Only the functions that
1736         deal with constructing TypeBuilder::type have not been changed
1737         because they have to deal with NULL values.
1738
1739         This is a first step into supporting reflection types that don't
1740         map directly into their unmanaged counterpart.
1741
1742 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
1743
1744         * metadata-verify.c (parse_locals_signature): Don't complain
1745         on signature with zero locals since MS generates it and doesn't
1746         bother with.
1747
1748 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
1749
1750         * reflection.c (mono_image_get_array_token): Resolve return
1751         type using mono_reflection_type_get_handle.
1752
1753         * reflection.c (mono_image_get_array_token): Resolve array method
1754         parent type using mono_reflection_type_get_handle.
1755
1756 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
1757
1758         * reflection.c (mono_image_basic_init): Applied patch from
1759         <Dax@daxxfiles.net>. Set the public key token from the assembly
1760         builder. Fixes #518909.
1761
1762         * appdomain.c: Bump corlib version.
1763
1764 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
1765
1766         * class.c (mono_class_needs_cctor_run): Make this return false if
1767         the class has no cctor.
1768
1769 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1770
1771         * sgen-gc.c: When the minor GC needs to allocate a new section,
1772         invoke the major GC afterwards.
1773
1774 2009-07-14  Bill Holmes  <billholmes54@gmail.com>
1775
1776         * process.c  (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
1777           Applying the window_style field to the SHELLEXECUTEINFO struct.
1778
1779         Code is contributed under MIT/X11 license.
1780
1781 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1782
1783         * sgen-gc.c: Fix the race condition in the unmanaged allocator by
1784         locking earlier.  Fix it in the managed allocator by making sure
1785         that no thread is stopped there before the GC runs.  If we do stop
1786         a thread there, we restart it and let it run a but, until it stops
1787         somewhere else.
1788
1789         * gc-internal.h, gc.c: Function for getting the IP from a signal
1790         context via a function registered by mini.
1791
1792 2009-07-11  Zoltan Varga  <vargaz@gmail.com>
1793
1794         * object-internals.h (MonoIntPtr): New structure describing a boxed
1795         IntPtr.
1796
1797         * object.c (mono_runtime_invoke_array): Handle ptr arguments and
1798         returns. Fixes #519953.
1799
1800         * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
1801
1802 2009-07-09  Mark Probst  <mark.probst@gmail.com>
1803
1804         * class-internals.h, generic-sharing.c: New RGCTX info type for
1805         getting a remoting invoke with check wrapper.
1806
1807 2009-07-07  Geoff Norton  <gnorton@novell.com>
1808
1809         * icall-def.h: Fix the enable-minimal build.
1810
1811 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1812
1813         * object-internals.h: Add MonoReflectionDerivedType.
1814
1815         * reflection.c: Implement support for PointerType.
1816         Fixed tons of warnings.
1817
1818 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1819
1820         * object-internals.h: Add MonoReflectionByRefType.
1821
1822         * reflection.c: Implement support for ByRefType.
1823
1824 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1825
1826         * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
1827
1828         * object-internals.h: Add MonoReflectionArrayType and
1829         mono_reflection_create_unmanaged_type.
1830
1831         * reflection.c: Implement support for ArrayType.
1832
1833 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1834
1835         * metadata-verify.c (is_valid_method_header): Parse EH block
1836         flags correctly.
1837
1838 2009-07-03  Mark Probst  <mark.probst@gmail.com>
1839
1840         * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
1841         processing the disappearing links, and process disappearing links
1842         in a loop until no new objects are copied.
1843
1844 2009-07-03  Mark Probst  <mark.probst@gmail.com>
1845
1846         * object.c (handle_enum): Invoke the write barrier when copying
1847         value type instances.
1848
1849         * sgen-gc.c: Register remsets for unmanaged write barriers only
1850         when the address written to is actually on the heap.  This makes
1851         set_value() in object.c work without requiring that the result be
1852         on the heap.
1853
1854 2009-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
1855
1856         The runtime wrappers are all bound to a given type that must
1857         exist in the same image. For regular images we use the <Module>
1858         type, which is required to exist for all images.
1859
1860         The <Module> type can't be used for dynamic images because it
1861         might not exist at the time the wrapper is required, so we create
1862         a synthetic type to use instead.
1863
1864         The current code works because of the 2 stage setup of MonoClass,
1865         but once this is gone it will no longer work.
1866
1867         * icall-def.h: Add ModuleBuilder::set_wrappers_type.
1868
1869         * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
1870
1871         * object-internals.h: Export mono_image_set_wrappers_type icall
1872         as part of the internal API.
1873
1874         * marshal.c (get_wrapper_target_class): If the image is dynamic,
1875         use MonoDynamicImage::wrappers_type instead of the <Module> type.
1876
1877         reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
1878         image wrappers_type to the provided value.
1879
1880 2009-07-01 Rodrigo Kumpera  <rkumpera@novell.com>
1881
1882         * appdomain.c (deregister_reflection_info_roots): No need
1883         to use the image lock here.
1884
1885 2009-07-02  Mark Probst  <mark.probst@gmail.com>
1886
1887         * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
1888
1889 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
1890
1891         * threads.c: Store the thread start argument in a hash table instead of
1892         registering it as a root, as libgc doesn't support unregistering roots
1893         under windows, leading to 'too many root sets' errors when many threads
1894         are created.
1895
1896         * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
1897         shutdown, they can still be referenced by the other dying objects.
1898         Fixes #514506.
1899
1900 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1901
1902         * socket-io.c: DontLinger does not allow LingerOptions.
1903
1904 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1905
1906         * metadata-verify.c: The spec doesn't mention that it's possible to add
1907         custom attribute to a generic parameter. Fixed.
1908
1909 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1910
1911         * class.c (inflate_generic_type): Don't crash while trying to output a message
1912         on why we're aborting.
1913
1914 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1915
1916         * socket-io.c: DontLinger can take an int or a boolean too.
1917
1918 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1919
1920         * gc.c: check for a null argument to SuppressFinalize () and
1921         ReRegisterForFinalize ().
1922
1923 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1924
1925         * loader.c (method_from_methodspec): Call into the verifier to check
1926         the signature.
1927
1928         * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1929
1930         * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1931         part of the internal API.
1932
1933 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1934
1935         * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1936         the signature.
1937
1938         * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1939
1940         * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1941         part of the internal API.
1942
1943 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1944
1945         * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1946         the signature.
1947
1948         * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1949         blob verification.
1950
1951         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1952         part of the internal API.
1953
1954 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1955
1956         * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1957         when doing basic verification. 
1958
1959         This check must be done since the runtime peeks into signatures in much
1960         more places than it does decoding so it makes sense to ensure that all
1961         pointers to blob objects are well formed.
1962
1963 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1964
1965         * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1966         Use proper overflow dectection. Fix usage of it.
1967
1968 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1969
1970         * loader.c (field_from_memberref): Call into the verifier to check
1971         the signature.
1972
1973         * loader.c (mono_method_get_signature_full): Same.
1974
1975         * loader.c (method_from_memberref): Same.
1976
1977         * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1978
1979         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1980         part of the internal API.
1981
1982 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1983
1984         * threadpool.c (mono_thread_pool_add): If the domain is unloading
1985         or unloaded, still return an AsyncResult, but don't add it to the
1986         threadpool.
1987
1988 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1989
1990         * threads.c: fix missing colon when DEBUG is defined.
1991
1992 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1993
1994         * threadpool.c: Don't add new calls to a threadpool if the domain
1995         of the call is unloading or unloaded.  When dequeuing a job, null
1996         the reference in the queue.
1997
1998 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1999
2000         * sgen-gc.c (null_link_in_range): Add the dislink for the old
2001         generation if an object was moved.
2002
2003 2009-06-25  Sylvain Dupont <duposyl@gmail.com>
2004
2005         * cominterop.h cominterop.c marshal.c: Added support for marshalling out 
2006           parameters of type SAFEARRAY[VARIANT].
2007
2008         * reflection.c (encode_marshal_blob): Properly generate element type
2009           (SafeArraySubType marshal attribute option).
2010
2011         Code is contributed under MIT/X11 license.
2012
2013 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
2014
2015         * reflection.c: in mono_method_clear_object () really ensure all the
2016         objects are removed.
2017
2018 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
2019
2020         * loader.c (mono_method_signature): Call into the verifier to check
2021         the method signature.
2022
2023         * metadata-verify.c (verify_method_table): Move signature verification
2024         to verify_method_table_full.
2025
2026         * metadata-verify.c: Add mono_verifier_verify_method_signature.
2027
2028         * verify-internals.h: Export mono_verifier_verify_method_signature as
2029         part of the internal API.
2030
2031 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
2032
2033         * loader.c (mono_method_get_header): Call into the verifier to
2034         check the method header.
2035
2036         * metadata-verify.c: Add mono_verifier_verify_method_header.
2037
2038         * verify-internals.h: Export mono_verifier_verify_method_header as
2039         part of the internal API.
2040
2041 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
2042
2043         * class.c (mono_class_find_enum_basetype): Call into the verifier to
2044         check the field signature. Replace an assert with an explicit check.
2045
2046         * class.c (mono_class_setup_fields): Call into the verifier to check
2047         the field signature.
2048
2049         * metadata-verify.c: Add mono_verifier_verify_field_signature.
2050
2051         * verify-internals.h: Export mono_verifier_verify_field_signature as
2052         part of the internal API.
2053
2054 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
2055
2056         * class.c (mono_class_find_enum_basetype): Simplify this function
2057         by moving code outside of the loop and not decoding static fields.
2058
2059 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
2060
2061         * metadata-verify.c (verify_typedef_table): Check the extends
2062         token here. Move to here a flags check from verify_typedef_table_full.
2063
2064 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
2065
2066         * metadata-verify.c (is_valid_method_header): Fix a warning.
2067
2068         * metadata-internals.h (MonoImage): Remove the unused 
2069         static_rgctx_invoke_wrapper_cache.
2070
2071         * image.c marshal.c: Ditto.
2072
2073 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
2074
2075         * image.c (do_mono_image_load): Enable table data verification.
2076
2077 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
2078
2079         * metadata-verify.c (is_valid_constant): Fix nullref check.
2080
2081 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
2082
2083         * metadata-verify.c (is_valid_constant): Fix string bounds check.
2084
2085 2009-06-22  Mark Probst  <mark.probst@gmail.com>
2086
2087         * sgen-gc.c: Managed allocation with pthreads TLS.
2088
2089         * threads.c, threads-types.h: Functions for the JIT to tell the
2090         runtime whether it supports the MONO_TLS opcode.
2091
2092 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
2093
2094         * metadata-verify.c (verify_param_table): Fix a crash for assemblies
2095         without methods.
2096
2097 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
2098
2099         * metadata-verify.c (is_valid_constant): Fix the string length check.
2100         Use safe overflow checking. Add decent error messages.
2101
2102 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
2103
2104         * metadata-verify.c: Move remaininh blob checks to the offline
2105         verification path.
2106
2107 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
2108
2109         * metadata-verify.c: Move more blob checks to the offline verification
2110         path.
2111
2112 2009-06-22  Bill Holmes  <billholmes54@gmail.com>
2113
2114         * object-internals.h : Adding interrupt_on_stop field.
2115
2116         * threads.c (mono_thread_request_interruption) : On Windows exit the
2117           thread if interrupt_on_stop is set.
2118
2119         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
2120          Removing old interrupt logic and setting the interrupt_on_stop for the
2121          thread when calling accept.
2122
2123         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
2124          setting the interrupt_on_stop for the thread when calling accept.
2125
2126         Contributed under MIT/X11 license.
2127
2128 2009-06-20  Martin Baulig  <martin@ximian.com>
2129
2130         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
2131
2132 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
2133
2134         * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
2135         running in no-exec mode.
2136
2137 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2138
2139         * metadata-verify.c (verify_method_table): Move header
2140         checking to verify_method_table_full.
2141
2142         * metata-verify.c (mono_verifier_verify_full_table_data):
2143         Call verify_method_table_full.
2144
2145 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2146
2147         * metadata-verify.c (verify_field_table): Move signature
2148         checking to verify_field_table_full.
2149
2150         * metata-verify.c (mono_verifier_verify_full_table_data):
2151         Call verify_field_table_full.
2152
2153 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2154
2155         * metadata-verify.c (verify_typedef_table): Move remaining
2156         stuff to verify_typedef_table_full.
2157
2158 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2159
2160         * metadata-verify.c: Kill is_corlib from VerifyContext.
2161         It is only used by the offline mode.
2162         So we better remove it from the runtime path.
2163
2164 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2165
2166         * metadata-verify.c: Add new mono_verifier_verify_full_table_data
2167         function that perform the offline metadata verification steps.
2168
2169         * metadata-verify.c (verify_typedef_table): Move some checks to
2170         verify_typedef_table_full and make it been called by new function
2171         mono_verifier_verify_full_table_data.
2172
2173         * pedump.c: Call mono_verifier_verify_full_table_data.
2174
2175         * verify-internals.h: Export mono_verifier_verify_full_table_data as
2176         part of the internal API.
2177
2178 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2179
2180         * metadata-verify.c (typedef_is_system_object): Fix System.Object
2181         check.
2182
2183         * metadata-verify.c (verify_implmap_table): Fix implmap invalid
2184         flags bits. SupportLastError was confused as bit 7 instead of 6.
2185
2186         * metadata-verify.c (verify_implmap_table): Fix import scope verification
2187         to check against the module ref table instead of module.
2188
2189         * metadata-verify.c (verify_implmap_table): Fix corlib check.
2190
2191         * pedump.c: Call mono_image_load_names.
2192
2193 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
2194
2195         * image.c: Extract mono_image_load_names from do_mono_image_load.
2196
2197         * metadata-internals.h: Export mono_image_load_names as part of
2198         the internal API.
2199         
2200 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
2201
2202         * metadata.c (mono_metadata_cleanup): Free the generic method cache
2203         first, as it could reference data in the other caches.
2204
2205 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
2206
2207         * metadata-verify.c: Finished with method header verification.
2208
2209 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
2210
2211         * metadata-verify.c: Added more header verification code.
2212         Now only EH clauses are missing.
2213
2214 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
2215
2216         * marshal.c (get_runtime_invoke_type): Don't share primitive types
2217         for return values.
2218
2219 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
2220
2221         * metadata-verify.c: Initial method header verification.
2222
2223 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
2224
2225         * metadata-verify.c (verify_import_table): The IAT contents
2226         might end been patched by the windows DL when running with
2227         coree enabled.
2228
2229 2009-06-15 Rodrigo Kumpera  <rkumpera@novell.com>
2230
2231         * class.c (mono_class_from_typeref): If the enclosing type is not
2232         found return null instead of crashing. Fixes #508487.
2233
2234 2009-06-15  Atsushi Enomoto  <atsushi@ximian.com>
2235
2236         * normalization-tables.h : updated to the latest unicode charcter
2237           data.
2238         * appdomain.c : bump corlib version.
2239
2240 2009-06-14  Zoltan Varga  <vargaz@gmail.com>
2241
2242         * class.c (mono_class_from_name): Fix support for assembly references
2243         in the EXPORTEDTYPE table. Fixes #511704.
2244
2245 2009-06-13  Geoff Norton  <gnorton@novell.com>
2246
2247         * domain.c: Ensure that mono_domain_assembly_open actually opens the
2248         assembly in the target domain.
2249
2250 2009-06-12  Robert Jordan  <robertj@gmx.net>
2251
2252         * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
2253         because "this" of the managed signature has become an
2254         ordinary parameter in the unmanaged signature.
2255
2256 2009-06-12  Zoltan Varga  <vargaz@gmail.com>
2257
2258         * class-internals.h (struct _MonoGenericContainer): Add an 'image'
2259         field for owner-less generic containers.
2260
2261         * reflection.c (mono_reflection_initialize_generic_parameter): Set the
2262         image field of the owner-less generic containers created here.
2263
2264         * metadata.c (mono_metadata_load_generic_params): Ditto, the
2265         contain is ownerless until the caller sets its owner.
2266
2267         * metadata.c (type_in_image): Handle owner-less generic containers
2268         correctly.
2269         
2270 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
2271
2272         * image.c (mono_image_close): Support debug_assembly_unload for
2273         dynamic images too.
2274
2275 2009-06-11 Andrés G. Aragoneses  <aaragoneses@novell.com>
2276
2277         * class.c: Fix some typos in comments.
2278
2279 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
2280
2281         * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
2282
2283         * threads.c (mono_thread_execute_interruption): Avoid creating the
2284         abort exception object while holding the synch_cs lock.
2285
2286 2009-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
2287
2288         * metadata-verify.c: Verify basic cattr content.
2289
2290 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
2291
2292         * reflection.c (add_exported_type): Don't set the FORWARDER flag on
2293         nested types.
2294         
2295         * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
2296         support for nested types. Fixes #511704.
2297
2298 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
2299
2300         * metadata-verify.c: Verify methodspec signatures.
2301
2302 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
2303
2304         * metadata-verify.c: Verify typespec signatures.
2305
2306 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
2307
2308         * metadata.c (free_inflated_method): Call 
2309         mono_marshal_free_inflated_wrappers (), which was missed earlier.
2310
2311 2009-06-08  Miguel de Icaza  <miguel@novell.com>
2312
2313         * mono-config.c: Small change to report the PPC64/ILP32 model.
2314
2315 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
2316
2317         * metadata-verify.c (parse_type): Check szarray.
2318
2319 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
2320
2321         * metadata-verify.c (parse_type): Check fnptr.
2322
2323 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
2324
2325         * metadata-verify.c (parse_type): Check generic instances.
2326
2327 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
2328
2329         * metadata-verify.c (parse_type): Check array shape.
2330
2331 2009-06-05  Robert Jordan  <robertj@gmx.net>
2332
2333         * class.c (mono_class_create_from_typedef): Check only for
2334         mscorlib's System.Array.
2335
2336 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
2337
2338         * metadata-verify.c (parse_type): Check pointer, class/valuetype
2339         and generic params. 
2340
2341         * metadata-verify.c (parse_field): Check the signature.
2342
2343 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
2344
2345         * metadata-verify.c: Implement locals signature check.
2346
2347 2009-06-04  Marek Safar  <marek.safar@gmail.com>
2348
2349         * domain.c: Add .NET 4.0 Beta 1 version.
2350
2351 2009-06-04  Bill Holmes  <billholmes54@gmail.com>
2352
2353         * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
2354           For QueryInterface on CCWs consider the base class
2355           interfaces as well.
2356
2357         Code is contributed under MIT/X11 license.
2358
2359 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
2360
2361         * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
2362
2363         * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
2364         used.
2365
2366         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
2367         adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
2368
2369         * generic-sharing.c (inflate_other_data): Ditto.
2370         
2371 2009-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
2372
2373         * metadata-verify.c: Implement property signature check.
2374
2375 2009-06-04  Mark Probst  <mark.probst@gmail.com>
2376
2377         * sgen-gc.h: Register saving support for PPC.
2378
2379 2009-06-04  Mark Probst  <mark.probst@gmail.com>
2380
2381         * sgen-gc.c: Fixed a pthread TLS screwup.
2382
2383 2009-06-04  Mark Probst  <mark.probst@gmail.com>
2384
2385         * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
2386         supported.
2387
2388 2009-06-04  Mark Probst  <mark.probst@gmail.com>
2389
2390         * sgen-gc.c: Disable TLA and managed allocation if the __thread
2391         keyword is not supported.
2392
2393 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
2394
2395         * marshal.c metadata.c: Applied patch from Ulrich Weigand 
2396         <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
2397         the inflated method is freed. Fixes #508389.
2398
2399         The code is contributed under the MIT/X11 license.
2400         
2401 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
2402
2403         * marshal.c (get_wrapper_target_class): New helper function.
2404         (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
2405         the <Module> class of the image. Fixes #509049.
2406
2407 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
2408
2409         * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
2410         Check if the thread was interrupted and proccess it straight away.
2411         Makes abortion much more responsive.
2412
2413 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
2414
2415         * threads.c (mono_thread_execute_interruption): Use atomic cas with
2416         MonoThread::interruption_requested to match it's counterpart.
2417
2418         Fixes a hang in abort-stress-1 on a 2 core x86.
2419
2420         * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2421         Fix warning.
2422
2423 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
2424
2425         Change MonoImage::name_cache to be protected by the image lock
2426         instead of the loader lock.
2427
2428         * appdomain.c (deregister_reflection_info_roots): Protect access
2429         to name_cache.
2430
2431         * class.c (mono_image_init_name_cache): Change from the loader lock
2432         to the image lock. Check if the cache wasn't already created.
2433
2434         * class.c: Change from the loader to the image lock.
2435
2436         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
2437         the code to hold the image lock while iterating over name_cache and
2438         not go into mono_array_new holding it.
2439
2440         * metadata-internals.h: Add a comment about this change.
2441
2442 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
2443
2444         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2445         Under the 2.0 profile raise the loader error.
2446
2447         Fixes #508532.
2448
2449 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
2450
2451         * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
2452         of ldind opcode for generic instances so we don't fail for direct wrappers.
2453         This only affect direct calls.
2454
2455 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
2456
2457         * reflection.c (create_dynamic_mono_image): Fix warnings.
2458
2459         * generic-sharing.c (other_info_equal): Ditto.
2460         
2461 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
2462
2463         * metadata-verify.c: Implement field signature check.
2464
2465 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
2466
2467         * metadata-verify.c: Implement standalone signature check.
2468
2469 2009-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
2470
2471         * metadata-verify.c: Implement methodref signature check.
2472
2473 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
2474
2475         * object-internals.h (MonoRuntimeCallbacks): New structure containing
2476         callbacks supplied by the runtime.
2477
2478         * object.c (mono_install_callbacks): New internal function to install
2479         the callbacks.
2480
2481         * object.c (mono_create_ftnptr): Move the implementation of this to
2482         mini/.
2483
2484         * object.c (mono_get_addr_from_ftnptr): Ditto.  
2485
2486 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
2487
2488         * metadata-verify.c (parse_return_type): Proper byref check.
2489         * metadata-verify.c (is_valid_method_signature): Check for zero arity
2490         generic signatures and method params.
2491
2492 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
2493
2494         * metadata-verify.c (decode_signature_header): Fix bounds check.
2495
2496         * metadata-verify.c (parse_custom_mods): Check custom mods.
2497
2498         * metadata-verify.c (parse_type): Do initial basic verification
2499         of valid values.
2500         
2501         * metadata-verify.c (is_valid_method_signature): Parse the generic
2502         param count.
2503
2504 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
2505
2506         * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
2507         discarded based on their most specific definition so we set the method_slots
2508         array before checking if the method is acceptable or not.
2509
2510         Fixes #506757.
2511
2512 2009-05-26  Mark Probst  <mark.probst@gmail.com>
2513
2514         * icall.c: Free the old array when resizing a mono_ptr_array.
2515
2516 2009-05-26  Mark Probst  <mark.probst@gmail.com>
2517
2518         * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
2519         for the hashes whose keys are managed objects.
2520
2521 2009-05-26  Mark Probst  <mark.probst@gmail.com>
2522
2523         * object-internals.h, threads.c: Set the execution context on
2524         thread start here, not in corlib.
2525
2526         * appdomain.c: Bump corlib version.
2527
2528 2009-05-27  Martin Baulig  <martin@ximian.com>
2529
2530         * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
2531         if `_mono_debug_using_mono_debugger' is set to make things work
2532         properly when embedding Mono.
2533
2534 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
2535
2536         * class.c (mono_class_setup_fields): Don't mark simd types as having
2537         16 bytes alignment as the whole runtime doesn't support.
2538
2539 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
2540
2541         * metadata-verify.c (safe_read): Use endian safe read macros.
2542
2543 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
2544
2545         * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
2546         it is read-only when using full aot.
2547
2548 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
2549
2550         * metadata-verify.c (is_valid_method_signature): Verify parts
2551         of the return type. Provide an error message in case of failure.
2552
2553 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
2554
2555         * metadata-verify.c (is_valid_method_signature): Verify the call conv.
2556
2557 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
2558
2559         * metadata-verify.c: Include the size prefix in the bounds check.
2560
2561 2009-05-22  Miguel de Icaza  <miguel@novell.com>
2562
2563         * icall.c: Remove warnings.
2564
2565         * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
2566         prevent auto-detection based on GCC defines.
2567
2568         Add PS3
2569
2570         * metadata-verify.c: Do not include signal.h
2571
2572         * generic-sharing.c, marshal.c: Add returns to avoid some warning
2573         messages.  Not sure why the g_assert_not_reached is not enough to
2574         quiet the compiler.
2575         
2576
2577         * appdomain.c: Remove code that is not used when
2578         DISABLE_SHADOW_COPY is set.
2579
2580         * image.c: use g_getenv
2581
2582 2009-05-21  Miguel de Icaza  <miguel@novell.com>
2583
2584         * reflection.c: Remove code that it not used with
2585         DISABLE_REFLECTION_EMIT is defined.
2586
2587 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
2588
2589         * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
2590         invoke wrappers.
2591
2592 2009-05-20  Miguel de Icaza  <miguel@novell.com>
2593
2594         * socket-io.c
2595         (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
2596         the ifdef here and instead put that on io-layer
2597
2598 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2599
2600         * metadata-verify.c: Verify the generic param constraint table.
2601
2602 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2603
2604         * metadata-verify.c (verify_generic_param_table): Fix
2605         thinko on the valid flags bits for generic params.
2606
2607 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2608
2609         * metadata-verify.c: Verify the methodspec table.
2610
2611 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2612
2613         * metadata-verify.c: Verify the generic param table.
2614
2615 2009-05-19  Mark Probst  <mark.probst@gmail.com>
2616
2617         * sgen-gc.c: Store and use the count with REMSET_VTYPE.
2618
2619 2009-05-19  Mark Probst  <mark.probst@gmail.com>
2620
2621         * sgen-gc.c: Use generation enum more consistently and use the
2622         correct generation in mono_gc_register_for_finalization().
2623
2624 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
2625
2626         * metadata-verify.c: Verify the nested class table.
2627
2628 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
2629
2630         * metadata-verify.c: Verify the manifest resource table.
2631
2632 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
2633
2634         * debug-helpers.c (dis_one): Add little-endian support for ldstr.
2635
2636 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
2639         wrappers, this is now done in the JIT.
2640         
2641         * class.c (mono_set_generic_sharing_supported): New internal function.
2642         (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
2643
2644 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2645
2646         * metadata-verify.c: Verify the exported type table.
2647
2648 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2649
2650         * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
2651
2652 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2653
2654         * metadata-verify.c: Verify the file table.
2655
2656 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2657
2658         * metadata-verify.c (verify_assembly_table): Fix an error message.
2659
2660         * metadata-verify.c: Verify the assemblyref table.
2661
2662 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2663
2664         * metadata-verify.c (verify_assembly_table): Fix the valid
2665         bits mask for flags.
2666
2667 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
2668
2669         * debug-helpers.c (mono_method_full_name): Print generic parameters of
2670         generic methods as well.
2671
2672 2009-05-15  Geoff Norton  <gnorton@novell.com>
2673
2674         * gc.c: MachO/Darwin supports and uses semaphores fine for this 
2675         use-case and is significantly more performant than the wapi layer.
2676
2677 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
2678
2679         * metadata-verify.c: Verify the assembly table.
2680
2681 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
2682
2683         * metadata-verify.c: Fix rows limit check.
2684
2685 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
2686
2687         * metadata-verify.c: Verify the fieldrva table.
2688
2689 2009-05-13  Mark Probst  <mark.probst@gmail.com>
2690
2691         * sgen.c: Speed up weak links and finalizers by grouping them by
2692         generation.
2693
2694 2009-05-13  Mark Probst  <mark.probst@gmail.com>
2695
2696         * marshal.c (delegate_hash_table_add): When overwriting an entry,
2697         free the old GCHandle (only applies to SGen).
2698
2699 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
2700
2701         * loader.c (mono_get_method_from_token): Avoid the expensive call to
2702         mono_metadata_load_generic_params () for non-generic methods.
2703
2704 2009-05-12  Mark Probst  <mark.probst@gmail.com>
2705
2706         * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
2707         New function for returning a monitor's weak link if it has one.
2708
2709         * sgen-gc.c: Remove an object's monitor's weak link (if it has
2710         one) when clearing a domain.  These can still be around because
2711         the object might not have been collected.
2712
2713 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
2714
2715         * gc.c: Fix a warning.
2716
2717 2009-05-12  Kornél Pál  <kornelpal@gmail.com>
2718
2719         * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
2720         prevous wait that resulted in a deadlock on Windows when initializing
2721         the runtime form DllMain. Also results in improved startup time.
2722         (finalizer_thread): Get rid of thread_started_event.
2723         * threads.c, threads-types.h (mono_thread_create_internal): Return the
2724         resulting MonoThread.
2725
2726         Contributed under MIT/X11 license.
2727
2728 2009-05-11 Rodrigo Kumpera  <rkumpera@novell.com>
2729
2730         * metadata-verify.c: Verify the implmap table.
2731         Don't require that #US and #Strings be present.
2732
2733 2009-05-11  Sebastien Pouliot  <sebastien@ximian.com>
2734
2735         * security-core-clr.c: Delegate checks are done at creation time,
2736         not a invocation time. Fix exception for Telerik Silverlight demo
2737
2738 2009-05-11  Mark Probst  <mark.probst@gmail.com>
2739
2740         * sgen-gc.c (need_remove_object_for_domain): Remove the special
2741         case for the Thread class.
2742
2743         * threads.c: Do clean-up of abort exception/state in
2744         thread_cleanup() instead of Thread.free_internal().  Also clean up
2745         current_appcontext.  The reason we have to do that is because
2746         those references might point into another domain and if that
2747         domain is unloaded before the thread is finalized, they point to
2748         invalid data.
2749
2750 2009-05-10  Andreas Faerber  <andreas.faerber@web.de>
2751
2752         * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
2753         stub signatures.
2754         
2755         Contributed unter MIT/X11 license.
2756
2757 2009-05-09  Miguel de Icaza  <miguel@novell.com>
2758
2759         * verify.c, metadata-verifier.c: Add support for disabling the
2760         verifier in some builds.
2761
2762         [ Sorry, my previous commit accidentally commited some work in
2763         progress ]
2764
2765 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
2766
2767         * class.c (mono_class_setup_fields): Set class->field.first for
2768         generic instances.
2769
2770 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
2771
2772         * metadata-verify.c: Verify the typespec table.
2773
2774 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
2775
2776         * metadata-verify.c: Verify the module table.
2777
2778 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
2779
2780         * metadata-verify.c: Verify the methodimpl table.
2781
2782 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
2783
2784         * metadata-verify.c: Verify the property table.
2785
2786 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
2787
2788         * debug-helpers.c (mono_method_desc_match): Add support for generic
2789         glob patterns.
2790
2791 2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>
2792
2793         * metadata-verify.c: Verify the propertymap table.
2794
2795 2009-05-04 Rodrigo Kumpera  <rkumpera@novell.com>
2796
2797         * metadata-verify.c: Verify the event table.
2798
2799         * metadata-verify.c (search_sorted_table): Fix offset
2800         calculation.
2801
2802 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
2803
2804         * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
2805
2806 2009-05-01  Mark Probst  <mark.probst@gmail.com>
2807
2808         * gc.c (mono_gc_run_finalize): Don't set the domain too late,
2809         because mono_delegate_free_ftnptr() needs it.
2810
2811 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2812
2813         * metadata-verify.c: Verify the eventmap table.
2814
2815 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2816
2817         * metadata-verify.c: Verify the standalonesig table.
2818
2819 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2820
2821         * metadata-verify.c: Verify the field layout table.
2822
2823 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2824
2825         * class.c (mono_type_get_name_recurse): Don't crash
2826         for ownerless generic params.
2827
2828         * debug-helpers.c (mono_type_get_desc): Correct the format
2829         for ownerless generic params.
2830
2831 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2832
2833         * metadata-verify.c: Verify the class layout table.
2834
2835 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2836
2837         * metadata-verify.c: Verify the decl security table.
2838
2839 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2840
2841         * domain.c (mono_domain_set_internal_with_options): Don't do
2842         anything if the old domain is the same as the old one.  Fixes
2843         #499326.
2844
2845 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2846
2847         * appdomain.c: Deregister the reflection_info roots when unloading
2848         a domain.
2849
2850         * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
2851         memory allocated by a domain and frees its disappearing links.
2852
2853         * boehm-gc.c, null-gc.c: Empty implementation of
2854         mono_gc_clear_domain().
2855
2856 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2857
2858         * appdomain.c (clear_cached_vtable): Free the static fields memory
2859         block.
2860
2861 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2862
2863         * gc.c: Set the correct domain when invoking finalizers.
2864
2865         * appdomain.c: Set the correct domain when creating threads.
2866
2867 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2868
2869         * sgen-gc.c: Fix skip size for vectors.
2870
2871 2009-05-03  Martin Baulig  <martin@ximian.com>
2872
2873         * mono-debug-debugger.c
2874         (mono_debugger_check_breakpoints): Check class init handlers even
2875         if we don't have any method load handers.
2876
2877 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
2878
2879         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid 
2880         returning refonly assemblies if refonly is FALSE. Fixes #499013.
2881
2882 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
2883
2884         * metadata-verify.c: Verify the field marshal table.
2885
2886 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
2887
2888         * metadata-verify.c: Verify the custom attribute table.
2889
2890 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2891
2892         * metadata-verify.c: Verify the constant table.
2893
2894 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2895
2896         * metadata-verify.c: Verify the memberef table.
2897
2898 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2899
2900         * metadata-verify.c (get_coded_index_token): Remove
2901         dead argument.
2902
2903 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2904
2905         * metadata-verify.c: Verify the interfaceimpl table.
2906
2907 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2908
2909         * verify.c: Improve error message.
2910
2911         * debug-helpers.c (mono_type_get_desc): Harden the code that
2912         deals with VAR and MVAR.
2913
2914 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
2915
2916         * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes 
2917         part of #498692.
2918
2919 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2920
2921         * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2922         changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2923
2924 2009-04-28  Sebastien Pouliot  <sebastien@ximian.com>
2925
2926         * security-core-clr.c: Avoid redundant checks for platform code, 
2927         e.g. check for method and for class (very common) and check
2928         for class and outer class (less common)...
2929
2930 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * reflection.c: Avoid returning random cattrs for synthetic methods.
2933         Fixes #498545.
2934
2935 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2936
2937         * assembly.c: assemblies in the GAC should never be shadow-copied.
2938
2939 2009-04-26  Mark Probst  <mark.probst@gmail.com>
2940
2941         * domain.c, domain-internals.h: Disable
2942         track_resurrection_{objects,handles}_hash in MonoDomain if using
2943         SGen.
2944
2945 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2946
2947         * metadata-verify.c: Verify the param table.
2948
2949 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2950
2951         * metadata-verify.c (verify_typedef_table): Range check FieldList and
2952         MethodList.
2953
2954         * metadata-verify.c (verify_method_table): Proper check the ParamList
2955         field.
2956
2957 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2958
2959         * metadata-verify.c (verify_method_table): Check for runtime
2960         implemented functions such as delegate .ctors. Remove spurious
2961         printf.
2962         
2963 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2964
2965         * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2966
2967 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2968
2969         Don't allocate MonoGenericInfo for ownerless generic params.
2970         * class-internals.h (MonoGenericParam::info): Move field to ...
2971         (MonoGenericParamFull): ... this.  New struct.
2972         (MonoGenericContainer::type_params): Change type to
2973         MonoGenericParamFull.
2974         (MonoGenericParam, MonoGenericContainer): Update accessors.
2975         * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2976         'info' field for ownerless generic param.
2977         (mono_metadata_load_generic_params): Update to changes.
2978         * reflection.c (mono_reflection_create_generic_class): Likewise.
2979         (reflection_methodbuilder_to_mono_method): Likewise.
2980         (mono_reflection_initialize_generic_parameter): Likewise.
2981
2982 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2983
2984         Don't use MonoGenericParamInfo for ownerless generic params.
2985         * class.c (get_anon_gparam_class, set_anon_gparam_class): New.  Don't
2986         use ParamInfo class at all.
2987         (mono_class_from_generic_parameter): Use them.
2988         (make_generic_param_class): Fix a couple of instances where 'pinfo
2989         == NULL' wasn't handle.
2990
2991 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2992
2993         * class.c (make_generic_param_class): Carve out of ...
2994         (mono_class_from_generic_parameter): ... here.
2995
2996 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2997
2998         Simplify mono_class_from_generic_parameter
2999         * class-internals.h (MonoGenericParamInfo::token): New field.
3000         * metadata.c (mono_metadata_load_generic_params): Initialize it
3001         from metadata.
3002         * class.c (mono_class_from_generic_parameter): Use it instead of
3003         searching through metadata.
3004
3005 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
3006
3007         * metadata-verify.c: Add verification of the method table.
3008
3009 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
3010
3011         * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
3012         Delegate::Invoke optimization.
3013
3014 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
3015
3016         * appdomain.c (mono_domain_create_appdomain_internal): Free the
3017         string returned by get_shadow_assembly_location_base.
3018
3019         * appdomain.c (get_shadow_assembly_location_base): Add a comment
3020         about caller's ownership.
3021
3022 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
3023
3024         * reflection.c: Add mono_reflection_cleanup_domain to cleanup
3025         reflection memory on domain unload.
3026
3027         * domain.c (mono_domain_free): Don't free refobject_hash, let the
3028         reflection cleanup code do it.
3029
3030         * domain-internals.h: Add mono_reflection_cleanup_domain.
3031
3032         This fixes a memory leak for managed mirrors of reflection objects
3033         on domain unload. 
3034
3035 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
3036
3037         * metadata-verify.c: Implement more verification of the field table.
3038
3039 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
3040
3041         * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
3042         doesn't try to parse the input assembly, which can be broken.
3043
3044 2009-04-23  Mark Probst  <mark.probst@gmail.com>
3045
3046         * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
3047         sgen-gc.c: Implement track resurrection in weak GC handles in SGen
3048         by using the lowest bit in the link to store whether the link is
3049         tracked.  Move the track_resurrection hashes into boehm-gc.c.
3050
3051 2009-04-22  Miguel de Icaza  <miguel@novell.com>
3052
3053         * Makefile.am: Split the console support in platform specific code
3054         and put together a framework for making this easy in the future so
3055         that we can start splitting code instead of having a mess of PLATFORM_WIN32
3056
3057 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
3058
3059         * pedump.c: Fix a warning.
3060
3061 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
3062
3063         * verify.c (mono_delegate_type_equal): Compare valuetypes using
3064         mono_class_from_mono_type to avoid bad interactions with the dual representation
3065         of the generic type definition.
3066
3067 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
3068
3069         * verify.c (do_invoke_method): Use mono_class_from_mono_type to
3070         get the MonoClass for the call context type as it might be a generic
3071         instance.
3072
3073         Fixes #491483.
3074
3075 2009-04-21  Mark Probst  <mark.probst@gmail.com>
3076
3077         * object-internals.h: The Thread object has no execution_context
3078         member anymore.
3079
3080         * threads.c, threadpool.c, threads-types.h: Accessor functions for
3081         the execution context.
3082
3083         * appdomain.c: Bump corlib version.
3084
3085 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
3086
3087         * verify.c (do_newobj): Improve error message.
3088
3089 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
3090
3091         * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
3092         is nested in the filter block.
3093
3094         * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
3095         block is not fully nested.
3096
3097         Fixes #495656.
3098
3099 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
3100
3101         * verify.c (verify_type_compatibility_full): Compare MonoClass and
3102         not MonoType to check for equality of valuetypes as the generic type
3103         definition allows for two different encodings: the generic type definition
3104         class or a generic instance over the GTD arguments.
3105
3106         Fixes #496175.
3107
3108 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
3109
3110         * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
3111
3112         * verify.c (do_initobj): Improve error message.
3113
3114 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
3115
3116         * metadata-verify.c: Enable pe verification as the issue with #496453
3117         is that the authenticode data directory have a different unspecified
3118         format. Ignore it for now.
3119
3120         * pedump.c: Run the metadata verifier together with the IL verifier.
3121
3122         Fixes ##496453.
3123
3124 2009-04-20  Rolf Bjarne Kvinge  <RKvinge@novell.com>
3125
3126         * metadata-verify.c: Temporarily disable pe verification due to #496453.
3127
3128 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
3129
3130         * class.c (can_access_type): Check visibility against
3131         the element type for pointers and arrays.
3132
3133         Fixes #496150.
3134
3135 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
3136
3137         * metadata-verify.c: Fix cli and table verification to use information
3138         from the MonoImage. A lot of duplicated code got killed.
3139
3140 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
3141
3142
3143         This patch starts to integrate the metadata verifier with the runtime code.
3144
3145         This patch causes major regression in functionality for the metadata verifier
3146         as cli and table verification are disabled since they require to be ported to
3147         use MonoImage information.
3148
3149         * image.c (do_mono_image_load): Split the code in this function
3150         into mono_image_load_pe_data and mono_image_load_cli_data.
3151         Add     care_about_pecoff parameter to not load pecoff data.
3152         Call into the metadata verifier for pecoff and cli verification.
3153
3154         * image.c (mono_image_open_raw): New function that doesn't perform
3155         any parsing of the image contents.
3156         
3157         The reason for the 3 new functions is to give pedump better control
3158         into the interaction with the verifier.
3159
3160         * metadata-internals.h: Add new functions from image.c as part of the
3161         internal mono API.
3162
3163         * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
3164         mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
3165         to make those functions work together with the runtime.
3166
3167         * verify.c: Add mono_verifier_is_enabled_for_image function that returns
3168         true if the image needs to be verified.
3169
3170         * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
3171
3172         * pedump.c: Use new metadata verifier API.
3173
3174 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
3175
3176         * object.c (mono_install_vtable_trampoline): Make this receive a
3177         trampoline creation function instead of trampoline, allowing the JIT
3178         to use a different trampoline for each vtable.
3179
3180 2009-04-18  Mark Probst  <mark.probst@gmail.com>
3181
3182         * object.c (mono_raise_exception): Don't reset the thread abort
3183         exception state here.
3184
3185 2009-04-18  Mark Probst  <mark.probst@gmail.com>
3186
3187         * icall-def.h: New icall for getting the thread abort exception
3188         state for a thread.
3189
3190         * object.c, thread.c, object-internals.h: A thread's abort
3191         exception state is now a GC handle.  To get the object it stands
3192         for, we must move it into the current app domain, if it's
3193         different than the one where it originated from.
3194
3195         * appdomain.c: Bump corlib version.
3196
3197         * domain.c, domain-internals.h: New function for setting the
3198         domain and migrate the thread abort exception or not.
3199
3200 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3201
3202         * metadata-verify.c: Add initial verification of the
3203         field table.
3204
3205 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3206
3207         * metadata-verify.c: Add a macro to conditionally enable
3208         dumping of verification information. Add  make_coded_token
3209         and search_sorted_table to enable search sorted tables
3210         by a given coded token.
3211
3212 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3213
3214         * metadata-verify.c: Add array mapping from table index
3215         to description offset. Add get_col_offset and get_col_size
3216         functions.
3217
3218 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3219
3220         * metadata-verify.c: Add remaining table descriptions offsets.
3221         Add remaining coded index descriptions.
3222
3223 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3224
3225         * metadata-verify.c: Fixed constant table description.
3226         Fixed calculation of HasCustomAttribute coded index size.
3227         Fixed calculation of size for many table indexes. 
3228
3229 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3230
3231         * pedump.c (dump_metadata): Dump table offset instead
3232         of useless pointer in memory.
3233
3234 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
3235
3236         * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
3237
3238 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
3239
3240         * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
3241         a missing of for interface types.
3242
3243 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
3244
3245         * metadata-verify.c (verify_pe_optional_header): Add comment of why
3246         the code is commented.
3247
3248         * metadata-verify.c (verify_resources_table): Remove spurious printf
3249         and don't fail if there are unmanaged resources. Gmcs generates a useless
3250         one     for all assemblies - I bet it's some MS compatibility junk.
3251
3252 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
3253
3254         * metadata-verify.c (verify_typedef_table): Verify the extends field.
3255
3256         * metadata-verify.c (mono_image_verify): Add a is_corlib.
3257
3258         * verify-internals.h: Same.
3259
3260         * pedump.c: Fix for mono_image_verify new signature.
3261
3262 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
3263
3264         * metadata-verify.c (verify_typedef_table): Verify for some invalid
3265         flags combinations.
3266
3267 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
3268
3269         * metadata-verify.c (verify_module_table): Ignore the generation field.
3270
3271 2009-04-15  Martin Baulig  <martin@ximian.com>
3272
3273         * debug-mono-symfile.c
3274         (mono_debug_symfile_lookup_location): Don't print a warning for
3275         unknown extended opcodes if they're within 0x40 and 0x7f.
3276
3277 2009-04-15  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
3280         invoke signatures returning an enum. Fixes #494847.
3281
3282 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
3283
3284         * metadata-verify.c: Initial code to verify the typedef table.
3285
3286 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
3287
3288         * verify.c (mono_method_verify): Don't fail if an unconditional branch
3289         with non empty stack happens before the beginning of a try block.
3290
3291         Fixes #494812.
3292
3293 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
3294
3295         * metadata-verify.c: Verify typename and typenamespace fields of
3296         the typeref table.
3297
3298 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
3299
3300         * metadata-verify.c: Initial code to verify the typeref table.
3301
3302 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
3303
3304         * verify.c (verify_delegate_compatibility): Fix error message.
3305
3306 2009-04-14  Sebastien Pouliot  <sebastien@ximian.com>
3307
3308         * security-core-clr.c: Fix typo
3309
3310 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
3311
3312         * marshal.c (delegate_hash_table_add): Make delegate_target_locations 
3313         a MonoGHashTable to keep its values alive.
3314         (emit_marshal_boolean): Fix a warning.
3315
3316 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3317
3318         * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
3319         not have any interface configured for IPv4/IPv6.
3320
3321 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3322
3323         * assembly.c: fix typo in error message.
3324
3325 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
3326
3327         * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
3328         allocating the location holding the this argument to prevent
3329         'too many root sets' errors.
3330
3331         * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
3332         to mark fields as special static.
3333         (mono_field_static_get_value): Handle special static fields.
3334         (mono_field_static_set_value): Ditto.
3335
3336         * class-internals.h (struct _MonoClassField): Document this.
3337
3338 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
3339
3340         * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
3341           the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
3342           case.  This will handle when managed code returns null to native code.
3343
3344         Code is contributed under MIT/X11 license.
3345
3346 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
3347
3348         * object.c (build_imt_slots): Changing a free to a g_free to match
3349           the g_malloc0 in add_imt_builder_entry that allocated this memory.
3350
3351         Code is contributed under MIT/X11 license.
3352
3353 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
3354
3355         * marshal.c (emit_marshal_boolean): Adding code to ensure that
3356           the correct TRUE value is passed through the marshaling layer.
3357
3358         Code is contributed under MIT/X11 license.
3359
3360 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
3361
3362         * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
3363         correctly. Fixes #492330.
3364         
3365         * marshal.c: Fix the embedding of object pointers into JITted code in
3366         the native-to-managed wrappers by allocating some GC tracked memory, and
3367         embedding the address of that.
3368
3369 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
3370
3371         * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
3372         pointers into the vtable.
3373
3374 2009-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
3375
3376         * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
3377
3378         * verify.c (verify_ldftn_delegate): Improve error message.
3379
3380 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
3381
3382         * reflection.c (my_mono_class_from_mono_type): Remove.
3383
3384 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
3385
3386         Prepare to reduce memory usage of owner-less generic parameters (1/n)
3387         * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
3388         and constraints fields into ...
3389         (MonoGenericParamInfo): ... this.
3390         (mono_generic_param_info, mono_generic_container_get_param_info):
3391         New accessors.
3392         * class.c, debug-helpers.c, icall.c: Update to changes.
3393         * metadata.c, reflection.c, verify.c: Likewise.
3394
3395 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
3398
3399         * marshal.c (get_runtime_invoke_type): Share enums with their base types.
3400         
3401         * marshal.c (get_runtime_invoke_type): Share pointers with ints and
3402         booleans with sbytes.
3403
3404 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
3405
3406         * class.c (can_access_instantiation): Verify accesibility of element types
3407         for arrays and pointers.
3408
3409         * class.c (can_access_type): Return true if the target class is VAR or MVAR.
3410
3411         * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
3412
3413         Fixes #493068.
3414
3415 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
3416
3417         * verify.c (do_invoke_method): Improve error messages.
3418
3419 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
3420
3421         * verify.c:  Fixing the MSVC build.
3422
3423         Code is contributed under MIT/X11 license.
3424
3425 2009-04-08  Sebastien Pouliot  <sebastien@ximian.com>
3426
3427         * security-core-clr.c: Simplify get_reflection_caller not to call
3428         mono_method_get_last_managed (another stack walk) and adjust the
3429         callers to handle a (should not happen) NULL return value.
3430
3431 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3432
3433         Add accessors to some MonoGenericParam fields
3434         * class-internals.h (mono_generic_param_owner): New accessor.
3435         (mono_generic_param_num): Likewise.
3436         (mono_type_get_generic_param_owner): New helper.
3437         (mono_type_get_generic_param_num): New helper.
3438         * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
3439
3440 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3441
3442         * class-internals.h (mono_generic_container_get_param): New wrapper.
3443         * class.c, icall.c, metadata.c, verify.c: Use it.
3444
3445 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3446
3447         Fix gtest-252.cs
3448         * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
3449         the standard case/loop.  In particular, don't complain about
3450         references to generic type definitions.
3451
3452 2009-04-07  Zoltan Varga  <vargaz@gmail.com>
3453
3454         * debug-helpers.c (dis_one): Decode string arguments.
3455
3456 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
3457
3458         * pedump.c (dump_verify_info): Dump type name correctly.
3459
3460 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
3461
3462         * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
3463         are larger than code size.
3464
3465         This can happen in valid code if the try/catch block is not followed by any instruction
3466         and do a backward branch on the leave instruction.
3467
3468         Fixes #492494.
3469
3470 2009-04-06  Sebastien Pouliot  <sebastien@ximian.com>
3471
3472         * security-core-clr.c: Fix typo while comparing second method names
3473         in can_avoid_corlib_reflection_delegate_optimization
3474
3475 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
3476
3477         * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
3478
3479         Fixes #487738.
3480
3481 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
3482
3483         * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
3484         a MVAR using a class context.
3485
3486         Fixes #490335.
3487
3488 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
3489
3490         * object.c (mono_class_compute_gc_descriptor): Make this non-static.
3491
3492         * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
3493
3494         * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
3495         functions supplied by the JIT for the SGEN GC.
3496
3497         * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
3498         
3499 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
3500
3501         monitor.c (mono_monitor_try_enter_internal):
3502         Added calls to profile monitor contentions.
3503         Also duplicated a small piece of code (the "get the monitor" logic)
3504         from the fast path to the slow path, and changed the relevant goto
3505         statements, so that monitor acquisition events can be emitted from the
3506         slow path (this is by Paolo Molaro).
3507
3508 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
3509
3510         * profiler.c, profiler.h, profiler-private.h:
3511         Added support for profiling monitor contentions.
3512
3513 2009-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
3514
3515         * metadata-verify.c: Verify the modules table.
3516
3517 2009-04-02 Rodrigo Kumpera  <rkumpera@novell.com>
3518
3519         * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
3520         using the context of the method been verifier and not of the method been called.
3521
3522         * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
3523         safely inflate generic types. 
3524
3525 2009-04-02  Sebastien Pouliot  <sebastien@ximian.com>
3526
3527         * security-core-clr.c: Change the strategy for checking the 
3528         "reflection using delegates optimization" to avoid unneeded 
3529         attributes in multiple class libraries.
3530
3531 2009-04-02  Mark Probst  <mark.probst@gmail.com>
3532
3533         * sgen-gc.c: Remove object element in the disappearing link struct
3534         by storing the object pointer in the link.
3535
3536 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
3537
3538         * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
3539
3540 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
3541
3542         * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
3543
3544         * verify.c (mono_method_verify): Do proper bounds checking of exception
3545         clause ranges.
3546
3547 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
3548
3549         * loader.c (mono_field_from_token): Don't crash if the field parent could
3550         not be decoded.
3551
3552 2009-03-31  Mark Probst  <mark.probst@gmail.com>
3553
3554         * sgen-gc.c: Execute critical finalizers after ordinary
3555         finalizers.
3556
3557         * class-internals.h, domain.c: Add CriticalFinalizerObject to
3558         mono_defaults.
3559
3560 2009-03-31 Jb Evain <jbevain@novell.com>
3561
3562         * verify.c (do_ldstr): don't check if a string is in the user strings
3563         heap if the current image is dynamic.
3564
3565 2009-03-31  Mark Probst  <mark.probst@gmail.com>
3566
3567         * sgen-gc.c: Wait until the last finalizer has executed when
3568         returning from WaitForPendingFinalizers.
3569
3570 2009-03-31  Martin Baulig  <martin@ximian.com>
3571
3572         * mono-debug-debugger.h (MonoDebuggerEvent): Add
3573         `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
3574         `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
3575         (mono_debugger_event_create_appdomain): New function.
3576         (mono_debugger_event_unload_appdomain): New function.
3577
3578         * appdomain.c (mono_domain_create_appdomain_internal): Call
3579         mono_debugger_event_create_appdomain().
3580
3581 2009-03-31  Martin Baulig  <martin@ximian.com>
3582
3583         * mono-debug-debugger.c
3584         (mono_debugger_register_class_init_callback): Also register the
3585         class init callback if the class is already initialized to make
3586         things work with shadow copied assemblies.
3587
3588 2009-03-31  Sebastien Pouliot  <sebastien@ximian.com>
3589
3590         * security-core-clr.c
3591         (mono_security_core_clr_ensure_reflection_access_field): Let 
3592         critical code access the field (just like we do for methods). Use
3593         check_field_access helper.
3594         (mono_security_core_clr_ensure_reflection_access_method): Use 
3595         check_field_access helper.
3596
3597 2009-03-31  Mark Probst  <mark.probst@gmail.com>
3598
3599         * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
3600         call the run-finalize function directly.
3601
3602         * gc.c, gc-internal.h: Make run_finalize() non-static.
3603
3604 2009-03-31  Mark Probst  <mark.probst@gmail.com>
3605
3606         * sgen-gc.c: Use a separate struct for disappearing links.
3607
3608 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3609
3610         * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
3611         * MaxIOVectorLength enabled, just ignore them.
3612         Fixes bug #349688.
3613
3614 2009-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
3615
3616         * metadata-verify.c: Fix eglib build.
3617
3618 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
3619
3620         * threads-types.h: Fix the win32 build.
3621
3622 2009-03-28  Sebastien Pouliot  <sebastien@ximian.com>
3623
3624         * class.c: move coreclr inheritance/override checks to 
3625         security-core.clr.c
3626         * security-core.clr.c|h: add code from class.c with additional
3627         documentation. Fix override check when the method is not critical.
3628
3629 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
3630
3631         * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
3632         (match_class): Ditto.
3633
3634 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
3635
3636         * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
3637
3638         * metadata-verify.c: Implement table layout row size calculation. Verify
3639         the total size of the tables.
3640
3641 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
3642
3643         * metadata-verify.c: Verify heap sizes and size to decode row counts. 
3644
3645 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3646
3647         * appdomain.c:
3648         * console-io.[ch]: added new mono_console_init() to make sure that
3649         file descriptors 0, 1 and 2 are opened.
3650         Bug #489019 fixed.
3651
3652 2009-03-27  Sebastien Pouliot  <sebastien@ximian.com> 
3653
3654         * appdomain.h: Export a new callback type and a new function to
3655         set this callback. This allow a mono host to provide it's own
3656         definition for "platform code".
3657         * metadata-internals.h: Add a core_clr_platform_code flag on 
3658         _MonoImage to (cache and) know if it is representing platform 
3659         code.
3660         * image.c (do_mono_image_open): Set core_clr_platform_code flag 
3661         on platform code images.
3662         * security-core-clr.c|h 
3663         (mono_security_set_core_clr_platform_callback): Allow the host
3664         to provide it's own platform check definition.
3665         (mono_security_core_clr_determine_platform_image): Detect if an 
3666         image is platform code (using the specified callback).
3667         (mono_security_core_clr_is_platform_image): Return cached value 
3668         for platform code.
3669
3670 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
3671
3672         * threads.c (mono_create_thread): New helper function to wrap CreateThread
3673         which has different parameter types for the 'tid' argument in windows and
3674         the io-layer.
3675
3676         * appdomain.c attach.c threads.c: Use the new helper.
3677
3678 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
3679
3680         * metadata-verify.c: Verify valid table bits.
3681
3682 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
3683
3684         * metadata-verify.c (verify_metadata_header): Store size in the size field.
3685
3686         * metadata-verify.c: Add initial table schema verification.
3687
3688 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
3689
3690         * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
3691         obtain the refclass argument needed by mono_param_get_objects (). Fixes
3692         #488383.
3693
3694         * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
3695
3696         * appdomain.c (MONO_CORLIB_VERSION): Bump this.
3697
3698 2009-03-26  Sebastien Pouliot  <sebastien@ximian.com>
3699
3700         * security-core-clr.c: Add/update documentation
3701
3702 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
3703
3704         * marshal.c (emit_marshal_object): Generate code to throw an exception
3705         instead of throwing it. Fixes #488670.
3706
3707 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com>
3708
3709         * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
3710         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
3711         an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
3712         and add a call to mono_security_core_clr_ensure_delegate_creation
3713         to do the extra checks required by CoreCLR.
3714         * security-core-clr.c|h: Add function to check delegate creation,
3715         both in the binding and accessibility, under CoreCLR.
3716
3717 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com> 
3718
3719         * reflection.c (mono_reflection_create_dynamic_method): when 
3720         coreclr is enabled make sure that every resolved object are
3721         checked (e.g. field and method access).
3722         * security-core-clr.c|h: Add function to check objects resolved
3723         when a dynamic method is created.
3724
3725 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
3726
3727         * metadata-verify.c: Cache directory rva translations.
3728
3729         * metadata-verify.c: Add cli-header and streams verification.
3730
3731 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
3732
3733         * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
3734         the wrong offset (8 instead of 6).
3735
3736 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
3737
3738         * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
3739         methods, return the native function address itself. Fixes
3740         #487758.
3741
3742 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3743
3744         * console-io.c: some of the values for control characters might not be
3745         present.
3746
3747 2009-03-21  Sebastien Pouliot  <sebastien@ximian.com>
3748
3749         * exception.c|h: Add helpers to create [Field|Method]AccessException
3750         * icall.c: Add required coreclr check calls for field reflection.
3751         Move the existing (method) check logic into security-core-clr.c
3752         * security-core-clr.c: Add functions to check if the access of a
3753         field or method is allowed when reflecting under coreclr. This is
3754         mostly done using a stack walk to find the "real" caller: i.e. the
3755         code that is calling the reflection
3756
3757 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
3758
3759         * gc-internal.h: Change location of gc_wrapper.h
3760
3761 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com> 
3762
3763         * class.c: Simplification to coreclr checks for overrides that
3764         makes it easier to set breakpoints.
3765
3766 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>
3767
3768         * security-core-clr.c|h: (mono_security_core_clr_class_level, 
3769         mono_security_core_clr_method_level): Avoid potential 
3770         MonoCustomAttrInfo allocation for transparent assemblies (e.g. 
3771         user/application code) and make it easier to set breakpoints
3772
3773 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
3774
3775         * metadata-verify.c: Reject cli header tables that mono don't handle.
3776
3777 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
3778
3779         * pedump.c: Fix CLI header dumping.
3780
3781 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
3782
3783         * metadata-verify.c: More CLI header verification.
3784
3785 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
3786
3787         * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
3788
3789 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
3790
3791         * metadata-verify.c: Initial verification of the CLI header.
3792
3793 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
3794
3795         * metadata-verify.c (verify_resources_table): Fix verification of zero
3796         sized resource section and id entries count.
3797
3798 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
3799
3800         * icall.c: Handle user types in many Type icalls. Fixes #486303.
3801
3802 2009-03-17  Jb Evain  <jbevain@novell.com>
3803
3804         * profiler.c: call mono_gc_base_init from mono_profiler_load.
3805
3806 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
3807
3808         * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
3809         (mono_gc_make_descr_for_array): Ditto.
3810
3811 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
3812
3813         * verify.c (mono_verifier_is_class_full_trust): Add support for
3814         CoreCLR security mode where trusted assemblies are defined as
3815         "platform code".
3816
3817 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3818
3819         * metadata-verify.c: Add minimal PECOFF resource verification.
3820
3821 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3822
3823         * metadata-verify.c: Be less restrictive with some coff fields.
3824
3825 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3826
3827         * verify.c (init_stack_with_value_at_exception_boundary): Init generic
3828         params as boxed values on stack. Fixes #485706.
3829
3830 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3831
3832         * console-io.c: the termios values may vary in different flavors of unix.
3833
3834 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3835
3836         * console-io.[ch]: return the entire set of control characters when
3837         initializing the terminal.
3838         * appdomain.c: bump corlib version.
3839
3840 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
3841
3842         * mono-perfcounters.c: added support for in-process custom
3843         performance counters.
3844
3845 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
3846
3847         * metadata-verify.c: Small cleanup and add comment for IAT directory entry. 
3848
3849 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
3850
3851         * metadata-verify.c: Verify the data pointed by the import table. 
3852
3853 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
3854
3855         * metadata-verify.c (load_data_directories): Store data
3856         directory contents.
3857
3858         * metadata-verify.c: Verify the import table. 
3859
3860 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
3861
3862         * metadata-verify.c: Verify data directories.
3863
3864 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
3865
3866         * metadata-verify.c: Check section header flags.
3867
3868 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3869
3870         * appdomain.c: if the assembly name is a shadow-copied file, return
3871         TRUE from mono_is_shadow_copy_enabled but don't actually do anything
3872         in mono_make_shadow_copy.
3873         * icall.c: if the assembly name is a shadow-copied file, replace it
3874         with the original assembly path.
3875
3876         Bug #484244 fixed. NUnit tests for corlib can be run without
3877         --noshadow now.
3878
3879 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
3880
3881         * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
3882         entries when the table is reallocated.
3883
3884         * icall.c: Allocate the memory used by the mono_ptr_array macros using
3885         mono_gc_alloc_fixed () since it contains GC refs.
3886
3887 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
3888
3889         * reflection.c (ensure_complete_type): New helper function to call
3890         type resolve handlers for unfinished dynamic types.
3891         (resolve_object): Call it for MonoClassFields. Fixes #483852.
3892
3893 2009-03-09  Zoltan Varga  <vargaz@gmail.com>
3894
3895         * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
3896         #483247.
3897
3898 2009-03-08 Rodrigo Kumpera  <rkumpera@novell.com>
3899
3900         * appdomain.c (get_shadow_assembly_location): Fix memleak.
3901
3902 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
3903
3904         * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
3905         between GCHandles of type WeakTrackResurrection and the objects they
3906         point to.
3907
3908         * gc.c: Partly implement the sematics of GCHandles of type 
3909         WeakTrackResurrection: these handles should only be cleared after the
3910         finalizer of the object they are pointing to has ran.
3911
3912 2009-03-06  Mark Probst  <mark.probst@gmail.com>
3913
3914         * icall.c: Partially revert r126631 because using the jump
3915         trampolines for generic shared methods makes it superfluous.
3916
3917 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
3918
3919         * threads.c (handle_store): Create the 'threads' hash table with the proper
3920         MONO_HASH_VALUE_GC type.
3921
3922 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
3923
3924         * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3925         FIRST_GC_TRACKED.
3926
3927         * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3928         and LAST_GC_TRACKED as a GC root.
3929
3930         * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3931
3932         * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3933         the static data even if it consists of 1 reference.
3934
3935         * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3936         if there is a GC descriptor.
3937
3938         * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3939         instead of through the GC since they contain no object references.
3940
3941 2009-03-05  Mark Probst  <mark.probst@gmail.com>
3942
3943         * generic-sharing.c (instantiate_other_info): Always return a jump
3944         trampoline for method code.
3945
3946 2009-03-05  Marek Habersack  <mhabersack@novell.com>
3947
3948         * culture-info-tables.h: generated to include the en-tt culture.
3949
3950 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
3951
3952         * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3953         capture the thread context.
3954
3955         * object.c (mono_async_result_new): Cache the invoke wrappers to
3956         ExecutionContext::Capture.
3957
3958 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
3959
3960         * marshal.h: Add a prototype for what mono_compile_method returns
3961         for invoke wrappers.
3962
3963         * gc.c: Use the new prototype declaration.
3964
3965 2009-03-04  Geoff Norton  <gnorton@novell.com>
3966
3967         * boehm-gc.c: Add some MONO_LOG tracing for the GC
3968         * gc-internal.h:
3969         * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3970
3971 2009-03-04  Martin Baulig  <martin@ximian.com>
3972
3973         * mono-debug.h
3974         (mono_debugger_runtime_invoke): Removed.
3975
3976         * mono-debug-debugger.c
3977         (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3978
3979 2009-03-02  Martin Baulig  <martin@ximian.com>
3980
3981         * mono-debug.h
3982         (mono_debugger_unhandled_exception): Removed.
3983         (mono_debugger_handle_exception): Removed.
3984         (mono_debugger_throw_exception): Removed.
3985
3986         * mono-debug.c
3987         (mono_debug_debugger_version): Bump to 5.
3988
3989         * mono-debug-debugger.c: Moved the exception handling code to
3990         ../mini/debug-mini.c
3991
3992 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
3993
3994         * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3995         finalize_objects_hash.
3996
3997         * gc.c: Use the separate lock to access the finalize_objects_hash field.
3998         
3999         * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
4000         field.
4001
4002         * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
4003         cache.
4004
4005         * image.c (mono_image_close): Free it.
4006         
4007         * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
4008         allowing a creation of a wrapper which invokes its method using a CALLVIRT
4009         on the this argument.
4010
4011         * gc.c (run_finalize): Optimize the calling of the finalizers.
4012
4013 2009-03-03  Martin Baulig  <martin@ximian.com>
4014
4015         * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
4016         of the `MonoGenericInst' changes.
4017
4018 2009-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
4019
4020         * icall.c (ves_icall_MonoType_GetGenericArguments): Use
4021         mono_array_class_get_cached to reduce locking contention. Extract
4022         a domain var.
4023
4024         * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
4025         intermediary managed arrays. Use caching version of mono_array_new
4026         to allocate the result array.
4027
4028         * icall.c (ves_icall_Type_GetEvents_internal): Same.    
4029
4030         * icall.c (ves_icall_Type_GetNestedTypes): Same.        
4031
4032         * locales.c (create_names_array_idx):  Use mono_array_new_cached
4033         to reduce locking contention.
4034
4035 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
4036                 
4037         * object.c (mono_method_add_generic_virtual_invocation): Put back the
4038         thunk builder code for the non-interface case.
4039
4040 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
4041
4042         * object.c (get_generic_virtual_entries): New helper function to collect
4043         the virtual generic method instances which need to be added to an IMT
4044         thunk.
4045         (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
4046         Instead of creating a new IMT thunk, reset the vtable slot to the
4047         trampoline, the thunk will be created the next time the trampoline is called.
4048         (build_imt_slots): Add support for virtual generic methods in interfaces by
4049         adding to the IMT thunk all the methods registered using 
4050         mono_method_add_generic_virtual_invocation ().
4051
4052         * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
4053         (struct _MonoIMTCheckItem): Ditto.
4054
4055         * object.c (mono_method_add_generic_virtual_invocation): Take a
4056         MonoMethod argument instead of a MonoGenericInst. Fix the construction of
4057         the IMT thunk to include all items.
4058         
4059         * object.c (mono_class_create_runtime_vtable): Add a missing
4060         mono_loader_unlock ().
4061
4062 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
4063
4064         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4065
4066         * object-internals.h (MonoReflectionEvent): Add cached_add_event.
4067
4068 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
4069
4070         * object-internals.h: Rename _MonoReflectionEvent to
4071         MonoReflectionMonoEvent so it reflects the right managed type.
4072         Add a MonoReflectionEvent that correctly represents System.EventInfo.
4073
4074         * icall.c:
4075         * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
4076         type.
4077
4078 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
4079
4080         * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
4081         intermediary managed arrays. Use caching version of mono_array_new
4082         to allocate the result array.
4083
4084 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
4085
4086         * reflection.c: Use cached version of mono_array_new alongside
4087         the mono_reflection_get_custom_attrs_by_type call path.
4088
4089 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
4090
4091         * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
4092         intermediary managed arrays. Use caching version of mono_array_new
4093         to allocate the result array.
4094
4095         * icall.c (ves_icall_Type_GetConstructors_internal): Same.
4096
4097 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
4098
4099         * icall.c: Add small implementation of a growable stack bound array.
4100
4101         * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
4102
4103         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
4104         intermediary managed arrays. Use caching version of mono_array_new
4105         to allocate the result array.
4106
4107 2009-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
4108
4109         * icall.c: New icall ves_icall_System_Enum_compare_value_to that
4110         helps Enum::CompareTo to be implemented without reboxing all enums
4111         to their underlying type.
4112 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
4113
4114         * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
4115         since it acquires a global lock leading to scalability problems.
4116
4117         * profiler.c: Make the stat profiler work with multiple appdomains, this
4118         currently only works when no appdomains are unloaded.
4119
4120 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
4121
4122         * appdomain.c: make the check to avoid copying when the assembly is
4123         already shadow copied actually work.
4124
4125 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
4126
4127         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4128
4129         * object-internals.h (struct _MonoReflectionGenericClass): Sync with
4130         changes to the managed side.
4131
4132 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
4133
4134         * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
4135         classes + a separate lock for it, as it is used frequently at runtime, not
4136         just during metadata loading/JIT compilation.
4137
4138         * class.c (mono_bounded_array_class_get): Use the separate cache + lock
4139         for szarrays.
4140         
4141         * object-internals.h (mono_class_from_name_cached): New macro to cache
4142         the results of the lookup locally without having to declare a static
4143         variable to hold it.
4144         (mono_class_get_field_from_name_cached): Ditto.
4145         (mono_array_class_get_cached): Ditto.
4146
4147         * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
4148         the new macros.
4149         
4150         * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
4151         slower search in metadata.
4152
4153         * pedump.c: Fix a warning.
4154
4155 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
4156
4157         * reflection.c (encode_locals): Add checks for user types.
4158         (method_encode_clauses): Ditto.
4159         (method_encode_code): Ditto.
4160         (mono_image_create_token): Ditto.
4161
4162         * object-internals.h: Change the type of more fields from MonoReflectionType*
4163         to MonoObject*.
4164
4165 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
4166
4167         * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
4168         the a thread does not suspend within 100ms.
4169
4170         * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
4171         in addition to StopRequested as well.
4172
4173         * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
4174
4175         * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
4176         search the method_hash before inserting a new entry, to avoid crashes when
4177         the same method is inserted multiple times, causing the old 
4178         MonoDebugMethodInfo structure to be freed by the value dtor function.
4179
4180 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
4181
4182         * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
4183         SO_EXLUSIVEADDRUSE where available.
4184
4185 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
4186
4187         * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
4188         runtime invoke wrappers, this time it is string ctor wrappers, which
4189         pass a dummy string as 'this' instead of their obj argument. Fixes
4190         #478473.
4191
4192 2009-02-21  Jb Evain  <jbevain@novell.com>
4193
4194         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4195         only get create_culture once.
4196
4197 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * reflection.c (mono_reflection_setup_internal_class): Move the user type
4200         check before the locking.
4201         
4202         * reflection.c (mono_reflection_setup_internal_class): Check for user types.
4203         (mono_reflection_create_runtime_class): Ditto.
4204         (mono_reflection_sighelper_get_signature_local): Ditto.
4205         (mono_reflection_sighelper_get_signature_field): Ditto.
4206
4207         * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
4208         is a System.MonoType object or similar.
4209         (monotype_cast): New helper function to cast a MonoObject to a 
4210         MonoReflectionType object.
4211
4212         * object-internals.h: Change MonoReflectionType* members in structures to
4213         MonoObject* members to force the usage of the monotype_cast () function.
4214
4215         * reflection.c icall.c: Use monotype_cast () for accessing Type members of
4216         structures/arrays. This causes us to assert instead of crashing when 
4217         instances of user defined subclasses of System.Type are encountered.
4218
4219 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4220
4221         * cil-coff.h:
4222         * icall-def.h:
4223         * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
4224         win32 resource loaded from a PE file.
4225
4226         * image.c: fix mono_image_lookup_resource.
4227
4228 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4229
4230         * icall-def.h:
4231         * threads-types.h:
4232         * threads.c: added internal call for WaitHandle.SignalAndWait.
4233
4234 2009-02-19  Bill Holmes  <billholmes54@gmail.com>
4235
4236         * cominterop.c : Adding cominterop_type_from_handle and 
4237           registering it as an icall.  Replacing all references
4238           to type_from_handle.
4239
4240         Code is contributed under MIT/X11 license.
4241
4242 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
4243
4244         * Makefile.am: Add lock-tracer.h and lock-trace.c.
4245
4246         * appdomain.c: Call the tracer init function.
4247
4248         * domain-internals.h: Enable the tracer for the domain locks.
4249
4250         * image.c: Enable the tracer for image locks.
4251
4252         * loader.c: Enable the trace for the loader lock.
4253
4254         * lock-tracer.h:
4255         * lock-tracer.c: Initial implementation of the lock trace utility.
4256         The tracer requires a compile time define to be enabled and a env var
4257         to be enabled at runtime.
4258
4259 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
4260
4261         * domain.c (mono_domain_code_foreach): Improve documentation.
4262
4263 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
4264
4265         * appdomain.c:
4266         * generic-sharing.c:
4267         * object.c:
4268         * reflection.c:  Adjust locking order to the new semantics where the loader lock
4269         comes first.
4270
4271 2009-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
4272
4273         * domain.c: Add mono_domain_code_* functions that perform locking
4274         around the domain codeman.
4275
4276         * domain-internals.h: Export those functions.
4277
4278         * object.c: Use new functions instead of acquiring the domain lock.
4279
4280 2009-02-19  Zoltan Varga  <vargaz@gmail.com>
4281
4282         * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
4283         delegate. Fixes #477396.
4284
4285 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
4286
4287         * reflection.c (create_custom_attr): Get rid of alloca.
4288
4289 2009-02-18  Bill Holmes  <billholmes54@gmail.com>
4290
4291         * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
4292           Adding exception handling for all CCW calls.
4293
4294         Code is contributed under MIT/X11 license.
4295
4296 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
4297
4298         * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
4299
4300         * marshal.c (emit_marshal_boolean): Add null checks to the new 
4301         native->managed marshalling code. Fixes #476247.
4302
4303 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * class.c (mono_class_get_vtable_entry): Move the addition of
4306         static rgctx invoke wrappers for vtable methods here, this simplifies
4307         a lot of code and causes fewer rgctx wrappers to be created.
4308
4309         * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
4310         name of the statistics to begin with an uppercase.
4311
4312 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
4313
4314         * reflection.c: Revert previous change as it breaks the build.
4315         
4316 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
4317
4318         * verify.c: Properly handle SZARRAY element type.
4319
4320         Fixes #474271.
4321
4322 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
4323
4324         * reflection.c (mono_image_create_method_token): Correctly encode
4325         MethodDef MemberRefParent token.
4326
4327         Fixes #472845.
4328
4329 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
4330
4331         * image.c (mono_image_close): Delete the critical section before
4332         freeing the memory holding it.
4333
4334 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
4335
4336         * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
4337         Fixes #476257.
4338
4339 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
4340
4341         * pedump.c (main): Call mono_marshal_init so pedump
4342         doesn't crash.
4343
4344 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
4345
4346         * loader.c (method_from_memberref): Properly fix #474271 and
4347         don't break the runtime bad.
4348
4349 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
4350
4351         * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
4352         (mono_domain_alloc0): Ditto.
4353
4354 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
4355
4356         * loader.c (method_from_memberref): Don't abort if the array
4357         method is not found. A regular loader failure is more informative
4358         and correct.
4359
4360         Fixes #474271.
4361
4362 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
4363
4364         *loader.c: Guard MonoImage::method_cache/methodref_cache
4365         using the image lock instead of the loader lock.
4366
4367         * metadata.h: Add comments about which fields are protected by
4368         the image lock.
4369
4370 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
4371
4372         * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
4373
4374         * generic-sharing.c (mono_method_construct_object_context): Remove the
4375         wrapper_type == NONE assert, it is not needed.
4376
4377 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
4378
4379         * reflection.c (clear_cached_object): New helper function.
4380         (mono_method_clear_object): New function to clear the cached reflection
4381         objects for a dynamic method.
4382
4383         * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
4384         Partly fixes # 463323.
4385         
4386 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
4387
4388         * class.c:
4389         * loader.c:
4390         * reflection.c: Remove all explicit uses of MonoImage::property_hash.
4391
4392 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
4393
4394         * image.c: Add mono_image_property_(lookup,insert,remove) functions that
4395         take the image lock instead of the loader lock.
4396
4397         * metadata-internals.h: Export new functions.
4398
4399 2009-02-12  Miguel de Icaza  <miguel@novell.com>
4400
4401         * domain.c (app_config_parse): Remove another use of stat that is
4402         not necessary as g_file_get_contents already does the presence
4403         check. 
4404
4405 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
4406
4407         * cominterop.c icall-def.h: Fix the DISABLE_COM build.
4408
4409         * marshal.c: Move the bstr handling code to cominterop.c.
4410
4411         * marshal.c: Remove some COM interop code missed previously.
4412
4413 2009-02-12  Miguel de Icaza  <miguel@novell.com>
4414
4415         More Paolo patches from the Wii port:
4416         
4417         * security.c: Remove ves_icall_System_Environment_get_UserName
4418         from here.
4419
4420         * icall.c: And put ves_icall_System_Environment_get_UserName
4421         here. 
4422
4423         * appdomain.c (mono_set_private_bin_path_from_config): Remove
4424         redundant call to stat that was only used to test for the file
4425         existence.   Patch from Paolo.
4426
4427         * gc.c (run_finalize): If COM is disabled, do not link in
4428         mono_marshal_free_ccw.
4429
4430         * generic-sharing.c: Use alloca.h here as well.
4431
4432 2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>
4433
4434         * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
4435
4436 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
4437
4438         * cominterop.c cominterop.h: New files.
4439
4440         * marshal.c: Move the COM interop related code to cominterop.c. Make a few
4441         function/typedefs which are needed by cominterop.c global.
4442
4443 2009-02-12  Mark Probst  <mark.probst@gmail.com>
4444
4445         * generic-sharing.c: Don't take the loader lock to guard image
4446         mempool allocs.
4447
4448 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4449
4450         * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
4451         called without the loader lock which is required to guard MonoImage:tokens.
4452
4453 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4454
4455         * class.c:
4456         * metadata.c:
4457         * method-builder.c:
4458         * marshal.c:
4459         * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
4460
4461 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4462
4463         * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4464         Rework the code to use regular mono_image_alloc/0.
4465
4466         * loader.c: Rework the code to use regular mono_image_alloc/0.
4467
4468         * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4469
4470 2009-02-12  Bill Holmes  <billholmes54@gmail.com>
4471
4472         * object-internals.h : Fixing a typo in the 
4473           MonoReflectionComVisibleAttribute struct.
4474
4475         * marshal.c (cominterop_com_visible): Check the implemented 
4476           interfaces for ComImport.
4477
4478         * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
4479           assume that bools should be treated as VARIANTBOOLs.
4480
4481         * marshal.c (emit_marshal_boolean): Adding cases for 
4482           MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
4483
4484         * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
4485           emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
4486
4487         * marshal.c (cominterop_get_ccw): For COM calls assume that bools
4488           should be treated as VARIANTBOOLs.    
4489
4490         Code is contributed under MIT/X11 license.
4491
4492 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4493
4494         * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
4495         allocation with the image lock.
4496
4497 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4498
4499         This patch is the last of a series to remove explicit reference of MonoImage::mempool
4500         and use mono_image_alloc set of functions instead. This time we finish with reflection.c
4501
4502         * object.c: Add mono_string_to_utf8_image.
4503
4504         * object-internals.h: Export mono_string_to_utf8_image.
4505
4506         * reflection.c: Rework all explicit references to the the image mempool to go thought
4507         the mono_image_alloc set of functions.
4508
4509 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4510
4511         This patch is the third of a series to remove explicit reference of MonoImage::mempool
4512         and use mono_image_alloc set of functions instead. This time we finish with marshal.c
4513         and generics-sharing.c.
4514
4515         * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
4516         as first argument. Note that this function remains broken as it doesn't perform locking around the
4517         mempool allocation.
4518
4519         * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
4520
4521         * image.c: Add g_slist_append_image.
4522
4523         * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
4524         the supplied image for allocation. Move code into mono_metadata_field_info_full.
4525
4526         * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
4527         Fix all related code to do the same.
4528
4529         * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
4530
4531         * metadata-internals.h: Fix the signatures.
4532
4533 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
4534
4535         This patch is the second of a series to remove explicit reference of MonoImage::mempool
4536         and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
4537         and similar to work using MonoImage.
4538
4539         * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
4540         MonoMemPool.
4541
4542         * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
4543
4544         * class.c (mono_metadata_signature_deep_dup): Same.
4545
4546         * class.c (inflate_generic_type): Same.
4547
4548         * class.c (mono_class_inflate_generic_type_with_mempool): Same.
4549
4550         * metadata.c (mono_metadata_signature_dup_full): Same.
4551
4552         * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
4553         mono_metadata_signature_dup_full.
4554
4555         * metadata.c (mono_metadata_type_dup): Same.
4556
4557         * marshal.c: Pass the image to calls to mono_metadata_type_dup.
4558
4559         * reflection.c: Same.
4560
4561         * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
4562
4563         * metadata-internals.h: Fix the signatures.
4564
4565         * class-internals.h: Same.
4566
4567 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
4568
4569         This patch is the first of a series to remove explicit reference of MonoImage::mempool
4570         and use mono_image_alloc set of functions instead. 
4571
4572         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
4573         Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
4574         of a MonoMemPool.
4575
4576         * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
4577
4578         * class.c (g_list_prepend_mempool): Removed.
4579
4580         * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
4581
4582         * image.c: Add g_list_prepend_image.
4583
4584         * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
4585
4586         * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
4587
4588
4589 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
4590
4591         * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
4592         mono_image_unlock.
4593
4594         * image.c (mono_image_init): Init the lock field.
4595  
4596         * image.c (mono_image_init): Cleanup the lock field.
4597
4598         * image.c: Add mono_image_(un)lock functions.
4599
4600 2009-02-11  Mark Probst  <mark.probst@gmail.com>
4601
4602         * class.c, class-internals.h: mono_method_get_context_general()
4603         combines the functionality of mono_method_get_context() and
4604         mini_method_get_context().
4605
4606         * generic-sharing.c, domain-internals.h:
4607         mono_method_construct_object_context() and
4608         mono_domain_lookup_shared_generic() moved from mini.
4609
4610         * icall.c (ves_icall_InternalInvoke): Handle the case where the
4611         method doesn't have the correct instantiation because it's shared
4612         generic code.  Fixes #473999.
4613
4614 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
4615
4616         * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
4617
4618         * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
4619         
4620 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
4621
4622         * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
4623
4624         * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
4625
4626         * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
4627         and recheck the cache for dups after it.
4628
4629         * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
4630
4631         Fixes one of the deadlocks found in #473150.
4632
4633 2009-02-11  Bill Holmes  <billholmes54@gmail.com>
4634
4635         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
4636           For Win32, add additional break conditions for accept.
4637
4638         Code is contributed under MIT/X11 license.
4639
4640 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4641
4642         * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
4643         lazily initialize the native wrapper cache.
4644         (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
4645         cache, since they are different from the normal wrappers.
4646
4647         * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
4648
4649         * metadata-internals.h (struct _MonoImage): Add a new wrapper for
4650         AOT compiled native wrappers.
4651
4652 2009-02-09  Geoff Norton  <gnorton@novell.com>
4653
4654         * appdomain.h:
4655         * security-core-clr.c: Allow enabling core-clr from the embedding
4656         API.
4657
4658 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4659
4660         * socket-io.c: when requesting all the local ips, if there are no
4661         interfaces up and running, MS returns 127.0.0.1.
4662
4663 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4664
4665         * mono-perfcounters-def.h: processor time is an inverse time.
4666         Fixes bug #468625.
4667
4668 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4669
4670         * socket-io.c: an empty host name returns the list of local IPs.
4671         Fixes bug #386637 part 1/2.
4672
4673 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
4674
4675         * verify.c (mono_class_interface_implements_interface): Call
4676         mono_class_setup_interfaces ().
4677         (merge_stacks): Ditto.
4678
4679 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
4680
4681         * class.c (mono_class_setup_interfaces): New function to lazily initalize
4682         klass->interfaces.
4683         (mono_generic_class_get_class): Don't initalize klass->interfaces.
4684         (mono_generic_class_get_class): Ditto.
4685
4686 2009-02-06  U-QUACK\miguel  <miguel@quack>
4687
4688         * icall-defs.h: Include also the Encrypt/Decrypt string methods as
4689         they live in security.c
4690
4691         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
4692         another bit from Paolo's code.
4693
4694 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
4695
4696         * object.c (build_imt_slots): Add a small optimization to avoid inflating
4697         methods which will be discarded by add_imt_builder_entry ().
4698
4699         * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
4700         need to be boxed.
4701
4702         * loader.c: Add a statistics for the size of the memberref signature cache.
4703         
4704         * loader.c (find_cached_memberref_sig): New helper function.
4705         (cache_memberref_sig): Ditto.
4706
4707         * loader.c: Cache the result of parsing memberref signatures, since otherwise
4708         they will be parsed again for every generic instantiation, leading to unbounded
4709         memory growth.
4710
4711 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4712
4713         * loader.c (mono_get_method_from_token): Avoid creating class for the generic
4714         parameters of generic methods.
4715
4716         * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
4717         after the original method is copied to the inflated method.
4718         (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
4719
4720         * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
4721         field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
4722
4723         * class.c metadata.c: Update after the changes above.
4724
4725 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
4726
4727         * metadata-verify.c: Simplified error handling and added
4728         section table validation.
4729
4730 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4731
4732         * class-internals.h (MonoClassExt): New structure containing rarely used
4733         fields of MonoClass.
4734         (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
4735         through a new 'ext' field.
4736
4737         * class.c (mono_class_alloc_ext): New helper function to allocate 
4738         class->ext.
4739
4740         * class.c metadata.c reflection.c: Update after MonoClass structure changes.
4741
4742 2009-02-05  Mark Probst  <mark.probst@gmail.com>
4743
4744         * object.c (mono_object_get_virtual_method): Properly inflate
4745         generic methods.  Fixes #472692.
4746
4747 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
4748
4749         * class.c (mono_class_create_from_typedef): The CLR supports SystemF
4750         recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
4751         for the parent type, the created type must be ready to be used on a generic
4752         instantiation.
4753         We fill this_arg/byval_arg if the parent is a generic instance to make sure
4754         we won't have duplicated entries in generic_inst_cache.
4755
4756         Fixes #469553.
4757
4758 2009-02-05  Miguel De Icaza  <miguel@novell.com>
4759
4760         * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
4761         replace with plain BSD per the comments on the bug MONO77637.
4762
4763 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4764
4765         * class.c (mono_class_get_generic_class): New accessor function.
4766         (mono_class_get_generic_container): Ditto.
4767
4768         * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
4769         fields, similar to the ones in MonoMethod.
4770
4771         * class.c (mono_generic_class_get_class): Set klass->is_inflated.
4772         (mono_class_create_from_typedef): Set klass->is_generic if needed.
4773
4774         * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
4775         
4776         * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
4777         the same information as element_class->byval_arg.
4778
4779         * class.c reflection.c: Remove references to class->byval_arg.
4780
4781         * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
4782         klass->enum_basetype directly.
4783
4784         * verify.c metadata.c object.c icall.c reflection.c: Use 
4785         mono_class_enum_basetype () instead of accessing klass->enum_basetype 
4786         directly.
4787
4788 2009-02-04  Miguel de Icaza  <miguel@novell.com>
4789
4790         * icall-def.h: Remove internal calls for sockets when
4791         DISABLE_SOCKET is defined, file system writing features when the
4792         OS only support reading and not writing data and Policy support if
4793         the Policy is disabled.
4794         
4795         * image.c (do_mono_image_open): Apply Paolo's patches for using
4796         mono_file_map_ APIs here.
4797
4798         * assembly.c: Add support for platforms to avoid prefix
4799         auto-detection. 
4800
4801 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
4802
4803         * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
4804         warning.
4805
4806         * class.c (mono_class_inflate_generic_class): New helper function.
4807
4808         * class.c: Use mono_class_inflate_generic_class in a few places. Add
4809         statistics for inflated methods/classes.
4810
4811         * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
4812
4813         * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
4814         the call is made from Delegate.CreateDelegate () for the invoke method of
4815         a delegate.
4816
4817         * loader.c: Add a statistics for the memory occupied by inflated signatures.
4818
4819         * metadata.c (mono_metadata_signature_size): New helper function.
4820
4821         * class.c (mono_class_get_method_from_name_flags): Add an optimization for
4822         generic instances.
4823
4824         * metadata.c (inflated_method_in_image): Avoid calling 
4825         mono_method_signature () if the method does not already have a signature.
4826
4827 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4828
4829         * verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
4830         valuetype is compatible with target type, check by inheritance as a
4831         VT is not really compatible with System.ValueType, for example.
4832
4833         * verify.c (do_invoke_method): Improve error message.
4834
4835         * verify.c (do_box_value): If boxing a nullable, use the type argument
4836         on stack instead.
4837
4838         * verify.c (do_newobj): Improve error message.  
4839
4840         Fixes #469549.
4841
4842 2009-02-03  Miguel de Icaza  <miguel@novell.com>
4843
4844         * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
4845
4846 2009-02-03  Mark Probst  <mark.probst@gmail.com>
4847
4848         * generic-sharing.c: Don't hold domain lock when calling
4849         instantiate_other_info().  Fixes #471958.
4850
4851         * domain-internals.h, loader.c: Describe locking policy of domain
4852         lock vs loader lock.
4853
4854 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4855
4856         * verify.c (mono_delegate_signature_equal): Make it possible to check
4857         first-arg-bound delegates to static method.
4858
4859         * verify.c (verify_delegate_compatibility): Correctly verify delegates to
4860         static methods with the first arg bound.
4861
4862         Fixes #469529.
4863
4864 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4865
4866         * verify.c: Added stack_slot_full_name to provide decent and more meanfull
4867         errors.
4868
4869         * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
4870         under strict mode. Any type, when boxed can be seen as a reference type.
4871
4872         Fixes #469528.
4873
4874 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4875
4876         * object.h: The lower bound of an array is a signed integer value.
4877         Introduce mono_array_lower_bound_t typedef. It should be used instead of
4878         gint32 as under MONO_BIG_ARRAYS it will be a gint64.
4879
4880         * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
4881         calculate the upper bound.
4882         
4883         Fixes #471252.
4884
4885 2009-02-02  Miguel de Icaza  <miguel@novell.com>
4886
4887         From Paolo's work, refactored, cleared up:
4888         
4889         * threadpool.c, icall.c: ifdef code that requires a working socket
4890         stack.
4891
4892         * metadata.c (mono_metadata_field_info): Do not attempt to return
4893         a value from a function declared as void.
4894
4895         * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
4896         from the console stack.
4897
4898         * assembly.c: use strrchr instead of rindex.
4899
4900         * class.c, object.c, marshal.c, icall.c, reflection.c: include
4901         alloca.h on systems that have it.
4902
4903         * environment.c: Avoid code that uses stuff from
4904         HAVE_SYS_UTSNAME_H
4905         
4906         * appdomain.c: Include sys/time.h.
4907
4908         * console-io.c: include sys/ioctl.h if it is available.
4909
4910 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
4911
4912         * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4913
4914         * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4915         the method builder.
4916
4917         * marshal.c: Set mb->skip_visibility instead of setting it on the method
4918         after it was created and cached, as the later is not thread safe.
4919         
4920 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4921
4922         * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4923         called while the debugging module is not initialized. Fixes #471669.
4924
4925 2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>
4926
4927         * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4928
4929         Fixes #471255.
4930
4931 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4932
4933         * generic-sharing.c (lookup_or_register_other_info): Make sure the
4934         loader lock is not taken while the templates lock is held.  Fixes
4935         #471089.
4936
4937 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4938
4939         * metadata.c (type_in_image): Added a check to fix a monodis
4940         crash.
4941
4942 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4943
4944         * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4945         nullable arguments.
4946
4947         * object.c (mono_runtime_invoke_array): Ditto.
4948         
4949         * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4950         freeing wrappers of dynamic methods.
4951
4952         * loader.c (mono_free_method): Call it. Fixes #463323.
4953         
4954         * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4955         methods taking vtype/byref arguments, to fix yet another bug caused by
4956         the sharing of runtime invoke wrappers. Partly fixes #471259.
4957
4958 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
4959
4960         * debug-mono-symfile.c (check_line): Return NULL instead of returning
4961         <first file in file table>:1 when the IL offset does not have an associated
4962         line number.
4963
4964 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
4965
4966         * mono-debug.c (mono_debug_lookup_locals): New function to return local
4967         variable info for a method.
4968
4969         * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4970         
4971 2009-01-30  Jb Evain  <jbevain@novell.com>
4972
4973         * pedump.c: reuse code from monodis to make sure pedump honors
4974         MONO_PATH, which is needed to verify net_2_1 assemblies.
4975
4976 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
4977
4978         * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4979         there is no line number info.
4980
4981 2009-01-29  Raja R Harinath  <harinath@hurrynot.org>
4982
4983         Avoid some MonoType allocations
4984         * reflection.c (mono_reflection_initialize_generic_parameter):
4985         Reuse MonoType from param->pklass rather than allocating one.
4986         (mono_dynamic_image_free): Update to changes.
4987
4988 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
4989
4990         Rearrange some code to improve consistency
4991         * reflection.c (mono_reflection_setup_generic_class): Move body ...
4992         (mono_reflection_initialize_generic_parameter): ... here.
4993
4994 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
4995
4996         * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4997         with type constraints as an experiment.
4998
4999         * boehm-gc.c (on_gc_notification): Update mono_stats.
5000
5001 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
5002
5003         Avoid some allocations
5004         * class-internals.h (_MonoGenericInst::type_argv): Convert from
5005         pointer to tail array to avoid extra allocation.
5006         * metadata.c (free_generic_inst): Update to changes.
5007         (mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
5008         on-stack struct.
5009
5010 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
5011
5012         * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
5013         return TRUE if the two type objects are the same.
5014
5015 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
5016
5017         * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
5018         (mono_class_native_size): Use klass->marshal_info->min_align instead of
5019         klass->min_align, since klass->min_align contains the managed alignment,
5020         while the native alignment can be different, like for longs on x86.
5021         Fixes #469135.
5022
5023         * class-internals.h (MonoMarshalType): Add a min_align field.
5024
5025 2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>
5026
5027         * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
5028         the 1.0 format.
5029
5030 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
5031
5032         * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
5033         some comments about the usage of the used_regs field.
5034
5035         * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
5036         Fixes #469217.
5037
5038 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
5039
5040         * appdomain.c: return NULL instead of throwing FileNotFoundException
5041         when LoadAssembly() fails.
5042
5043 2009-01-23  Mark Probst  <mark.probst@gmail.com>
5044
5045         * metadata.c (mono_metadata_generic_param_equal): Only compare the
5046         image if the owner is NULL.  Fixes the AOT failures.
5047
5048 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
5049
5050         * metadata.c (mono_metadata_load_generic_params): Initialize the 
5051         MonoGenericParam structure using memset so the image field is initialized
5052         as well.
5053
5054 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
5055
5056         * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
5057         a plain store.
5058
5059 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
5060
5061         * class.c (mono_class_setup_vtable_general): In the generic instance
5062         optimization, set method->slot for abstract virtual methods. Fixes part of
5063         #467834.
5064
5065 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
5066
5067         * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
5068         which signals that the unloading has started but all appdomain services must
5069         remain operational.
5070
5071         * appdomain.c (mono_domain_unload): The initial state for unloading now
5072         is unloading_start and we switch to unloading after the managed call to
5073         AppDomain::DomainUnload has finished.
5074
5075         The new unloading state has to be created because managed code in the
5076         DomainUnload event can depend on things like the threadpool still working.
5077         The domain must remain fully functional while the event executes.
5078
5079         This shown as an issue due to Process::WaitForExit, which waits for
5080         async reads of stdout and stderr to complete. Since those are processed
5081         in the threadpool the code deadlocks because the DomainUnload callback 
5082         waits for the async read finished event, which should have been set by a
5083         threadpool job but has been discarded due to the domain been in unload
5084         state.
5085
5086 2009-01-21  Mark Probst  <mark.probst@gmail.com>
5087
5088         * metadata.c (mono_metadata_generic_param_equal): Owner as well as
5089         image must match.
5090
5091 2009-01-21  Mark Probst  <mark.probst@gmail.com>
5092
5093         * reflection.c (resolve_object): For fields, inflate the class and
5094         then get the field in the inflated class.
5095
5096 2009-01-20  Mark Probst  <mark.probst@gmail.com>
5097
5098         * object-internals.h (struct _MonoException): Added a comment
5099         explaining the new use of trace_ips.
5100
5101 2009-01-20  Mark Probst  <mark.probst@gmail.com>
5102
5103         * generic-sharing.c (inflate_other_data): Inflate array methods
5104         correctly.
5105
5106         * loader.c, class-internals.h: Rename search_in_array_class() to
5107         mono_method_search_in_array_class() and make it non-static.
5108
5109 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
5110
5111         * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
5112         Hopefully fixes #458168.
5113
5114 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
5115
5116         * object.c (mono_raise_exception): Remove call to InterlockedIncrement
5117         as it is performed elsewhere.
5118
5119         Code is contributed under MIT/X11 license
5120
5121 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
5122
5123         * mono-perfcounters-def.h: Add counters for asp.net requests total and
5124         requests queued.
5125         * object.c (mono_raise_exception): Increment the exceptions total
5126         counter when an exception is thrown.
5127         * class-internals.h: Add a location for storing the total number of
5128         asp.net requests served.
5129         * mono-perfcounters.c: Implement update support for asp.net counters
5130         from the class libraries. Implement read support for asp.net counters
5131         and exceptions total counter.
5132
5133 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
5134
5135         * loader.c (search_in_array_class): Call mono_class_setup_methods () before
5136         accessing klass->methods. Fixes #467385.
5137
5138 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
5139
5140         * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
5141         for byval arguments without an [Out] attribute. Fixes #467212.
5142
5143         * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
5144         Fix compilation under android.
5145         
5146         * sgen-gc.c: Instead of scanning gray objects after all roots have been 
5147         processed, scan them directly after they are copied, to achieve better locality
5148         and cache usage.
5149
5150         * socket-io.c: Applied patch from Koushik Dutta
5151         (koush@koushikdutta.com). Disable IPV6 when running under android.
5152
5153 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
5154
5155         * icall.c (ves_icall_InternalExecute): Add write barriers.
5156
5157         * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
5158         the GC code.
5159
5160         * sgen-gc.c: Implement write barriers in IL code.
5161
5162 2009-01-17  Geoff Norton  <gnorton@novell.com>
5163
5164         * image.c: Avoid trying to walk the reference table of dynamic assemblies.
5165
5166 2009-01-17  Geoff Norton  <gnorton@novell.com>
5167
5168         * image.c: When unloading the image->references table, there can be gaps
5169         in it.  Ensure that we iterate every entry to avoid leaking assembly references
5170         when unloading an appdomain.
5171
5172 2009-01-16  Zoltan Varga  <vargaz@gmail.com>
5173
5174         * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
5175         speed up ptr-in-nursery checks.
5176
5177         * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
5178         threads_lock () to prevent deadlocks.
5179
5180         * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
5181         does not need to be scanned during minor collections, since writes to it
5182         must use write barriers.
5183
5184 2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>
5185
5186         * metadata-verify.c: Add pe nt header verification.
5187         
5188 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
5189
5190         * gc.c: Fix a few warnings when using SGEN.
5191
5192 2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>
5193
5194         * metadata-verify.c: Add pe optional header verification.
5195
5196 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * sgen-gc.c: Add support for user defined marker functions, used by
5199         MonoGHashTable to avoid registering a GC root for every hash node.
5200
5201 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
5202
5203         * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
5204         non-pinned roots into separate hashes to avoid having to traverse them
5205         in functions which are only interested in one kind.
5206
5207 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
5208
5209         * metadata-verify.c: Add pe header machine field verification.
5210         
5211 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
5212
5213         * metadata-verify.c: Add pe header size verification.
5214
5215 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
5216
5217         * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
5218         using the GC, they don't contain references.
5219
5220         * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
5221
5222 2009-01-13  Geoff Norton  <gnorton@novell.com>
5223
5224         * appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
5225         AppDomains created on the native side can be cleaned up on the native side.
5226
5227 2009-01-13  Geoff Norton  <gnorton@novell.com>
5228
5229         * appdomain.c: Ensure that we call mono_context_init for the embedding api
5230         as well as the managed api.
5231
5232 2009-01-13  Geoff Norton  <gnorton@novell.com>
5233
5234         * appdomain.h|c: New API for creating a MonoDomain in the embedding api
5235         with a MonoAppDomain initialized against it.
5236
5237 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
5238
5239         * reflection.c (MOVING_GC_REGISTER): Fix a warning.
5240         
5241         * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
5242
5243         * marshal.c: Avoid setting the exception clauses after a method has been entered 
5244         into the wrapper caches. Fixes #465700.
5245
5246         * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
5247         method builder.
5248         (mono_mb_create_method): Set the clauses from the method builder.
5249
5250 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5251
5252         * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
5253         Patch from Makoto Kishimoto.
5254
5255 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
5256
5257         * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
5258         encoding them as ROOT_DESC_COMPLEX.
5259         (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
5260
5261 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
5262
5263         * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
5264         no longer point to the nursery.
5265
5266         * sgen-gc.c: Add a few comments/FIXMEs.
5267         
5268         * sgen-gc.c: Implement scanning of the alloc_pinned objects.
5269
5270         * marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
5271         initialization of the various _method variables thread safe. Fixes
5272         #465377.
5273
5274 2009-01-12  Mark Probst  <mark.probst@gmail.com>
5275
5276         * domain.c, domain-internals.h: Remove the shared_generics_hash
5277         and its lookup functions.
5278
5279 2009-01-12  Bill Holmes  <billholmes54@gmail.com>
5280
5281         * socket-io.c:  Fixing the MSVC build. 
5282
5283         Code is contributed under MIT/X11 license.
5284
5285 2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>
5286
5287         * metadata-verify.c: Add pe header watermark verification.
5288
5289 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
5290
5291         * metadata-verify.c: Add lfanew verification.
5292
5293 2009-01-12  Jb Evain  <jbevain@novell.com>
5294
5295         * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
5296         METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
5297
5298 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
5299
5300         * socket-io.c: Fix the build.
5301
5302         * environment.c: Fix an #ifdef.
5303
5304 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
5305
5306         * threadpool.c (async_invoke_thread): Handle the wait function returning
5307         WAIT_IO_COMPLETION as well.
5308         (async_invoke_io_thread): Ditto.
5309
5310 2009-01-09  Bill Holmes  <billholmes54@gmail.com>
5311
5312         * threads.c: Fixing the Windows build.
5313
5314         Code is contributed under MIT/X11 license.
5315
5316 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
5317  
5318         * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
5319         interrupt a wait.
5320         (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
5321         the thread to wait again.
5322
5323 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
5324
5325         * metadata-verify.c: Initial skeleton of the metadata verifier.
5326
5327         * pedump.c: Add support for the metadata verifier.
5328
5329         * verify-internal.h: Export the whole assembly metadata verifier function.
5330
5331 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
5332
5333         * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
5334
5335 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
5336
5337         * Makefile.am: Upgrade dtrace-prelink.sh location.
5338
5339 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
5340
5341         * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
5342         well. Otherwise the shutdown deadlock that happens on unix will can happen
5343         as well.
5344         If the main thread code finishes too fast it's possible that the finalizer
5345         thread won't have executed yet, won't record itself as the finalizer thread
5346         and the shutdown sequence will wait on it forever.
5347
5348 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
5349
5350         * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
5351         with MSVC.
5352
5353 2009-01-08  Miguel de Icaza  <miguel@novell.com>
5354
5355         * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
5356         Robert Jordan for pointing this out.
5357
5358 2009-01-08  Christian Prochnow  <cproch@seculogix.de>
5359
5360         * icall.c
5361         * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
5362         ves_icall_System_IO_DriveInfo_GetDriveType.
5363
5364 2009-01-07  Miguel de Icaza  <miguel@novell.com>
5365
5366         * icall.c: Wrap calls to mono_strtod in CriticalSection
5367         invocations when using eglib, to work around #464316.
5368
5369 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
5370
5371         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
5372         return value of GetCurrentDirectory to never access unitialized memory.
5373
5374 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
5375
5376         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
5377         return value of GetCurrentDirectory and expand the buffer if needed.
5378
5379         Fixes #459094.
5380
5381 2009-10-07 Tom Hindle  <tom_hindle@sil.org>
5382
5383         * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
5384           Adding a call to mono_init_com_types.
5385
5386         Code is contributed under MIT/X11 license.
5387
5388 2009-01-07  Geoff Norton  <gnorton@novell.com>
5389
5390         * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
5391         darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
5392         ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
5393         be the value of the ip buffer.
5394
5395 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
5396
5397         * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
5398         interfaces_packed here.
5399
5400         Fixes part of #463294.
5401
5402 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
5403
5404         * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
5405
5406         Fixes part of #463294.
5407
5408 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
5409
5410         * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
5411         is a boxed complex as well.
5412
5413         Fixes part of #463294.
5414
5415 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
5416
5417         * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
5418         control if a methodspec should be created for the generic method definition from external assemblies.
5419         Caching of methodspec is done using the handleref hash table.
5420
5421         Fixes #462592.
5422
5423 2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>
5424
5425         * loader.c (find_method): When searching the interfaces of a class
5426         check the transitive closure of implemented interfaces.
5427
5428         Fixes #463303.
5429
5430 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
5431
5432         * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
5433         
5434 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
5435
5436         * class.c (get_implicit_generic_array_interfaces): Extract valuetype
5437         interfaces calculation to fill_valuetype_array_derived_types.
5438
5439         * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
5440         ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
5441         for example.
5442
5443         * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
5444         interfaces for valuetypes if needed.    
5445
5446         * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
5447         for their basetype as well. Types are array expanded if rank is > 0.
5448
5449         Fixes #400716.
5450
5451 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
5452
5453         * socket-io.h : Changing the signature of
5454           ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
5455           the blocking state.
5456
5457         * icall-def.h :  Changing the signature of
5458           System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
5459
5460         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
5461           For Windows only.  Avoid blocking when calling accept by
5462           querying for a connection via select.  The loop also queries
5463           the thread state every 1000 micro seconds for the thread
5464           stop state.  This will avoid the process hanging on shutdown
5465           when using a TcpChannel that is never connected to.
5466
5467         Code is contributed under MIT/X11 license.
5468
5469 2008-12-30  Marek Safar  <marek.safar@gmail.com>
5470
5471         * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
5472
5473 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
5474
5475         * class.c (get_implicit_generic_array_interfaces): Extract common
5476         code to a helper function making it a lot easier on the eyes.
5477
5478 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
5479
5480         * class.c (get_implicit_generic_array_interfaces): If the internal
5481         enumerator is an interface inflate System.Object instead of itself.
5482
5483         Fixes #461261.
5484
5485 2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>
5486
5487         * object.c (mono_runtime_invoke_array): Don't assert with
5488         byref nullable types.
5489
5490         * marshal.c (mono_marshal_get_runtime_invoke): To handle
5491         byref nullables we unbox the object and store it on the
5492         stack. 
5493         We can't use the boxed object since it is the T of Nullable<T>
5494         and the boxed representation of a nullable it's underlying type
5495         or null.
5496         We could cheat and create a boxed nullable and use the same
5497         machinery of other byref VTs but this feels like a hack and
5498         using the stack has the bonus of reducing heap pressure.
5499
5500         Fixes #461941.
5501
5502 2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>
5503
5504         * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
5505         return value.
5506
5507         Fixes #461867.
5508
5509 2008-12-19  Bill Holmes  <billholmes54@gmail.com>
5510
5511         * icall-def.h : Adding an internal call definition for 
5512           System.Environment.internalBroadcastSettingChange.
5513
5514         * icall.c : Adding a Windows only implementation to broadcast a 
5515           WM_SETTINGCHANGE when an environment variable has changed.
5516
5517         Code is contributed under MIT/X11 license.
5518
5519 2008-12-19  Mark Probst  <mark.probst@gmail.com>
5520
5521         * class.c, class-internals.h: Made
5522         mono_class_has_parent_and_ignore_generics() non-static.
5523
5524 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
5525
5526         * image.c: deal with the mmap failing when loading an image.
5527
5528 2008-12-17  Geoff Norton  <gnorton@novell.com>
5529
5530         * threadpool.c: Ensure that the io_queue_lock is initialized
5531         in all circumstances, as we always attempt to cleanup against it.
5532
5533 2008-12-17  Miguel de Icaza  <miguel@novell.com>
5534
5535         * icall.c (ves_icall_System_Environment_get_Platform): For
5536         compatibility reasons for existing client code we will keep
5537         returning 4 for a while.   
5538
5539         For how long will depend on the documentation being updated, and
5540         for us to give client code a chance to be updated.
5541
5542         This reverts the original decison on #433108 since we did not
5543         catch roughly 33 instances of the broken code in our own source
5544         code base, we did not catch failures on the buildbots, and QA did
5545         not bring this as a problem.
5546
5547         Only today I found some customer's code breaking due to our own
5548         class libraries not being fully updated and tracked it down to
5549         this change.  I am reverting it because if we could not even get
5550         our story straight in our own code base, how can we hope that our
5551         end user code be fixed?
5552
5553         As of this morning, our Wiki page that documents how to detect
5554         Unix had not been fixed.    
5555
5556 2008-12-16  Zoltan Varga  <vargaz@gmail.com>
5557
5558         * metadata.c (inflated_method_in_image): Add a workaround for #458168.
5559
5560         * class.c (mono_class_get_fields): Handle loading errors.
5561
5562 2008-12-12 Mark Mason <mmason@upwardaccess.com>
5563
5564         * 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.
5565         
5566 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
5567
5568         * mono-perfcounters.c: avoid warning.
5569
5570 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
5571
5572         * reflection.c (ensure_runtime_vtable): Work on generic instances and
5573         make sure all interfaces have MonoClass::interface_id set.
5574
5575         * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
5576         method table is property set.
5577
5578 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
5579
5580         * class.c: New function mono_class_setup_interface_id that setup
5581         MonoClass::interface_id if needed.
5582
5583         * class-internals.h: Export new function.
5584
5585 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
5586
5587         * class.c: Add code to sanity check the vtable after setup_vtable_general
5588         has done it's work.
5589
5590 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
5591
5592         * icall.c: make Assembly.GetExecutingAssembly work properly when
5593         reflection is used to invoke the method.
5594         Bug #321781 fixed.
5595
5596 2008-12-11  Mark Probst  <mark.probst@gmail.com>
5597
5598         * metadata/generic-sharing.c: Look for constraints in all type
5599         arguments, not just the first one.
5600
5601 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5602
5603         * appdomain.c: return the correct CodeBase for an Assembly instance
5604         that was loaded from the shadow-copy directories.
5605         Bug #458190 fixed.
5606
5607 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
5608
5609         * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
5610
5611         * sgen-gc.c (check_object): New debugging helper function.
5612
5613         * object.c: Fix calls to mono_value_copy_array ().
5614
5615 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
5616
5617         * class.c (mono_class_setup_fields): If working on an inflated class
5618         first check if the generic definition did init with success.
5619
5620         Fixes #445361.
5621
5622 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
5623
5624         pedump.c (main): Fix a warning.
5625
5626 2008-12-10  Bill Holmes  <billholmes54@gmail.com>
5627
5628         * object-internals.h : Adding a definition for 
5629           MonoReflectionComVisibleAttribute.
5630
5631         * marshal.c (cominterop_com_visible) :  Method added to check the 
5632           ComVisible attribute of a class.
5633
5634         * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
5635           cominterop_raise_hr_exception added to consolidate common code 
5636           to raise hr exceptions.
5637
5638         * marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
5639           if a managed class should support IDispatch.
5640
5641         * marshal.c 
5642           (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
5643           Added additional checks for managed object when getting 
5644           an IDispatch interface.
5645
5646         Code is contributed under MIT/X11 license.
5647
5648 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
5649
5650         pedump.c (main): Handle mono_get_method () returning NULL. 
5651
5652 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5653
5654         * marshal.h: Fix a warning.
5655
5656 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
5657
5658         * marshal.c : Adding cominterop_release_all_rcws to release all
5659           runtime callable wrappers held by the runtime.
5660
5661         * marshal.h : Adding declaration for cominterop_release_all_rcws.
5662           
5663         Code is contributed under MIT/X11 license.
5664
5665 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5666
5667         * metadata.c (mono_image_alloc_lock): New helper function.
5668         (mono_image_alloc0_lock): Ditto.
5669
5670         * metadata.c: Use the alloc_lock () helper functions for allocating
5671         memory from the image mempool.
5672
5673 2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
5674
5675         * class.c (mono_class_from_generic_parameter): Document it's
5676         locking behavior. Fix double checked locking here, we stored in
5677         param->pklass a partially initialized MonoClass and no membar was used.
5678
5679 2008-12-05  Marek Habersack  <mhabersack@novell.com>
5680
5681         * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
5682         (3) functions are present in the C library use them to do the
5683         job. If they are absent, make sure that the sum of int_part and
5684         dec_part is rounded before returning. This is necessary due to the
5685         division of dec_part by the power of 10 before the final addition
5686         is performed - if the result is not rounded in some cases it will
5687         yield invalid results.
5688
5689 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
5690
5691         * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
5692         wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
5693         instruction instead of a pointer constant.
5694
5695 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
5696
5697         * loader.c (mono_method_get_header): Do most of the work outside the
5698         loader lock, to avoid assembly load hook deadlocks.
5699
5700         * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
5701         (mono_metadata_parse_type_full): Ditto.
5702
5703 2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>
5704
5705         * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
5706         Make the stack depth fixed. Ensure proper argument passing to the backtrace
5707         funtions. Finally, use a lock to produce well ordered output.
5708
5709         The lock looks silly, as all calls to the corlib mempool should be guarded
5710         with the loader lock, but for some reason this fact doesn't help. 
5711
5712         * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
5713
5714 2008-12-02  Mark Probst  <mark.probst@gmail.com>
5715
5716         * socket-io.c: 64 bit big-endian fixes.
5717
5718 2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
5719
5720         * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
5721         targets that require strict compatibility between the types.
5722
5723         * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
5724         to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
5725         Kill the strict argument and create a new one valuetype_must_be_boxed.
5726
5727         * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
5728         state that all valuetypes must be boxed.
5729
5730         Fixes #448560.
5731
5732 2008-11-29  Kornél Pál  <kornelpal@gmail.com>
5733
5734         * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
5735         IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
5736
5737         Contributed under MIT/X11 license.
5738
5739 2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>
5740
5741         * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
5742         the inflate_generic_type machinery should handle it.
5743
5744         This avoids a crash when the field's flags is zero and it's type is
5745         a primitive.
5746         What happens is that mono_metadata_parse_type_full will see that opt_attrs
5747         is zero and will return one of the cached built-in primitive types. Since
5748         those types live in read-only memory, the code that copies it crashes.  
5749
5750 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5751
5752         * object.c: Don't put function descriptors into generalized IMT
5753         thunks.
5754
5755 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5756
5757         * class.c: Enable generic code sharing on PPC64.
5758
5759 2008-11-27  Mark Probst  <mark.probst@gmail.com>
5760
5761         * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
5762         from mini/mini.c.
5763
5764         * generic-sharing.c: Allocate the method template slists from the
5765         image mempool so it doesn't leak.
5766
5767 2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
5768
5769         * class.c (generic_array_methods): Release the linked list.
5770
5771 2008-11-27  Mark Probst  <mark.probst@gmail.com>
5772
5773         * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
5774         invocation to g_utf16_to_utf8().
5775
5776 2008-11-26  Mark Probst  <mark.probst@gmail.com>
5777
5778         * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
5779         arguments on big endian archs.
5780
5781 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5782
5783         * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
5784         the type name (test added in corlib).
5785
5786 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5787
5788         * pedump.c: initialize perf. counters. Fixes a segv.
5789
5790 2008-11-25  Martin Baulig  <martin@ximian.com>
5791
5792         * mono-debug-debugger.c
5793         (mono_debugger_runtime_invoke): Return the exception object if an
5794         exception was thrown.  Visual Studio displays the exception object
5795         in the locals window.
5796
5797 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5798
5799         * mini-trampolines.c (mono_delegate_trampoline): Don't return a
5800         ftnptr.
5801
5802 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5803
5804         * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
5805         MONO_TYPE_U are sizeof (gpointer), too.
5806
5807 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5808
5809         * marshal.c (mono_type_native_stack_size): Fixed size and
5810         alignment for reference types.
5811
5812 2008-11-23  Mark Probst  <mark.probst@gmail.com>
5813
5814         * class.c (mono_class_generic_sharing_enabled): Disable generic
5815         code sharing for PPC64.
5816
5817 2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
5818
5819         * icall.c (mono_method_get_equivalent_method): Make sure
5820         method->klass->methods is inited before looping over it.
5821
5822 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
5823
5824         * object.c: when calling ExecuteAssembly in a newly created domain,
5825         the configuration file and application base are already set up.
5826         Bug #446353 take 2 fixed.
5827
5828 2008-11-20  Zoltan Varga  <vargaz@gmail.com>
5829
5830         * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
5831         Fixes #444715. Fix a warning.
5832
5833 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
5834
5835         * appdomain.c: write the full path of the assembly to the .ini file
5836         created when "shadow-copying"
5837         Bug #446353 fixed.
5838
5839 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
5840
5841         * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
5842         if signature==FALSE.
5843
5844 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5845
5846         * marshal.h : Fix the cygwin build.
5847            marshal.c:12442: undefined reference to `_IID_IMarshal'
5848           
5849         Code is contributed under MIT/X11 license.
5850
5851 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5852
5853         * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
5854           free threaded marshaler when QueryInterface is called on a COM callable
5855           wrapper requesting the IMarshal interface.
5856           
5857         Code is contributed under MIT/X11 license.
5858
5859 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5860
5861         * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
5862
5863         * reflection.c (mono_type_get_object): Special case the very common
5864         void type.
5865
5866         * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
5867         hold typeof(void).
5868
5869 2008-11-13  Bill Holmes  <billholmes54@gmail.com>
5870
5871         * process.h : Adding method declaration for
5872           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5873           
5874         * process.c : Adding implementation for
5875           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5876           
5877         * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
5878           to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5879
5880         Code is contributed under MIT/X11 license.
5881
5882 2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
5883
5884         * appdomain.c (unload_thread_main): Clean up threadpool by
5885         calling mono_thread_pool_remove_domain_jobs.
5886
5887         * domain-internals.h (struct _MonoDomain): Add new fields to
5888         help coordinate the cleanup of the threadpool.
5889
5890         * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
5891         that cleans up the threadpool of all jobs associated with an appdomain.
5892         It does that by cleaning up the queues and making sure all active
5893         threads are accounted.
5894
5895         * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
5896         unloaded or in the process of. Take this is such way that there is
5897         no race condition between another thread starting the unload and the
5898         current thread acknowledging it.
5899
5900         * threadpool.c (async_invoke_thread): Same.
5901
5902         * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
5903         firing the new thread.
5904
5905         * threadpool.c (start_tpthread): Same.
5906
5907         * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5908
5909         * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5910
5911 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
5912
5913         * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5914         Add support for DuplicateHandle.
5915         
5916         * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5917         Add support for DuplicateHandle.
5918         
5919         * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5920         Add support for DuplicateHandle.
5921
5922         Code is contributed under MIT/X11 license.
5923
5924 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5925
5926         * class-internals.h: Make min_align into a whole byte.
5927
5928         * class.c: Set min_align for SIMD types to 16.
5929
5930 2008-11-05  Geoff Norton  <gnorton@novell.com>
5931
5932         * attach.c: Default the attacher to enabled for all cases including
5933         embedded.
5934
5935 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5936
5937         * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5938         change r117650.
5939
5940 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5941
5942         * monitor.c, monitor.h: New function for querying offsets of
5943         members of MonoThreadsSync.
5944
5945 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5946
5947         * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5948         to speed up this function and to avoid the boundless memory growth caused by
5949         the signature_dup () calls.
5950
5951 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5952
5953         * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5954         wrapper.
5955
5956         * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5957         by 1 bit.
5958
5959         * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5960
5961 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5962
5963         * appdomain.c:
5964         * domain-internals.h: made mono_set_private_bin_path_from_config()
5965         "internal".
5966         * object.c: call the above function after setting the configuration
5967         file path for the root domain.
5968         Fixes bug #314478.
5969
5970 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5971
5972         * assembly.c: when the assembly is loaded from an absolute path, end
5973         basedir with a directory separator.
5974         Bug #440781 fixed.
5975
5976 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5977
5978         * monitor.c (mono_monitor_get_fast_enter_method): If
5979         CompareExchange is not available, don't create the fastpath
5980         instead of asserting.  (The method is missing in the 1.1 profile.)
5981
5982 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5983
5984         * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5985
5986         * monitor.c, monitor.h: Code for generating Monitor.Enter and
5987         Monitor.Exit IL fastpaths.
5988
5989 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5990
5991         * class.c (mono_class_create_from_typedef): Added Vector2ul.
5992
5993 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5994
5995         * class.c (mono_class_create_from_typedef): Added Vector2l.
5996
5997 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5998
5999         * class.c (mono_class_create_from_typedef): Added Vector2d.
6000
6001 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
6002
6003         * appdomain.c: translate \ into / for cache_path.
6004         * domain-internals.h: new mono_is_shadow_copy_enabled().
6005         * icall.c: (fill_reflection_assembly_name) do the same path
6006         manipulations that get_code_base does.
6007         (get_code_base) use mono_is_shadow_copy_enabled.
6008
6009 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
6010
6011         * appdomain.c: shadow-copied assemblies go to CachePath +
6012         ApplicationName when both are set. DynamicBase has nothing to do with
6013         shadow copies.
6014         Bug #406877 fixed.
6015
6016 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
6017
6018         * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
6019         STANDALONESIG table.
6020
6021         * metadata-internals.h (struct _MonoDynamicImage): Add cache for
6022         standalone signatures.
6023
6024         * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
6025         comparison code: instead of comparing the signatures using a custom
6026         equals function, transform them to a common signature and compare that. This
6027         works better with AOT.
6028
6029 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
6030
6031         * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
6032
6033         * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
6034         call for generic instances.
6035         (mono_class_setup_properties): Call setup_properties () before accessing
6036         gklass->properties.
6037
6038         * class.c (mono_class_get_virtual_methods): New helper function to iterate
6039         over the virtual methods of a class using metadata if possible, avoiding the
6040         creation of MonoMethod's for non-virtual methods.
6041         
6042         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
6043         get_virtual_methods () to iterate over the virtual methods of classes.
6044
6045 2008-10-25  Martin Baulig  <martin@ximian.com>
6046
6047         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
6048
6049 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6050
6051         * class.c (mono_class_create_from_typedef): Added Vector4i.
6052
6053 2008-10-24  Mark Probst  <mark.probst@gmail.com>
6054
6055         * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
6056         ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
6057         special-casing applies to eliminate the call completely.
6058
6059 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6060
6061         * class.c (mono_class_create_from_typedef): Added Vector8s.
6062
6063 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
6064
6065         * class.c (mono_class_create_from_typedef): Added Vector16sb.
6066
6067 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6068
6069         * icall.c: get rid of annoying warning.
6070
6071 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6072
6073         * threadpool.c: in 1.x, if you change the background status of the
6074         threadpool thread, it's not reset.
6075         Remove unnecessary calls to SetState.
6076
6077 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6078
6079         * threadpool.c: asynchronously create a set of idle threads upon first
6080         use of the threadpool. SetMinThreads will now start the appropriate
6081         number of idle threads if they are not already running. The default is
6082         1 threadpool thread per CPU. Increased the maximum number of threads
6083         per CPU to 10.
6084
6085 2008-10-22  Martin Baulig  <martin@ximian.com>
6086
6087         Revert r116521 from Zoltan, it breaks the debugger:
6088
6089         * class.c (mono_class_get_virtual_methods): New helper function to iterate
6090         over the virtual methods of a class using metadata if possible, avoiding the
6091         creation of MonoMethod's for non-virtual methods.
6092         
6093         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
6094         get_virtual_methods () to iterate over the virtual methods of classes.
6095
6096 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6097
6098         * threads.c: when creating a threadpool thread, set its state to
6099         'background'.
6100         * threadpool.c: reset the background state of a threadpool thread
6101         after finishing each work item
6102         Bug #437888 fixed.
6103
6104 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
6105
6106         * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
6107         
6108         * class.c (mono_class_setup_vtable_general): Add an optimized version for
6109         generic instances which works by inflating the methods in the container
6110         class's vtable.
6111
6112         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
6113         variant which doesn't make a copy if no inflation was done.
6114         (mono_class_setup_fields): Use it.
6115
6116         * metadata.c (mono_metadata_get_shared_type): New helper function to
6117         return a shared instance of a given MonoType.
6118
6119         * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
6120         a copy of most non-generic types.
6121
6122 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6123
6124         * threadpool.c: remove one more GetSystemInfo () call.
6125
6126 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6127
6128         * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
6129         use the code in mono-proclib.h to get processor information.
6130
6131 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6132
6133         * appdomain.c: fixed the logic that determines whether assemblies in a
6134         directory are "shadow-copied" or not. Bug #433483 fixed.
6135
6136 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
6137
6138         * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
6139         warning.
6140
6141 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
6142
6143         * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
6144         returning a vtype.
6145
6146         * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
6147         reflection.c: Use mono_field_get_name () for accessing a field's name.
6148
6149         * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
6150         class.c
6151
6152         * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
6153         field.
6154
6155         * loader.c (find_method_in_class): Reenable the metadata optimization by
6156         not using it for generic instances.
6157
6158         * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
6159         data/def_type fields from MonoClassField into a separate structure.
6160         (struct MonoClassField): Remove data/def_type fields.
6161         (struct _MonoClass): Add a 'field_def_values' array to store the default
6162         values/RVA for fields.
6163
6164         * class.c reflection.c: Update after the changes.
6165         
6166         * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
6167         for accessing field->data.
6168
6169         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
6170
6171         * loader.c (find_method_in_class): Revert the last change for now as
6172         it breaks Mono.C5 unit tests.
6173
6174         * class-internals.h (struct _MonoDynamicGenericClass): Add fields
6175         'field_generic_types' and 'field_objects' which contain the information
6176         previously stored in MonoInflatedField.
6177         (MonoInflatedField): Delete.
6178         (struct _MonoClassField): Delete 'generic_info' field.
6179
6180         * reflection.c: Store the information which was previously in 
6181         field->generic_info in MonoDynamicGenericClass instead.
6182
6183         * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
6184         MonoClassField changes.
6185
6186 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
6187
6188         * marshal.c, method-builder.c: get rid of wrapper_hash and instead
6189         store the value inside the data array of the MonoMethodWrapper.
6190         This saves memory, is faster and fixes the lifetime issues (methods
6191         were never removed from the hash previously). May also fix bug#436996.
6192
6193 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
6194
6195         * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
6196         generic instances, compute the type from the generic definition instead of
6197         looking in field->generic_info.
6198
6199         * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
6200         for inflated fields, the only user was get_fieldref_token () which no
6201         longer needs it.
6202
6203         * class.c (mono_class_init): Revert the last change as it seems to cause
6204         crashes.
6205
6206         * class-internals.h (struct _MonoClassField): Reorder fields to save 4
6207         bytes on 64 bit platforms.
6208
6209         * object.c (mono_class_create_runtime_vtable): Fix a warning.
6210         
6211         * object.c (mono_class_create_runtime_vtable): Don't initalize
6212         field->data/field->def_type here, it is done lazily by 
6213         mono_class_get_field_default_value ().
6214
6215         * icall.c (ves_icall_get_enum_info): Call 
6216         mono_class_get_field_default_value () instead of directly accessing
6217         field->data and field->def_type.
6218
6219         * object.c (get_default_field_value): Ditto.
6220
6221         * class.c (mono_field_get_data): Ditto.
6222         
6223         * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
6224         call for generic instances.
6225
6226         * loader.c (find_method_in_class): If klass != from_class, then inflate
6227         the method with the context of from_class, since the caller assumes this.
6228
6229 2008-10-20  Zoltan Varga  <vargaz@gmail.com>
6230
6231         * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
6232         for accessing method->slot.
6233
6234 2008-10-20  Cedric Vivier  <cedricv@neonux.com>
6235
6236         * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
6237
6238 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
6239
6240         * class.c (mono_method_get_vtable_index): Use
6241         mono_method_get_vtable_slot () for accessing method->slot.
6242
6243         * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
6244         accessing klass->methods.
6245
6246         * class.c (mono_method_get_vtable_slot): New helper function.
6247         (mono_class_get_vtable_entry): Ditto.
6248         (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
6249         accessing method->slot.
6250
6251         * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
6252         method to get_inflated_method ().
6253
6254         * class.c (mono_class_get_inflated_method): New helper method to obtain
6255         a method of an inflated class without calling setup_methods ().
6256         (mono_class_get_cctor): Use get_inflated_method.
6257
6258         * generic-sharing.c (mono_class_get_method_generic): Ditto.
6259         
6260         * marshal.c image.c: Lazily create all the marshal caches.
6261
6262         * image.c (mono_image_init): Move initialization of runtime_invoke
6263         caches to marshal.c.
6264
6265         * marshal.c (get_cache): New helper function to lazily initialize a 
6266         wrapper cache.
6267         (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
6268
6269         * debug-helpers.c (mono_method_full_name): Include generic arguments.
6270
6271 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
6272
6273         * loader.c: fixed check for interface type.
6274
6275 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6276
6277         * appdomain.c: check for NULL setup before it's referenced.
6278
6279 p
6280 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6281
6282         * class.c: remove the unused old vtable setup code.
6283
6284 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6285
6286         * class.c: don't depend on interface order in
6287         setup_interface_offsets (bug #435777).
6288         * reflection.c: sort the InterfaceImpl table (patch from
6289         Jb Evain  <jbevain@novell.com>).
6290
6291 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
6292
6293         * assembly.c (mono_assembly_open_full): Avoid loading images while holding
6294         the low level assemblies lock.
6295
6296 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
6297
6298         * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
6299         object.c, reflection.c, socket-io.c, threads.c: introduced
6300         mono_framework_version () to return the major framewrok version,
6301         changed the code that was using more complex patterns to use it.
6302         Return the correct value for PlatformID for OSX.
6303
6304 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
6305
6306         * icall-def.h, process.h, process.c: added an icall to get info about
6307         processes using mono-proclib.
6308
6309 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
6310
6311         * mono-perfcounters.c: use the mono-proclib functions to
6312         access process information.
6313
6314 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6315
6316         * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
6317         monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
6318         reflection.c: remove rawbuffer usage: mmap support is more sanely
6319         provided by utils/mono-mmap.
6320
6321 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
6322
6323         * gc.c: use posix semaphores when possible so that
6324         mono_gc_finalize_notify() is signal safe.
6325
6326 2008-10-11  Zoltan Varga  <vargaz@gmail.com>
6327
6328         * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
6329         #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
6330         be #ifdef-ed out, the linker will remove the rest.
6331
6332         * marshal.c: Implement DISABLE_COM.
6333
6334         * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
6335
6336 2008-10-11  Miguel de Icaza  <miguel@novell.com>
6337
6338         * locales.c (string_invariant_compare_char): Optimization: do not
6339         call g_unichar_type unless we actually need the information.
6340
6341 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6342
6343         * object.c, class-internals.h: Also create remoting trampolines
6344         for generic methods.  Pass the domain to the remoting trampoline
6345         creation function, too.
6346
6347 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
6348
6349         * class.c (mono_class_init): Fix+re-enable the finalize optimization.
6350
6351 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6352
6353         * class.c (mono_class_create_from_typedef): Vector4u was renamed to
6354         Vector4ui.
6355
6356 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
6357
6358         * assembly.c:
6359         * locales.c: remove the use of g_strdown. Fixes bug #322313.
6360
6361 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6362
6363         * assembly.c: in mono_assembly_load_friends() take the assemblies lock
6364         for the least possible amount of time (extending the fix in r113458).
6365
6366 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6367
6368         * class.c (mono_class_create_from_typedef): Retrofit to new type names.
6369
6370 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6371
6372         * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
6373         as possible simd intrinsic types.
6374         Optimized the test to check for the common prefix first.
6375
6376 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
6377
6378         * class.c: back out part of a broken optimization committed on
6379         May 23th (bug #433908).
6380
6381 2008-10-09  Mark Probst  <mark.probst@gmail.com>
6382
6383         * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
6384         Win32.  Should fix #432388 for most cases until we have the new
6385         profiler on Win32.
6386
6387 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
6388
6389         * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
6390         instead of using inst->id so the hash is stable for AOT.
6391
6392 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6393
6394         * appdomain.c:
6395         * icall.c: create a .ini file for shadow-copied assemblies that
6396         contains the location of the original assembly. Use this to return the
6397         proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
6398         Also fix the number of '/' for windows when returning the CodeBase.
6399         Fixes bug #430920.
6400
6401 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6402
6403         * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
6404
6405         Code is contributed under MIT/X11 license.
6406
6407 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6408
6409         * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
6410           if if the class vtable needs initialized.
6411
6412         Code is contributed under MIT/X11 license.
6413
6414 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6415
6416         * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
6417           Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
6418           STRING->BSTR, and CLASS->INTERFACE.
6419
6420         Code is contributed under MIT/X11 license.
6421
6422 2008-10-07  Marek Habersack  <mhabersack@novell.com>
6423
6424         * sysmath.h: changed the declaration of the
6425         ves_icall_System_Math_Round2 icall by adding an extra
6426         away_from_zero parameter.
6427
6428         * sysmath.c (ves_icall_System_Math_Round2): added support for
6429         away from zero rounding. The icall now takes an extra boolean
6430         parameter to signal that away from zero operation is requested.
6431
6432 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6433
6434         * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
6435         the delegate klass so it can work with full-aot.
6436         (mono_marshal_get_delegate_end_invoke): Ditto.
6437         (mono_marshal_get_delegate_invoke): Ditto.
6438
6439 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
6440
6441         * gc.c, attach.h, attach.c: remove a bad pattern:
6442         add_finalizer_callback () is not implemented correctly, it can't
6443         without adding more overhead to the finalizer loop and it's not
6444         even needed, since we know exactly what we need to call, so there is
6445         no need to do so through an expensive function pointer.
6446
6447 2008-10-04  Zoltan Varga  <vargaz@gmail.com>
6448
6449         * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
6450         for the no-gc case.
6451         * attach.c (mono_attach_init): Remove the #ifdef.
6452
6453 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
6454
6455         * attach.c (mono_attach_init): Don't use
6456         mono_gc_add_finalizer_thread_callback when compiling without GC.
6457         Fixes #432306.
6458         
6459         Code is contributed under MIT/X11 license.
6460
6461 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6462
6463         * class.c (mono_class_create_from_typedef): Remove the 
6464         #ifndef DISABLE_SIMD stuff.
6465
6466 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6467
6468         * class-internals.h (MonoClass): Added simd_type bit field.
6469
6470         * class.c (mono_class_create_from_typedef): Check if type is a simd
6471         intrinsic.
6472
6473 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6474
6475         * object.c (mono_method_add_generic_virtual_invocation): Only add
6476         instantiations to the thunk whose count is at least as large as
6477         the threshold.
6478
6479 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
6480
6481         * icall.c: changed the Type of the exception thrown when trying to
6482         invoke a constructor on an abstract class. Part of the fix for bug
6483         #324185.
6484
6485 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6486
6487         * class.c, class-internals.h (mono_method_get_vtable_index): New
6488         function which returns the index into the vtable and properly
6489         handles inflated virtual generic methods.
6490
6491 2008-10-01  Mark Probst  <mark.probst@gmail.com>
6492
6493         * object.c, domain.c, object-internals.h, domain-internals.h:
6494         Generalize IMT thunk machinery to also handle thunks for virtual
6495         generic method invokes.  When a virtual generic method is invoked
6496         more than a number of times we insert it into the thunk so that it
6497         can be called without lookup in unmanaged code.
6498
6499         * generic-sharing.c, class-internals.h: Fetching a
6500         MonoGenericInst* for a method from an (M)RGCTX.
6501
6502 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
6503
6504         * marshal.c (emit_marshal_string): Applied a variant of a patch by
6505         tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
6506         marshalling. Fixes #431304.
6507
6508 2008-10-01  Bill Holmes  <billholmes54@gmail.com>
6509
6510         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
6511           handle when ref is specified without In or Out.
6512
6513         Code is contributed under MIT/X11 license.
6514
6515 2008-09-30  Mark Probst  <mark.probst@gmail.com>
6516
6517         * loader.c (mono_get_method_constrained): Don't expand method with
6518         the class's context, because it's already a method of that class.
6519
6520 2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>
6521
6522         * attach.c : should be correct build fix.
6523
6524 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
6525
6526         * attach.c: Fix the previous change.
6527
6528 2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>
6529
6530         * attach.c : quick w32 build fix.
6531
6532 2008-09-27  Miguel de Icaza  <miguel@novell.com>
6533
6534         * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
6535         crashes MonoDevelop: #430455.
6536
6537 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
6538
6539         * domain-internals.h (struct _MonoDomain): Move most fields used only by
6540         the JIT do MonoJitDomainInfo in ../mini/mini.h.
6541
6542         * domain.c: Remove initialization/cleanup of the removed fields.
6543
6544 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6545
6546         * class.c (mono_class_generic_sharing_enabled): Enable generic
6547         code sharing for PPC.
6548
6549 2008-09-26  Bill Holmes  <billholmes54@gmail.com>
6550
6551         * attach.c : Fixing the Windows builds.
6552
6553         Code is contributed under MIT/X11 license.
6554
6555 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6556
6557         * class.c (mono_class_generic_sharing_enabled): Experimentally change 
6558         the default generic sharing mode to 'all'.
6559
6560 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6561
6562         * generic-sharing.c, class-internals.h: New function for checking
6563         whether a method needs a static RGCTX invoke wrapper.  A few
6564         funtions moved from mini/generic-sharing.c.
6565
6566         * icall.c: New function used.
6567
6568 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6569
6570         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6571         Static RGCTX invoke wrapping applies to value type methods, too.
6572
6573         * class.c (mono_class_setup_vtable_general): In generic-shared
6574         value types, wrap methods with a static RGCTX invoke wrapper.
6575
6576 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6577
6578         * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
6579         osx build.
6580
6581 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6582
6583         * gc.c (mono_gc_add_finalizer_thread_callback): New function to
6584         register a callback which is called when the finalizer thread is woken
6585         up.
6586         (finalizer_thread): Call the callback if it exists.
6587
6588         * attach.h attach.c: New files, implementing the attach mechanism.
6589
6590         * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
6591         
6592         * object.c (mono_object_get_virtual_method): Fix an assertion introduced
6593         by the previous change.
6594
6595 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6596
6597         * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
6598         loader.c, marshal.c, metadata-internals.h, metadata.c,
6599         method-builder.c, object.c, reflection.c: introduced specific functions
6600         to allocate from the domain and image mempools and cleaned up most of
6601         the code to use them (still missing a few in reflection.c).
6602         Keep the loader bytes counter updated.
6603
6604 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
6605
6606         * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
6607         loader-related counters.
6608
6609 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
6610
6611         * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
6612         added more MS-compatible counters.
6613
6614 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
6615
6616         * class.c (mono_class_setup_fields): Call setup_fields before accessing
6617         class->blittable. Fixes #428217.
6618
6619 2008-09-21  Zoltan Varga  <vargaz@gmail.com>
6620
6621         * reflection.c (mono_image_get_field_on_inst_token): Call 
6622         field_encode_signature () since that handles custom modifiers too.
6623         Fixes #424663.
6624
6625 2008-09-20  Zoltan Varga  <vargaz@gmail.com>
6626
6627         * reflection.c (add_custom_modifiers): New helper function to merge custom
6628         modifiers stored in objects to a MonoType.
6629         (fieldref_encode_signature): Encode custom modifiers.
6630         (mono_image_get_generic_field_token): Call add_custom_modifiers ().
6631         (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
6632
6633 2008-09-19  Kornél Pál  <kornelpal@gmail.com>
6634
6635         * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
6636         calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
6637         64-bit IL only images because imports are not resolved for IL only images.
6638         Special thanks to Bill Holmes for finding this bug and testing the patch.
6639         Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
6640
6641         Contributed under MIT/X11 license.
6642
6643 2008-09-19  Miguel de Icaza  <miguel@novell.com>
6644
6645         * mono-config.c (dllmap_start): Add support for the bits keyword
6646         on dllentry and dllmap to easily detect 32 vs 64 bit systems.
6647
6648 2008-09-19  Mark Probst  <mark.probst@gmail.com>
6649
6650         * reflection.c (inflate_mono_method): When the class the method is
6651         to be inflated for is itself not inflated, just return the method.
6652
6653 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
6654
6655         * mono-perfcounters.c: use more user friendly process instance names.
6656
6657 2008-09-18  Bill Holmes  <billholmes54@gmail.com>
6658
6659         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
6660           handle "[in] ref" and "[in][out] ref" cases.
6661
6662         * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
6663           to mono_mb_create_method.  This was causing problems calling native to
6664           managed passing Variants by value.
6665
6666         Code is contributed under MIT/X11 license.
6667
6668 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
6669
6670         * class.c (can_access_internals): Call mono_assembly_load_friends ()
6671         before accessing the friend_assembly_names field.
6672
6673         * assembly.c (mono_assembly_load_friends): Make this callable multiple
6674         times.
6675         (mono_assembly_load_from_full): Avoid calling load_friends (), it is
6676         called lazily when it is needed.
6677
6678         * metadata-internals.h (struct _MonoAssembly): Add 
6679         'friend_assembly_names_inited' flag.
6680
6681 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
6682
6683         * mono-perfcounters-def.h: fix the types of a few counters.
6684         * mono-perfcounters.c: implemented the instance names getter
6685         and a few bugfixes.
6686
6687 2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>
6688
6689         * culture-info-table.h : regenerated.
6690
6691 2008-09-17  Robert Jordan  <robertj@gmx.net>
6692
6693         * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
6694         context bound objects. Fixes #415577.
6695
6696         Code is contributed under MIT/X11 license.
6697
6698 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
6699
6700         * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
6701         implementation (bug #423582).
6702
6703 2008-09-16  Zoltan Varga  <vargaz@gmail.com>
6704
6705         * object.c (mono_object_get_virtual_method): Handle the case method->slot
6706         is not set. Fixes #426309.
6707
6708 2008-09-16  Jb Evain  <jbevain@novell.com>
6709
6710         * class.c (mono_class_from_name): fix the exported type look up
6711         when the type is defined in a referenced assembly.
6712
6713 2008-09-16  Jb Evain  <jbevain@novell.com>
6714
6715         * reflection.c (mono_image_fill_export_table_from_type_forwarders):
6716         increment the next index counter on each iteration to make that work
6717         for more than one type forwarder. Unmanaged part to fix #422929.
6718
6719 2008-09-15  Mark Probst  <mark.probst@gmail.com>
6720
6721         * object-internals.h: enum ComInterfaceType in
6722         MonoInterfaceTypeAttribute is guint32, not guint16.
6723
6724 2008-09-12  Mark Probst  <mark.probst@gmail.com>
6725
6726         * cil-coff.h, image.c, reflection.c: Endianness fixes in image
6727         writing code.
6728
6729 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6730
6731         * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
6732         not gboolean.
6733
6734 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6735
6736         * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
6737         Endianness fixes for MonoSymbolFileOffsetTable.
6738
6739 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
6740
6741         * process.c (complete_path) : Removing quotes from the 
6742           input path.  The glib file routines do not handle file paths
6743           that have quotes around them.
6744
6745         Code is contributed under MIT/X11 license.
6746
6747 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
6748
6749         * socket-io.h : Adding a comment to provide locations where 
6750           changes to MonoSocketAsyncResult need to be synced.
6751
6752         Code is contributed under MIT/X11 license.
6753
6754 2008-09-10  Zoltan Varga  <vargaz@gmail.com>
6755
6756         * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
6757         parameters as well. Fixes #425001.
6758
6759 2008-09-08  Miguel de Icaza  <miguel@novell.com>
6760
6761         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
6762         windows build.
6763
6764 2008-09-07  Miguel de Icaza  <miguel@novell.com>
6765
6766         * console-io.c: Add support for tracking the window size if it
6767         changes.
6768
6769         The setup is very simple: the TtySetup function will now return a
6770         pointer to a location in memory that tracks the current console
6771         size.  The managed code checks its current value every time its
6772         queried against the last value set, and updates accordingly.
6773
6774         With this setup we can work with multiple consoles, and we do not
6775         require to poke into managed code from a signal handler.
6776
6777         Additionally, the environment for COLUMNS and LINES is now handled
6778         in unmanaged code.
6779
6780         (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
6781
6782 2008-09-07  Mark Probst  <mark.probst@gmail.com>
6783
6784         * marshal.c (mono_type_native_stack_size): Treat
6785         MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
6786
6787 2008-09-04  Jb Evain  <jbevain@novell.com>
6788
6789         * class.c (mono_class_is_assignable_from): fix assignability of nullables
6790         to nullables.
6791
6792 2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>
6793
6794         * verify.c (verify_type_compatibility_full): Revert change
6795         to allow converting a native int to unmanaged pointer be verifiable
6796         under non-strict mode.
6797         It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
6798
6799         * verify.c: Added some TODOs.
6800
6801 2008-09-02  Bill Holmes  <billholmes54@gmail.com>
6802
6803         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
6804           ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
6805           Changed to use GlobalAlloc for the memory returned on Windows platforms.
6806
6807         Code is contributed under MIT/X11 license.
6808
6809 2008-09-02  Jb Evain  <jbevain@novell.com>
6810
6811         * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
6812
6813 2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>
6814
6815         reflection.c (typebuilder_setup_fields): Handle classes with
6816         explicit size.
6817
6818 2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>
6819
6820         class.c (mono_class_setup_events): Add memory barrier due to
6821         double checked locking.
6822         
6823         class.c (mono_class_setup_properties): Same.
6824
6825 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
6826
6827         * class.c (mono_class_is_assignable_from): Fix the build.
6828         
6829         * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
6830         before accessing klass->interface_bitmap. Fixes #421744.
6831
6832 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
6833
6834         * appdomain.c (mono_runtime_set_no_exec): New internal function setting
6835         the runtime into no-exec mode, useful when running the AOT compiler.
6836
6837         * appdomain.c gc.c object.c: Avoid executing managed code when running
6838         in no-exec mode.
6839         
6840         * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
6841
6842         * reflection.c (_mono_reflection_get_type_from_info): Handle the 
6843         special case when the mono_assembly_loaded () returns NULL because the 
6844         search hook is not installed.
6845
6846 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
6847
6848         * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
6849         crashes in bstr marshalling on linux.
6850
6851 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6852
6853         * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
6854         with more than one parameter.
6855
6856 2008-08-24  Miguel de Icaza  <miguel@novell.com>
6857
6858         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
6859         start/stop flow control as well when turning off ICANON (allows
6860         C-s and C-q to be read by Console.ReadKey).
6861
6862 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6863
6864         * class.c (mono_class_init): Move the initialization of nested classes
6865         into mono_class_get_nested_types (). Fixes #418433.
6866
6867         * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
6868         flag.
6869
6870         * class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
6871         iterating tough the nested classes of a class.
6872
6873 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
6874
6875         * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
6876         on arm.
6877
6878 2008-08-22  Miguel de Icaza  <miguel@novell.com>
6879
6880         * console-io.c (sigcont_handler): Support signal chaining for
6881         SIGCONT.
6882
6883         (console_set_signal_handlers): Use best practices with sigaction,
6884         clear the structure before using it. 
6885
6886 2008-08-22  Robert Jordan  <robertj@gmx.net>
6887
6888         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
6889         Fix the Windows build.
6890
6891 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
6892
6893         * class.c (mono_class_generic_sharing_enabled): Make the default
6894         sharing mode 'corlib'.
6895
6896 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * console-io.c (console_set_signal_handlers): Fix a warning.
6899
6900         * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
6901         method normally, the JIT will take care of avoiding recursion.
6902
6903 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
6904
6905         * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6906
6907         Code is contributed under MIT/X11 license.
6908
6909 2008-08-20  Miguel de Icaza  <miguel@novell.com>
6910
6911         * console-io.c (sigcont_handler): We need to restore the entire
6912         termios state, not only the original settings, as things like echo
6913         can be controlled after this (Booish exposes this issue with its
6914         own ReadLine implementation).
6915
6916         Additionally, we need to set the terminal back into keypad_xmit
6917         mode.
6918         
6919         (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6920         string as a paramter as well.   Otherwise we get different
6921         keyboard sequences.
6922
6923 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
6924
6925         * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6926         delegates with byref out parameter passing. Fixes #351520.
6927
6928         * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6929         a generic context.
6930         (mono_type_get_desc): Add the type arguments for GENERICINST.
6931         (mono_method_full_name): Stringify the class name using mono_type_full_name
6932         so it picks up generic arguments.
6933
6934 2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>
6935
6936         * console-io.c: Removed debug output.
6937
6938 2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>
6939
6940         reflection.c (mono_reflection_create_runtime_class): Alloc
6941         the nested classes linked list using the dynamic image mempool.
6942         Fixes leak in corlib compilation.
6943
6944 2008-08-19  Miguel de Icaza  <miguel@novell.com>
6945
6946         * console-io.c: Fix incredibly annoying behavior on the console
6947         after resuming execution after control-z.   This affected every
6948         console application.
6949
6950 2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>
6951
6952         * mempool-internals.h: Header for mono private mempool functions. The first
6953         two function are for allocating glib linked lists using pools.
6954
6955         * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6956
6957         * Makefile.am: Added mempool-internals.h.
6958
6959 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
6960
6961         * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6962         (mono_domain_free): Ditto.
6963
6964         * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6965         be used by the JIT to store its domain-specific information, instead of putting
6966         it directly into MonoDomain.
6967
6968         * domain.c (mono_install_create_domain_hook): New helper function to install
6969         a hook which initializes domain->runtime_info.
6970
6971         * domain.c (mono_install_free_domain_hook): Ditto.
6972         
6973 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
6974
6975         * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6976         asserting if the ares parameter is null.
6977
6978         * mono-perfcounters.c: Fix warnings.
6979
6980         * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6981         is not needed, don't check for interruptions either.
6982         (mono_marshal_get_delegate_end_invoke): Ditto.
6983
6984 2008-08-15  Marek Habersack  <mhabersack@novell.com>
6985
6986         * mono-perfcounters.c (predef_readonly_counter): added support for
6987         reading the ASP.NET Requests Queued counter from another process.
6988
6989 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
6990
6991         * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6992         MonoImage to simplify the AOT code.
6993
6994 2008-08-10  Zoltan Varga  <vargaz@gmail.com>
6995
6996         * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6997         marshalling. Fixes #416078.
6998
6999 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
7000         
7001         * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
7002         it is set, looking up the icall address is deferred to the JIT, since 
7003         in embedded scenarios, the icall might not be registered in the runtime
7004         doing the AOT compilation. Backported from the 2.0 branch.
7005
7006 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
7007
7008         * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
7009         Fixes #415621.
7010
7011 2008-08-05  Marek Habersack  <mhabersack@novell.com>
7012
7013         * Makefile.am: added support for cross-compilation.
7014
7015 2008-08-04  Zoltan Varga  <vargaz@gmail.com>
7016
7017         * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
7018
7019 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
7020
7021         * mono-perfcounters.c: jitted methods and jitted bytes counters.
7022
7023 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
7024
7025         * class-internals.h, icall-def.h, mono-perfcounters-def.h,
7026         mono-perfcounters.c: performance counters implementation.
7027
7028 2008-07-31  Zoltan Varga  <vargaz@gmail.com>
7029
7030         * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
7031         to gpointer, letting the AOT code decide what to store in it.
7032
7033 2008-07-31  Bill Holmes  <billholmes54@gmail.com>
7034
7035         * marshal.c (cominterop_get_native_wrapper) : Adding a call to 
7036           mono_class_setup_methods if the methods are not initialized.
7037
7038         Code is contributed under MIT/X11 license.
7039
7040 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
7041
7042         * verify.c: Remove some debug code I commited by accident.
7043
7044         * verify.c (mono_method_is_valid_in_context): Change the return value
7045         to make possible to distinguish between invalid and unverifiable.
7046
7047         * verify.c (verifier_load_method): Don't return NULL for unverifiable
7048         methods.
7049
7050 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
7051
7052         * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
7053         constraints. Fixes regression in gtest-253.
7054
7055 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
7056
7057         * verify.c (mono_verifier_verify_class): Don't allow generic types
7058         with explicit layout.
7059
7060         * verify.c (mono_method_verify): Check locals and argument types.
7061
7062 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
7063
7064         * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
7065         wait if the thread is in StopRequested state.
7066
7067         * class.c (mono_class_from_name): Refactor the module searching code into
7068         a separate function so it can be reused in the AOT case too.
7069
7070 2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
7071
7072         * verify.c (mono_type_is_valid_in_context): Improve the error message.
7073         Check both the type and it's generic type definition for loader errors.
7074         
7075         * verify.c (mono_method_is_valid_in_context): Don't generate another
7076         error when a type errors occur, this leads to the wrong exception been
7077         thrown.
7078
7079 2008-07-28  Dick Porter  <dick@ximian.com>
7080
7081         * icall-def.h
7082         * process.c
7083         (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
7084         New internal calls to duplicate and close a process handle.
7085
7086 2008-07-27  Andreas Färber  <andreas.faerber@web.de>
7087
7088         * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
7089
7090 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7091
7092         * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
7093
7094 2008-07-27  Robert Jordan  <robertj@gmx.net>
7095
7096         * class.c (mono_class_init): Don't compute class.has_finalize for
7097         valuetypes. Fixes #412477.
7098
7099 2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>
7100
7101         * verify.c: Implement constraint equivalence checking.
7102         This is required when a generic parameter is used as
7103         argument to a constrained one.
7104
7105         Fixes #410637.
7106
7107 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7108
7109         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7110
7111         * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
7112
7113         * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
7114         synch with managed object layout.
7115
7116 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
7117
7118         * verify.c (do_branch_op): Handle valuetypes and generic
7119         arguments properly.
7120
7121         * verify.c (do_cmp_op): Same.
7122
7123         Fixes #410383.
7124
7125 2008-07-24  Mark Probst  <mark.probst@gmail.com>
7126
7127         * generic-sharing.c: Fix memory leaks.
7128
7129         * class.c, class-internals.h: Make
7130         mono_class_inflate_generic_type_with_mempool() non-static.
7131
7132 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
7133
7134         * pedump.c (dump_verify_info): Dump full class name.
7135
7136 2008-07-24  Mark Probst  <mark.probst@gmail.com>
7137
7138         * generic-sharing.c: Removed some old code that didn't do anything.
7139
7140 2008-07-24  Massimiliano Mantione  <massi@ximian.com>
7141         * profiler.c: Added runtime_initialized_event,
7142         mono_profiler_install_runtime_initialized and
7143         mono_profiler_runtime_initialized. This new hook tells the profiler
7144         when the runtime is sufficiently initialized to be able to call
7145         mono_thread_attach on the root appdomain.
7146         * profiler.h, profiler-private.h: Likewise.
7147
7148 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
7149
7150         * verify.c (do_cast): Do boxing for generic arguments as well.
7151
7152         * class.c (is_nesting_type): Drop generic instantiations before
7153         checking for nesting.
7154
7155         * class.c (can_access_instantiation): Allow access to generic
7156         arguments.
7157
7158 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
7159
7160         * verify.c (verify_class_for_overlapping_reference_fields):
7161         On some cases, the field size might be zero, guard against that.
7162         Fix the explicit layout check to work as expected.
7163
7164 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7165
7166         * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
7167         mono_thread_resume () during shutdown, since the thread we want to abort
7168         might be suspended.
7169
7170 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
7171
7172         * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
7173         warning.
7174
7175         * debug-mono-symfile.c: Fix a warning.
7176
7177         * mono-perfcounters.c (get_cpu_times): Fix a warning.
7178
7179         * object.c (mono_class_vtable): Check if exception_type is set, and return
7180         NULL as defined by the function comments.
7181
7182 2008-07-22  Mark Probst  <mark.probst@gmail.com>
7183
7184         * mempool.c: Use malloc for every single mempool allocation if the
7185         configure option is set.  This makes it easier to track mempool
7186         allocations with tools like Valgrind.
7187
7188 2008-07-22  Jb Evain  <jbevain@novell.com>
7189
7190         * reflection.c (create_dynamic_mono_image): emit the same
7191         metadata version that SL2 does when creating a SL2 image.
7192
7193 2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>
7194
7195         * icall-def.h:
7196         * icall.c: New icall System.Enum:get_hashcode. This function
7197         avoids the overhead of boxing the enum to the underlying type.
7198
7199 2008-07-21  Mark Probst  <mark.probst@gmail.com>
7200
7201         * reflection.c (mono_method_get_object): Don't let static RGCTX
7202         invoke wrappers get into MonoReflectionMethods.
7203
7204 2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>
7205
7206         * object-internals.h:
7207         * object.c: New mono_runtime_class_init_full function
7208         that makes throwing the exception optinal.
7209
7210         * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
7211         for the case where the exception object is supplied.
7212
7213 2008-07-16  Kornél Pál  <kornelpal@gmail.com>
7214
7215         * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
7216         old ld versions.
7217
7218         Contributed under MIT/X11 license.
7219
7220 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
7221
7222         * string-icalls.c (ves_icall_System_String_InternalSplit):
7223         Optimize array allocation by caching the MonoClass of the
7224         array type.
7225
7226         * icall.c (ves_icall_Type_GetMethodsByName): Same.
7227
7228         * reflection.c (mono_param_get_objects): Same.
7229
7230 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
7231
7232         * icall-def.h:
7233         * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
7234         It inflates the given type using the class context.
7235
7236 2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
7237
7238         * object.c (mono_class_try_get_vtable): New function. Tries to fetch
7239         the vtable if it already exists.
7240
7241         * object-internals.h: Add mono_class_try_get_vtable as part of the
7242         internal API.
7243
7244         * reflection.c (mono_type_get_object): Use the MonoObject from the
7245         vtable when possible. Reduces locking contention on reflection heavy
7246         code.
7247
7248 2008-07-15  Zoltan Varga  <vargaz@gmail.com>
7249
7250         * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
7251         g_bit_nth_msf () since that macro is not implemented in eglib.
7252
7253 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
7254
7255         * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
7256         on platforms which do not support it.
7257
7258 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7259
7260         * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
7261
7262 2008-07-11  Martin Baulig  <martin@ximian.com>
7263
7264         * mono-debug-debugger.h
7265         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
7266
7267         * mono-debug-debugger.c
7268         (_mono_debugger_interruption_request): New global volatile variable.
7269         (mono_debugger_check_interruption): New public function.
7270
7271         * threads.c
7272         (mono_thread_current_check_pending_interrupt): Call
7273         mono_debugger_check_interruption().
7274         (mono_thread_interruption_checkpoint_request): Likewise.
7275
7276 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
7277
7278         * verify.c: Add more type checks for loaded types. Verify the result
7279         handle from ldtoken.
7280
7281 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
7282
7283         * loader.c (field_from_memberref): Don't crash if the field
7284         wasn't found.
7285
7286 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
7287
7288         * verify.c: Verify if type and method instantiations
7289         don't have invalid VAR or MVAR arguments.
7290
7291 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
7292
7293         * verify.c: Fix double free of function pointer list.
7294
7295 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
7296
7297         * object.c (mono_string_to_utf8): Comment the new code as it
7298         breaks under eglib.
7299
7300 2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>
7301
7302         * object.c (mono_string_to_utf8): Avoid allocating a temp array.
7303
7304 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
7305
7306         * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
7307           is not throw too many times.
7308
7309         Code is contributed under MIT/X11 license.
7310
7311 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
7312
7313         * mono-debug.c (mono_debug_find_method): Allow this to be called even when
7314         debugging is turned off.
7315
7316 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
7317
7318         * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
7319
7320 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7321
7322         * class-internals.h, class.c: Added new generic sharing option:
7323         Share only stuff in System.Collections.Generic, which is now the
7324         default.
7325
7326 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7327
7328         * generic-sharing.c, class-internals.h: New function for getting a
7329         generic method in a generic class given the corresponding method
7330         for a different instantiation of the class.  Partly refactored
7331         from mini-trampolines.c.
7332
7333         * class.c: Make sure generic methods have a class_inst if they are
7334         part of a generic class.
7335
7336         * metadata.c (mono_type_stack_size_internal): Handle type
7337         variables.
7338
7339 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7340
7341         * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
7342         Signifies whether information on the this/vtable/mrgctx variable
7343         is available.
7344
7345 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7346
7347         * object.c, object-internals.h, icall.c: New function
7348         mono_delegate_ctor_with_method(), which does the same as
7349         mono_delegate_ctor(), but takes an explicit method argument
7350         instead of taking the method from the jit info.
7351
7352         * marshal.c: When creating a delegate with an inflated method take
7353         the "this" argument as the target class for the castclass.
7354
7355 2008-07-03  Mark Probst  <mark.probst@gmail.com>
7356
7357         * domain.c (mono_jit_info_table_find): Fixed a bug that caused
7358         mono_jit_info_table_find() to perform very badly in some cases.
7359
7360 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
7361
7362         * icall.c (type_from_typename): Handle 'string'.
7363
7364         * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
7365         wrappers into the wrapper_hash, since the key is not a MonoMethod.
7366
7367 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
7368
7369         * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
7370
7371         * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
7372         number of available managed allocator types.
7373
7374         * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
7375         (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
7376
7377 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
7378
7379         * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
7380         which is a low level lock protecting just the 'jit_code_hash' hash table.
7381
7382         * domain.c: Initialize+cleanup jit_code_hash_lock.
7383         
7384 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
7385
7386         * coree.c (mono_load_coree): Set coree_module_handle global variable only
7387         after initialization.
7388
7389         * coree.h: Make MonoFixupExe internal.
7390
7391         Contributed under MIT/X11 license.
7392
7393 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
7394
7395         * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
7396         because that is platform independent. Check NumberOfRvaAndSizes in PE32
7397         as well.
7398         (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
7399         image being loaded is a CLI image and _CorValidateImage gets called.
7400
7401         * coree.h: Add MonoLoadImage.
7402
7403         * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
7404         instead of LoadLibrary.
7405
7406         Contributed under MIT/X11 license.
7407
7408 2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>
7409
7410         * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
7411         for any primitive type.
7412
7413 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
7414
7415         * object.c (mono_array_new_specific): Optimize this and the other allocation
7416         functions a bit.
7417         
7418         * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
7419         domains too if mono_dont_free_domains is set.
7420
7421         * domain-internals.h (mono_dont_free_domains): New internal option controlling
7422         whenever to free appdomain data after it has been unloaded.
7423
7424         * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
7425         
7426 2008-06-28  Zoltan Varga  <vargaz@gmail.com>
7427
7428         * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
7429         (mono_method_get_equivalent_method): Fix a warning.
7430
7431         * object.c (mono_message_init): Avoid looking up array types for each call.
7432
7433 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
7434
7435         * object.c (mono_message_invoke): Avoid looking up the object[] type for each
7436         call.
7437
7438         * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
7439         even more.
7440
7441         * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
7442         each iteration.
7443
7444         * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
7445         fields of an enum.
7446
7447 2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
7448
7449         * object.c (mono_value_box): Fix boxing of nullables.
7450
7451 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
7452
7453         * assembly.c (mono_set_rootdir): Use __ImageBase instead of
7454         mono_module_handle that is defined by the linker; no initialization required.
7455         * coree.h: Remove mono_module_handle, add __ImageBase, update
7456         mono_image_open_from_module_handle.
7457         * coree.c (_CorValidateImage): Convert platform independent PE32 images to
7458         PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
7459         (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
7460         memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
7461         to 4 GB away from image base address. IA64 version is not tested but was very
7462         easy to implement and should work if we ever need it.
7463         * domain.c (mono_init_internal): Avoid system error message boxes.
7464         * image.c (mono_image_open_from_module_handle): Replace ref_count argument
7465         with has_entry_point. Handle do_mono_image_load fauilre correctly.
7466         (mono_image_open_full, mono_image_close): Use has_entry_point instead of
7467         coff_attributes that is a more reliable way to detect if _CorDllMain was called.
7468         * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
7469
7470         Contributed under MIT/X11 license.
7471
7472 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
7473
7474         * class.c, class-internals.h: Export mono_class_get_generic_type_definition
7475         as part of the private mono API.
7476         
7477         * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
7478         Do proper argument checking for methods that belong to generic classes.
7479         Do proper type resolution for GMFH/2.
7480         Fixes #377324.
7481         
7482 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
7483
7484         * verify.c (do_switch): Fix a memory corruption bug with
7485         the jump index is out of bound.
7486
7487 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
7488
7489         * verify.c: Disable debug code.
7490
7491 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
7492
7493         * reflection.c (mono_image_get_methodbuilder_token): Use
7494         mono_image_get_methodspec_token_for_generic_method_definition
7495         instead of mono_image_get_memberref_token. We cache more memberef
7496         entries now.
7497
7498 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
7499
7500         * verify.c: Inflate exception clause types.
7501         Fixes #402606.
7502         
7503 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
7504
7505         * reflection.c (mono_image_get_methodbuilder_token): Don't leak
7506         name.
7507
7508         * reflection.c (mono_image_get_ctorbuilder_token): Same.
7509
7510         * reflection.c (mono_image_create_method_token): Same.
7511
7512 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
7513
7514         * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
7515         It does the same as mono_image_get_methodref_token but works on
7516         MethodBuilder.
7517
7518         * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
7519         and always generate a methodspec. This follows the old behavior and fixes
7520         the regressions in System.Core. 
7521
7522 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
7523
7524         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
7525         don't event mono_class_get () succeeds. Fixes #402182.
7526
7527 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
7528
7529         * metadata-internals.h: Added MonoDynamicImage::methodspec
7530         hashtable to store methodspec tokens created for MethodBuilders.
7531
7532         * reflection.c (mono_image_get_methodbuilder_token): Encode generic
7533         MethodBuilders as open instantiations if a methodspec was requested.
7534
7535         * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
7536
7537         * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
7538
7539         * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
7540
7541         Fixes bug #349190.
7542
7543 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
7544
7545         * loader.c (method_from_methodspec): Avoid crashing if the
7546         method lookup fails.
7547
7548 2008-06-20  Dick Porter  <dick@ximian.com>
7549
7550         * socket-io.c (get_socket_assembly): Cope with Moonlight network
7551         classes being in a different assembly.  Fixes bug 399184.
7552
7553 2008-06-20  Zoltan Varga  <vargaz@gmail.com>
7554
7555         * loader.c (mono_loader_init): Make this callable multiple times.
7556         (mono_dllmap_insert): Call mono_loader_init () so this works even before
7557         the runtime is initialized. Fixes #401755.
7558
7559 2008-06-19  Dick Porter  <dick@ximian.com>
7560
7561         * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
7562         Fixes bug 349688.
7563
7564 2008-06-19  Dick Porter  <dick@ximian.com>
7565
7566         * socket-io.c:
7567         * icall-def.h: Implement Socket generic Send() and Receive()
7568         methods.  Fixes bug 395168.
7569
7570 2008-06-19  Kornél Pál  <kornelpal@gmail.com>
7571
7572         * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
7573
7574         Contributed under MIT/X11 license.
7575
7576 2008-06-18  Martin Baulig  <martin@ximian.com>
7577
7578         * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
7579         `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
7580         set to 80.0.  The debugger <-> runtime interface is now frozen as
7581         well.   
7582
7583         * mono-debug.c
7584         (mono_debug_debugger_version): Bump to 4.
7585
7586 2008-06-18  Martin Baulig  <martin@ximian.com>
7587
7588         * debug-mono-symfile.c
7589         (load_symfile): Don't check the minor version.
7590
7591         * debug-mono-symfile.h: Bump the version number to 50.0.
7592
7593 2008-06-18  Martin Baulig  <martin@ximian.com>
7594
7595         * debug-mono-symfile.c
7596         (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
7597         minimum required version.
7598
7599 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
7600
7601         * reflection.c (mono_custom_attrs_from_property): Fix support for
7602         retriveving cattrs of dynamic inflated generic types.
7603
7604         * reflection.c (mono_custom_attrs_from_event): Same.
7605
7606         * reflection.c (mono_custom_attrs_from_field): Same;
7607
7608         * reflection.c (typebuilder_setup_events): Same cattrs of events.
7609
7610         * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
7611         Moved to metadata.c.
7612
7613         * metadata.c: New functions to retrive the equivalent field, event
7614         of property from the generic type definition.
7615
7616         * metadata-internals.h: Added new functions from metadata.c.
7617
7618 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
7619
7620         * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
7621         to cached in a mempool is used.
7622
7623         * metadata.c (free_generic_class): In some situations field generic_info type
7624         is not properly dup'ed and leads to double free'ing.
7625
7626         Fixes #400643.
7627
7628 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7629
7630         * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
7631         this arguments (will be needed later for generic methods).
7632         Collect stats.
7633
7634 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7635
7636         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
7637         Create a static RGCTX invoke wrapper for methods which require it.
7638
7639 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7640
7641         * object.c, class-internals.h: New function for checking whether
7642         an individual field is special static.
7643
7644 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
7645
7646         * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
7647         linear search since the table is sorted.
7648
7649         * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
7650         Fixes #324180.
7651
7652 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
7653
7654         * appdomain.c (unload_thread_main): Applied patch from Tim Howard 
7655         (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
7656
7657         * gc.c (mono_domain_finalize): Allow an infinite timeout.
7658
7659         * threads.c (mono_threads_abort_appdomain_threads): Ditto.
7660         
7661         * threads.c (mono_thread_request_interruption): Get rid of locking, use
7662         InterlockedCompareExchange to query and modify 
7663         thread->interruption_requested.
7664
7665         * object-internals.h (struct _MonoThread): Change interruption_requested
7666         to a gint32 so it can be modified by atomic operations. Add 
7667         'critical_region_level' from the managed side, change small_id to a guint32,
7668         add new set of 'unused' fields.
7669
7670         * appdomain.c: Bump corlib version.
7671
7672 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
7673
7674         * class.c (mono_class_from_name): Search modules as well. Fixes
7675         #322332.
7676
7677 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7678
7679         * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
7680         templates.  Templates are generalized with an additional type_argc
7681         argument.  RGCTX templates have type_argc==0, MRGCTX templates
7682         have type_argc>0.
7683
7684         * domain-internals.h, domain.c: New hash table for looking up
7685         MRGCTXs.
7686
7687         * metadata.c, metadata-internals.h: Rename hash and equal
7688         functions for MonoGenericInst's and make them public.
7689
7690         * class-internals.h: New data structures for the MRGCTX.  Macros
7691         for distinguishing slots in the RGCTX and the MRGCTX.
7692
7693 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7694
7695         * object.c (mono_method_get_imt_slot): Put the same methods of
7696         different instantiations of the same generic interface in the same
7697         IMT slots, to make generic sharing simpler.
7698
7699 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
7700
7701         * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
7702
7703         * metadata.c (mono_metadata_field_info_with_mempool): Added.
7704         This function works just like mono_metadata_field_info, but
7705         accept a mempool as argument to be used allocating memory.
7706
7707         * marshal.c (mono_marshal_load_type_info): Use new function
7708         to load marshal data into image mempool.
7709
7710 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
7711
7712         * class.c (mono_class_inflate_generic_type_with_mempool):
7713         This function allows to inflate a generic type using
7714         a mempool.
7715
7716         * class.c (inflate_generic_type): Take a mempool as argument
7717         and use it to do type dup'ing.
7718
7719         * class.c (mono_class_setup_fields): Field type for generic
7720         generic classes are allocated from the image mempool.
7721
7722         * metadata.c (free_generic_class): Inflated field type is
7723         now allocated in the image mempool.
7724
7725 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
7726
7727         * threads.c (thread_cleanup): Free MonoThread::name.
7728
7729 2008-06-12  Marek Habersack  <mhabersack@novell.com>
7730
7731         * appdomain.c (ensure_directory_exists): avoid unnecessary
7732         mkdir(2) calls when the shadow directory already exists.
7733         (mono_make_shadow_copy): copy also satellite assemblies from the
7734         private bin directories.
7735
7736 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
7737
7738         * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
7739         
7740         * threads.c (mono_thread_get_stack_bounds): Align the stack address to
7741         a page boundary. Fixes #396219.
7742
7743 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7744
7745         * marshal.c (mono_marshal_load_type_info): Add a memory barrier
7746         due to double-checked locking.
7747
7748 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7749
7750         * assembly.c (build_assembly_name): Release memory on failure.
7751
7752         * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
7753
7754 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7755
7756         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
7757         memory on failure.
7758
7759 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7760
7761         * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
7762         memory on failure.
7763
7764 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7765
7766         * loader.c (field_from_memberref): Check if field signature type is equal
7767         to the non-inflated type of the field. Fixes #398980.
7768
7769 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
7770
7771         * assembly.c (mono_assembly_load_from_full): Call 
7772         mono_assembly_load_friends () outside the assemblies lock, since it can
7773         acquire the loader lock. Fixes #323696.
7774
7775         * reflection.c (resolve_object): Inflate the inst with the context for
7776         FieldOnTypeBuilderInst. Fixes #399010.
7777
7778 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7779
7780         * reflection.c (mono_image_get_field_on_inst_token): Don't
7781         inflate the field to encode it's signature. If it's a
7782         VAR or MVAR it should stay that way in the signature.
7783         Fixes #399047.
7784
7785 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7786
7787         * reflection.c (resolve_object): Release memory of inflated types.
7788
7789 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7790
7791         * loader.c (mono_method_get_signature_full): Remove assert about
7792         loading a methodspec to a generic method. We have such methods, such as
7793         System.Threading.Interlocked::CompareExchange<T>.
7794         This assert was removed since it crashes the verifier when it checks
7795         methods calling CompareExchange<T>.
7796
7797 2008-06-10  Marek Safar  <marek.safar@gmail.com>
7798
7799         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
7800         of Type array and not MonoType.
7801
7802 2008-06-10  Marek Habersack  <mhabersack@novell.com>
7803
7804         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
7805         <lupus@ximian.com>
7806
7807 2008-06-10  Martin Baulig  <martin@ximian.com>
7808
7809         * debug-mono-symfile.h
7810         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
7811         changes to the file format, but we were generating incorrect
7812         source file indices in the line number table due to a bug, which
7813         made backtraces report an incorrect source file.
7814
7815 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7816
7817         * mono-debug.c: Moved mono_debug_free_method_jit_info from
7818         mini/debug-mini.c to here.
7819
7820         * mono-debug.c (il_offset_from_address): Free memory from find_method.
7821
7822         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
7823         use it to release structs returned by mono_debug_find_method.
7824
7825 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
7826
7827         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
7828         since it needs to set method->slot for all interface methods.
7829
7830 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7831
7832         * class-internals.h: Forgot to add.
7833
7834 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7835
7836         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
7837
7838         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
7839         Lookup the custom attributes from property_hash.
7840
7841         * reflection.c (mono_save_custom_attrs): Save the custom attributes
7842         in property_hash. Allocate all data using the image mempool.
7843
7844         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
7845         for dynamic_custom_attrs to checks if the image is dynamic.
7846
7847 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
7848
7849         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
7850         assemblies array.
7851         
7852         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
7853         runtime functions while holding the domain assemblies lock.
7854
7855 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7856
7857         * verify.c: Reapplied the last bit of the reverted changes.
7858
7859 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7860
7861         * verify.c: Reapplied more of the reverted changes.
7862
7863 2008-06-09  Martin Baulig  <martin@ximian.com>
7864
7865         * debug-mono-symfile.c (load_symfile): Check the major version
7866         first; if it's wrong, don't print the minor version in the error message.
7867
7868 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
7869
7870         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
7871         lock instead of the domain lock to avoid deadlocks, since the thread might
7872         already hold the loader lock.
7873
7874         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
7875         (mono_thread_attach): Ditto.
7876
7877         * monitor.c: Use a TLS variable for holding the current thread id instead
7878         of calling pthread_self ().
7879         (mono_monitor_init_tls): New internal function to initialize the TLS
7880         variable.
7881         (mono_monitor_try_enter_internal): Put the owner == id check after the
7882         owner == 0 check.
7883
7884         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
7885         missed optimizations when using gcc-4.3.
7886
7887 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
7888
7889         * reflection.c (mono_dynamic_image_free): Free the memory
7890         used by MonoGenericParam in MonoDynamicImage::gen_param.
7891
7892         * reflection.c (mono_reflection_setup_generic_class): Allocate
7893         container from mempool.
7894
7895         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
7896         container from mempool.
7897
7898 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7899
7900         * threads.c (mono_set_pending_exception): New internal function to set the
7901         pending exception of the current thread.
7902         (mono_thread_get_and_clear_pending_exception): Check for 
7903         thread->pending_exception as well.
7904
7905         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7906
7907         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7908         it can trigger a collection.
7909
7910 2008-06-06  Martin Baulig  <martin@ximian.com>
7911
7912         Merged the `debugger-kahalo' branch.
7913
7914         * mono-debug.h
7915         (MONO_DEBUGGER_VERSION): Bumped to 72.
7916
7917         * debug-mono-symfile.h
7918         (MonoSymbolFileMethodIndexEntry): Removed.
7919         (MonoSymbolFileMethodEntry): New public typedef.
7920         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7921         (MonoSymbolFileSourceEntry): Remove everything except `index' and
7922         `data_offset'.
7923         (MonoSymbolFileMethodEntry): Removed.
7924         (MonoSymbolFileLexicalBlockEntry): Removed.
7925         (MonoSymbolFileLineNumberEntry): Removed.
7926         (MonoDebugLexicalBlockEntry): Removed.
7927         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7928         removed `num_il_offsets' and `il_offsets'.
7929         (MonoSymbolFile): Replace `version' with `major_version' and
7930         `minor_version'.
7931         (MONO_SYMBOL_FILE_VERSION): Replace with
7932         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7933         `MONO_SYMBOL_FILE_MINOR_VERSION'.
7934
7935         * debug-mono-symfile.c
7936         (mono_debug_symfile_lookup_location): Add support for the new line
7937         number table format.
7938
7939 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7940
7941         * metadata.c (free_generic_class): Release the inflated
7942         MonoClass of dynamic generic classes if it's not a generic
7943         type definition.
7944
7945 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7946
7947         * verify.c: Reapplied more of the reverted changes.
7948
7949 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7950
7951         * reflection.c (lookup_custom_attr): Clean the cached flag or
7952         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7953         for SRE types.
7954
7955 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7956
7957         * verify.c: Reapplied a small part of the reverted changes.
7958
7959 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7960
7961         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7962
7963         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
7964         previously in managed code.
7965         (mono_monitor_exit): Ditto.
7966         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7967
7968         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7969         the managed definition.
7970
7971 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
7972
7973         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7974
7975 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7976
7977         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7978         
7979         * monitor.c: Add some micro optimizations.
7980
7981         * icall.c (type_from_typename): Handle 'bool'.
7982
7983 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
7984
7985         * verify.c: Implement constructor verification per P III 1.8.1.4.
7986         Fixes #396716.
7987
7988 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7989
7990         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7991         holding the assemblies lock here too.
7992
7993 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7994
7995         * verify.c: Kill stack_top function.
7996
7997 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7998
7999         * verify.c: Kill stack_get function.
8000
8001 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
8002
8003         * verify.c (mono_method_verify): Last change broke the build. Fixed.
8004
8005 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
8006
8007         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
8008         more reliable.
8009
8010         * verify.c (mono_method_verify): Inflate params and locals to avoid
8011         mismatch when checking for compatibility.
8012
8013 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
8014
8015         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
8016         Length prefix should be size in bytes. Fix bug #339530.
8017         
8018         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
8019         Length prefix should be size in bytes. Fix bug #339530.
8020
8021         Code is contributed under MIT/X11 license.
8022
8023 2008-06-05  Bill Holmes <billholmes54@gmail.com>
8024
8025         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
8026
8027         Contributed under MIT/X11 license.
8028
8029 2008-06-05  Martin Baulig  <martin@ximian.com>
8030
8031         * mono-debug-debugger.c
8032         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
8033
8034 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
8035
8036         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
8037         while holding the assemblies lock to prevent deadlocks. Handle the case
8038         where the search hook returns NULL but the assembly was still loaded.
8039         Fixes #323696.
8040
8041         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
8042         modify domain state.
8043
8044 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
8045
8046         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
8047         * Makefile.am (pedump_LDADD): Post-process object files and
8048         add dtrace-generated object file, if necessary.
8049
8050         Code is contributed under MIT/X11 license.
8051
8052 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
8053
8054         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
8055
8056 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
8057
8058         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
8059
8060 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8061
8062         * threads.c: Try to free everything from the delayed free table
8063         when shutting down threads, and set the variable to NULL after the
8064         table is freed so that calling
8065         mono_thread_hazardous_try_free_all() when shutting down the root
8066         domain doesn't crash.
8067
8068 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
8069
8070         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
8071         the caller if resulting type was inflated.
8072
8073         * class.c (mono_class_create_from_typespec): Free the MonoType if it
8074         was inflated.
8075
8076         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
8077
8078
8079 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
8080
8081         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
8082         class library tests.
8083
8084         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
8085         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
8086         #396989.
8087
8088 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8089
8090         * domain.c, domain-internals.h: The JIT infos are now freed by the
8091         JIT info table code.  They are freed immediately if there only a
8092         single JIT info table in circulation.  If there is more, the free
8093         is delayed via a queue.
8094
8095         * threads.c, threads-types.h: New hazard pointer function for
8096         freeing all freeable delayed items in one sitting.
8097
8098 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
8099
8100         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
8101
8102         * reflection.c (typebuilder_setup_properties): Same.
8103
8104         * reflection.c (typebuilder_setup_events): Same.
8105
8106 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
8107
8108         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
8109         and use it for allocating memory.
8110
8111         * reflection.c (mono_marshal_spec_from_builder): Same.
8112
8113         * reflection.c: Change code to use new signatures.
8114
8115         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
8116
8117 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8118
8119         * decimal.c (rescale128): Put back one line which was accidently commented
8120         out.
8121         
8122         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
8123         to cause crashes.
8124
8125 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
8126
8127         * reflection.c (mono_reflection_generic_class_initialize): Name must
8128         be always malloc'ed so we can free it later on. Do this for field, property
8129         and event.
8130
8131         * metadata.c (free_generic_class): Free field, property and event names.
8132
8133 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
8134
8135         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
8136         instead of g_memdup.
8137
8138         * reflection.c (typebuilder_setup_fields): Same.
8139
8140 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8141
8142         * decimal.c (rescale128): Optimize this function a bit more.
8143
8144 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
8145
8146         * metadata.c (free_generic_class): Release some memory from
8147         SRE generic classes.
8148
8149 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
8150
8151         * reflection.c (mono_image_get_generic_field_token): No reference
8152         to name is kept, free it.
8153
8154         * reflection.c (mono_reflection_generic_class_initialize): Free
8155         more memory of the inflated field.
8156
8157 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8158
8159         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
8160         code.
8161
8162 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
8163
8164         * reflection.c (mono_dynamic_image_free): Release memory used by
8165         MonoDynamicImage::array_methods elements.
8166
8167         * reflection.c (assembly_add_win32_resources): Release memory after
8168         encoding.
8169
8170 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
8171
8172         * decimal.c (log2_32): Use an optimized version for this function too.
8173         
8174         * decimal.c (log2_64): Fix this on 32 bit machines.
8175
8176 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
8177
8178         * class.c (mono_dup_array_type): Implement allocation using a mempool.
8179
8180         * class.c (mono_metadata_signature_deep_dup): Same.
8181
8182         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
8183         a mempool.
8184
8185         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
8186
8187         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
8188
8189         * metadata-internals.h: Added mono_metadata_signature_dup_full.
8190
8191         * class-internals.h: Update signatures to take a MonoMemPool.
8192
8193 2008-06-02  Dick Porter  <dick@ximian.com>
8194
8195         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
8196         * icall-def.h: Add
8197         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
8198         FormatMessage API to get the error text.  Fixes bug 321827.
8199
8200 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
8201
8202         * decimal.c: Add some micro optimizations to make decimal operations faster.
8203
8204 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
8205
8206         * reflection.c (method_encode_clauses): Take a mempool
8207         as parameter and use it to allocate the clause array.
8208
8209         * reflection.c (mono_image_get_field_on_inst_token): Free
8210         the inflated type after encoding it.
8211
8212         * reflection.c (mono_dynamic_image_free): Free each element
8213         of MonoDynamicImage::gen_params.
8214
8215         * reflection.c (reflection_methodbuilder_to_mono_method):
8216         Allocate the generic param array from the mempool.
8217         Allocate signature params from the mempool.
8218
8219         * reflection.c (mono_reflection_generic_class_initialize):
8220         Free inflated fields after been used.
8221
8222 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
8223
8224         * icall.c: Reapply the memory leak fixes as they no
8225         longer make mono crash.
8226
8227 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
8228
8229         * reflection.c (mono_type_get_object): Don't store the suplied
8230         MonoType with type_hash. A caller which pass a type that
8231         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
8232         might end with a pointer to freed memory.
8233         The solution is to use byval_arg or this_arg from the associated
8234         MonoClass of the supplied type.
8235
8236 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
8237
8238         * icall.c: Revert the rest of the last change as it breaks the build too.
8239
8240 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
8241
8242         * icall.c: Revert a leak fix as it's breaking the build.
8243
8244 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
8245
8246         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
8247
8248 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
8249
8250         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
8251
8252 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
8253
8254         * icall.c: Fix some memory leaks.
8255
8256 2008-05-29  Dick Porter  <dick@ximian.com>
8257
8258         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
8259         async socket operations from the pending list when a socket
8260         closes.  Leaving it until the threadpool services the event
8261         exposes a race condition when a socket descriptor is reused.
8262         Fixes bug 377589.
8263
8264 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
8265
8266         * object.c: Fix negative index check for array alocation.
8267
8268 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
8269
8270         * icall.c, marshal.c: Delegate wrappers should skip visibility.
8271         This check is performed by the verifier for IL created delegates
8272         and by Delegate::CreateDelegate for programatically created ones.
8273         Fixes #372406.
8274
8275 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
8276
8277         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
8278         Fix code to use mono_array_size_t instead of int.
8279
8280         Based on patch by Luis F. Ortiz.
8281         Contributed under X11 license.
8282         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8283
8284 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
8285
8286         * icall.c: Added ves_icall_System_Array_GetLongLength and
8287         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
8288         arrays.
8289
8290         * icall.h: Export both new functions.
8291
8292         Based on patch by Luis F. Ortiz.
8293         Contributed under X11 license.
8294         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8295
8296 2008-05-28  Martin Baulig  <martin@ximian.com>
8297
8298         The debugger now requires exactly r103463.
8299
8300         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
8301         This version is not supported by the debugger, wait for 72.
8302
8303 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
8304
8305         * object.h: Changed array related functions to use
8306         mono_array_size_t instead of guint32. Forgot to commit this file.
8307
8308         Patch by Luis F. Ortiz.
8309         Contributed under X11 license.
8310         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8311
8312
8313 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
8314
8315         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
8316         don't define it. Use the number literal instead.
8317
8318 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
8319
8320         * icall.c: Changed array related functions to use
8321         mono_array_size_t instead of guint32.
8322
8323         * icall.c (ves_icall_System_Array_GetLength): Check for length
8324         overflow under MONO_BIG_ARRAYS.
8325
8326         Based on patch by Luis F. Ortiz.
8327         Contributed under X11 license.
8328         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8329
8330 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
8331
8332         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
8333
8334         Based on patch by Luis F. Ortiz.
8335         Contributed under X11 license.
8336         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8337
8338 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
8339
8340         * object.c, object.h: Changed array related functions to use
8341         mono_array_size_t instead of guint32.
8342
8343         Patch by Luis F. Ortiz.
8344         Contributed under X11 license.
8345         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8346
8347 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
8348
8349         * object.h: Introduced mono_array_size_t typedef. This must be used
8350         in all places an array length is expected. This is 64bits wide if
8351         MONO_BIG_ARRAYS is enabled.
8352
8353         Patch by Luis F. Ortiz.
8354         Contributed under X11 license.
8355         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8356
8357 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
8358
8359         * security-manager.c class.c: Set the class exception info by calling
8360         mono_class_set_failure ().
8361
8362         * class.c (mono_class_get_exception_data): New accessor function.
8363         (mono_class_set_failure): Store exception_data in the property hash.
8364
8365         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
8366         the struct as a property.
8367
8368         * loader.c (mono_get_method_full): Store the lookup result for method
8369         tokens in method_cache, the others in methodref_cache to decrease the memory
8370         usage of hash tables.
8371
8372         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
8373         (mono_image_init): method_cache is lazy inited now.
8374
8375         * metadata-internals.h (struct _MonoImage): Change method_cache to
8376         a MonoValueHashTable, add a separate methodref_cache.
8377
8378 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
8379
8380         * number-formatter.h: Fix tables to avoid arithemtic overflow in
8381           Double.ToString as exposed by Bug #383531.
8382
8383 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
8384
8385         * number-formatter.h: Make some tables static.
8386
8387         * class.c (mono_method_set_generic_container): New accessor function.
8388         (mono_method_get_generic_container): Ditto.
8389
8390         * class-internals.h (struct _MonoMethod): Remove rarely used 
8391         'generic_container' field, store it in the property hash instead. Add 
8392         'is_generic' boolean field instead.
8393
8394         * image.c (mono_image_init): Initialize property_hash.
8395         (mono_image_close): Destroy property_hash.
8396
8397         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
8398         hold rarely used fields of runtime structures belonging to this image.
8399
8400         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
8401         to get/set method->generic_container.
8402
8403         * loader.c (mono_get_method_from_token): Avoid loading the method header for
8404         generic methods.
8405
8406 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
8407
8408         * class.c (mono_class_inflate_generic_method_full): Don't increase
8409         mono_stats.inflated_method_count for methods found in the cache.
8410
8411         * threads.c (mono_thread_request_interruption): Add a comment about 
8412         QueueUserAPC ().
8413
8414 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
8415
8416         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
8417         interface_offsets_packed table.
8418         
8419         * class.c (mono_class_init): Remove some dead code.
8420
8421         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
8422         mono_class_setup_vtable () when CAS is active to detect security problems.
8423
8424 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
8425
8426         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
8427
8428         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
8429         parameters as it's irrelevant for delegate checking.
8430
8431 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
8432
8433         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
8434
8435         * class.c (mono_class_init): Control the creation of a generic vtable using
8436         a global which is true by default, but set to false by the runtime startup code.
8437         
8438         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
8439         Disabled for now since it breaks the embedding API.
8440         Move the setup of class->methods for arrays to mono_class_setup_methods ().
8441         (mono_class_setup_methods): Add a memory barrier.
8442
8443         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
8444         when mono_class_init () doesn't compute the generic vtable.
8445         
8446 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
8447         * profiler.c: Added mono_profiler_install_statistical_call_chain,
8448         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
8449         to support call chains (backtrace) in the stat profiler.
8450         * profiler.c, profiler-private.h: Likewise.
8451
8452 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8453
8454         * generic-sharing.c: Init generic class when a method of it is
8455         requested via a runtime generic context.
8456
8457 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
8458
8459         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
8460
8461         * reflection.c (mono_type_get_object): Add a FIXME.
8462
8463         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
8464
8465         * class.c (mono_class_get_method_by_index): New helper function, returning an
8466         entry in the class->methods array.
8467
8468 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8469
8470         * class.c (mono_class_init): Only do the array optimization for szarrays. 
8471         Avoid creating a generic vtable for generic instances as well.
8472         (mono_class_get_method_from_name_flags): Don't search in the metadata for
8473         generic instances.
8474
8475 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
8476
8477         * loader.c (mono_get_method_constrained): Inflate the signature
8478         with class context. Fix #325283.
8479
8480 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8481
8482         * object.c (mono_class_create_runtime_vtable): Add a comment.
8483
8484         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
8485         where needed.
8486         (setup_interface_offsets): Handle the case when this is called twice for arrays.
8487         (mono_class_setup_vtable_general): Add an assert.
8488         (mono_class_init): Avoid creating a generic vtable for arrays.
8489
8490         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
8491         here, let mono_class_init () do that.
8492
8493         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
8494         interfaces in mscorlib.
8495
8496         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
8497         interfaces. Add some comments.
8498         (mono_class_init): Call mono_class_setup_methods () here since it is no
8499         longer called by mono_class_setup_vtable ().
8500
8501         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
8502         not set in class->vtable.
8503         (mono_class_create_runtime_vtable): Reenable the disabled code.
8504
8505         * object.c (mono_class_create_runtime_vtable): Disable the last change for
8506         now as it causes some test failures.
8507
8508         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
8509         if using the vtable trampoline. Also remove some strange code which put the
8510         generic methods themselves into the vtable slots. Remove the AOT init_vtable
8511         stuff as it is no longer needed.
8512
8513 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
8514
8515         * pedump.c: Give make --verify all option check code as well.
8516         Using --verify code won't check for metadata now.
8517
8518 2008-05-19  Martin Baulig  <martin@ximian.com>
8519
8520         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
8521
8522         * mono-debug.c
8523         (_mono_debug_using_mono_debugger): New global variable; it's set
8524         directly by the debugger, so mono_debug_using_mono_debugger() also
8525         works after attaching.
8526
8527 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
8528
8529         * object.c (mono_class_create_runtime_vtable): Use memory barriers
8530         as we do double checked locking on MonoClass::runtime_info and
8531         MonoClassRuntimeInfo::domain_vtables.
8532
8533 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
8534
8535         * debug-helpers.c (print_field_value): Fix a warning.
8536
8537 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
8538
8539         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
8540         set in the AOT case.
8541
8542 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
8543
8544         * class.c (mono_class_setup_vtable_general): Use memory barriers
8545         as we do double checked locking on MonoClass::vtable.
8546
8547 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
8548
8549         * reflection.c (resolve_object): Inflate only if the generic context
8550         is not null. Fixes #389886.
8551
8552 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
8553
8554         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
8555         instead of g_free.
8556
8557         Code is contributed under MIT/X11 license.
8558
8559 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
8560
8561         * class.c: Revert unrelated change.
8562
8563 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
8564
8565         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
8566         a generic instantiation, use mono_class_from_mono_type instead of playing
8567         with MonoType directly.
8568
8569 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
8570
8571         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
8572         checks must ignore generic instantiations, so mono_class_has_parent is not
8573         suitable. Fixes #390128.
8574
8575 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
8576
8577         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
8578         it to avoid registering tokens during metadata generation. Fixes #390023.
8579
8580 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
8581
8582         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
8583         consistent.
8584
8585         Contributed under MIT/X11 license.
8586
8587 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
8588
8589         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
8590         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
8591         to fixup the EXE image.
8592         (mono_cleanup): Use mono_close_exe_image.
8593         (mono_close_exe_image): New function.
8594         * image.c: Include "marshal.h".
8595         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
8596         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
8597         counting when the image is loaded outside of mono_image_open_full. Set status
8598         based on GetLastError.
8599         * coree.c: Include required headers. Add init_from_coree.
8600         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
8601         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
8602         (_CorExeMain): Set init_from_coree.
8603         (CorExitProcess): Only call ExitProcess for now.
8604         (CorBindToRuntimeEx): New stub implementation.
8605         (CorBindToRuntime): New function.
8606         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
8607         (MonoFixupExe): ILONLY executables require no fixups.
8608         (mono_set_act_ctx): New function to set activation context.
8609         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
8610         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
8611         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
8612         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
8613         as MONO_INTERNAL.
8614         * domain-internals.h: Add mono_close_exe_image.
8615
8616         Contributed under MIT/X11 license.
8617
8618 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
8619
8620         * metadata.c (mono_metadata_compute_size): Correctly calculate field
8621         size for generic param and event tables. Fixes #388977.
8622
8623 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
8624
8625         * loader.c (mono_method_signature): Use memory barriers because of the double
8626         checked locking pattern.
8627
8628         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
8629         aborting or aborted as well. Fixes #376391.
8630         
8631         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
8632         existing runtime state in the Suspend handler during shutdown.
8633
8634 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
8635
8636         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
8637
8638         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
8639         which are starting up or shutting down.
8640
8641         * threads.c (mono_threads_set_shutting_down): Don't return a value since
8642         this function never returns if the runtime is already shutting down.
8643
8644         * icall.c (ves_icall_System_Environment_Exit): Update after 
8645         mono_threads_set_shutting_down () signature change.
8646         
8647 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
8648
8649         * class.c: Added can_access_instantiation to verify if the instantiation
8650         is visible. Fix access check for nested types as they returned TRUE
8651         before doing type and generic instantiation visibility checks.
8652
8653 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
8654
8655         * reflection.c (mono_reflection_create_generic_class): The created type
8656         must have a different container from its TypeBuilder. Otherwise they
8657         will end sharing generic arguments, which is wrong.
8658
8659         Due to the sharing, making a generic instance of the created type using
8660         the TypeBuider generic arguments resulted in the generic type definition
8661         been returned, which is wrong as well.
8662
8663         As a bonus the code was leaking the type_params array. This memory should
8664         be allocated from the image mempool.
8665
8666         This fixes bug #354047.
8667
8668 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
8669
8670         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
8671         to here         as they are now used in assembly.c new code.
8672         Added a skipverification flag to MonoAssembly.
8673         New internal function mono_assembly_has_skip_verification.
8674
8675         * assembly.c: New function mono_assembly_has_skip_verification. It checks
8676         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
8677         part of #387274.
8678
8679 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8680
8681         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
8682         needed. Fixes #387034.
8683
8684         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
8685
8686 2008-05-06  Miguel de Icaza  <miguel@novell.com>
8687
8688         * assembly.c (mono_assembly_load_reference): Prevent crash while
8689         disassembling Silverlight 2.0 executables while we still do not
8690         have GACed libraries.
8691
8692 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8693
8694         * reflection.c: Special case generic type definitions as well. Fixes #383444.
8695
8696 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
8697
8698         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
8699         of the dynamic case. Fixes #387404.
8700
8701 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
8702
8703         *verify.c (mono_verifier_is_class_full_trust): If under
8704         verify_all and the verifier mode was not set, only
8705         gac and corlib types are fulltrust. This makes --verify-all
8706         usable to detect unverifiable code, which is the expected
8707         use case.
8708
8709 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
8710
8711         * verify.h: Ops, commited the header with debug
8712         enabled.
8713
8714 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
8715
8716         * verify.c (merge_stack): Use the new value on unverifiable
8717         stack merges.
8718
8719         * verify.c (verify_type_compatibility_full): Comparison
8720         of nullable types can't use mono_class_is_assignable_from.
8721
8722         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
8723         that makes all verification errors be reported.
8724
8725         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
8726         mono_method_verify.
8727
8728 2008-05-05  Robert Jordan  <robertj@gmx.net>
8729
8730         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
8731         support for value types. See #386415.
8732
8733         * object.c: comments.
8734
8735         Code is contributed under MIT/X11 license.
8736
8737 2008-05-05  Martin Baulig  <martin@ximian.com>
8738
8739         * debug-mono-symfile.h
8740         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
8741         for old pre-terrania symbol files.
8742
8743 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
8744
8745         * mono-config.c: Add ppc64 architecture.
8746
8747         Code is contributed under MIT/X11 license.
8748
8749 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
8750
8751         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
8752           PPC64 uses function descriptors as well.
8753
8754         Code is contributed under MIT/X11 license.
8755
8756 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
8757
8758         * object.c (compute_class_bitmap): Ignore literal static fields.
8759
8760         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
8761         var has an invalid format.
8762         (describe_ptr): Add some sanity checks for the vtable.
8763         (add_nursery_frag): Clear unused nursery fragments.
8764         (major_collection): Clear all remaining nursery fragments.
8765
8766 2008-05-03  Robert Jordan  <robertj@gmx.net>
8767
8768         * image.c, metadata-internals.h: add thunk_invoke_cache.
8769
8770         * marshal.c, marshal.h: implement
8771         mono_marshal_get_thunk_invoke_wrapper ().
8772
8773         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
8774
8775         Code is contributed under MIT/X11 license.
8776
8777 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
8778
8779         * verify.c (do_leave): Empty the stack.
8780
8781 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
8782
8783         * class.c (mono_class_is_assignable_from): Variance
8784         doesn't work between reference and value types. For example,
8785         given type C<T+>, C<int32> is not assignable to C<object>.
8786         Break the argument checking loop on first error. 
8787
8788 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
8789
8790         * icall.c : base64_to_byte_array() needs some more strict
8791           check for sequence of '=' characters. Patch by Santa
8792           Marta (http://deee.g.hatena.ne.jp/santamarta).
8793
8794           Contributed under MIT/X11 license.
8795           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
8796
8797 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
8798
8799         * domain.c: Disable LoadLibrary support to fix Win32 build.
8800
8801         Code is contributed under MIT/X11 license.
8802
8803 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
8804
8805         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
8806         to help with cache behaviour.
8807
8808 2008-05-01  Miguel de Icaza  <miguel@novell.com>
8809
8810         * appdomain.c (mono_domain_from_appdomain): Add new accessor
8811         method. 
8812
8813 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
8814
8815         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
8816
8817 2008-05-01  Dick Porter  <dick@ximian.com>
8818
8819         * process.c (process_get_fileversion): Only pass 16 bits of
8820         language ID to VerLanguageName.  Fixes bug 381204.
8821
8822 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
8823
8824         * verify.c (mono_method_verify): Fix the comparison
8825         operator for code bounds check.
8826
8827 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
8828
8829         * verify.c (mono_method_verify): Check the bounds of
8830         all access of the code array.
8831
8832 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
8833
8834         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
8835
8836 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
8837
8838         * image.c (mono_image_strong_name_position): Fix return value when the rva is
8839         not valid.
8840
8841 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
8842
8843         * loader.c (mono_get_method_from_token, mono_method_signature): Add
8844         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
8845         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
8846         fixup main EXE images when using mono.exe for mixed-mode assembly support.
8847         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
8848         mono_runtime_load.
8849         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
8850         runtime initialization from metadata.
8851         * assembly.c: Remove obsolete ceGetModuleFileNameA.
8852         (mono_set_rootdir): Use mono_get_module_file_name.
8853         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
8854         handles.
8855         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
8856         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
8857         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
8858         MonoCLIImageInfo. Add support for module handles.
8859         (load_cli_header): Update mono_cli_rva_image_map signature.
8860         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
8861         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
8862         (mono_image_rva_map): Add support for module handles.
8863         (mono_image_ensure_section_idx): Add support for module handles.
8864         (mono_image_close): Add support for module handles.
8865         (do_load_header): Add support for module handles.
8866         (mono_image_open_from_module_handle): New function for internal use.
8867         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
8868         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
8869         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
8870         handles.
8871         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
8872         * image.h: Add mono_image_fixup_vtable.
8873         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
8874         support.
8875         * coree.h: New file.
8876         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
8877         unsupported native code.
8878         (mono_marshal_set_callconv_from_modopt): New function splitted from
8879         mono_marshal_get_managed_wrapper.
8880         (mono_marshal_get_managed_wrapper): Use
8881         mono_marshal_set_callconv_from_modopt.
8882         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
8883         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
8884         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
8885         that results in a deadlock when the runtime is loaded in _CorDllMain.
8886         * Makefile.am: Add coree.c and coree.h.
8887
8888         Contributed under MIT/X11 license.
8889
8890 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8891
8892         * generic-sharing.c: Search for type arguments in array element
8893         types as well.
8894
8895 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8896
8897         * class-internals.h, generic-sharing.c: New, small runtime generic context.
8898
8899         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
8900
8901         * object.c: Don't setup the RGCTX when the vtable is created,
8902         because we're setting it up lazily now.
8903
8904 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
8905
8906         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
8907         64 bit support.
8908
8909 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
8910
8911         * verify.c (verify_class_for_overlapping_reference_fields): 
8912         If class is under fulltrust allow reference types to overllap
8913         if they have the same RVA.
8914
8915 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
8916
8917         * pedump.c: Added new flag valid-only, that makes the verifier
8918         behaves just like --security=validil. It won't fail type load
8919         due to unverifiable restrictions.
8920
8921 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
8922
8923         * class-internals.h (struct MonoMethod): Added a verification_success
8924         field to cache verifier executions. Reduced MonoMethod:slot size by
8925         one bit.
8926
8927 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
8928
8929         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8930         instead of a 'vt' argument to save an indirection and to allow these to be used
8931         for valuetypes.
8932         (scan_vtype): New helper function to scan an area using a gc descriptor.
8933         (mono_gc_wbarrier_value_copy): Implement this.
8934         (handle_remset): Add support for REMSET_VTYPE.
8935         (find_in_remset_loc): Ditto.
8936         (mono_gc_base_init): Allow some debugging options to be controlled through the
8937         use of the MONO_GC_DEBUG env variable.
8938         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8939         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8940
8941 2008-04-23  Martin Baulig  <martin@ximian.com>
8942
8943         * domain.c (mono_domain_create): Move the call to
8944         mono_debug_domain_create() down, after allocating the domain id.
8945
8946 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
8947
8948         verify.c (verify_class_for_overlapping_reference_fields): Skip
8949         static fields while verifying for overlapping fields as they
8950         don't matter at all.
8951
8952 2008-04-23  Marek Habersack  <mhabersack@novell.com>
8953
8954         * domain-internals.h: added a declaration of
8955         mono_make_shadow_copy.
8956
8957         * assembly.c (mono_assembly_open_full): shadow copying of
8958         assemblies moved to here, so that all the assemblies within the
8959         application domain's private binary directories can be
8960         processed. Fixes bug #380546
8961
8962         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8963         mono_make_shadow_copy and made non-static. The decision whether
8964         to shadow-copy an assembly is made based on its location - it's
8965         copied if it's in one of the private application domain binary
8966         directories and its different to the target file in the shadow
8967         directory. Fixes bug #380546
8968
8969 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
8970
8971         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8972
8973         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8974         types.
8975
8976         * reflection.c (mono_image_create_token): Handle 
8977         Method/ConstructorOnTypeBuilderInst.
8978         (resolve_object): Ditto.
8979         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8980         so it can be called from resolve_object. Also handle the case when the inflated
8981         class already has its methods setup.
8982
8983 2008-04-21  Martin Baulig  <martin@ximian.com>
8984
8985         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8986
8987 2008-04-20  Geoff Norton  <gnorton@novell.com>
8988
8989         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8990         pointer dereference.
8991
8992 2008-04-15  Marek Habersack  <mhabersack@novell.com>
8993
8994         * appdomain.c (try_load_from): if IOMAP is in effect, call the
8995         portability API to look up the assembly file. Fixes behavior in
8996         situations when the application has a bin/ directory, but the
8997         assembly search patch refers to Bin/ (and thus the requested file
8998         name is Bin/SomeLibrary.dll). Fixes bug #379888
8999
9000 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
9001
9002         verify.c (mono_type_is_generic_argument): Extracted this check
9003         from a dozen places to here.
9004
9005         verify.c: Fixed all issues related to boxing generic arguments
9006         and their constraints.
9007
9008 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
9009
9010         verify.c (mono_class_interface_implements_interface): Fix win32 build.
9011
9012 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
9013
9014         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
9015         isn't finished yet. Fixes #363447.
9016
9017 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
9018
9019         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
9020         Fixes #346419.
9021
9022 2008-04-13  Jb Evain  <jbevain@novell.com>
9023
9024         * domain.c: update the 2.1 profile versions.
9025         Merged from the Moonlight 2 branch.
9026
9027 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
9028
9029         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
9030         mscorlibs for the non-refonly case as well.
9031
9032         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
9033         in mono_assembly_load_from_full (). Fixes #378924.
9034
9035 2008-04-11  Geoff Norton  <gnorton@novell.com>
9036
9037         * icall.c: The global extern environ doesn't exist on Mac.  We
9038         need to call NSGetEnviron instead.
9039
9040 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
9041
9042         verify.c: Add generic method constraint verification.
9043
9044 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
9045
9046         class.c (mono_class_inflate_generic_method_full): Add a long
9047         explanation to the is_mb_open hack. Remove the FIXME.
9048
9049 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
9050
9051         * verify.c (mono_method_verify): Mark all unknown opcodes
9052         as invalid. Mark jmp as unverifiable.
9053
9054 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
9055
9056         * verify.c: Add code to do type constraint verification on class instances.
9057
9058         * verify.c (mono_verifier_verify_class): Use the type constraint 
9059         verification code.
9060
9061 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
9062
9063         * class.c (mono_class_get_field_default_value): Don't pass cindex
9064         as hint to mono_metadata_get_constant_index. The local is not initialized
9065         and should contain garbage most of the time. This could only work
9066         with a lot of luck.
9067
9068 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
9069
9070         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
9071
9072 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
9073
9074         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
9075
9076         * class.c (mono_class_from_generic_parameter): Save the token of the
9077         generic param in MonoClass::sizes.generic_param_token.
9078
9079         * reflection.c (mono_custom_attrs_from_class): If the class type is
9080         VAR or MVAR retrieve the attributes of the generic param.
9081
9082 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
9083
9084         * class.c (mono_class_init): Do class verification if the verifier
9085         is enabled.
9086
9087 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
9088
9089         * verify-internal.h: Added mono_verifier_verify_class.
9090
9091         * verify.c: Added mono_verifier_verify_class. It checks for
9092         classes with explicit layout that have overlapping reference fields.
9093
9094         * pedump.c: Init the verifier state prior to verification. Fixed
9095         command line arguments.
9096
9097 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
9098
9099         * Makefile.am: Added verify-internals.h, hopefully fix the build.
9100
9101 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9102
9103         * verify-internals.h: Fix a warning.
9104
9105 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
9106
9107         * verify-internals.h: New header with the verifier configuration
9108         extracted from mini.c.
9109
9110         * verify.c: Implemented the new functions exported by verify-internals.h.
9111
9112 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
9113
9114         * verify.c: Add proper verification of ckfinite.
9115
9116 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
9117
9118         * verify.c (do_conversion): Improved error message to something
9119         more meanfull.
9120
9121         * verify.c (check_is_valid_type_for_field_ops): Fix to work
9122         with primitive types.
9123
9124 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
9125
9126         * verify.c: Added tail prefix checking. Marked icall
9127         as unverifible.
9128
9129 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
9130
9131         * verify.c: Fix the detection of branches to the middle
9132         of an instruction.
9133
9134 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
9135
9136         * verify.c: Implemented verification of volatile. and
9137         unaligned. prefix. Check if a type is valid after retrieving it.
9138
9139 2008-04-01  Dick Porter  <dick@ximian.com>
9140
9141         * process.c (process_get_fileversion): If there's no string block,
9142         set the file language to en_US.  Fixes the other new part of bug
9143         374600.
9144
9145 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
9146
9147         * class.c: New functions mono_method_can_access_field_full and
9148         mono_method_can_access_method_full. They perform type visibility
9149         and type site check.
9150
9151         * class-internal.h: Added exported functions.
9152
9153         * verify.c: Use new functions to implement proper visibility checks.
9154
9155 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
9156
9157         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
9158
9159 2008-03-28  Dick Porter  <dick@ximian.com>
9160
9161         * process.c (process_get_fileversion): Use the first language ID
9162         we see, rather than insisting on an invariant language.  Fixes bug
9163         374600.
9164
9165 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
9166
9167         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
9168         the streams to fix reading of invalid memory later.
9169
9170         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
9171         to ease debugging.
9172
9173 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
9174
9175         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
9176         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
9177
9178 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
9179         * threads.h: Added MonoThreadManageCallback type and
9180         mono_thread_set_manage_callback prototype
9181         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
9182         (used to store the mono_thread_manage callback).
9183         * threads.c: Added mono_thread_set_manage_callback, and handle
9184         "MonoThread->manage_callback" in build_wait_tids.
9185
9186 2008-03-26  Dick Porter  <dick@ximian.com>
9187
9188         * process.c (process_get_fileversion): Set FileVersionInfo strings
9189         to Empty when the resource doesn't have the particular info.
9190         Fixes bug 355717.
9191
9192 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
9193
9194         * verify.c (mono_method_verify): Proper prefix validation.
9195
9196 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
9197
9198         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
9199         itself in a separate argument instead of throwing them. Fixes #373448.
9200
9201         * appdomain.c: Bump corlib version.
9202
9203 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
9204
9205         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
9206
9207 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
9208
9209         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
9210         version macros.
9211
9212 2008-03-20  Mark Probst  <mark.probst@gmail.com>
9213
9214         * generic-sharing.c, class-internals.h: Code for putting
9215         reflection types into the runtime generic context.
9216
9217 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
9218
9219         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
9220         Fixes #340662. 
9221
9222
9223 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
9224
9225         * verify.c (VerifyContext): Added instruction prefix data to the struct.
9226
9227         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
9228
9229         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
9230
9231         * verify.c (do_cast): Let the result value keep the boxed status.
9232
9233         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
9234
9235 2008-03-17  Jb Evain  <jbevain@novell.com>
9236
9237         * reflection.c: when running on a 2.0 runtime, emit
9238         unconditionally the #~ header version as 2.0, and the
9239         CLI header version as 2.5, for symmetry's sake with csc.
9240
9241 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
9242
9243         * class.c: Remove the unused cache_interface_offsets stuff.
9244
9245         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
9246         profiler.c: Fix warnings.
9247
9248 2008-03-16  Mark Probst  <mark.probst@gmail.com>
9249
9250         * generic-sharing.c, class-internals.h: Support for putting
9251         methods into the runtime generic context.
9252
9253 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
9254
9255         * class.c (mono_class_setup_fields): Ignore calls made to this function for
9256         classes which are generic instances of not-yet finished typebuilders. Fixes
9257         #351172.
9258
9259         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
9260
9261 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
9262
9263         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
9264
9265         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
9266         field, replace it with a hash table in MonoDynamicImage.
9267
9268         * reflection.c (inflate_mono_method): Access the generic definition object from
9269         image->generic_def_objects instead of imethod->reflection_info.
9270
9271         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
9272
9273         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
9274         
9275         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
9276         function in reflection.c so it is easier to keep in sync with the dynamic image
9277         creation code.
9278
9279         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
9280         mono_image_close ().
9281
9282 2008-03-15  Mark Probst  <mark.probst@gmail.com>
9283
9284         * class.c (mono_class_generic_sharing_enabled): Disable generic
9285         sharing for all architectures except AMD64 and x86 to fix build.
9286
9287 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
9288
9289         * verify.c: Use the generic definition MonoGenericContext when available.
9290         Remove code for checking generics instance compatibility in favor of
9291         mono_class_is_assignable_from.
9292
9293 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9294
9295         * marshal.c, marshal.h, metadata-internals.h, image.c,
9296         wrapper-types.h: New wrapper for invoking a shared static method
9297         without having to pass the runtime generic context argument.
9298
9299 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
9300
9301         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
9302
9303 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9304
9305         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
9306         
9307         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
9308         create a token from a FieldOnTypeBuilderInst.
9309         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
9310         (resolve_object): Ditto.
9311
9312         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
9313         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
9314
9315 2008-03-14  Martin Baulig  <martin@ximian.com>
9316
9317         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
9318
9319         * debug-mono-symfile.h
9320         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
9321         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
9322
9323 2008-03-10  Martin Baulig  <martin@ximian.com>
9324
9325         * debug-mono-symfile.h
9326         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
9327         `lexical_block_table_offset'.
9328         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
9329         `lexical_blocks'.
9330         (MonoSymbolFile): Added `version'.
9331
9332         * mono-debug.h
9333         (MonoDebugLexicalBlockEntry): Removed.
9334         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
9335         `lexical_blocks'.
9336
9337         * mono-debug.c (mono_debug_add_method): Don't compute lexical
9338         blocks here; the debugger now does this internally.
9339
9340 2008-02-27  Martin Baulig  <martin@ximian.com>
9341
9342         * object.c (mono_runtime_exec_main): Call
9343         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
9344         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
9345
9346 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
9347
9348         * verify.c (verify_type_compatibility_full): Allow native int to be converted
9349         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
9350
9351 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
9352
9353         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
9354         ldftn with a virtual method.
9355
9356 2008-03-13  Geoff Norton  <gnorton@novell.com>
9357
9358         * decimal.c:  Only include memory.h if the platform has it.
9359
9360 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
9361
9362         * assembly.c, class.c, metadata-internals.h: make sure public key
9363         tokesns are compared in a case-insensitive way. Also, all
9364         the lookups in the GAC use a lowercase public key token
9365         (gaacutil already does the lowercasing on install). Fixes
9366         bug #369541.
9367
9368 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
9369
9370         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
9371         and return value.
9372
9373 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
9374
9375         * image.c: when someone loads a mscorlib from a file, return the
9376         currently loaded mscorlib (fixes bug #369253).
9377
9378 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9379
9380         * class.c: handle types with no parents by forcing them to have
9381         System.Object as a parent and marking them as broken (this currently
9382         allows the first part of bug #369173 to work as well, likely because
9383         we don't check for typeload exceptions everywhere yet).
9384
9385 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
9386
9387         * class.c: more complete check that types belong to corlib
9388         (fixes second part of bug #369173).
9389
9390 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
9391
9392         * generic-sharing.c:  Including glib.h for the MSVC builds to define
9393           "inline" to "__inline" before including mono-membar.h.
9394           
9395         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
9396           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
9397           MSVC builds.
9398
9399         Contributed under MIT/X11 license.
9400
9401 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
9402
9403         * verify.c (do_invoke_method): Remove return type validation.
9404
9405         * verify.c (do_ret): Do return type validation at return site instead of
9406         call site.
9407
9408 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
9409
9410         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
9411
9412         * verify.c: Some todos cleaned and improved a few error messages.
9413
9414 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
9415
9416         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
9417
9418 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9419
9420         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
9421         system types correctly.
9422
9423         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
9424         function.
9425
9426 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
9427
9428         * assembly.c (build_assembly_name): Fix a warning.
9429
9430 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
9431
9432         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
9433         the called function takes an object type argument. Fixes storing or
9434         valuetypes across remoting as well as reducing memory usage.
9435         * image.c, metadata-internals.h: remove now unused ldfld_remote and
9436         stfld_remote wrapper caches.
9437
9438 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
9439
9440         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
9441         is not found.
9442
9443         * reflection.c (mono_image_register_token): New helper function to save
9444         a token->object mapping.        
9445
9446         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
9447         managed code.
9448
9449         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
9450         one dimension arrays. Fixes #367670.
9451         (mono_reflection_get_type_internal): Ditto.
9452
9453 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9454
9455         * marshal.c: mono_load_remote_field_new() always returns object.
9456         so use the proper signature (fixes bug #366445).
9457
9458 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9459         
9460         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
9461         add an 'inline_failure' flag instead.
9462
9463 2008-03-04  Mark Probst  <mark.probst@gmail.com>
9464
9465         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
9466         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
9467         contains the location of "this", used for exception handling.
9468
9469 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9470
9471         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
9472         their size on all platforms for perf reasons.
9473
9474 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
9475
9476         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
9477         object-internal.h
9478
9479         * object-internal.h: Same.
9480
9481 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
9482
9483         * reflection.h: Fix the build I just broke.
9484
9485 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
9486
9487         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
9488         Test if a token is valid, this remove explicit usage of 
9489         MonoDynamicImage::tokens from the verifier code.
9490
9491         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
9492
9493         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
9494         instead of direct access to MonoDynamicImage::tokens.
9495
9496 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
9497
9498         * verify.c (token_bounds_check): Fix the build I just broke.
9499
9500 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
9501
9502         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
9503
9504         * verify.c (verifier_load_method): Fixed the errors message.
9505
9506         * verify.c (mono_method_verify): Fixed a debug message.
9507
9508 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
9509
9510         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
9511         mono-perfcounters.h, class-internals.h: support for predefined
9512         writable counters, query of categories and counters, bugfixes.
9513
9514 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
9515
9516         * verify.c (do_refanytype): Verify the refanytype opcode.
9517
9518         * verify.c (mono_method_verify): Use do_refanytype.
9519
9520 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
9521
9522         * verify.c (do_mkrefany): Verify the mkrefany opcode.
9523
9524         * verify.c (mono_method_verify): Use do_mkrefany.
9525
9526 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
9527
9528         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
9529         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
9530         implementation.
9531
9532 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
9533
9534         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
9535         the type load exception.
9536
9537 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
9538
9539         * verify.c: Added a few FIXME for method signatures
9540
9541         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
9542         of mono_method_get_signature and get vararg call working. Removed unused
9543         checks for return value.
9544
9545         * verify.c (do_refanyval): Verify the refanyval opcode.
9546
9547         * verify.c (mono_method_verify): Implemented verification of arglist and
9548         use do_refanyval.
9549
9550 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
9551
9552         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
9553         vtypes to marshal.c.
9554
9555         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
9556         it works for AOT as well.
9557
9558 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9559
9560         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
9561         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
9562         the system time is adjusted.
9563
9564 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
9565
9566         * icall.c, icall-def.h: use the new time functions (fixes the
9567         non-monotonic behaviour of TickCount).
9568
9569 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
9570
9571         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
9572         it breaks the build.
9573         
9574         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
9575         cattr is not finished yet.
9576
9577 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
9578
9579         * verify.c: Proper token validation for field, method and type.
9580
9581 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
9582
9583         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
9584
9585         * loader.c (method_from_memberref): Generate type load error instead of method missing
9586         if the type is not found.
9587
9588 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
9589
9590         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
9591         some of the conversions caused the generation of a marshal directive exception.
9592
9593 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
9594
9595         verify.c: Report which exception should be thrown by the JIT.
9596         Added a lot of FIXME notes.
9597
9598 2008-02-22  Mark Probst  <mark.probst@gmail.com>
9599
9600         * generic-sharing.c: Runtime generic context slots are not
9601         instantiated on init anymore.  Instead, provide function to do the
9602         instantiating on demand.
9603
9604         * class-internals.h: Added vtable to runtime generic context.
9605         Macros for encoding direct and indirect slot offsets in one
9606         guint32.
9607
9608 2008-02-21  Mark Probst  <mark.probst@gmail.com>
9609
9610         * object.c, generic-sharing.c: Moved some generic sharing code
9611         from object.c to generic-sharing.c.
9612
9613         * generic-sharing.c: Added support for extensible runtime generic
9614         context.
9615
9616         * metadata-internals.h: Two new hash tables in MonoImage for
9617         extensible runtime generic context support.
9618
9619         * domain.c: Unregister generic vtables upon domain unloading.
9620
9621         * image.c: Destroy new hash tables upon image unloading.
9622
9623         * metadata.c: Unregister generic subclasses upon image unloading.
9624
9625         * class-internals.h: New data structure for runtime generic
9626         context template.  New fields in the runtime generic context for
9627         extensible part.
9628
9629         * Makefile.am: Added generic-sharing.c.
9630
9631 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
9632
9633         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
9634         there is a pending loader exception, raise it.
9635
9636         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
9637         same.
9638
9639         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
9640         same.
9641
9642         Fixes #363450.
9643
9644 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
9645
9646         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
9647
9648         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
9649         
9650         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
9651         ref-only requests for compatibility with MS.
9652
9653 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
9654
9655         * reflection.c (mono_custom_attrs_from_method): Don't silently
9656         return an empty list for generic method instances.
9657         (mono_custom_attrs_from_param): Likewise.
9658
9659 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
9660             Raja R Harinath  <harinath@hurrynot.org>
9661
9662         Fix #354757
9663         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
9664         * class.c (mono_class_inflate_generic_method_full): Initialize it
9665         when a fully-open method is instantiated.
9666         * metadata.c (inflated_method_equal, inflated_method_hash): Update
9667         to new field.
9668         * reflection.c (inflate_mono_method): Don't create a temporary context.
9669
9670 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
9671
9672         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
9673         Compute correct value, to prepare for imethod->reflection_info going away.
9674
9675 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
9676
9677         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
9678
9679 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
9680
9681         * verify.c: Implement skip visibility flag.
9682
9683 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
9684
9685         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
9686         which contains an extra field to tell the kind of exception that should be thrown.
9687
9688         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
9689
9690 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
9691
9692         * loader.c (mono_method_get_param_names): Initialize 'klass' after
9693         'method' is updated.
9694
9695 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
9696
9697         * class.c (mono_class_layout_fields): Set class->min_align for classes using
9698         explicit layout as well. Fixes #360375.
9699
9700 2008-02-11  Geoff Norton  <gnorton@novell.com>
9701
9702         * loader.c: Guard and dereference against inflated generic methods
9703
9704 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
9705
9706         * class.c: Include Retargetable spec in assembly name.
9707         * assembly.c: Always include PublicKeyToken spec in assembly name
9708         (with value "null" if assembly is not signed), and include
9709         Retargetable spec.
9710         * icall-def.h: Added icall for Assembly.get_fullname.
9711         * icall.c: Added icall returning the fullname of an assembly.
9712
9713 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
9714
9715         * class.c (mono_class_setup_vtable_general): Add a missing call to
9716         mono_class_setup_methods () which is needed in the AOT case.
9717
9718 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
9719
9720         * verify.c (mono_type_get_stack_name): Added. Return the name for the
9721         stack type of the given MonoType.
9722
9723         * verify.c (verify_type_compatibility_full): Handle the void type.
9724
9725         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
9726         way stack merging works.
9727
9728         * verify.c (store_local): Improved verification message.
9729
9730         * verify.c (do_branch_op): If the merging is invalid, the method
9731         is unverifiable and not invalid. Improved error message.
9732
9733         * verify.c (merge_stacks): Properly merge a boxed valuetype and
9734         a reference type diferent than System.Object. Improved error
9735         message.
9736
9737 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
9738
9739         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
9740
9741         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
9742         type of an enum even if the argument is byref.
9743
9744         * verify.c: Replace all explicit uses of enumtype and enum_basetype
9745         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
9746
9747         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
9748
9749         *verify.c (verify_type_compatibility_full): Make enum types
9750         compatible with their base types.
9751
9752         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
9753         types are compatible for the special case of a boxed valuetype and
9754         System.Object.
9755
9756         * verify.c (verify_stack_type_compatibility): The function
9757         is_compatible_boxed_valuetype was extracted from here.
9758
9759         * verify.c (push_arg): Only set ctx->has_this_store if the method
9760         is not static.
9761
9762         * verify.c (do_ldelem): Fixed a typo in an error message and added
9763         strict check for mixing int32 and native int as the array type
9764         and ldelem type.
9765
9766         * verify.c (merge_stacks): Consider boxed valuetypes in the
9767         compatibility checks.
9768
9769 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
9770         * profiler.h: (MonoGCEvent): Added start-stop the world events.
9771
9772 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
9773         *class.c: use_new_interface_vtable_code: renamed the env var to have
9774         a "MONO_" prefix, and fix the logic to enable it by default.
9775
9776 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
9777         *class.c:
9778         mono_class_setup_vtable_general: rewrote the way in which interface
9779         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
9780         makes the code more maintainable.
9781         For now the old code is still there, and can be activated setting
9782         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
9783
9784 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
9785
9786         * verify.c: guarded some debug functions around and #ifdef.
9787
9788         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
9789
9790 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9791
9792         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
9793         changes for now since they seem to break too many things.
9794
9795 2008-02-05  Mark Probst  <mark.probst@gmail.com>
9796
9797         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
9798         mono_marshal_find_nonzero_bit_offset): Added macro and function
9799         for finding the byte- and bit-offset of a bitfield within a
9800         struct.
9801
9802 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
9803
9804         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
9805         (mono_marshal_get_struct_to_ptr): Ditto.
9806
9807         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
9808         cctor_signature.
9809
9810 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
9811
9812         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
9813         between methods for non-corlib types.
9814
9815 2008-02-02  Geoff Norton  <gnorton@novell.com>
9816
9817         * loader.c (mono_method_get_param_names): Populate the parameter name for 
9818         generic parameters as well. (Fixes #342536)
9819
9820 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
9821
9822         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
9823
9824         * verify.c (do_invoke_method): Fix for calling with byref structs.
9825
9826         * verify.c (do_cast): push a boxed value type based on the type token and not
9827         the type of stack.
9828
9829 2008-01-31  William Holmes  <billholmes54@gmail.com>
9830
9831         * process.c (process_module_string_read): Check the size returned form 
9832           VerQueryValue to avoid out of memory exception. 
9833
9834 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
9835
9836         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9837         Handle properly modules which are not in the moduleref table. Fixes
9838         #356938.
9839
9840 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
9841
9842         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
9843         the dynamic case which is now in managed code.
9844         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
9845
9846         * marshal.c (mono_string_to_bstr): Fix a warning.
9847         (init_com_provider_ms): Ditto.
9848
9849         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
9850
9851         * exception.c (mono_get_exception_out_of_memory): New helper function.
9852
9853 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
9854
9855         * marshal.c: Add support for BSTR marshalling
9856         using other COM systems.
9857
9858         Code is contributed under MIT/X11 license.
9859
9860 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
9861
9862         * object.c (mono_runtime_invoke_array): reverted previous
9863         commit as it breaks the build.
9864
9865 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
9866
9867         * object.c (mono_runtime_invoke_array): Verify arguments for
9868         invalid types. Fixes #348522.
9869
9870 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
9871
9872         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
9873         non-final virtual calls using call. 
9874
9875         * verify.c (do_invoke): fixed some TODOs.
9876
9877         * verify.c (push_arg): set has_this_store for "ldarga 0".
9878
9879 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
9880
9881         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
9882         which belong to an inflated class. Fixes #356531.
9883
9884 2008-01-26  Robert Jordan  <robertj@gmx.net>
9885
9886         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
9887         which resort to FindFirstFile when a certain error condition
9888         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
9889         Code is contributed under MIT/X11 license.
9890
9891 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
9892
9893         * marshal.c (emit_marshal_string): Fix out string marshalling
9894         to use specified encoding. Fixes #323900.
9895
9896         Code is contributed under MIT/X11 license.
9897
9898 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
9899
9900         * class.c (mono_class_inflate_generic_method_full): Don't modify
9901         iresult->context after cache check.
9902
9903 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
9904
9905         * class.c (mono_class_inflate_generic_method_full): Change the
9906         struct assignments to memcpy for better visibility and add some comments.
9907
9908 2008-01-23  Dick Porter  <dick@ximian.com>
9909
9910         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9911         procedure, and make it work on windows.
9912
9913 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
9914
9915         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9916         a MonoReflectionTypeBuilder since it is always of that type.
9917
9918         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
9919
9920         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9921
9922         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9923         
9924         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9925
9926         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9927
9928         * reflection.c (mono_reflection_create_runtime_class): Remove already created
9929         instantiations from the type cache.
9930
9931 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9932
9933         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9934
9935         * verify.c (do_unbox_value): push a controled mutability managed pointer.
9936
9937 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9938
9939         * verify.c (do_ldstr): added, verifies if the #US token is valid.
9940
9941         * verify.c (mono_method_verify): removed old TODO
9942
9943 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9944
9945         * verify.c (do_newobj): add visibility check.
9946
9947 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9948
9949         * verify.c (do_load_function_ptr): add visibility check.
9950
9951 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
9952         *class.c:
9953         mono_generic_class_get_class: hook profiler events.
9954         mono_field_get_offset: added to support heap-shot in the new profiler.
9955         *class.h: exported mono_field_get_offset.
9956         * reflection.c:
9957         mono_reflection_setup_internal_class: hook profiler events.
9958
9959 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
9960
9961         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
9962         argument here too and use it to avoid checking for pending exceptions if 
9963         possible.
9964
9965 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
9966
9967         * assembly.c (build_assembly_name): add arg for passing the assembly
9968         flags. Do not consider a PublicKey with value "null" valid.
9969         (mono_assembly_name_parse_full): added boolean argument that will be
9970         set if the assembly name contains a PublicKeyToken spec. Added support
9971         for the Retargetable spec for which only Yes or No are allowed as valid
9972         value. Consider assembly name invalid if Retargetable spec is set, but
9973         either version, culture or public key (token) are not specified.
9974         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9975         with implementation in assembly.c.
9976         * icall.c (fill_reflection_assembly_name): also copy assembly flags
9977         from MonoAssemblyName.
9978         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9979         introduced argument for mono_assembly_name_parse_full to know if the
9980         assembly name has a PublicKeyToken spec, and if it has instruct
9981         fill_reflection_assembly_name to use default value for keyToken (if
9982         PublicKeyToken is null).
9983
9984 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
9985
9986         * verify.c (mono_method_verify): fixed ovf ops with
9987         float values. They are unverifiable now.
9988
9989 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
9990
9991         * class.c (set_failure_from_loader_error): add BadImageException to the
9992         list of exceptions that can cause a type to fail to load.
9993
9994         * class.c (mono_class_get_exception_for_failure): same.
9995
9996 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
9997
9998         * verify.c (in_any_exception_block): added, check if offset
9999         is part of any exception handling clause.
10000
10001         * verify.c (get_stack_type): added VAR and MVAR types.
10002
10003         * verify.c (do_stobj): better error messages.
10004
10005         * verify.c (do_cpobj): added, check cpobj.
10006
10007         * verify.c (do_initobj): added, check initobj.
10008
10009         * verify.c (do_sizeof): added, check sizeof.
10010
10011         * verify.c (do_localloc): added, check localloc.
10012
10013         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
10014
10015 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
10016
10017         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
10018         save_lmf/restore_lmf opcodes.
10019
10020         * threads.c (mono_threads_install_notify_pending_exc): New function to
10021         install a callback notifying the JIT there is a pending exception on a thread.
10022         (mono_thread_request_interruption): Call the new callback.
10023         (mono_thread_get_and_clear_pending_exception): New function to return the
10024         exception pending on a thread.
10025
10026         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
10027         to turn off checking for pending exceptions.
10028         (mono_marshal_get_native_wrapper): Ditto.
10029
10030 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
10031
10032         * threads-types.h: Get rid of the unnecessary extern declarations.
10033
10034 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
10035
10036         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
10037         return field from parent class if not private.
10038         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
10039         returns fields from parent class if they are not private.
10040         (method_nonpublic): added function to determine if a given method
10041         should be considered non-public. Returns false for private methods
10042         on parent class, and internal methods from parent on the 1.0 profile.
10043         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
10044         use method_nonpublic function to determine whether method should be
10045         returned.
10046         (property_accessor_public): use newly introduced method_nonpublic
10047         function to determine whether accessor is non-public. 
10048         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
10049         event from parent class if not private. Only return static event if
10050         Static flag is set, and only return static event from parent class if
10051         FlattenHierarchy flag is set.
10052         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
10053         include non-private events from parent class.
10054
10055 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
10056
10057         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
10058         warning.
10059
10060 2008-01-16  Wade Berrier <wberrier@novell.com>
10061
10062         * security.c: Add assembly.h header to appease some warnings
10063
10064 2008-01-16  Dick Porter  <dick@ximian.com>
10065
10066         * process.c (process_module_string_read): Remove trailing null
10067         when saving string.
10068
10069 2008-01-16  Mark Probst  <mark.probst@gmail.com>
10070
10071         * class-internals.h: A new data structure describing the layout of
10072         a runtime generic context (MonoRuntimeGenericContextTemplate).
10073
10074         * metadata-internals.h: Added a hash table to MonoDomain that maps
10075         from open generic classes to their runtime generic context
10076         templates.
10077
10078         * object.c: Building of the runtime generic context, including
10079         proper handling of generic type arguments of superclasses.
10080         Building of the runtime generic context according to the template.
10081
10082 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
10083
10084         * class.c (mono_class_setup_fields): Set field.count for generic instances.
10085         Fixes #350856.
10086
10087         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
10088         mono_portability_find_file (). Fixes #325466.
10089         (mono_image_get_public_key): Fix a warning.
10090
10091 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
10092
10093         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
10094         Fixes #353550.
10095         (mono_class_from_name_case): Ditto.
10096
10097 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
10098
10099         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
10100           common storage for the tables used in the System/NumberFormatter class.
10101
10102 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
10103
10104         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
10105
10106 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
10107
10108         * verify.c (get_boxable_mono_type): check if the token is valid.
10109
10110         * verify.c (set_stack_value): changed to add an error if an
10111         invalid type is set on stack. Changed all callers due to signature change.
10112
10113         * verify.c (do_stobj): implement stobj validation.
10114
10115 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
10116
10117         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
10118         set container->is_method, it was set earlier.
10119
10120         * metadata.c (type_in_image): Handle MVARs which belong to not finished
10121         generic methods.
10122
10123         * reflection.c (mono_reflection_initialize_generic_parameter): Set
10124         is_method of the generic container to TRUE for methods.
10125
10126 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
10127
10128         * metadata.c (type_in_image): Handle type parameters properly.
10129
10130         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
10131         memory ownership of this structure.
10132
10133 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
10134
10135         * verify.c (get_boxable_mono_type): make typedref types been just
10136         unverifiable. check for void type.
10137
10138         * verify.c (do_unbox_any): added, verify opcode unbox.any.
10139
10140         * verify.c (do_load_function_ptr): accept method spec tokens.
10141
10142 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
10143
10144         * marshal.c (mono_class_native_size): Always set *align even if this is called
10145         recursively.
10146
10147 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
10148
10149         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
10150         out-of-date.
10151
10152 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
10153
10154         * verify.c: removed some old unused tables. A huge bunch of small fixes
10155         to things found while testing the verifier with mono basic.
10156
10157         * verify.c (dump_stack_value): dump null literal flag to.
10158
10159         * verify.c (verify_type_compatibility_full): fix comparison
10160         for types that have a generic super type.
10161
10162         * verify.c (verify_stack_type_compatibility): fix compatibility
10163         between null literals and reference types. fix compatibility between
10164         boxed valuetypes and object. fix corner case test for enums.
10165
10166         * verify.c (do_cmp_op): proper verification of cgt.un in case
10167         of reference types.
10168
10169         * verify.c (do_invoke_method): fix error message.
10170
10171         * verify.c (do_store_indirect
10172
10173         * verify.c (check_is_valid_type_for_field_ops): proper verification
10174         of managed pointers to valuetypes and boxed valuetypes. proper verification
10175         of null literals.
10176
10177         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
10178         allow token to be a reference type.
10179
10180         * verify.c (do_cast): proper handling of boxes valuetypes.
10181
10182         * verify.c (do_stelem): proper handling of storing a boxed valuetype
10183         in object[].
10184
10185         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
10186         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
10187         fixed the decoding of unbox_any
10188
10189 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
10190
10191         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
10192
10193 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
10194
10195         * verify.c (do_newobj): do delegate verification.
10196
10197         * verify.c (verify_delegate_compatibility): perform delegate
10198         verification.
10199
10200         * verify.c (verify_ldftn_delegate): perform tests related to
10201         ldftn delegates.
10202
10203         * verify.c (mono_delegate_signature_equal): perform the
10204         slightly diferent signature comparison required by delegates.
10205
10206         * metadata.c (mono_metadata_type_equal_full): added and exported
10207         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
10208         allows signature only comparison.
10209
10210         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
10211         as MONO_INTERNAL.
10212
10213 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
10214
10215         * verify.c: added a bunch of stack_slot_* functions to
10216         make access to stack slot type easier. This is required to
10217         allow optional flags, like null literal, boxed value and
10218         this pointer.
10219         All access paths to IlStackDesc::stype have been changed 
10220         to use these new funcions.
10221         Removed a bunch of unused functions and cleared all warnings.
10222         This patch introduces the usage of the this pointer and 
10223         boxed value flags.
10224
10225 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
10226
10227         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
10228
10229 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
10230
10231         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
10232         match managed version.
10233
10234         * appdomain.c: Bump corlib version.
10235         
10236         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
10237         argument.
10238
10239 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
10240
10241         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
10242         Set public key token to zero-length byte array if assembly is not
10243         strongnamed.
10244
10245 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
10246
10247         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
10248         writing a vtype array elem.
10249
10250 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
10251
10252         * assembly.c (build_assembly_name): return FALSE if length of token is
10253         not 16 (if not "null").
10254         (mono_assembly_name_parse_full): return FALSE if value of version,
10255         culture, token or key is 0.
10256         * icall.c (fill_reflection_assembly_name): add boolean arguments to
10257         specify whether public key and public key token must be set to default
10258         value (zero-length byte array) if not available. Set versioncompat to
10259         SameMachine. If public key is available or the default is set, then
10260         set PublicKey flag.
10261         (ves_icall_System_Reflection_Assembly_FillName): if no public key
10262         is available, use empty byte array as default value. On the 2.0
10263         profile, use default value for public key token if not set.
10264         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
10265         profile, use default value for public key if not set. On the 2.0
10266         profile, use default value for public key token if not set.
10267         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
10268         default values for public key and public key token.
10269
10270 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
10271
10272         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
10273         field to keep it in synch with the managed object.
10274
10275         * marshal.c (emit_marshal_object): Add support for byref marshalling of
10276         delegates. Fixes #351520.
10277
10278         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
10279         contains defined memory.
10280         
10281         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
10282
10283         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
10284         
10285         * sgen-gc.c (check_consistency): New helper function to do a consistency check
10286         of the GC data structures.
10287
10288         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
10289
10290         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
10291         
10292         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
10293         barrier.
10294         (mono_array_clone_in_domain): Ditto.
10295         (mono_array_clone_in_domain): Ditto.
10296
10297         * threads.c (start_wrapper): Register the thread start argument as a GC root.
10298         (cache_culture): Use a write barrier.
10299
10300         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
10301         (ves_icall_get_property_info): Ditto.
10302
10303         * object.h (MONO_STRUCT_SETREF): New macro.
10304
10305         * class-internals.h (MonoStats): Add some GC statistics.
10306
10307         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
10308
10309 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
10310
10311         * exception.c (mono_exception_from_name_two_strings):
10312         Break from loop after method is found.
10313
10314 2008-01-04  Dick Porter  <dick@ximian.com>
10315
10316         * process.c (process_module_string_read): Rename variable to
10317         reflect correct usage, after fixing bug 345972.
10318
10319 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
10320
10321         * verify.c (mono_type_create_fnptr_from_mono_method): 
10322         created a MonoType function pointer instance to be used during
10323         verification. The verifier releases this memory at end.
10324
10325         * verify.c (mono_method_is_constructor): extracted repeated
10326         checks for constructor into a single class.
10327
10328         * verify.c (do_push_field): use new extracted method
10329         for constructor check.
10330
10331         * verify.c (do_newobj): same.
10332
10333         * verify.c (do_ldftn): renamed to do_load_function_ptr
10334         and make it verify ldvirtftn too.
10335
10336         * verify.c (mono_method_verify: proper verification
10337         of ldvirtftn. release created MonoMethod instances.
10338
10339 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
10340
10341         * verify.c (token_bounds_check): added.
10342
10343         * verify.c (do_ldftn): added.
10344
10345         * verify.c (mono_method_verify): proper verificartion of ldftn.
10346
10347 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
10348
10349         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
10350         than the table row count. It's the resposibility of the caller to
10351         make the bounds check and raise the correct error.
10352
10353         * metadata.c (mono_metadata_decode_row_col): Same.
10354
10355         * loader.c (mono_get_method_from_token): perform bounds check
10356         on token for methoddef table.
10357
10358 2007-12-29  Miguel de Icaza  <miguel@novell.com>
10359
10360         * icall.c
10361         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
10362         assert into a negative result, the managed code already coped with
10363         that.
10364
10365         Some folks on Windows reported this error. 
10366
10367 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
10368
10369         * appdomain.c: Bump corlib version.
10370         * icall.c:
10371         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
10372         CultureInfo.CreateCulture to create CultureInfo for name.
10373         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
10374         create CultureInfo for name. Fixes bug #347174.
10375
10376 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
10377
10378         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
10379         flags.
10380
10381         * verify.c (is_valid_branch_instruction): allow branching to the
10382         first instruction of the protected block.
10383
10384         * verify.c (is_valid_cmp_branch_instruction): same.
10385
10386         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
10387         avoid double initialization.
10388
10389         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
10390         detect which cases the eval stack should just be copied.
10391
10392         * verify.c (mono_method_verify): check if the eval stack
10393         is empty when entering a protected block.
10394
10395 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
10396
10397         * verify.c: added is_clause_in_range, is_clause_inside_range,
10398         is_clause_nested and verify_clause_relationship. They perform
10399         the verifications stated in P1 12.4.2.7.
10400
10401         * verify.c (mono_method_verify): remove some unused variables,
10402         add the new exception clause checks, add instruction border
10403         checks for protected block start/end, improved some error 
10404         messages and fixed a bug in the way invalid instruction access
10405         is detected.
10406
10407 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
10408
10409         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
10410         from GC 7.0 if available.
10411
10412         * object.c: Remove an unused define.
10413         
10414         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
10415
10416         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
10417
10418         * null-gc.c (mono_gc_make_descr_for_array): Implement.
10419
10420         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
10421
10422         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
10423         to take the same arguments as the other make_descr functions.
10424
10425         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
10426
10427         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
10428         directly.
10429
10430         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
10431         mini.c.
10432
10433         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
10434         call to boehm-gc.c.
10435
10436         * boehm-gc.c (mono_gc_register_root): Fix a warning.
10437
10438         * null-gc.c (mono_gc_register_root): Fix a warning.
10439
10440         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
10441
10442         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
10443         (mono_gc_base_init): Call GC_init ().
10444
10445         * null-gc.c: Define mono_gc_register_root () as a no-op.
10446
10447         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10448
10449 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
10450
10451         * verify.c: add prototype for merge_stacks at top
10452
10453         * verify.c (do_switch): added.
10454
10455         * verify.c (merge_stacks): on some cases the stack merging
10456         was not happening properly. Unequal stack sizes at merge
10457         points should be invalid.
10458
10459         * verify.c (mono_method_verify): added more debug info on stack state.
10460         verify switch properly.
10461
10462 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
10463
10464         * method-builder.h: New file, moved the mono_mb_ declarations here from 
10465         marshal.h.
10466
10467         * boehm-gc.c marshal.c: Include method-builder.h.
10468
10469         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
10470
10471         * marshal.c: Remove some code which is now in method-builder.c.
10472
10473 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
10474
10475         * method-builder.c: New file, extraction of the method builder functionality 
10476         from marshal.c.
10477
10478         * marshal.c: Move the mb functions into method-builder.c.
10479
10480         * marshal.h marshal.c: Export some mono_mb_... functions.
10481
10482         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
10483
10484         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
10485         the caller.
10486
10487         * class.c (mono_class_get_full): Check the token type in the dynamic case.
10488
10489         * loader.c (mono_field_from_token): Ditto.      
10490
10491         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
10492         type as well.
10493         
10494         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
10495         Fixes #342565.
10496
10497         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
10498         a helper function for setting it.
10499
10500         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
10501
10502         
10503         * assembly.c: Significally simplify code now that referenced assemblies are 
10504         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
10505
10506         * threads.h: Don't include  the internal threads-types.h header file. Fixes
10507         #349952.
10508
10509 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
10510
10511         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
10512         instructions that were target of branches or are at protected block boundaries.
10513
10514         * verify.c (in_same_block): handle filter clauses.
10515
10516         * verify.c (is_valid_branch_instruction): added. checks the target of
10517         instructions br or brtrue/false.
10518
10519         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
10520         binary branch instructions such as beq and bge.
10521
10522         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
10523         and made it pin the instruction as been part of the exception block.
10524
10525         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
10526         of in_same_block.
10527
10528         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
10529         of in_same_block.
10530
10531         * verify.c (do_ret): ret from a protected block is unverifiable and
10532         not invalid.
10533
10534         * verify.c (do_static_branch): verify br and br.s instructions.
10535
10536         * verify.c (merge_stacks): add extra param to support detection
10537         of branches in the middle of instructions.
10538         
10539         * verify.c (mono_method_verify): verify branches and exception blocks
10540         that target the middle of instructions. Proper verification of br and br.s.
10541
10542 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
10543
10544         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
10545         skip_visibility field.
10546         (reflection_methodbuilder_from_dynamic_method): Ditto.
10547
10548         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
10549         registrations. Fixes #348193.
10550
10551         * threads.h: Move the internal mono_thread_get_pending_exception () to
10552         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
10553
10554 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
10555
10556         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
10557         icall registration. Fixes #348193.
10558
10559         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
10560         for corlib classes into object. Fixes #349621.
10561
10562 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
10563
10564         * icall.c (property_accessor_nonpublic): new function to determine
10565         whether an accessor allows a property to be considered non-public.
10566         Returns false for private accessor(s) from parent class, and internal
10567         accessor(s) from parent on 2.0 profile (and higher).
10568         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
10569         to determine whether property should be included if NonPublic flag
10570         is set. Fixes bug #349078.
10571
10572 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
10573
10574         * verify.c (init_stack_with_value): added.
10575
10576         * verify.c (mono_method_verify): extracted common
10577         code for exception initialization into init_stack_with_value.
10578
10579         * verify.c (mono_method_verify): initialize the exception
10580         for handler clauses as well.
10581
10582         * verify.c (mono_method_verify): fix the exception clause
10583         ordering rules, it should use handler end offset and not
10584         start offset.
10585
10586 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
10587
10588         * rawbuffer.c: remove useless warning.
10589
10590 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
10591
10592         * threads.h, threads-types.h: move functions to the correct header
10593         (fixes bug#349952).
10594
10595 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
10596
10597         * verify.c (mono_method_verify): proper verification
10598         of exception handling clauses ranges and fallthru in
10599         and out of protected blocks.
10600
10601 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
10602
10603         * verify.c (mono_method_verify): fixed compilation issue.
10604
10605 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
10606
10607         * verify.c (mono_method_verify): a printf slipped in, changed
10608         to use verifier debug macro.
10609
10610 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
10611
10612         * verify.c (is_correct_leave): check for filter clauses.
10613
10614         * verify.c (do_filter): added.
10615
10616         * verify.c (mono_method_verify): property verification of leave.
10617
10618
10619 2007-12-18  Mark Probst  <mark.probst@gmail.com>
10620
10621         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
10622         Win32 build, until we figure out how to do the proper thing on
10623         Win32.
10624
10625 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
10626
10627         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
10628         by the previous patch.
10629         
10630         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
10631         the assembly resolve handler for refonly assemblies.
10632
10633 2007-12-17  Mark Probst  <mark.probst@gmail.com>
10634
10635         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
10636         Make sure only one thread is allowed to commence shutdown, and
10637         don't allow new threads to be started once shutdown is in
10638         progress.
10639
10640 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
10641
10642         * verify.c (is_correct_endfilter): added.
10643
10644         * verify.c (is_unverifiable_endfilter): added.
10645
10646         * verify.c (do_endfilter): added.
10647
10648         * verify.c (mono_method_verify): property verification of endfilter
10649         and fixed a corner case or endfinally.
10650
10651 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
10652
10653         * verify.h: new flags to support fail fast of unverifiable code and
10654         do non-strict verification. Non-strict verification is required to
10655         have MS runtime compatibility. There are a huge amount of unverifiable
10656         code that it accepts as verifiable. The strict mode verifies the code
10657         as the specs says.
10658         Non-strict mode will be required in cases where code needs to be
10659         accepted as verifiable but fails under strict mode.
10660
10661         * pedump.c: added support to fail fast and non-strict verification.
10662
10663         * verify.c: added support for both fail fast and non-strict verification.
10664
10665 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
10666
10667         * verify.c (is_correct_endfinally): added.
10668
10669         * verify.c (mono_method_verify): property verification of endfinally.
10670
10671 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10672
10673         * verify.c (in_any_block): check for filter clauses.
10674
10675         * verify.c (is_correct_rethrow): added.
10676
10677         * verify.c (mono_method_verify): property verification of rethrow.
10678
10679         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
10680
10681 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10682
10683         * verify.c (do_throw): added.
10684
10685         * verify.c (mono_method_verify): property verification of throw
10686
10687 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
10688
10689         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
10690         assemblies. Fixes #346425.
10691
10692 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
10693
10694         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
10695         FieldBuilders.
10696
10697         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
10698
10699         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
10700         prevent asserts when this is called with a token which might not be valid.
10701
10702         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
10703         lookup_dynamic_token_class with valid_token == FALSE.
10704
10705         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
10706
10707         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
10708
10709         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
10710         
10711 2007-12-10  Mark Probst  <mark.probst@gmail.com>
10712
10713         * gc.c: Don't delay threadpool thread finalization unless Mono is
10714         shutting down.
10715
10716 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10717
10718         * threads.c: turn an assert into a non-fatal warning.
10719
10720 2007-12-09  Robert Jordan  <robertj@gmx.net>
10721
10722         * icall.c (GetVirtualMethod): Add missing argument validation.
10723
10724 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10725
10726         * verify.c (do_cast): added.
10727
10728         * verify.c (mono_method_verify): property verification of castclass and isinst.
10729
10730
10731 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10732
10733         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
10734
10735         * verify.c (do_stelem): added.
10736
10737         * verify.c (mono_method_verify): property verification of stelem.X.
10738
10739 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10740
10741         * class.c, class-internals.h: Introduce an environment variable
10742         (MONO_GENERIC_SHARING) through which the extent of generic code
10743         sharing can be controlled (share all classes, share only corlib
10744         classes, or share nothing).
10745
10746         * object.c: Only create runtime generic context for classes for
10747         which sharing is enabled.
10748
10749 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10750
10751         * verify.c (do_ldelem): refactor it to work with ldelem.any.
10752
10753         * verify.c (mono_method_verify): property verification of ldelem.any.
10754
10755 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10756
10757         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
10758         added ldelem.X opcodes.
10759
10760         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
10761
10762         * verify.c: proper verification of ldelem.X 
10763
10764 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10765
10766         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
10767
10768 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
10769
10770         * verify.c (mono_method_verify): null literal requires special handling,
10771         the value pushed on stack need to be flagged as so.
10772
10773         * verify.c (do_ldelema): Verify ldelema properly.
10774
10775 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
10776
10777         * verify.c: Verify ldlen properly.
10778
10779 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
10780
10781         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
10782         to the target object's type. Fixes #346160.
10783
10784 2007-12-05  Dick Porter  <dick@ximian.com>
10785
10786         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
10787         Solaris needs the same workaround as BSD-derived systems.  Fixes
10788         bug 323524, patch by Burkhard Linke
10789         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
10790
10791 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
10792
10793         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
10794         handle to use when error dialog is shown; otherwise, update mask
10795         to show no error dialog when an error occurs.
10796
10797 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
10798
10799         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
10800
10801         * class.c (mono_class_get_field_default_value): New helper function to initialize
10802         field->def_type and field->data.
10803
10804 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
10805
10806         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
10807         the general one.
10808
10809         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
10810
10811         * marshal.c: Avoid depending on delegate->method_info being set.
10812
10813         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
10814         
10815         * object.c (mono_delegate_ctor): Set delegate->method.
10816
10817         * object-internals.h (struct _MonoDelegate): Add 'method' field.
10818
10819         * appdomain.c: Bump corlib version.
10820
10821 2007-11-27  Raja R Harinath  <harinath@gmail.com>
10822
10823         * metadata.c (mono_generic_inst_equal_full): Short-circuit
10824         equality check if we're comparing canonicalized MonoGenericInsts.
10825
10826 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
10827
10828         * class.c (generic_array_methods): Call mono_class_setup_methods () before
10829         accessing class->methods.
10830
10831 2007-11-22  Dick Porter  <dick@ximian.com>
10832
10833         * threads.c: Ensure that the synch_cs is set before trying to use
10834         it.
10835
10836 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
10837
10838         * profiler.c: r89126 broke the statistial profiler, unbreak.
10839
10840 2007-11-22  Martin Baulig  <martin@ximian.com>
10841
10842         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
10843
10844         * mono-debug.c
10845         (mono_debug_debugger_version): Bump to 3.
10846         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
10847         -> mono_debugger_class_initialized().
10848
10849         * mono-debug-debugger.c
10850         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
10851
10852         * class.c
10853         (mono_debugger_start_class_init_func): Removed.
10854         (mono_debugger_class_loaded_methods_func): Added.
10855         (mono_class_setup_methods): Call it here.
10856
10857 2007-11-22  Martin Baulig  <martin@ximian.com>
10858
10859         * mono-debug.c
10860         (mono_debug_add_delegate_trampoline): New public method.
10861         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
10862
10863         * mono-debug.h
10864         (MonoSymbolTable): Added `global_data_table'.
10865         (MonoDebuggerTypeKind): Removed.
10866
10867 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
10868
10869         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
10870         these methods.
10871
10872         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10873         
10874 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10875
10876         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
10877
10878 2007-11-20  Martin Baulig  <martin@ximian.com>
10879
10880         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
10881
10882         * mono-debug-debugger.c
10883         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
10884         (mono_debugger_remove_breakpoint): Likewise.
10885         (mono_debugger_check_breakpoints): Likewise.
10886         (mono_debugger_register_class_init_callback): New public method.
10887         (mono_debugger_remove_class_init_callback): Likewise.
10888         (mono_debugger_add_type): Likewise.
10889
10890         * mono-debug-debugger.h
10891         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
10892
10893 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
10894
10895         * class.c: more interface implementations needed for the
10896         array enumerator (fixes bug #341112).
10897
10898 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
10899
10900         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
10901         fix ParamName of ArgumentNullExceptions.
10902
10903 2007-11-17  Miguel de Icaza  <miguel@novell.com>
10904
10905         * reflection.c (mono_reflection_encode_sighelper): Generate the
10906         modopts and modreqs.   I have a useless test that crashes monodis,
10907         but that shows the code working.
10908
10909 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10910
10911         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10912         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10913
10914 2007-11-15  Dick Porter  <dick@ximian.com>
10915
10916         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10917         When joining a thread, it's the thread that's calling Join that
10918         gets WaitSleepJoin state not the target.  Fixes the standalone
10919         test case in bug 334740, and hopefully the whole bug too.
10920
10921 2007-11-15  Dick Porter  <dick@ximian.com>
10922
10923         * process.c: Read file version info from the files pointed at by
10924         process modules, not the current process.  Fixes bug 315969.
10925
10926         Use windows typedef names in some places to fix warnings on the
10927         windows build.
10928
10929 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10930
10931         * image.c, metadata-internals.h: Added a generic_class_cache hash
10932         to MonoImage for looking up generic classes when sharing generics.
10933
10934 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10935
10936         * sgen-gc.c: warning cleanups.
10937
10938 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
10939
10940         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10941         inherited properties.
10942
10943 2007-11-14  Mark Probst  <mark.probst@gmail.com>
10944
10945         * object.c, class-internals.h: Added more information to the
10946         runtime generic context.
10947
10948 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10949
10950         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10951         instead of just the target method. Generalize the abstract method handling to
10952         handle any non-static method.
10953
10954         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10955         mono_marshal_get_delegate_invoke () signature change.
10956
10957 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10958
10959         * class.c, class-internals.h: Made
10960         mono_type_get_basic_type_from_generic () public.  Fixed member
10961         access check for shared generics.
10962
10963         * loader.c: Don't insert field into field cache if it's part of a
10964         non-inflated generic class.
10965
10966         * domain.c, domain-internals.h: The generic sharing context is now
10967         part of the jit info data structure.  Added two accessor
10968         functions.
10969
10970 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10971
10972         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10973         the array Get/Set/Address methods, since the JIT inlines them.
10974
10975         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10976
10977         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10978         (mono_image_init): Initialize runtime_invoke_direct_cache.      
10979
10980         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10981         mono_marshal_get_delegate_invoke signature change.
10982
10983         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10984         an additional argument. Add support for invoking abstract methods.
10985
10986         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10987
10988         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
10989
10990 2007-11-09  Mark Probst  <mark.probst@gmail.com>
10991
10992         * class.c: Do field layout for open generic classes as well.
10993
10994 2007-11-09  Mark Probst  <mark.probst@gmail.com>
10995
10996         * gc.c, gc-internal.h: Don't finalize threadpool threads with
10997         other objects, because the threadpool is still around.  Put them
10998         in a list instead and after finalizing all other objects in the
10999         root domain shut down the thread pool and then finalize the
11000         threads.  Fixes bug #337383.
11001
11002         * threads.c, thread-types.h: New mono_thread_create_internal()
11003         function for marking a thread with the threadpool flag before it
11004         started.  Set synch_cs to NULL after freeing it.
11005
11006         * threadpool.c: Mark threadpool threads before they start.
11007
11008 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
11009
11010         * reflection.h, reflection.c: don't export random functions
11011         and lazy load dbnull and missing objects.
11012
11013 2007-11-07  Jonathan Chambers <joncham@gmail.com>
11014
11015         * class.c: Initialize COM types if COM interfaces
11016         are present (not just COM classes).
11017         
11018         Code is contributed under MIT/X11 license.
11019
11020 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
11021         * reflection.c:
11022         create_dynamic_mono_image: hook module profiler events (dynamic case).
11023         mono_image_basic_init: hook assembly profiler events (dynamic case).
11024
11025 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
11026         * profiler.c:
11027         simple_appdomain_unload: completely terminate the profiler
11028         instead of only processing the statistical samples.
11029         simple_shutdown: make sure this is really called exactly once,
11030         even in multithreaded applications, and always listen to
11031         appdomain events.
11032         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
11033         here, the "[un]load" functions will do it.
11034         Fixes bugs #333791 and #325261.
11035
11036 2007-11-07  Geoff Norton  <gnorton@novell.com>
11037
11038         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
11039         rather than depend on __APPLE__.
11040
11041 2007-11-07  Mark Probst  <mark.probst@gmail.com>
11042
11043         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
11044
11045 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
11046
11047         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
11048         UTF16 MonoString. Fix the crash from bug #335488
11049
11050 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
11051
11052         * marshal.c: Correct (for non-Win32 OS) length != size in 
11053         mono_string_from_bstr. Fix #339530.
11054
11055 2007-11-06  Geoff Norton  <gnorton@novell.com>
11056
11057         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
11058         to succeed
11059
11060 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
11061
11062         * process.c: Added run-time GetProcessId API detection for Windows.
11063
11064 2007-11-04  Miguel de Icaza  <miguel@novell.com>
11065
11066         * reflection.c  (mono_param_get_objects): If a parameter has the
11067         attribute [System.Runtime.InteropServices.Optional] we should
11068         set the DefaultValue of the ParameterInfo to be
11069         System.Reflection.Missing instead of DBNull.
11070
11071         See bug #339013.
11072
11073         (mono_get_reflection_missing_object): New method,
11074         returns the System.Reflection.Missing.Value singleton instance.
11075
11076 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
11077
11078         * culture-info-table.h : regenerated.
11079
11080 2007-11-02  Jonathan Chambers <joncham@gmail.com>
11081
11082         * icall.c: Use GetEnvironmentStrings on windows
11083         so we are using the same environment block as 
11084         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
11085         #333740.
11086         
11087         Code is contributed under MIT/X11 license.
11088
11089 2007-10-31  Martin Baulig  <martin@ximian.com>
11090
11091         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
11092
11093         * mono-debug-debugger.h
11094         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
11095
11096 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
11097
11098         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
11099         classes.
11100
11101 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
11102
11103         * culture-info-table.h : regenerated.
11104
11105 2007-10-30  Robert Jordan  <robertj@gmx.net>
11106
11107         * icall-def.h, icall.c:
11108         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
11109
11110         Code is contributed under MIT/X11 license.
11111
11112 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
11113
11114         * class.c (mono_class_setup_vtable): Find the inflated methods in the
11115         inflated class instead of inflating them again.
11116         
11117         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
11118         dynamic case.
11119
11120         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
11121         Call setup_supertypes () after klass->parent is set.
11122         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
11123
11124         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
11125         for inflated instances of not yet created dynamic generic classes.
11126         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
11127         times from inflated_method.
11128         (methodbuilder_to_mono_method): Ditto.
11129
11130 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
11131
11132         * gc.c: code cleanup and removed old untested option of not creating the
11133         finalizer thread.
11134
11135 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
11136
11137         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
11138         creating a jump trampoline for dynamic methods.
11139
11140 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
11141
11142         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
11143         generic TypeBuilders when called from another method of the same type (bug #335131).
11144
11145
11146 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
11147
11148         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
11149         doesn't seem to work perfectly.
11150         
11151         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
11152         called multiple times.
11153         (methodbuilder_to_mono_method): Ditto.
11154         (resolve_object): Inflate FieldBuilder's.
11155
11156 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11157
11158         * string-icalls.c, string-icalls.h, appdomain.c: patch from
11159         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
11160         RemoveEmptyEntries in the string.Split implementation (bug #322375).
11161
11162 2007-10-26  Dick Porter  <dick@ximian.com>
11163
11164         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
11165         Thread initialisation changes
11166
11167 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
11168
11169         * verify.c: fix compatibility check between arrays and System.Array
11170
11171 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
11172
11173         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
11174         too. Fixes #336999.
11175
11176 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
11177
11178         * object.c (mono_value_box): Use typed allocation here.
11179
11180 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
11181
11182         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
11183         trampoline instead of compiling the method right away.
11184
11185         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
11186
11187 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
11188
11189         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
11190         related fields for dynamic classes. Fixes #334493.
11191
11192 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
11193
11194         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
11195         
11196         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
11197
11198         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
11199         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
11200
11201         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
11202
11203         * reflection.c (create_generic_typespec): Initialize klass->generic_container
11204         if needed.
11205         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
11206
11207 2007-10-18  Jonathan Chambers <joncham@gmail.com>
11208
11209         * marshal.c: Use correct key when removing item
11210         from ccw_hash.
11211         
11212         Code is contributed under MIT/X11 license.
11213
11214 2007-10-17  William Holmes  <billholmes54@gmail.com>
11215
11216         *marshal.c: Adding a case to marshal booleans to U1
11217
11218         Code is contributed under MIT/X11 license.
11219
11220 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
11221
11222         * class.c (mono_class_from_name): Search the modules compromising dynamic
11223         assemblies. Fixes #331601.
11224
11225 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
11226
11227         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
11228         exception if the type name contains an assembly component. Fixes #334203.
11229
11230         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
11231         modules inside dynamic assemblies. Fixes #334200.
11232         
11233         * reflection.c: Set image->public_key and image->public_key_length;
11234
11235         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
11236         fields.
11237
11238         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
11239         
11240 2007-10-16  Mark Probst  <mark.probst@gmail.com>
11241
11242         * metadata.c: Implemented correct comparing of generic classes.
11243         An inflated generic class can be equal to a non-inflated one if it
11244         is inflated with generic type variables as type arguments.  Fixes
11245         bug #333798.
11246
11247 2007-10-15  Dick Porter  <dick@ximian.com>
11248
11249         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
11250         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
11251         81646.
11252
11253         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
11254         instead of a monitor lock.  This means that monitor_try_enter and
11255         co can set the thread state safely.
11256         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
11257         thread_interrupt_requested, so interrupt actually works.
11258
11259         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
11260         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
11261         state accessor function
11262
11263 2007-10-15  Martin Baulig  <martin@ximian.com>
11264
11265         * mono-debug.h
11266         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
11267         the debugger with the current runtime.
11268
11269 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11270
11271         * object.c, object-internals.h: added the ability to set a single
11272         trampoline for all the slots in a vtable.
11273
11274 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11275
11276         * marshal.c: deal with a possible race condition during multicast
11277         delegate invocation.
11278
11279 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11280
11281         * class.c: ensure value type methods don't have the synchronized
11282         flag set.
11283
11284 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11285
11286         * string-icalls.c, string-icalls.h: reverted unapproved patch that
11287         breaks the build.
11288
11289 2007-10-11  Joel Reed  <joelwreed@comcast.com>
11290
11291         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
11292         to take an options parameter so that empty entries can be removed during
11293         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
11294
11295 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11296
11297         * marshal.c: make sure we don't store the signature from a dynamic
11298         method into the runtime invoke cache (bug #327189).
11299
11300 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11301
11302         * marshal.c: make sure the wrapper methods are properly initialized.
11303
11304 2007-10-11  Mark Probst  <mark.probst@gmail.com>
11305
11306         * metadata.c, metadata-internals.h: Generalized
11307         mono_type_stack_size() to mono_type_stack_size_internal() which
11308         takes an additional argument specifying whether it allows open
11309         types.
11310
11311 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
11312
11313         * verify.c (do_invoke_method): handle typedbyref params
11314         correctly and check for unverifiable return values.
11315
11316         * verify.c (do_newobj): fix a warning.
11317
11318 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
11319
11320         * verify.c: don't tread typedbyref as allways unverifable,
11321         so uses, like (ld/st)loc.0 are valid. verify for the cases
11322         that it matters, like boxing related operations.
11323
11324 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
11325
11326         * verify.c: add verification of the newobj opcode. verification
11327         of delegate instantation still missing due ldftn and virldftn not
11328         pushing the function type on stack
11329
11330 2007-10-08  Mark Probst  <mark.probst@gmail.com>
11331
11332         * class-internals.h: Runtime generic context data structure
11333         definition.
11334
11335         * object.c: Initialization of runtime generic context at runtime
11336         vtable creation time.
11337
11338 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
11339         * class.c (mono_class_create_from_typedef,
11340         mono_class_from_generic_parameter, mono_ptr_class_get,
11341         mono_fnptr_class_get, mono_bounded_array_class_get)
11342         * domain.c (mono_domain_create, mono_domain_free)
11343         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
11344         * image.c (do_mono_image_load, mono_image_close):
11345         Hooked up load-unload profiler events.
11346
11347 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11348
11349         * domain.c: track statistics about the actual amount of native code
11350         allocated.
11351
11352 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11353
11354         * class.c: the valuetype enumerators don't have the additional
11355         supertypes interfaces.
11356
11357 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11358
11359         * class.c: need more interfaces setup for the IEnumerator<T>
11360         object created for arrays (tests/ienumerator-interfaces.2.cs).
11361
11362 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
11363
11364         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
11365
11366 2007-10-05  Alp Toker  <alp@atoker.com>
11367
11368         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
11369         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
11370         #315863.
11371
11372 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
11373
11374         * verify.c (verify_type_compatibility_full): verification of
11375         compatibility improved, validates correctly non-strict checks between
11376         native int and I4 types different than (unsigned)int32.
11377
11378         * verify.c (do_store_indirect): added, do all verification of
11379         ldind.X opcodes. 
11380
11381         * verify.c (get_load_indirect_mono_type): renamed to
11382         get_indirect_op_mono_type, as it now returns the MonoType for 
11383         ldind.X and stind.X opcodes.
11384
11385 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
11386
11387         * reflection.c: Fix the encoding of generic type definition for
11388         TypeBuilders.
11389
11390         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
11391         mono_image_typedef_or_ref but allows to specify if typespec lookups should
11392         be made. Typespec check is done prior to typeref cache lookup.
11393
11394         * reflection.c (mono_image_typedef_or_ref): now just delegate to
11395         mono_image_typedef_or_ref_full.
11396
11397         * reflection.c (encode_generic_class): encode the generic class
11398         directly instead of calling encode_type.
11399
11400         * reflection.c (encode_type): encode the generic type definition
11401         MonoClass as a generic instantiation.
11402
11403         * reflection.c (create_typespec): cache typespec tokens in
11404         the assembly->typespec cache. Don't create typespec for a generic
11405         instance MonoClass. Create typespec for the generic type defintion.
11406
11407         * reflection.c (create_generic_typespec): encode the generic
11408         class directly instead of calling encode_type.
11409
11410         * reflection.c (mono_image_create_token): encode the generic
11411         type definition not using a typespec for MonoType instances.
11412
11413
11414 2007-10-04  Raja R Harinath  <rharinath@novell.com>
11415
11416         Fix #328812
11417         * class.c (mono_image_init_name_cache): Don't return nested
11418         'protected internal' classes.
11419         (mono_class_from_name_case): Likewise.
11420
11421 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
11422
11423         * icall-def.h, icall.c : get_bundled_machine_config() is now the
11424           common function used by both DefaultConfig in System.dll and
11425           InternalConfigurationHost in System.Configuration.dll.
11426
11427 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11428
11429         * class.c: automatically add to vectors only a few essential explicit
11430         generic interfaces. The rest of the interfaces that arrays should
11431         provide are currently implicitly added (but still not lazily, see the
11432         design in the discussion of bug#325495 for the details of what is
11433         needed for that). Additionally, implicit interfaces are assigned the
11434         same vtable slot as the explicit interfaces (as they are compatible):
11435         this enables huge memory savings since we don't need to instantiate
11436         as many memthods and as large vtables anymore. Also, Since
11437         GetEnumerator<T> returns an instance of a type that is required to
11438         support a similarly large set of interfaces as arrays, we add
11439         implicit interfaces and interface offset sharing support to those
11440         types, too. This change adds all the required interfaces so that
11441         the anonarray.cs test case in the bug report works (we don't add
11442         all the interfaces to arrays of arrays 3-level deep and more because
11443         of the memory requirements explained in the bug and since they are much
11444         less common: the lazy-loading support will enabled them to work, too).
11445
11446 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
11447
11448         * verify.c (merge_stacks): major clean up, all type compatibility
11449         checks are done by verify_type_compatibility. This fix my earlier lack
11450         of understanding of the CLR type system and merge_stacks no longer looks
11451         scary.
11452
11453         * verify.c: fixed some bad spelling.
11454
11455 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
11456
11457         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
11458         a given stack slock.
11459         
11460         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
11461         verify_type_compatibility_full. This removed a near indentical function and fixed
11462         handling of Int32 and IntPtr across all opcodes.
11463
11464 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11465
11466         * class.c: only vectors have the additional generic interfaces.
11467
11468 2007-10-01  Jonathan Chambers <joncham@gmail.com>
11469
11470         * mono-config.c: Use g_strcasecmp instead of
11471         strcasecmp like everywhere else to fix
11472         compilation with MSVC.
11473         
11474         Code is contributed under MIT/X11 license.
11475
11476 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11477
11478         * object.c, object-internals.h: refactored the IMT code to enable
11479         building a single slot at a time and lazily creating the IMT trampolines
11480         and thunks.
11481
11482 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
11483
11484         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
11485
11486         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
11487         Fixes #328501.
11488         
11489 2007-09-29  Raja R Harinath  <harinath@gmail.com>
11490
11491         * loader.c (method_from_methodspec): Rearrange to avoid
11492         un-necessary exposition.  Don't assert out if the method's
11493         declaring type is a generic type definition.
11494
11495 2007-09-28  Martin Baulig  <martin@ximian.com>
11496
11497         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
11498
11499 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11500
11501         * class-internals.h: optimize field layout of MonoClass to
11502         requires less cachelines at runtime and save a few bytes on 64 bit
11503         systems.
11504
11505 2007-09-28  Jb Evain  <jbevain@novell.com>
11506
11507         * reflection.c: when encoding type names in custom attributes,
11508         if the type is a closed generic type, its generic arguments
11509         have to be serialized as AssemblyQualifiedName, so that when
11510         they are deserialized, it's possible to re-create them properly.
11511         Fixes #329450.
11512
11513
11514 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11515
11516         * object.c, class-internals.h: added delegate-creation counter.
11517
11518 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11519
11520         * class.c: cleanup of the code that synthetizes interfaces for
11521         arrays in 2.0: saves quit a bit of corlib mempool memory.
11522         Code to fix bug #325495 ifdeffed out for now until the issues
11523         with memory usage and O(n^2) behaviour are fixed.
11524
11525 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11526
11527         * marshal.c: when possible, do not duplicate the name of the methods
11528         in the method builder and in the generated MonoMethod.
11529
11530 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
11531         * verify.c: added support for type checking ldind_* opcodes.
11532
11533 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
11534
11535         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
11536         which is used to distinguish the fully open instantiation of a TypeBuilder
11537         with the rest. This temporary hack is required to restore the property that
11538         the fully open instantiation is the same type of the generic type definition.
11539
11540         * class-internals.h (mono_generic_class_is_generic_type_definition):
11541         new function as part of the internal API.
11542
11543         * class.c (inflate_generic_type): return NULL when the generic inst is
11544         fully open. The fully open generic type is now the same as the generic type
11545         definition for non TypeBuilder types.
11546
11547         * class.c (mono_generic_class_get_class): removed assert since it is
11548         no longer valid, gklass->cached_class can point to the generic type definition.
11549
11550         * class.c (mono_generic_class_is_generic_type_definition): new.
11551
11552         * metadata.c (mono_generic_class_hash): added is_tb_open field
11553         to the hash calculation.
11554
11555         * metadata.c (free_generic_class): if the generic class is associated
11556         with the generic type definition, its field will come from the mempool and
11557         must not be freed.
11558
11559         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
11560         new, this function identifies the corner case of a TypeBuilder fully open
11561         instantiation.
11562
11563         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
11564         for lookup. Set gclass->cached_class to be the container class in case of
11565         the fully open instantiation of non TypeBuilder types.
11566
11567         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
11568         to compare generic classes.
11569
11570         * reflection.c (method_encode_methodspec): remove assert that
11571         no longer is valid.
11572
11573         * reflection.c (mono_reflection_generic_class_initialize): add
11574         an aditional assert to ensure the proper type is used.
11575
11576 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
11577
11578         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
11579         to enjoy it.
11580
11581 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
11582
11583         * verify.c (push_arg): Fixed support for ldarga
11584         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
11585         MonoType used as first arg in case of instance calls.
11586
11587 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
11588
11589         * verify.c: Support for verifying VAR and MVAR types, 
11590
11591 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
11592
11593         * icall.c (ves_icall_get_property_info): Set the reflected type of the
11594         accessors correctly.
11595
11596 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11597
11598         * threads.c: support OSX and other systems in
11599         mono_thread_get_stack_bounds (bug #328026).
11600
11601 2007-09-25  Martin Baulig  <martin@ximian.com>
11602
11603         * mono-debug.h
11604         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
11605
11606 2007-09-24  Martin Baulig  <martin@ximian.com>
11607
11608         * mono-debug.h
11609         (MonoDebugClassEntry): Moved the definition of this struct into
11610         mono-debug.c to make it private.
11611
11612         * mono-debug.c
11613         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
11614         type table per symbol file, we don't need to store the symfile id
11615         any longer.
11616
11617 2007-09-24  Martin Baulig  <martin@ximian.com>
11618
11619         Create one type table per symbol file, since a `MonoClass *' gets
11620         invalid when its image is unloaded.
11621
11622         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
11623         (MonoDebugHandle): Added `type_table'.
11624
11625 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11626
11627         * mempool.c, mempool.h: added mono_mempool_new_size () API
11628         to be able to specify a smaller initial size for the pool.
11629         Adjusted the code to slowly increase pool size before using
11630         the previous default size.
11631         * image.c: use a small initial size for image mempools.
11632
11633 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
11634
11635         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
11636         Fixes ##320990.
11637
11638         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
11639         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
11640
11641 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
11642
11643         * metadata.c (mono_type_create_from_typespec): Remove an invalid
11644         free. Fixes #327438.
11645
11646 2007-09-21  Raja R Harinath  <harinath@gmail.com>
11647
11648         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
11649         generic instantiations, etc.
11650         <MONO_TYPE_ARRAY>: Likewise.
11651
11652 2007-09-21  Martin Baulig  <martin@ximian.com>
11653
11654         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
11655         these structs were never defined.
11656         (MonoDebugHandle): Removed the `_priv' field, it was never used.
11657
11658 2007-09-21  Martin Baulig  <martin@ximian.com>
11659
11660         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
11661
11662 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
11663
11664         * image.c: removed the guid hash tables: we can get the same info
11665         without the additional memory usage hit (partially fixes also bug #327052).
11666
11667 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11668
11669         * profiler.h, profiler-private.h, profiler.c: add a new profiler
11670         event to handle unloading methods. After the event is called, the
11671         corresponding MonoMethod* must be considered invalid.
11672         * loader.c (mono_free_method): call the new mono_profiler_method_free
11673         event.
11674
11675 2007-09-20  Mark Probst  <mark.probst@gmail.com>
11676
11677         * domain-internals.h: New flag in MonoJitInfo which marks shared
11678         generic methods.  New hash table (shared_generics_hash) in
11679         MonoDomain to keep track of shared generic methods.  Prototypes
11680         for functions to register and lookup shared generic methods.
11681
11682         * domain.c: Support for registering and looking up shared generic
11683         methods via a hash table (shared_generics_hash) in MonoDomain.
11684
11685         * class-internals.h: New exception to signal failure of shared
11686         compilation of a generic method.  New counters for generics
11687         sharing in MonoStats.
11688
11689 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11690
11691         * image.c, metadata-internals.h: don't keep a file descriptor open
11692         for loaded assemblies (bug#325988).
11693
11694 2007-09-19  Raja R Harinath  <rharinath@novell.com>
11695
11696         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
11697         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
11698         use the corresponding datatypes.
11699         (type_in_image): Update to changes.
11700         (CleanForImageUserData): Simplify.
11701         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
11702         Avoid quadratic behaviour in handling the "stolen" list by
11703         separating the filter predicate out, and by prepending the stolen
11704         items rather than appending them.
11705         (steal_ginst_in_image): Likewise.
11706         (mono_metadata_clean_for_image): Update to changes.
11707
11708 2007-09-19  Martin Baulig  <martin@ximian.com>
11709
11710         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
11711
11712 2007-09-19  Martin Baulig  <martin@ximian.com>
11713
11714         * mono-debug.c (mono_debug_cleanup): Don't call
11715         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
11716
11717 2007-09-19  Raja R Harinath  <harinath@gmail.com>
11718
11719         Fix crash on 'make run-test' in mcs/errors
11720         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
11721         Avoid more potential allocations in mono_class_from_mono_type.
11722         (ginst_in_image): Update to changes.
11723         (gclass_in_image): Rearrange slightly.
11724
11725 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11726
11727         * class.c (mono_class_init): Move the code that sets up class->methods to 
11728         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
11729
11730         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
11731         canonical instance of an inflated generic signature.
11732         (mono_type_create_from_typespec): Remove an invalid free.
11733
11734         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
11735
11736 2007-09-18  Marek Habersack  <mhabersack@novell.com>
11737
11738         * domain-internals.h: added a declaration of the
11739         mono_assembly_load_full_nosearch internal function.
11740
11741         * assembly.c (mono_assembly_load_with_partial_name): use
11742         mono_try_assembly_resolve return value properly.
11743         (mono_assembly_load_full_nosearch): copied the function body from
11744         mono_assembly_load_full, without the code to invoke assembly
11745         search hooks.
11746         (mono_assembly_load_full): calls the above new function and if the
11747         assembly is not resolved, invokes the search hooks.
11748
11749         * appdomain.c (mono_runtime_init): restore the global postload
11750         assembly search handlers.
11751
11752 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11753
11754         * class.c (mono_class_init): Make sure class->methods and class->properties
11755         are never NULL in the generics case.
11756
11757         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
11758
11759 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
11760
11761         * metadata.c (free_generic_class): Disable some code to fix the build.
11762
11763         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
11764
11765         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
11766         from the image mempool.
11767
11768         * metadata.c (free_generic_class): Free more data from the inflated class.
11769
11770         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
11771
11772         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
11773         mempool.
11774         (mono_type_create_from_typespec): Ditto.
11775
11776         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
11777         MonoImage to the caller.
11778         (mono_init_internal): Save the opened image in a global variable.
11779         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
11780
11781         * reflection.c (resolve_object): Fix a leak.
11782
11783         * metadata.c: Fix the freeing of data in the generics caches.
11784         
11785         * metadata.c (free_generic_inst): Comment this out to fix the build.
11786         (free_generic_class): Ditto.
11787
11788         * metadata.c: Free cached generic methods, instantinations and classes when
11789         they are removed from the caches.
11790         (mono_metadata_free_type): Free the type itself.
11791
11792         * class.c: Free the result of mono_class_inflate_generic_type () in a few
11793         places.
11794
11795 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11796
11797         * boehm-gc.c: restrict managed allocs to __thread supporting
11798         architectures.
11799
11800 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
11801
11802         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
11803         (mono_generic_class_get_class): Fix a leak.
11804
11805         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
11806         mono_metadata_free_type ().
11807         (mono_metadata_inflate_generic_inst): Fix a leak.
11808
11809 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11810
11811         * mono-debug.c (free_header_data): Fix a leak missed earlier.
11812
11813         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
11814         mempool.
11815
11816         * mono-debug.c (mono_debug_close_image): Fix call to 
11817         g_hash_table_remove ().
11818
11819 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11820
11821         * icall-def.h: redirect all the string ctor to the managed
11822         CreateString () methods.
11823         * string-icalls.c, string-icalls.h: removed dead code for string
11824         ctors and icalls.
11825
11826 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11827
11828         * mono-debug.c: Fix memory leaks.
11829
11830 2007-09-14  Jonathan Chambers <joncham@gmail.com>
11831
11832         * threads-types.h: Implement mono_hazard_pointer_set and 
11833         mono_hazard_pointer_clear macros using do/while(0) to fix
11834         compilation with MSVC.
11835         
11836         Code is contributed under MIT/X11 license.
11837
11838 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11839
11840         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
11841         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
11842
11843 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11844
11845         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
11846         icalls.
11847
11848 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11849
11850         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
11851         managed-code allocated as well.
11852
11853 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11854
11855         * class.c (mono_class_is_assignable_from): Add support for generic variance.
11856
11857 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
11858
11859         * boehm-gc.c: fixed the build after the AOT changes.
11860
11861 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11862
11863         * wrapper-types.h: Add an ALLOC wrapper type.
11864
11865         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
11866         reference managed allocator methods.
11867
11868 2007-09-12  Marek Safar  <marek.safar@gmail.com>
11869
11870         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
11871         of Type array and not MonoType, a fix suggested by Hari.
11872         
11873 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11874
11875         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
11876         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
11877         
11878         Code is contributed under MIT/X11 license.
11879
11880 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11881
11882         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
11883
11884 2007-09-12  Marek Habersack  <mhabersack@novell.com>
11885
11886         * image.c (do_mono_image_open): if assembly file fails to open and
11887         MONO_IOMAP is in effect, try to find the path in a
11888         case-insensitive way.
11889
11890         * appdomain.c (mono_runtime_init): do not install postload hooks -
11891         tests show that MS.NET doesn't use anything of that sort to
11892         trigger the AppDomain.AssemblyResolve event.
11893         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
11894         made non-static.
11895         (mono_runtime_init): init portability helpers here.
11896
11897         * assembly.c (mono_assembly_load_with_partial_name): if other   
11898         attempts fail, trigger the AppDomain.AssemblyResolve event handler
11899         to resolve the assembly.
11900
11901         * domain-internals.h: added mono_try_assembly_resolve and marked
11902         it as internal.
11903
11904 2007-09-11  Jb Evain  <jbevain@novell.com>
11905
11906         * object-internals.h (MonoReflectionDynamicMethod): add
11907         a `MonoReflectionType *owner` field. The owner is used
11908         * reflection.c:
11909         (mono_reflection_create_dynamic_method): use the owner of the dynamic
11910         method as the class declaring the dynamic method.
11911         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11912         dynamic method to the declaring type of the methodbuilder.
11913
11914 2007-09-11  Mark Probst  <mark.probst@gmail.com>
11915
11916         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11917         rules for calling methods via reflection.
11918
11919 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
11920
11921         * reflection.c (resolve_object): Add support for MonoGenericClass. 
11922         Inflate MonoType's.
11923
11924 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11925
11926         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11927         provide a managed method that does fast allocations without needing
11928         a managed->unmanaged transition. Boehm GC implementation currently
11929         enabled for ptrfree objects on sane architectures.
11930
11931 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11932
11933         * marshal.c, marshal.h: exported a couple of useful functions and
11934         added mono_mb_get_label () to easily handle backward branches.
11935
11936 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
11937
11938         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11939
11940 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11941
11942         * loader.c (find_method): Fixed the regression introduced while
11943         fixing bug #81466.
11944
11945 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
11946
11947         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11948         well.
11949         
11950         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11951         icall.c reflection.c: Pass a MonoGenericContext argument to 
11952         mono_lookup_dynamic_token ().
11953
11954         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11955         #82744.
11956         
11957 2007-09-09  Robert Jordan  <robertj@gmx.net>
11958
11959         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11960         for generic methods.
11961
11962         * object.c (mono_object_get_virtual_method): Handle generic methods.
11963         Fixes bug #78882.
11964
11965         Code is contributed under MIT/X11 license.
11966
11967 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11968
11969         * image.c: fix locking in mono_image_load_file_for_image ().
11970
11971 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11972
11973         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11974         used only as a cache: added an icall to fill it.
11975
11976 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
11977
11978         * reflection.h: exposed mono_reflection_free_type_info
11979         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11980         since mono_reflection_bind_generic_parameters makes a copy of it.
11981         * reflection.c (free_type_info): subinfos should be freed.
11982         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
11983         made non static.
11984         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11985         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11986         this fixes #82695 and #81726.
11987    
11988
11989 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
11990
11991         * process.h, process.c:  added support for user profile/info in
11992           ProcessStartInfo. For now only Windows works.
11993
11994 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11995
11996         * metadata.c: consider the generic arguments when comparing
11997         signatures (bug #82614).
11998
11999 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12000
12001         * cil-coff.h, image.c: updated assembly loader to cope with the
12002         PE32+ 64 bit file format.
12003
12004 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12005
12006         * assembly.c, class.c, domain.c, loader.c: remove useless
12007         inclusion of cil-coff.h.
12008
12009 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
12010
12011         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
12012         if interface is marked with CoClassAttribute. 
12013    
12014         Code is contributed under MIT/X11 license.
12015
12016 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12017
12018         * sgen-gc.c: ensure no object from the to space is copied again or finalized
12019         if it's seen twice in major collections.
12020
12021 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12022
12023         * sgen-gc.c: big objects are not copied to the gray area, but they
12024         need to be considered for scanning, too, if they are brought alive
12025         by an object ready for finalizations or a survived one.
12026
12027 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
12028
12029         * sgen-gc.c: properly account the number of disappearing links when
12030         they are nullified.
12031
12032 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
12033
12034         * sgen-gc.c: share the code to scan the registered roots between the
12035         different types of collections.
12036
12037 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
12038
12039         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
12040
12041 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
12042
12043         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
12044         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
12045
12046 2007-08-28  Mark Probst  <mark.probst@gmail.com>
12047
12048         * security-manager.c (mono_security_manager_get_methods):
12049         LinkDemandSecurityException now has 2 arguments instead of 3.
12050
12051 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
12052
12053         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
12054         platforms which need it.
12055
12056 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12057
12058         * sgen-gc.c: unregister thread data structures with a pthread_key_t
12059         dtor.
12060
12061 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
12062
12063         * threads.c: free the thread static data on thread exit.
12064
12065 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
12066
12067         * class.c: walk the hierarchy to find the generic definition for
12068         a class (fixes runtime part of bug #82498).
12069
12070 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
12071
12072         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
12073         ...
12074
12075         * image.c (mono_image_close): Here. Hopefully fixes #82510.
12076
12077 2007-08-24  Mark Probst  <mark.probst@gmail.com>
12078
12079         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
12080
12081 2007-08-24  Robert Jordan  <robertj@gmx.net>
12082
12083         * appdomain.c: don't perform the ':'->';' substitution on Win32.
12084
12085 2007-08-24  Jb Evain  <jbevain@novell.com>
12086
12087         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
12088         for byref types.
12089
12090 2007-08-24  Mark Probst  <mark.probst@gmail.com>
12091
12092         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
12093         #82286.
12094
12095 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
12096
12097         * assembly.c: Fix a warning.
12098         
12099 2007-08-23  Marek Habersack  <mhabersack@novell.com>
12100
12101         * appdomain.c: parse the <runtime> section looking for the probing
12102         element with the 'privatePath' attribute, which sets additional
12103         directories in which the runtime should look for assemblies.
12104
12105 2007-08-23  Robert Jordan  <robertj@gmx.net>
12106
12107         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
12108         Fixes #82499.
12109
12110 2007-08-23  Martin Baulig  <martin@ximian.com>
12111
12112         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
12113         _mono_debug_init_corlib() and remove it from the header file.
12114
12115 2007-08-23  Martin Baulig  <martin@ximian.com>
12116
12117         * mono-debug-debugger.c
12118         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
12119         don't notify the debugger about it.
12120
12121         * mono-debug-debugger.h
12122         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
12123
12124 2007-08-23  Robert Jordan  <robertj@gmx.net>
12125
12126         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
12127         Code is contributed under MIT/X11 license.
12128
12129 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12130
12131         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
12132
12133 2007-08-22  Martin Baulig  <martin@ximian.com>
12134
12135         * mono-debug.c: Store debugging info on a per-domain basis and
12136         free it on domain unload.  Add support for unloading symbol files.
12137
12138         * mono-debug.h
12139         (MonoDebugList): New typedef.
12140         (MonoSymbolTable):
12141         - add `data_tables and `type_table'.
12142         - replace 'symbol_files' and `num_symbol_files' with a
12143           `MonoDebugList *'.
12144         (mono_debug_data_table): Removed.
12145         (mono_debug_list_add): New public function.
12146         (mono_debug_list_remove): New public function.
12147         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
12148         (mono_debug_init_2_memory): Renamed into
12149         mono_debug_open_image_from_memory().
12150         (mono_debug_close_image): New public function.
12151         (mono_debug_domain_create): Likewise.
12152         (mono_debug_domain_unload): Likewise.
12153         (MONO_DEBUGGER_VERSION): Bump to 60.
12154
12155         * mono-debug-debugger.h
12156         (MonoDebuggerEvent):
12157         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
12158         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
12159         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
12160         - rename `THREAD_CREATED' and `THREAD_EXITED' into
12161           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
12162         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
12163           meaning.
12164         (mono_debugger_add_symbol_file): Removed.
12165         (mono_debugger_add_type): Removed.
12166         (mono_debugger_lookup_type): Removed.
12167         (mono_debugger_lookup_assembly): Removed.
12168
12169         * domain.c
12170         (mono_domain_create): Call mono_debug_domain_create().
12171         (mono_init_internal): Call mono_debug_init_corlib().
12172
12173         * assembly.c
12174         (mono_assembly_close): Call mono_debug_close_image().
12175
12176 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
12177
12178         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
12179         mmap call.
12180
12181 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12182
12183         * sgen-gc.c: ensure section->pin_queue_end is initialized
12184         correctly when non pinning objects in the section have been found.
12185
12186 2007-08-22  Marek Habersack  <mhabersack@novell.com>
12187
12188         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
12189         containing a list of directories separated by ':'. MSDN docs say
12190         the directories should be separated with ';'. Part of a bugfix for
12191         bug #81446
12192
12193 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
12194
12195         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
12196         it should MonoType and not MonoClass.
12197
12198 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
12199
12200         * culture-info-table.h : regenerated.
12201
12202 2007-08-20  William Holmes  <billholmes54@gmail.com>
12203
12204         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
12205          to call ReplaceFile Kernel32 on windows or in io-layer.
12206         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
12207         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
12208          as an internal call.
12209
12210         Code is contributed under MIT/X11 license.
12211
12212 2007-08-20  Jb Evain  <jbevain@novell.com>
12213
12214         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
12215         and MONO_EXCEPTION_FIELD_ACCESS.
12216
12217         * debug-helpers.[c|h]: new mono_field_full_name function.
12218
12219 2007-08-20  Mark Probst  <mark.probst@gmail.com>
12220
12221         * class.c: Removed class_security_level() and moved it to
12222         security-core-clr.c.
12223
12224         * security-core-clr.c, security-core-clr.h: class_security_level()
12225         is now public and renamed to mono_security_core_clr_class_level().
12226         It also looks for security attributes in the classes a class is
12227         nested in.
12228
12229 2007-08-20  Mark Probst  <mark.probst@gmail.com>
12230
12231         * security-core-clr.c, security-core-clr.h: CoreCLR security
12232         utility functions.
12233
12234         * Makefile.am: Added security-core-clr.[ch].
12235
12236         * security-manager.c, security-manager.h: Functions and enum for
12237         setting and getting the security mode.
12238
12239         * class.c: CoreCLR security checks.
12240
12241 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
12242
12243         * icall-def.h, process.c, process.h: implemented icall to get
12244         user/system processor times.
12245
12246 2007-08-17  Mark Probst  <mark.probst@gmail.com>
12247
12248         * domain.c, threads.c, class-internals.h, domain-internals.h: New
12249         reader-lock-free jit_info_table.
12250
12251 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
12252
12253         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
12254
12255         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
12256
12257         * object-internals.h (MonoException): Add missing _data member.
12258
12259 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
12260
12261         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
12262         checking that only methods with matching qname or fqname are picked
12263         from implemented interfaces.
12264
12265 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
12266
12267         * verify.c (do_newarr):added, do type verification of
12268         newarr ops, push the right value on the eval stack.
12269         * verify.c (mono_method_verify): use do_newarr
12270
12271
12272 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
12273
12274         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
12275         factored the common code into get_boxable_mono_type, which
12276         is now using mono_type_get_full, this fixed byref related tests.
12277
12278 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
12279
12280         * class.c: added mono_type_get_full, this function has the same
12281         behavior of mono_class_get_full but the returned MonoType has
12282         all metadata of the associated token in case of a typespec token.
12283         * class.c: added mono_type_retrieve_from_typespec, used by 
12284         mono_type_get_full to retrieve the token type.
12285         * class.c (mono_class_create_from_typespec): changed to use
12286         mono_type_retrieve_from_typespec.
12287         * class.c (mono_ldtoken): changed to use mono_type_get_full
12288         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
12289         * class-internals.h: exported mono_type_get_full for internal use.
12290
12291 2007-08-16  Jb Evain  <jbevain@novell.com>
12292
12293         * domain.c (supported_runtimes): add entry for
12294         the 'moonlight' runtime version.
12295
12296 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
12297
12298         * verify.c (mono_method_verify): small typo sliped in.  
12299
12300 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
12301
12302         * verify.c (do_unbox_value): added, do type verification of
12303         unboxing ops
12304         * verify.c (mono_method_verify): use do_unbox_value
12305
12306
12307 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
12308
12309         * verify.c (dump_stack_value): fixed typo, was printing string
12310         instead of object on stack.
12311         * verify.c (do_box_value): moved the byref check up as it leads
12312         to invalid code and should be done earlier.
12313         * verify.c: improved error messages for and ldobj
12314
12315 2007-08-15  William Holmes  <billholmes54@gmail.com>
12316
12317         * marshal.c (emit_marshal_custom): Omit the call to 
12318           marshal_native_to_managed when calling native to managed 
12319           and the argument is specified as an out argument.
12320
12321         Code is contributed under MIT/X11 license.
12322
12323 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
12324
12325         * verify.c: fixed the type checks for generics, function pointers and vectors.
12326         Added type verification for ldobj and ldtoken. The verifier
12327         would segfault if header or signature of a method contained references
12328         to non-existant types.
12329
12330 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
12331
12332         * marshal.c (cominterop_get_ccw): Patch from
12333         Bill Holmes to no walk up interface hierarchy. 
12334         All parent methods should be present in the interface for COM.
12335    
12336         Code is contributed under MIT/X11 license.
12337
12338 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
12339
12340         * marshal.c (emit_marshal_com_interface): Patch from
12341         Bill Holmes to handle COM Interfaces as return values
12342         for native->managed calls.
12343    
12344         Code is contributed under MIT/X11 license.
12345
12346 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
12347
12348         * marshal.c (cominterop_get_idispatch_for_object): Implement
12349         for runtime callable wrappers.
12350    
12351         Code is contributed under MIT/X11 license.
12352
12353 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
12354
12355         * pedump.c (main): changed from mono_init to mono_init_from_assembly
12356         so 2.0 types are accessible
12357
12358
12359 2007-08-13  Miguel de Icaza  <miguel@novell.com>
12360
12361         * domain.c (mono_init_internal): Call mono_assembly_load_friends
12362         once we load mscorlib.   Due to the order in which we initialize,
12363         the mono_assembly_load_full routine that loads mscorlib did not
12364         load friends.   We now load it once we load the
12365         mono_defaults.internals_visible_class class. 
12366
12367         * assembly.c: Expose the mono_load_friend_assemblies method.
12368
12369 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
12370
12371         * verify.c: improved the handling of boxing, better
12372         type checking for unary ops and conversion. Fix bug
12373         regarding managed pointer compatibility checking
12374
12375 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
12376
12377         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
12378
12379         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
12380
12381 2007-08-09  Raja R Harinath  <rharinath@novell.com>
12382
12383         * reflection.c (dup_type): Remove.
12384         * class.c (dup_type): Remove.
12385         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
12386         instead of the dodgy 'dup_type'.
12387         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
12388         handle the case where 'dup_type' needed the second argument.
12389
12390 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
12391
12392         * domain.c: Fix a warning.
12393
12394 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
12395
12396         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
12397         checking that methods with the same fqname are not overridden
12398         with a method from an ancestor.
12399
12400 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
12401
12402         * threads.c (free_thread_static_data_helper): Avoid a crash if
12403         thread->static_data is not yet set.
12404
12405 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
12406
12407         * marshal.c: Use correct image when emitting
12408         native wrapper for COM calls.
12409    
12410         Code is contributed under MIT/X11 license.
12411
12412 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
12413
12414         * icall-def.h, security.c, security.h :
12415           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
12416
12417 2007-08-07  Martin Baulig  <martin@ximian.com>
12418
12419         * mono-debug-debugger.h
12420         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
12421
12422         * domain.c (mono_domain_free): Call
12423         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
12424
12425 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
12426
12427         * verify.c (check_underflow, check_overflow): error message now returns IL offset
12428         * verify.c (in_same_block): code should test if either offset is inside the clauses
12429         * verify.c (mono_method_verify): push the exception into the eval stack of exception
12430         and filter blocks
12431
12432 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
12433
12434         * image.c (mono_image_close): Fix a leak.
12435
12436         * object.c (mono_runtime_invoke_array): Avoid using alloca.
12437
12438         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
12439
12440 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12441
12442         * domain.c, threads.c, threads-types.h: fix memory retention issue
12443         with thread static variables not being cleared on domain unload.
12444         Reuse thread static slots after domain unload.
12445
12446 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
12447
12448         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
12449         nullable type.
12450
12451         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
12452         now done in mono_runtime_invoke_array.
12453
12454         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
12455         receiver is a nullable type.
12456
12457         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
12458         generic parameter.
12459
12460 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
12461
12462         * marshal.c: Implement COM Objects as return type for 
12463         managed->unmanaged calls. Added Release calls for COM Object
12464         out/return values in managed->unmanaged calls.
12465
12466         Code is contributed under MIT/X11 license.
12467
12468 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12469
12470         * threads.h, threads-type.h: move the hazard pointer declarations
12471         to the private header.
12472
12473 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12474
12475         * file-io.c, appdomain.c: memory leak fixes.
12476
12477 2007-08-02  Dick Porter  <dick@ximian.com>
12478
12479         * socket-io.c
12480         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
12481         SO_REUSEADDR setting into io-layer/sockets.c.
12482
12483 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
12484
12485         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
12486         from Object when called on a generic parameter. Fixes #82211.
12487
12488 2007-08-01  Dick Porter  <dick@ximian.com>
12489
12490         * file-io.c (convert_share): Test FileShare values bit-by-bit.
12491         Fixes bug 79250 yet again.
12492
12493 2007-07-30  Martin Baulig  <martin@ximian.com>
12494
12495         Merged the `debugger-dublin' branch.
12496
12497         * mono-debug.h
12498         (MonoDebugDataTable): New typedef.
12499         (MonoDebugMethodAddressList): New typedef.
12500         (MonoDebugWrapperData): Removed.
12501         (MonoDebugSymbolTable): Removed `current_data_table',
12502         `current_data_table_size', `current_data_table_offset'.
12503         (MonoDebugDataItemType): Moved into mono-debug.c.
12504         (MonoDebugMethodJitInfo): Remove `address'.
12505         (mono_debug_data_table): New global variable.
12506         (mono_debug_lookup_method_addresses): New public function.
12507         (mono_debug_find_method): Take a `MonoMethod *', not a
12508         `MonoDebugMethodInfo *'.
12509
12510         * mono-debug.c: Drop support for the old symbol tables.
12511
12512 2007-06-28  Martin Baulig  <martin@ximian.com>
12513
12514         * mono-debug.c (mono_debug_debugger_version): New public variable.
12515
12516 2007-07-31  William Holmes  <billholmes54@gmail.com>
12517
12518         * metadata.c Changed mono_type_create_from_typespec to not insert
12519           the type into the hash map until after
12520           do_mono_metadata_parse_type has completed.
12521         Fixes Bug #82194
12522         Code is contributed under MIT/X11 license.
12523
12524 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
12525
12526         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
12527         generic parameter. Fixes #82211.
12528
12529 2007-07-27  Jb Evain  <jbevain@novell.com>
12530
12531         * pedump.c (dump_metadata, dump_metadata_header): dump
12532         versions contained in the metadata header.
12533
12534 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12535
12536         * threads.c: register small_id_table with the GC.
12537
12538 2007-07-27  Mark Probst  <mark.probst@gmail.com>
12539
12540         * threads.c, threads.h, class-internals.h, object-internals.h:
12541         Hazard pointers, to be used by lock-free parallel algorithms.
12542
12543 2007-07-26  Dick Porter  <dick@ximian.com>
12544
12545         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
12546         routine on non-windows platforms, as I've not managed to think of
12547         a non-kludgy way of doing this.  Finishes off bug 78739.
12548
12549 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12550
12551         * object.c: properly setup interface_bitmap in proxy vtables.
12552
12553 2007-07-25  Marek Habersack  <mhabersack@novell.com>
12554
12555         * appdomain.c (get_shadow_assembly_location): do not use TickCount
12556         to create unique shadow copy target directories, use the domain's
12557         serial number instead. Each domain gets a unique target directory
12558         that way.
12559
12560         * domain.c (mono_domain_create): added code to increment domain
12561         shadow copy serial number and cache the value in the current
12562         domain structure.
12563
12564         * domain-internals.h (struct _MonoDomain): added a new field -
12565         shadow_serial to hold the serial number used in generation of
12566         shadow-copy directories. This is to make sure that the directory
12567         name is unique for each and every domain created. We avoid a race
12568         condition with overriding assemblies already in use by other app
12569         domains.
12570
12571 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
12572
12573         * class.c (mono_bounded_array_class_get): fixed memory leak when 
12574         binding generic parameters.
12575
12576 2007-07-24  Raja R Harinath  <rharinath@novell.com>
12577
12578         * metadata.c (do_mono_metadata_parse_generic_class): Use
12579         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
12580         error.
12581
12582 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12583
12584         * loader.c, class-internals.h, reflection.c: removed the per-method
12585         generics hashtable: we use the global one through the call of
12586         mono_class_inflate_generic_method ().
12587
12588 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12589
12590         * class.c, metadata.c, class-internals.h: introduce yet another
12591         generics global cache for inflated methods (fixes 98% of the perf
12592         issue in bug #81806).
12593
12594 2007-07-23  Raja R Harinath  <rharinath@novell.com>
12595
12596         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
12597         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
12598         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
12599         return a MonoGenericInst containing (a copy) of those types.
12600         (mono_metadata_inflate_generic_inst): Update to changes.
12601         (mono_metadata_parse_generic_inst): Likewise.
12602         (mono_get_shared_generic_inst): Likewise.
12603         * reflection.c (mono_class_bind_generic_parameters): Likewise.
12604         (mono_reflection_bind_generic_method_parameters): Likewise.
12605         * metadata-internals.h: Likewise.
12606         * icall.c (free_generic_context): Kill.
12607         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
12608
12609         * reflection.c (reflection_methodbuilder_to_mono_method): Use
12610         mono_metadata_type_dup.
12611         * marshal.c (mono_mb_create_method): Likewise.
12612
12613         * metadata.c (mono_metadata_type_dup): Rename from
12614         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
12615         MonoImage.  Handle a few more cases, esp. when no mempool is given.
12616         * marshal.c, metadata-internals.h: Update to changes.
12617
12618 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
12619
12620         * class.c: fixed a small leak for array classes and removed warning.
12621
12622 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
12623
12624         * loader.c (mono_method_get_param_token): Make this work on generic methods.
12625         Return 0x8000000 for return parameters. Fixes #82161.
12626
12627 2007-07-21  Marek Habersack  <grendello@gmail.com>
12628
12629         * appdomain.c (get_shadow_assembly_location): append the current
12630         ticks value to the path. Avoids overwriting the same assemblies by
12631         several threads at the same time.
12632
12633 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
12634         and Raja R Harinath  <rharinath@novell.com>
12635
12636         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12637         Simplify slightly.
12638         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
12639         property for testing if a method is a generic method definition.
12640
12641 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
12642
12643         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
12644
12645 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12646
12647         * verify.c: used function from private branch, reverted to the one in class.h 
12648
12649 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12650
12651         * verify.c: a typo slipped in and the code wont compile
12652
12653 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12654
12655         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
12656         disabled box instruction as it is doing the wrong thing
12657         improved stack dump messages, now it is easier to debug type related issues
12658
12659
12660 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
12661
12662         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
12663
12664 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12665
12666         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
12667         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
12668         grouped with class and valuetype. This change will simply 
12669         the code as it should be handled just like unmanaged pointers.
12670
12671 2007-07-19  Mark Probst  <mark.probst@gmail.com>
12672
12673         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
12674
12675 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12676
12677         * verify.c: several stack merge issues fixed, reference comparisons now
12678         check the type size. strict type check now works correctly.
12679         added more uses of IS_MANAGED_POINTER macro.
12680         fixed issues pointed by running the test suite against .net.
12681         
12682
12683 2007-07-19  Mark Probst  <mark.probst@gmail.com>
12684
12685         * class.c, loader.c, class-internals.h: Removed the
12686         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
12687         defines.
12688
12689         * icall.c: Better error checking in some internal reflection
12690         methods.
12691
12692 2007-07-18  William Holmes  <billholmes54@gmail.com>
12693
12694         * filewatcher.c : removed unused variable 'filename' in 
12695           ves_icall_System_IO_FSW_SupportsFSW
12696
12697 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12698
12699         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
12700         obsolete, removed.
12701
12702 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
12703
12704         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
12705         
12706         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
12707
12708 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
12709
12710         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
12711         Implement generics support.
12712         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12713
12714         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
12715         type_args and method_args arguments.
12716         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12717         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12718         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
12719
12720 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
12721
12722         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
12723           It adds a rootimage parameter to mono_reflection_get_type_internal,
12724           adds new function mono_reflection_get_type_with_rootimage and use
12725           the rootimage to resolve the types instead of the current image
12726
12727 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
12728
12729         * culture-info-table.h: Forgot to update after r78304.
12730
12731 2007-07-13  Raja R Harinath  <rharinath@novell.com>
12732
12733         * class.c (mono_class_is_open_constructed_type)
12734         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
12735
12736 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
12737
12738         * class.c (mono_bounded_array_class_get):  method fails if used with
12739         an incomplete TypeBuilder enum (no basetype field), fixed it by 
12740         avoiding calculating the size for such array as it cannot be instantiated.
12741         Fix bug #82015
12742
12743 2007-07-12  Raja R Harinath  <rharinath@novell.com>
12744
12745         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
12746         field.
12747         * metadata.c, reflection.c: Update to changes.
12748
12749 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
12750
12751         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
12752         mono_class_is_valid_enum, they are used to valide a enum when loading.
12753         * reflection.c: used new functions to throw TypeLoadException when and
12754         invalid enum is build with TypeBuilder. Fixes #82018
12755   
12756 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12757
12758         * object.c: forgot commit of mono_class_setup_methods () to access
12759         iface->methods.
12760         * object-internals.h: added a few more handy fields to
12761         MonoIMTCheckItem.
12762
12763 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
12764
12765         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
12766         iface->methods.
12767
12768 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
12769
12770         * class-internals.h, object-internals.h, object.c: IMT-based
12771         interface invocation core from Massimiliano Mantione
12772         (massi@ximian.com) with a reworked arch-specific interface,
12773         bsearch implementation and a few bugfixes and memory savings by me.
12774
12775 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
12776
12777         * class.c (mono_class_create_from_typedef): mono would segfault if 
12778         an enum did not have a __value field. It now throws a TypeLoadException
12779         for such cases. Fix bug #82022
12780
12781 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
12782
12783         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
12784
12785 2007-07-09  Mark Probst  <mark.probst@gmail.com>
12786
12787         * class.c (mono_class_init): If a class is already inited but has
12788         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
12789
12790 2007-07-09  Mark Probst  <mark.probst@gmail.com>
12791
12792         * class.c: Properly handle the case of an unimplemented interface
12793         method.  Fixes: 81673.
12794
12795 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12796
12797         * class-internals.h, object.c: cleanup patch from massi: use
12798         MonoVTable->interface_bitmap since the vtable interfaces offset array
12799         is going away.
12800
12801 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
12802
12803         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
12804         GetMDStreamVersion icall instead.
12805
12806 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12807
12808         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
12809         not use mono_dl_build_path() with a full library name: makes
12810         fallbacks to libgaim and libfam work.
12811
12812 2007-07-06  William Holmes  <billholmes54@gmail.com>
12813
12814         * assembly.c: Added a continue statement in probe_for_partial_name when
12815          parse_assembly_directory_name fails.  Fixes : 82002
12816
12817 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
12818
12819         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
12820         and added a verification  for TYPEDBYREF.
12821         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
12822         make native int interchangeable with int32 and some small cleanup and formating.
12823         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
12824         handle byref of byref.
12825         * verify.c (push_local): handle byref of byref.
12826         * verify.c (do_binop): invalid mix of values is unverifiable
12827         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
12828         added visibility checks
12829         * verify.c (field related method): added visibility checks
12830         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
12831
12832 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
12833
12834         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
12835         string.
12836
12837 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
12838
12839         * profiler.c (mono_profiler_load): Fix an off-by-one error.
12840
12841         * marshal.c (emit_marshal_string): When returning a string from managed code,
12842         allways make a copy even for unicode strings. Fixes #81990.
12843
12844 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
12845
12846         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
12847         of byref generic inst types (bug #81997).
12848
12849 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
12850
12851         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
12852         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
12853
12854 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
12855
12856         * marshal.c (emit_marshal_string): Add support for unicode strings in
12857         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
12858
12859 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
12860
12861         * verify.c: field load/store are now verified, missing only access checks now
12862
12863 2007-06-28  Martin Baulig  <martin@ximian.com>
12864
12865         * mono-debug.c (mono_debug_debugger_version): New public variable.
12866
12867 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
12868
12869         * locales.c: When constructing DateTimeFormat or NumberFormat for
12870         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
12871         MonoCultureInfo contructed from the current locale is always
12872         read-only and has UseUserOverride set to true. All MonoCultureInfo
12873         instances returned for GetCultures have both IsReadOnly and
12874         UseUserOverride set to true. Fixes part of bug #81930.
12875
12876 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
12877
12878        * icall-def.h: Update System.__ComObject icalls
12879        * marshal.c: Avoid managed transition (and object creation)
12880        when looking up COM interface in RCW.
12881        * marshal.h: Ditto.
12882        
12883        Code is contributed under MIT/X11 license.
12884
12885 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
12886
12887         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
12888         to avoid crashes during assembly unloading.
12889
12890 2007-06-22  Raja R Harinath  <rharinath@novell.com>
12891
12892         Fix MethodInfo.IsGenericMethodDefinition
12893         * reflection.c (mono_reflection_bind_generic_method_parameters):
12894         Rearrange code to ensure we always uses a generic method definition.
12895         * class.c (mono_class_inflate_generic_method_full): Set
12896         'generic_container' field only for generic method definitions.
12897         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12898         Use presense of 'generic_container' field as indication of being a
12899         generic method definition.
12900
12901 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
12902
12903         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12904
12905         * object-internals.h: Reflect changes in the layout of the managed Delegate
12906         class.
12907         
12908         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12909         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12910         runtime memory used by the dynamic method. Fixes #77146.
12911
12912 2007-06-21  Dick Porter  <dick@ximian.com>
12913
12914         * file-io.h: 
12915         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
12916         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12917         81767.
12918
12919 2007-06-21  Raja R Harinath  <rharinath@novell.com>
12920
12921         * reflection.c (method_encode_methodspec): Add a tripwire.
12922         * class.c (inflate_generic_type): The fully open generic type is
12923         not the same as the generic type definition.
12924
12925 2007-06-21  Martin Baulig  <martin@ximian.com>
12926
12927         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12928
12929         * mono-debug-debugger.h
12930         (MonoDebuggerBreakpointInfo): Removed.
12931         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12932         (mono_debugger_remove_breakpoint): Likewise.
12933         (mono_debugger_breakpoint_callback): Likewise.
12934         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12935
12936 2007-06-21  Raja R Harinath  <rharinath@novell.com>
12937
12938         * metadata.c (mono_metadata_lookup_generic_class): The fully open
12939         generic type is not the same as the generic type definition.
12940         * class.c (mono_generic_class_get_class): Likewise.
12941
12942 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
12943
12944         * icall.c: The second argument to 
12945         System.Reflection.MethodBase.GetMethodFromHandleInternalType
12946         is a MonoType not a MonoClass.
12947
12948 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
12949
12950         * verify.c: support for function pointers in the verifier
12951
12952 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
12953
12954         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12955
12956 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12957
12958         * assembly.c: removed Mono.Data.SqliteClient from the list of
12959         forward-compatible assemblies as it breaks the ABI (bug #81899).
12960
12961 2007-06-19  Raja R Harinath  <rharinath@novell.com>
12962
12963         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12964         lookup/update with the loader lock.
12965         * reflection.c (mono_class_bind_generic_parameters): No need to
12966         protect mono_metadata_lookup_* with the loader lock.
12967         * class.c (inflate_generic_type): Likewise.
12968         
12969         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12970         on a generic instantiated type.
12971
12972 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
12973
12974         *verify.c: produce meanfull error messages on verification error
12975         *verify.c: fixed some cases of verification errors reported as validation errors
12976         *pedump.c: fixed the error name array, now it shows validation errors properly
12977         *verify.h: fixed the contant that should be used for verification errors
12978
12979 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12980
12981         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12982         for bug #77596, 81858 and 80743 (generics data structures on domain
12983         unload).
12984
12985 2007-06-15  Raja R Harinath  <rharinath@novell.com>
12986
12987         Avoid allocating 'MonoGenericContext' on the heap.
12988         * class-internals (_MonoMethodInflated::context): Make field
12989         inline, not a pointer.
12990         * loader.c (method_from_methodspec): Allocate 'new_context' on the
12991         stack.  Use the context embedded within the inflated method as the
12992         hash key, rather than 'new_context'.
12993         * class.c (inflate_generic_context): Simplify.  Return a struct
12994         rather than allocating on the heap.
12995         (mono_class_inflate_generic_method_full): Update to changes.  Now,
12996         doesn't salt away a copy of the context -- simplifying the
12997         lifetime rules of a 'MonoGenericContext *'.
12998         (mono_method_get_context): Return pointer to embedded context.
12999         (setup_generic_array_ifaces): Allocate temporary context on stack.
13000         * reflection.c (inflate_mono_method): Likewise.
13001         (mono_reflection_bind_generic_method_parameters): Likewise.
13002         Use the context embedded within the inflated method as the hash key.
13003
13004         Avoid a source of allocation of 'MonoGenericContext'.
13005         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
13006         and 'cached_context' fields into embedded 'MonoGenericContext' field.
13007         * class.c: Update to changes.
13008         (mono_generic_class_get_context): Simplify drastically.  Now just
13009         returns a pointer to the field.
13010         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
13011         argument as a const pointer.
13012         (mono_metadata_generic_context_equal): Likewise.
13013         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
13014         Update to changes.
13015
13016 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
13017
13018         * verify.c improved the handling of brtrue/brfalse, factored out common code
13019
13020 2007-06-14  Raja R Harinath  <rharinath@novell.com>
13021
13022         Kill MonoGenericMethod.
13023         * class-internals.h (MonoGenericContext::method_inst): Rename from
13024         'gmethod' and convert to a MonoGenericInst.
13025         (MonoGenericMethod): Remove.
13026         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
13027         * loader.c (method_from_methodspec): Update to changes.  Use a
13028         MonoGenericContext as the key to the hashtable.
13029         * metadata.c (mono_metadata_generic_context_equal): Rename from 
13030         'mono_metadata_generic_method_equal' and take MonoGenericContext.
13031         (mono_metadata_generic_context_hash): Likewise from
13032         'mono_metadata_generic_method_hash'.  Change hash function.
13033         (mono_metadata_load_generic_params): Update to changes.
13034         (mono_get_shared_generic_method): Remove.
13035         * metadata-internals.h (mono_get_shared_generic_method): Remove.
13036         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
13037         (inflate_generic_context): Likewise.
13038         (mono_class_inflate_generic_method_full): Likewise.
13039         (setup_generic_array_ifaces): Likewise.
13040         (mono_class_create_from_typespec): Likewise.
13041         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
13042         (method_encode_methodspec): Update callsite.
13043         (reflection_methodbuilder_to_mono_method): Update to changes.
13044         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
13045         MonoGenericContext as the key to the hashtable.
13046         (inflate_mono_method): Update to changes.
13047
13048         * class-internals.h (MonoGenericMethod::container): Remove.
13049         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13050
13051 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
13052
13053         * profiler-private.h, profiler.c, profiler.h: added API to profile
13054         exception events.
13055
13056 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
13057
13058         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
13059
13060 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
13061
13062         * verify.c: method invocation is now validated, now we verify parameter types on stack.
13063         Fixed overflow and underflow not aborting the verification process.
13064
13065 2007-06-13  Mark Probst  <mark.probst@gmail.com>
13066
13067         * class-internals.h (MonoStats): Added stats entries for dynamic
13068         code allocations.
13069
13070 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
13071
13072         * loader.c (mono_free_method): Free header->locals and header->clauses.
13073
13074         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
13075         dynamic case.
13076
13077         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
13078
13079         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
13080
13081 2007-06-12  Raja R Harinath  <rharinath@novell.com>
13082
13083         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
13084         the tables.
13085
13086 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
13087
13088         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
13089
13090 2007-06-11  Raja R Harinath  <harinath@gmail.com>
13091
13092         MonoGenericMethod on a diet
13093         * class-internals.h (_MonoMethodInflated::reflection_info): Move
13094         here ...
13095         (_MonoGenericMethod::reflection_info): ... from here.
13096         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
13097         Update to changes.
13098         * reflection.c (inflate_mono_method): Likewise.
13099         (mono_reflection_bind_generic_method_parameters): Likewise.
13100
13101 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
13102
13103         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
13104         *verify.c: factored long ldarg forms to share code with short forms
13105
13106 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
13107
13108         *verify.c: fixed code formating factored some duplicate code
13109         into a new function
13110
13111         *verify.h: fixed binary incompatibility introduced earlier
13112
13113         *pedump.c: fixed formating
13114
13115 2007-06-11  Raja R Harinath  <harinath@gmail.com>
13116
13117         Fix assertion when disassembling Mono.C5.dll
13118         * loader.c (method_from_methodspec): Avoid inflating a method
13119         twice with the same context.  If the methodref is inflated, use
13120         the declaring method instead.
13121
13122         * class.c (mono_class_from_generic_parameter): Fix case similar to
13123         bug #81830 handled below, but for method containers.
13124
13125 2007-06-10  Raja R Harinath  <harinath@gmail.com>
13126
13127         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
13128         get_shared_generic_class.  Directly inflate the instance.
13129         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
13130         (inflate_generic_class): Delete.
13131         (get_shared_generic_class): Delete.  Move setting of
13132         'cached_class' and 'cached_context' ...
13133         * metadata.c (mono_metadata_lookup_generic_class): ... here.
13134
13135         * metadata.c (mono_metadata_lookup_generic_class): Change
13136         signature to take the components of a MonoGenericClass rather than
13137         an allocated MonoGenericClass.  Change semantics to be intern-like.
13138         * reflection.c (mono_class_bind_generic_parameters): Update to
13139         changes.  Make locking region tighter.
13140         * class.c (inflate_generic_class): Update to changes.
13141         (get_shared_generic_class): Likewise.
13142         * metadata-internals.h: Likewise.
13143
13144         * reflection.c (mono_class_bind_generic_parameters): Take and
13145         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
13146         (mono_reflection_bind_generic_parameters): Use
13147         'mono_class_bind_generic_parameters' rather than duplicate the code.
13148         * class.c (mono_bounded_array_class_get): Update to changes.
13149         * object-internals.h: Likewise.
13150
13151         * reflection.c (mono_class_bind_generic_parameters): Only support
13152         parameterizing generic type definitions.  Remove support for other
13153         open types.
13154
13155 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
13156
13157         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
13158
13159         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
13160         in the dynamic case.
13161
13162 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
13163
13164         * threads.c: When cleaning up thread, reset the Background bit.
13165         Fixes bug #81720.
13166
13167 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
13168
13169        * metadata.c: Move variable declarations to top of scope.
13170        * verify.c: Move variable declarations to top of scope.
13171
13172        Code is contributed under MIT/X11 license.
13173
13174 2007-06-08  Raja R Harinath  <rharinath@novell.com>
13175
13176         * reflection.c (mono_class_bind_generic_parameters): Replace
13177         open-coded loop with mono_metadata_inflate_generic_inst.
13178
13179         * class.c (get_shared_generic_class): Don't call
13180         mono_get_shared_generic_inst.  Use the container's own
13181         'class_inst'.
13182
13183         * metadata.c (mono_metadata_load_generic_params): Move
13184         initialization of 'context' field here from ...
13185         * class.c (mono_class_create_from_typedef): ... here, and ...
13186         * loader.c (mono_get_method_from_token): ... here.
13187
13188         * class.c (get_shared_generic_class): Rename from
13189         mono_get_shared_generic_class and make static.
13190         (mono_get_shared_generic_inst): Move to metadata.c.
13191         * loader.c (mono_get_shared_generic_method): Likewise.
13192         * class-internals.h, metadata-internals.h: Update to changes.
13193
13194         Fix #81830
13195         * class.c (mono_class_from_generic_parameter): Don't assume a
13196         generic container owner exists.  Generic containers from monodis
13197         don't have any.
13198
13199 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
13200
13201         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
13202         * verify.h: new typedefs to returns the non-verifiable status
13203         * verify.c: initial implementation of generics, stack merging and object compatibility check
13204
13205 2007-06-06  Mark Probst  <mark.probst@gmail.com>
13206
13207         * class.c, image.c, class-internals.h (MonoImage): class_cache is
13208         a MonoInternalHashTable again (fixed bug in internal hash table
13209         code).
13210
13211 2007-06-06  Mark Probst  <mark.probst@gmail.com>
13212
13213         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
13214         MonoInternalHashTable again (fixed bug in internal hash table
13215         code).
13216
13217 2007-06-06  Mark Probst  <mark.probst@gmail.com>
13218
13219         * class.c, image.c, class-internals.h, domain.c,
13220         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
13221         changes.  Have to figure out what makes them break the SWF
13222         regression.
13223
13224 2007-06-04  Mark Probst  <mark.probst@gmail.com>
13225
13226         * class.c, image.c, class-internals.h (MonoImage): class_cache is
13227         a MonoInternalHashTable now.
13228
13229 2007-06-04  Mark Probst  <mark.probst@gmail.com>
13230
13231         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
13232         MonoInternalHashTable now.
13233
13234 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
13235
13236         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
13237         invoke_impl code.
13238
13239         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
13240
13241         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
13242         dependent trampoline.
13243
13244         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13245
13246         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
13247
13248 2007-05-29  Robert Jordan  <robertj@gmx.net>
13249
13250         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
13251
13252 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
13253
13254         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
13255
13256 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
13257
13258        * marshal.c: Fix interface lookup loops for
13259        cominterop_get_com_slot_for_method and 
13260        cominterop_get_method_interface. Only need to lookup
13261        if type is a class, else use interface type method is on.
13262
13263        Code is contributed under MIT/X11 license.
13264
13265 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
13266
13267         * reflection.c: HasSecurity can be present even if no specially 
13268         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
13269         SecurityAttribute). Fix CAS regression tests on buildbot.
13270
13271 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
13272
13273        * appdomain.c: Add configure checks for header files.
13274        * image.c: Add configure checks for header files.
13275        * file-io.c: Add configure checks for header files.
13276        * debug-mono-symfile.c: Add configure checks for header files.
13277        * threadpool.c: Add configure checks for header files.
13278        * console-io.c: Add configure checks for header files.
13279        * profiler.c: Add configure checks for header files.
13280        * rawbuffer.c: Add configure checks for header files.
13281        * icall.c: Add configure checks for header files.
13282        * rand.c: Add configure checks for header files.
13283        * socket-io.c: Add configure checks for header files.
13284
13285        Code is contributed under MIT/X11 license.
13286
13287 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
13288
13289         * reflection.c (mono_custom_attrs_from_builders): Remove the 
13290         assertion as it breaks the build.
13291         
13292         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
13293
13294         * reflection.c (lookup_custom_attr): Make a copy here too.
13295
13296         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
13297         dynamic images.
13298
13299         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
13300         images.
13301
13302         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
13303         info.
13304
13305 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
13306
13307         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
13308         (load_cattr_value): Ditto.
13309
13310 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
13311
13312         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
13313
13314 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
13315
13316         * threads.c: In "start_wrapper", set apartment_state to MTA if
13317         apartment_state is Unknown and we're running on 2.0 profile or
13318         higher.
13319         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
13320         to main method, then set apartment_state to Unknown on 1.0 profile,
13321         and MTA on 2.0 profile.
13322
13323 2007-05-16  Jb Evain  <jb@nurv.fr>
13324
13325         * class-internals.h (MonoDefaults): Add an attribute_class and
13326           customattribute_data_class.
13327         * domain.c (mono_init_internal): Populate them.
13328         * reflection.c: Use them to remove duplicates. Make a vew
13329         MonoClass variables `static'.
13330
13331 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
13332
13333         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
13334         step in implementing IMT, so that all isinst checks now can go
13335         through the bitmap.
13336         This was needed because vtables for TransparentProxy need to look
13337         like the vtable of the "target" class, so they need to point to
13338         its interface bitmap directly.
13339
13340         * object.c: inside "mono_class_create_runtime_vtable" and
13341         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
13342
13343 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
13344
13345         * object-internals.h
13346           culture-info.h : added territory field in MonoCulture and
13347           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
13348         * locales.c : fill territory field above too.
13349         * culture-info-table.h : regenerated.
13350
13351 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
13352
13353         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
13354         Fixes #81599.
13355
13356 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
13357
13358         * object.c: Always initialize apartment, even if 
13359         there is no custom attributes on entry point.
13360         
13361         Code is contributed under MIT/X11 license.
13362
13363 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
13364
13365         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
13366         * metadata.c: If no encoding is set, check for unicode
13367         on class.
13368         
13369         Code is contributed under MIT/X11 license.
13370
13371 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
13372
13373         * threads.c: Handle if mono_thread_current returns NULL 
13374         
13375         Code is contributed under MIT/X11 license.
13376
13377 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
13378
13379         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
13380         in start_wrapper. Added mono_thread_init_apartment_state and
13381         mono_thread_cleanup_apartment_state.
13382         * object.c: Initialize thread apartment state on main thread
13383         by checking for STAThreadAttribute on entry point.
13384         * object-internals.h: Add apartment_state field to MonoThread.
13385         * threads-types.h: Add unmanaged definition of 
13386         System.Threading.ApartmentState, MonoThreadApartmentState.
13387         
13388         Code is contributed under MIT/X11 license.
13389         
13390 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
13391
13392         * class.c: Fix windows build.
13393         * class-internals.h: Fix windows build.
13394         
13395         Code is contributed under MIT/X11 license.
13396
13397 2007-05-08  Robert Jordan  <robertj@gmx.net>
13398
13399         * process.c (CreateProcess_internal):
13400         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
13401         .CreateNoWindow was specified. Fixes #81496.
13402
13403 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
13404
13405         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
13406         step in implementing IMT, replaced it with two compact arrays
13407         (interfaces_packed and interface_offsets_packed) and a bitmap that
13408         is used for isinst checks (interface_bitmap).
13409
13410         * class.c: (compare_interface_ids): compare function to pass to
13411         bsearch when looking for an interface with a given id.
13412         (mono_class_interface_offset): reimplemented using bsearch on
13413         interfaces_packed, getting the offset from interface_offsets_packed.
13414         (print_implemented_interfaces): utility debugging function.
13415         (setup_interface_offsets): reworked to initialize interfaces_packed,
13416         interface_offsets_packed and interface_bitmap.
13417
13418         * object.c: replaced all accesses to "MonoClass.interface_offsets"
13419         with uses of interfaces_packed and interface_offsets_packed.
13420
13421 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
13422
13423         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
13424         mono_class_interface_offset prototype to wrap all accesses to
13425         "MonoClass.interface_offsets".
13426
13427         * class.c: Implemented mono_class_interface_offset, and wrapped all
13428         accesses to "MonoClass.interface_offsets".
13429
13430         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
13431         "MonoClass.interface_offsets".
13432
13433 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
13434
13435         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
13436         GetMethodFromHandle overloads (bug #78637).
13437
13438 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
13439
13440         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
13441         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
13442
13443 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
13444
13445         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
13446         #81498.
13447
13448         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
13449         gracefully.
13450         (mono_custom_attrs_from_index): Ditto.
13451
13452         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
13453         Fixes #81501.
13454
13455 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
13456
13457         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
13458         is now allocated from a mempool.
13459
13460 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
13461
13462         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
13463         caller holds threads_lock, leading to deadlocks. Fixes #81476.
13464
13465 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
13466
13467         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
13468         mono_loader_clear_error () too late. Fixes #81463.
13469
13470 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
13471
13472         * culture-info-table.h : regenerated.
13473
13474 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
13475
13476         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
13477         is missing.
13478
13479 2007-04-25  Dick Porter  <dick@ximian.com>
13480
13481         * Makefile.am: Put the mingw enforced-optimisation back into the
13482         PLATFORM_WIN32 section.
13483
13484 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
13485
13486         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
13487         patch.
13488
13489         * image.c (mono_image_load_module): New API function to load a module reference.
13490
13491         * image.c (load_modules): Load modules lazily. Fixes #80812.
13492
13493         * class.c (mono_class_from_typeref): Use mono_image_load_module.
13494         
13495         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
13496
13497         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
13498         to mono_image_load_module_dynamic.
13499
13500 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
13501
13502         * marshal.c: Fix calling convention for CCW on non-windows
13503         platforms. STDCALL on windows, CDECL everywhere else to work 
13504         with XPCOM and MainWin COM.
13505         
13506         Code is contributed under MIT/X11 license.
13507
13508 2007-04-23  Martin Baulig  <martin@ximian.com>
13509
13510         Fix #80969.
13511
13512         * loader.c
13513         (method_from_memberref): Added `gboolean *used_context' argument.
13514         (mono_get_method_from_token): Likewise.
13515         (mono_get_method_full): Don't insert the method in the cache when
13516         `used_context' is true.
13517
13518 2007-04-23  Raja R Harinath  <rharinath@novell.com>
13519
13520         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
13521
13522         * reflection.c (mono_reflection_bind_generic_parameters): Don't
13523         create new MonoTypes for returned types.
13524         * class.c (mono_generic_class_get_class): Export mono-internal.
13525         * class-internals.h: Update to changes.
13526
13527 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
13528
13529         * threadpool.c, threadpool.h, icall-def.h: patch from
13530         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
13531
13532 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
13533
13534         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
13535         
13536         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
13537
13538         * threads.c (mono_thread_get_stack_bounds): New helper function.
13539
13540         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
13541         Correctly compute stack bounds when attaching. Fixes #81394.
13542
13543 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
13544
13545         * reflection.c: fix handling of doubles in custom attributes
13546         for the arm-fpa format (bug #81368).
13547
13548 2007-04-18  Raja R Harinath  <rharinath@novell.com>
13549
13550         * reflection.c (assembly_add_win32_resources): Mildly relax an
13551         bounds check to let the end pointer point just past the end of the
13552         allocated buffer.  (may fix #81384)
13553
13554 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
13555
13556         * culture-info-table.h : regenerated.
13557
13558 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
13559
13560         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
13561         the thread is aborted early.
13562
13563 2007-04-05  Dick Porter  <dick@ximian.com>
13564
13565         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
13566         FindFirstFile()/FindNextFile() to find entries.  This lets the
13567         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
13568         81038.
13569
13570         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
13571         the parameters of
13572         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
13573
13574 2007-04-04  Martin Baulig  <martin@ximian.com>
13575
13576         * debug-helpers.c
13577         (mono_method_desc_full_match): Add support for nested classes.
13578
13579 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
13580
13581         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
13582
13583 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
13584
13585         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
13586         waiting for too many threads.
13587
13588 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
13589
13590         * environment.c: Fix return value check on uname so we can get the 
13591         executing version on Solaris operating systems.
13592
13593 2007-03-28  Jb Evain  <jbevain@gmail.com>
13594
13595         * class.c (mono_type_get_name_recurse): Complete the
13596         fix for the creation of assembly qualified names for
13597         pointer types. Fixes #81208.
13598
13599 2007-03-27  Dick Porter  <dick@ximian.com>
13600
13601         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
13602         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
13603         changed.
13604
13605         * threads.c
13606         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
13607         the value of ReleaseMutex().
13608
13609 2007-03-27  Dick Porter  <dick@ximian.com>
13610
13611         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
13612         in little-endian order, not network endian, so must be converted
13613         to host endian here.  Fixes bug 80593.
13614
13615 2007-03-22  Jb Evain  <jbevain@gmail.com>
13616
13617         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
13618         qualified names for pointer types. Fixes #81208.
13619
13620 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
13621
13622         * marshal.c: Add support for PreserveSigAttribute. 
13623         
13624         Code is contributed under MIT/X11 license.
13625
13626 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
13627
13628         * process.c: Fix endianness issues. Fixes #81126.
13629
13630         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
13631         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
13632
13633         * image.c (mono_image_lookup_resource): Make this work on big-endian
13634         machines.Change API contract so the caller needs to free the return value.
13635         
13636         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
13637         API change.
13638         
13639 2007-03-14  Martin Baulig  <martin@ximian.com>
13640
13641         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
13642         mono_type_get_desc() as well.
13643
13644 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
13645
13646         * icall.c:  Fix environ access in VS.  
13647         
13648 2007-03-13  Alp Toker  <alp@atoker.com>
13649
13650         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13651         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13652         #63841.
13653
13654 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
13655
13656         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
13657         circular references among dynamic methods. Fixes #81091.
13658
13659         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
13660
13661 2007-03-09  Martin Baulig  <martin@ximian.com>
13662
13663         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
13664
13665 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
13666
13667         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
13668         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
13669         
13670         Code is contributed under MIT/X11 license.
13671         
13672 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
13673
13674         * loader.c: Reapply patch for bug #79424.
13675
13676 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
13677
13678         * metadata.c (mono_type_to_unmanaged): Only convert object to
13679         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
13680
13681 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
13682
13683         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
13684         (and incorrectly set) is_reference field from MonoGenericInst.
13685
13686 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
13687
13688         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
13689         a little earlier.
13690
13691         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
13692
13693         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
13694
13695 2007-03-05  Miguel de Icaza  <miguel@novell.com>
13696
13697         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
13698         FileOptions.1 value to mean "temporary", map that to
13699         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
13700
13701         Fixes 80688
13702
13703 2007-03-03  Marek Habersack  <mhabersack@novell.com>
13704
13705         * appdomain.c: implement MS .Net style shadow copying. Copies of
13706         the assemblies are made in a subdirectory of the dynamic base
13707         directory, the assembly names are preserved.
13708         Copy .mdb and .config files along with the assemblies being shadowed.
13709
13710 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
13711
13712         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
13713         (emit_marshal_handleref): Ditto.
13714
13715         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
13716         on Visual C++. Fixes #80671.
13717
13718 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13719
13720         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
13721         for clone operations.
13722
13723 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
13724
13725         * marshal.c: Fix warnings.
13726
13727 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
13728
13729         * loader.c: allow case-insensitive matching of the dll name
13730         in dllmap handling when prefixed with "i:".
13731
13732 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
13733
13734         * threads.c: Fix #ifdef for dummy_apc function for VS.
13735
13736 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13737
13738         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
13739
13740 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
13741         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
13742         giving precedence to the methods with a fully qualified name
13743         (InterfaceName.MethodName) when building the interface sections
13744         of the vtable.
13745
13746 2007-02-16  Dick Porter  <dick@ximian.com>
13747
13748         * threadpool.c (append_job): Fix fast-path array handling, so it's
13749         less likely the array will grow exponentially when the load is
13750         heavy.
13751
13752 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13753
13754         * metadata-internals.h, loader.c: fix dllmap lookup order
13755         for non-function maps, too, and prepare for fallback code.
13756
13757 2007-02-12  Robert Jordan  <robertj@gmx.net>
13758
13759         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
13760         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
13761         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
13762         GlobalFree. Fixes a part of bug #77075.
13763
13764 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
13765
13766         * loader.c: implemented typedef parent in field memberref.
13767
13768 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
13769
13770         * marshal.c: Fix warnings and remember to call Release on
13771         IUnknown of RCW.
13772         
13773         Code is contributed under MIT/X11 license.
13774
13775 2007-02-10  Miguel de Icaza  <miguel@novell.com>
13776
13777         * class-internals.h: Add MonoHandleRef definition, and
13778         handleref_class to mono_defaults. 
13779
13780         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
13781         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
13782
13783         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
13784         (do nothing on this stage)
13785         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
13786         (emit_marshal_handleref): New method, used for argument handling
13787         of HandleRefs. 
13788
13789 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
13790
13791         * class.c (mono_class_setup_parent): Lazily init com types.
13792         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
13793         init com types.
13794         * object.c (mono_remote_class_vtable): Lazily init com types.
13795         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
13796         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
13797         * domain-internals.h: Expose mono_init_com_types.
13798         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
13799         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
13800         Add support for COM Callable Wrapper marshalling.
13801         * marshal.h: Add icall definitions.
13802         * gc.c: Handle freeing of CCWs in finalizer code.
13803         
13804         Code is contributed under MIT/X11 license.
13805
13806 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
13807
13808         * reflection.c: changed all the signature encoding code to use
13809         a variable-sized buffer.
13810
13811 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13812
13813         * marshal.c: locking fixes: never take the loader lock
13814         or other runtime locks when holding the marshal lock
13815         (fixes bug#80664).
13816
13817 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
13818
13819         * marshal.c: make the delegate function pointer mapping
13820         work for the moving GC.
13821
13822 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
13823
13824         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
13825         for bug #80618.
13826
13827 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13828
13829         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
13830         gmodule.
13831
13832 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13833
13834         * threadpool.c: made the code moving-GC safe.
13835
13836 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13837
13838         * assembly.c, boehm-gc.c, class-internals.h, class.c,
13839         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
13840         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
13841         warning cleanup.
13842         * reflection.c: warning cleanup, some threading and moving GC fixes.
13843
13844 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
13845
13846         * class.c, loader.c: create the needed Set/Get/Address array methods
13847         as well as the .ctors in mono_class_init (), fixes bug #80567.
13848
13849 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
13850
13851         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
13852         we doesn't decrease its alignment. Should fix the sparc build.
13853
13854 2007-01-24  Dick Porter  <dick@ximian.com>
13855
13856         * socket-io.c
13857         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13858         Create the returned object if we need to ignore an unsupported
13859         socket option.  Fixes a segfault reported by Atsushi.
13860
13861 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13862
13863         * class.c, object.c: restrict GC-tracked fields to
13864         UIntPtr fields used inside corlib, so we provide better
13865         type info to the GC and also allow broken packing as in
13866         bug #80580.
13867
13868 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
13869
13870         * sgen-gc.c: removed duplicated function.
13871
13872 2007-01-19  Miguel de Icaza  <miguel@novell.com>
13873
13874         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
13875         value that means that the value is not supported, but that we
13876         should not return a failure, but instead report this as a
13877         successful operation.
13878
13879 2007-01-19  Raja R Harinath  <rharinath@novell.com>
13880
13881         Fix tests/bug79956.2.il
13882         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
13883         (mono_generic_class_get_class): If the generic definition in an
13884         enum, copy over other fields related to it.
13885
13886 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13887
13888         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
13889         genericinst enums (bug #79215).
13890
13891 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
13892         * class.c: Fix bug 80307.
13893
13894 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
13895
13896         * image.c: if the file table is not present, try to load
13897         all the modules, since we don't have info about them
13898         having or not metadata (bug #80517).
13899         * assembly.c: allow mono_assembly_load_references () to
13900         work for netmodules.
13901
13902 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13903
13904         * image.c, metadata-internals.h, object.c: execute module
13905         cctors when running on the 2 runtime if present (bug #80487).
13906
13907 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13908
13909         * icall.c: optimized InitializeArray() on bigendian.
13910
13911 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13912
13913         * icall.c: fix for the broken ARM FPA double format.
13914
13915 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13916
13917         * icall.c: handle endian issues for r4 and r8 types, too, in
13918         the InitializeArray() icall.
13919
13920 2007-01-15  Miguel de Icaza  <miguel@novell.com>
13921
13922         * loader.c (mono_loader_error_prepare_exception): Clear the error
13923         once we have extracted the information from it, do this before we
13924         call into the JIT's class loading mechanisms.
13925
13926         * object.c (mono_class_create_runtime_vtable): Do not clear the
13927         loader error before calling mono_class_get_exception_for_failure
13928         as the loader error is needed inside
13929         mono_class_get_exception_for_failure to throw the error (thinko).
13930
13931         Fixes #80521
13932         
13933 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13934
13935         * reflection.c: align fields rva data so it's faster to load at
13936         runtime.
13937
13938 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13939
13940         Prepare to simplify GenericMethod handling.
13941         * class-internals.h (mono_method_get_context): New accessor function.
13942         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13943         rather than directly accessing '->context' field.
13944
13945         * class-internals.h (_MonoGenericParam.method): Move ...
13946         (_MonoGenericContainer): ... here.  Add into union with klass field.
13947         * class.c, icall.c, loader.c, metadata.c, reflection.c:
13948         Update to changes.
13949
13950 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13951
13952         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13953         the wrapper type enum and reduce relocations.
13954
13955 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13956
13957         * reflection.c (inflate_mono_method): Reuse method instantiation
13958         from the generic method, if available.
13959
13960 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13961
13962         * marshal.c (emit_marshal_variant): Fix conv_arg
13963         type in last commit, based on whether parameter is byref.
13964         
13965 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13966
13967         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13968         marshalling.
13969         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13970         MONO_TYPE_OBJECT back for VARIANT support.
13971
13972 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13973
13974         * marshal.c, marshal.h, icall-def.h: Implement 
13975         Marshal.ReAllocCoTaskMem.
13976
13977 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13978
13979         * marshal.c: memory retention fixes: use the proper
13980         image cache for runtime_invoke method lookups.
13981
13982 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13983
13984         * mempool.c: added code to help debug mempool allocations.
13985
13986 2007-01-11  Dick Porter  <dick@ximian.com>
13987
13988         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13989         support (experimenting with faking it with IP_MTU_DISCOVER for
13990         systems that don't have IP_DONTFRAGMENT.)
13991         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13992         icall.
13993
13994         * icall-def.h: new System.Net.Sockets.Disconnect icall.
13995
13996         * socket-io.h: Add new fields to MonoSocketAsyncResult
13997         corresponding to the new ones in Socket.cs.
13998
13999 2007-01-11  Raja R Harinath  <rharinath@novell.com>
14000
14001         Fix IronPython regression mentioned in #80249
14002         * metadata.c (do_mono_metadata_parse_generic_class): Clear
14003         'cached_context' field, since it may have been initialized as a
14004         side-effect of metadata parsing.
14005
14006         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
14007         (_MonoGenericClass.cached_class): Move here and rename from lone
14008         remaining field of ...
14009         (_MonoInflatedGenericClass): ... this.  Remove.
14010         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
14011         to changes.
14012
14013         Fix mcs/tests/test-128.cs regression.
14014         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
14015         2007-01-10 change below.
14016         [MONO_TYPE_OBJECT]: Recurse into array case.
14017
14018 2007-01-11  Raja R Harinath  <harinath@gmail.com>
14019
14020         * class-internals.h (mono_get_inflated_generic_class): Remove.
14021         * class.c (mono_get_inflated_generic_class): Remove.
14022         (mono_generic_class_get_class): Rename from
14023         mono_class_create_generic.
14024         (mono_class_from_mono_type) [GENERICINST]: Use it.
14025         * reflection.c, metadata.c: Update to changes.  Use
14026         'mono_class_from_mono_type'.
14027
14028 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
14029
14030         * reflection.c: use passed type when encoding an array element
14031         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
14032
14033 2007-01-09  Robert Jordan  <robertj@gmx.net>
14034
14035         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
14036         result arguments (someDelegate.EndInvoke (unrelatedAres)).
14037         Fixes bug #80392.
14038
14039 2007-01-09  Raja R Harinath  <rharinath@novell.com>
14040
14041         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
14042
14043         * object.c (set_value): Avoid aliasing between type->data.klass
14044         and type->data.generic_class.
14045
14046         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
14047
14048 2007-01-08  Raja R Harinath  <rharinath@novell.com>
14049
14050         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
14051         between type->data.klass and type->data.generic_class.
14052
14053 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
14054
14055         * marshal.c: In MS.NET, StringBuilder objects are not copied by
14056         value in out parameters.
14057
14058 2007-01-08  Raja R Harinath  <rharinath@novell.com>
14059
14060         Simplify invariant for MonoGenericClass::klass field.
14061         * class.c (mono_class_create_generic): Verify 'klass' is null.
14062         * metadata.c (do_mono_metadata_parse_generic_class): Don't
14063         initialize 'klass' field.
14064
14065 2007-01-05  Raja R Harinath  <rharinath@novell.com>
14066
14067         Ongoing work to avoid redundant data and simplify invariants.
14068         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
14069         'generic_class', and change type to a GenericInst.
14070         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
14071         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
14072
14073 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
14074
14075         * class.c : skip io-layer under PLATFORM_WIN32.
14076
14077 2007-01-03  Tor Lillqvist  <tml@novell.com>
14078
14079         Fix #80305: In a bundled executable, look in the bundled exe
14080         assembly to determine the runtime version. Add the possibility to
14081         bundle also the machine.config file.
14082         
14083         * assembly.c (mono_assembly_open_from_bundle): Make
14084         non-static. Allow being called even if we have no bundled
14085         assemblies, and return NULL right away in that case.
14086
14087         * domain-internals.h: Declare mono_assembly_open_from_bundle()
14088         here.
14089
14090         * domain.c (app_config_parse): Take an assembly exe file name as
14091         parameter instead of a config file name. Check for a bundled
14092         config file for that assembly by calling
14093         mono_config_string_for_assembly_file() (see below) before looking
14094         for one in the file system.
14095         (get_runtimes_from_exe): Corrsponding change to call of
14096         app_config_parse().
14097         (get_runtimes_from_exe): Check for bundled assembly exe file first
14098         by calling mono_assembly_open_from_bundle(). If no bundled
14099         assembly exe file is found, call mono_image_open() as before to
14100         look it up in the file system.
14101
14102         * mono-config.c: Add variable bundled_machinec_onfig.
14103         (mono_config_string_for_assembly_file): New function.
14104         (mono_config_for_assembly): Move code snippet that looks for a
14105         bundled assembly .config file into the above new function. Call
14106         it.
14107         (mono_register_machine_config, mono_get_machine_config): New
14108         functions to set and retrieve
14109
14110         * assembly.h: Declare mono_register_machine_config().
14111
14112         * mono-config.h: Declare mono_get_machine_config() and
14113         mono_config_string_for_assembly_file().
14114
14115         * icall.c: No declaration of environ necessary on Win32. It is
14116         declared (as a macro expanding to a function call) in stdlib.h.
14117         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
14118         New internal mono function. Returns the value of
14119         mono_get_machine_config() as a Mono string.
14120
14121         * icall-def.h: Add get_bundled_machine_config().
14122
14123 2007-01-04  Raja R Harinath  <rharinath@novell.com>
14124
14125         Remove redundant field
14126         * class-internals.h (_MonoGenericContext.container): Remove field.
14127         * loader.c (mono_method_get_signature_full): Don't parse a
14128         "container" for a signature parse when the signature is inflated
14129         immediately.
14130         (method_from_methodspec): Likewise, for a generic_inst.
14131         * class.c, metadata.c, reflection.c: Update to changes.
14132
14133 2006-01-04  Raja R Harinath  <rharinath@novell.com>
14134
14135         * class-internals.h (_MonoGenericClass): Rename 'context' field to
14136         'cached_context', and change semantics -- it starts off NULL, and
14137         is initialized on demand.
14138         * class.c (mono_generic_class_get_context): New accessor to
14139         replace 'context' field accesses.
14140         (mono_class_get_context): New helper.
14141         (*): Update to changes.
14142         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
14143
14144 2007-01-03  Miguel de Icaza  <miguel@novell.com>
14145
14146         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
14147         before the memcpy.   Fixes Marshal2 regression.
14148
14149 2007-01-02  Jb Evain  <jbevain@gmail.com>
14150
14151         * blob.h: add a MONO_TYPE_ENUM definition
14152         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
14153         fix the encoding of arrays of enums in custom attributes.
14154
14155         Fixes #79666.
14156
14157 2007-01-01  Miguel de Icaza  <miguel@novell.com>
14158
14159         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
14160         string is null terminated, but only cut the string short if it
14161         overflows the buffer.   
14162         
14163         (mono_string_to_byvalstr): Also fix this routine.   The code here
14164         was not properly terminating a string (it was only terminated
14165         because of the previous catch-all memset). 
14166
14167         I left the memset, because I do not know if applications expect
14168         the runtime to clear this region. 
14169
14170         Fixes #79944.
14171
14172         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
14173         Clear the error before returning to unmanaged code to prevent the
14174         runtime from being confused later on (fixes  80420).
14175         (ves_icall_type_from_name): Always call mono_loader_clear_error
14176         after parsing a type that could have failed.
14177         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
14178
14179         * loader.c (mono_loader_clear_error): Fix indentation.
14180
14181 2006-12-28  Martin Baulig  <martin@ximian.com>
14182
14183         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
14184
14185 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14186
14187         * reflection.c: patch from Rolf Bjarne Kvinge to fix
14188         getting a token for an EnumBuilder.
14189
14190 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
14191
14192         * reflection.c: be more careful in case resource generation
14193         fails to create the data array.
14194
14195 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14196
14197         * sgen-gc.c: write barrier for clone and fix unregister handles.
14198
14199 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14200
14201         * reflection.c: some fixes needed in the generics code for the moving GC.
14202
14203 2006-12-22  Robert Jordan  <robertj@gmx.net>
14204
14205         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
14206         account. Fixes bug #80299.
14207
14208 2006-12-21  Raja R Harinath  <rharinath@novell.com>
14209
14210         Fix WaitHandle usage in delegates.
14211         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
14212         * object.c (mono_wait_handle_new): Use the property set method to
14213         initialize the handle.
14214         (mono_wait_handle_get_handle): New.
14215         * threadpool.c (mono_async_invoke): Use it.
14216         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
14217         Likewise.
14218         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
14219
14220 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
14221
14222         * marshal.c (emit_marshal): Call emit_marshal_variant and
14223         emit_marshal_com_interface when applicable.
14224         (emit_marshal_variant, emit_marshal_com_interface): Add
14225         methods for this case and remove if's from emit_marshal_object.
14226         
14227 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
14228
14229         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
14230
14231 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
14232
14233         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
14234         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
14235         and GlobalFree on Windows. Remove FIXME.
14236
14237 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14238
14239         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
14240         implementation for managed objects.
14241
14242 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
14243
14244         * object.c: implemented code to be used for checking
14245         that no reference field overlaps with non-references.
14246
14247 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14248
14249         * threadpool.c: fix queue code to be compatible with the
14250         moving GC.
14251
14252 2006-12-18  Miguel de Icaza  <miguel@novell.com>
14253
14254         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
14255         in structures by throwing ArgumentNullException.
14256
14257         (emit_marshal_safehandle): Also when they are null parameters.
14258
14259         (emit_marshal_safehandle): Add support for ref
14260         SafeHandles parameters
14261
14262 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14263
14264         * profiler.c: updated to use the mono-dl API instead of
14265         gmodule.
14266
14267 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14268
14269         * profiler.c: updated to use the mono-dl dynamic loading
14270         API instead of gmodule.
14271
14272 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14273
14274         * profiler.c: use readlink, older versions of glib don't have
14275         g_file_read_link ().
14276
14277 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14278
14279         * profiler.c: try to detect the path to mono if libc fails to provide
14280         a useful name (bug #80286).
14281
14282 2006-12-16  Raja R Harinath  <rharinath@novell.com>
14283
14284         Fix #80242
14285         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
14286         instance, use the generic type definition instead.
14287         (ves_icall_Type_GetNestedTypes): Likewise.
14288         * class.c (mono_class_create_generic): Always set the
14289         nested_classes of a generic instance to NULL, even if the generic
14290         type definition has nested types.
14291
14292 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
14293
14294         * marshal.c (mono_string_from_bstr): Revert previous Windows change
14295         and fix on Linux.
14296         
14297 2006-12-15  Miguel de Icaza  <miguel@novell.com>
14298
14299         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
14300         my arguments were in the wrong order.   I also fixed the Windows
14301         version which seems to have had the same issue.
14302
14303         (mono_free_bstr): On Unix, this is g_free.
14304         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
14305         conversions (for the tests in corlib to pass).
14306
14307 2006-12-14  Miguel de Icaza  <miguel@novell.com>
14308
14309         * marshal.c (emit_ptr_to_object_conv): For now, ignore
14310         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
14311         exception if a ref SafeHandle in a struct has changed).
14312         
14313         (emit_struct_conv): Do not perform layout checks for classes
14314         derived from SafeHandle, as those are specially handled. 
14315
14316         (emit_object_to_ptr_conv): Add support for
14317         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
14318
14319         (emit_marshal_safehandle): Implement conversion of return values
14320         of safehandles (MARSHAL_ACTION_CONV_RESULT).
14321         
14322         * threads.c: WaitHandle now is compiled with two different handles
14323         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
14324         for 2.0.
14325         
14326         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
14327         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
14328         these routines to cope with both kinds of fields.
14329
14330 2006-12-12  Miguel de Icaza  <miguel@novell.com>
14331
14332         * metadata.c (mono_type_to_unmanaged): Handle the case where
14333         type->data.klass is a SafeHandle, and in that case, return the
14334         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
14335         MONO_MARSHAL_CONV_SAFEHANDLE. 
14336
14337 2006-12-11  Miguel de Icaza  <miguel@novell.com>
14338
14339         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
14340         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
14341         calling emit_marshal_object.
14342
14343         (emit_marshal_safehandle): Implement marshalling of
14344         SafeHandle parameters (no ref support yet).
14345
14346         (MarshalAction): Document the defines as I implement
14347         them for SafeHandle.
14348
14349         (emit_marshal_object): indentation police.
14350
14351         * class-internals.h: Define MonoSafeHandle.
14352         Add safehandle_class to MonoDefaults type.
14353
14354         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
14355         list of classes to check for fields. 
14356
14357         * domain.c (mono_init_internal): Add SafeHandle to the list of
14358         mono_defaults loaded.
14359
14360 2006-12-15  Raja R Harinath  <rharinath@novell.com>
14361
14362         Fix #80253
14363         * reflection.c (mono_reflection_bind_generic_parameters): If the
14364         generic type definition is a type builder, ensure that it is fully
14365         initialized before instantiating it.  Kill some dead code.
14366
14367 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14368
14369         * object.c: clear the loader_error () before loading
14370         more metadata stuff (bug #80258).
14371
14372 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
14373
14374         * icall.c, icall-defs.h: type modifiers icalls for
14375         parameters and properties.
14376
14377 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
14378
14379         * object.c, icall.c: fixed warnings.
14380
14381 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14382
14383         * marshal.c: fixed a couple of leaks and coding style in a few places.
14384
14385 2006-12-08  Dick Porter  <dick@ximian.com>
14386
14387         * process.c: Cope with NULL ProcessStartInfo arguments on windows
14388         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
14389         80173.
14390
14391 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14392
14393         * process.c: ProcessStartInfo may have only filename set and
14394         arguments can be NULL.
14395
14396 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14397
14398         * icall.c: fix leak found by Robert Jordan.
14399
14400 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14401
14402         * marshal.c, marshal.h: generate managed method to access an element
14403         of a multi-dimensional array.
14404
14405 2006-11-30  Paolo Molaro (lupus@ximian.com)
14406
14407         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
14408
14409 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14410
14411         * icall.c: back out GetFields () fix until the serialization code is
14412         fixed to not depend on the incorrect behaviour.
14413
14414 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14415
14416         * profiler.c: provide defaults if none are set.
14417
14418 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14419
14420         * Makefile.am, attrdefs.h: new public header file with
14421         constants for attributes for use by embedders.
14422
14423 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14424
14425         * icall.c: GetFields () fix for bug #80064.
14426
14427 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
14428
14429         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
14430         removed long unused icalls.
14431
14432 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
14433   
14434         * marshal.c: 
14435                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
14436                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
14437                 can be generated without a delegate class.
14438                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
14439         
14440         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14441
14442 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14443
14444         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
14445         #80069.
14446
14447 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
14448
14449         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
14450         icall-def.h: added icalls needed by System.GC.
14451
14452 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
14453
14454         * loader.c: ensure the class in catch clauses is handled
14455         correctly for generics methods (fixes bug#79980).
14456
14457 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
14458
14459         * monitor.h, monitor.c: added mono_locks_dump () function
14460         to help debug deadlocks involving managed locks.
14461
14462 2006-11-13  Dick Porter  <dick@ximian.com>
14463
14464         * file-io.c (get_file_attributes): If the file is a symlink try
14465         and get the stat data for the target, but also add the
14466         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
14467         the specs for the windows symlink support, but will probably have
14468         to be reworked when I have test data from a vista machine.  Fixes
14469         bug 79887.
14470
14471 2006-11-13  Dick Porter  <dick@ximian.com>
14472
14473         * gc.c (mono_domain_finalize): 
14474         * marshal.c (mono_delegate_begin_invoke): 
14475         * threadpool.c (socket_io_init, mono_thread_pool_init)
14476         (mono_thread_pool_finish): 
14477         * monitor.c (mono_monitor_try_enter_internal): 
14478         * threads.c (mono_thread_resume, mono_thread_init)
14479         (mono_thread_suspend_all_other_threads)
14480         (mono_thread_execute_interruption): 
14481         * appdomain.c (mono_domain_unload): Check for NULL error returns
14482         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
14483         75733.
14484
14485 2006-11-11  Miguel de Icaza  <miguel@novell.com>
14486
14487         * process.c
14488         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
14489         Only close the handle if the value of the handle is not
14490         INVALID_HANDLE_VALUE.  This just makes the process a bit more
14491         robust.
14492
14493         Improvement for #75733, so that we do not run into this problem. 
14494
14495         
14496         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
14497         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
14498         internal variables.  Fixes #79462 
14499         
14500
14501 2006-11-09  Dick Porter  <dick@ximian.com>
14502
14503         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14504         Use poll() not select().  Fixes bug 79397.
14505
14506 2006-11-09  Raja R Harinath  <rharinath@novell.com>
14507
14508         Fix #79872
14509         * assembly.c (mono_assembly_load_from_full): Check that the given
14510         image has an assembly manifest.
14511
14512 2006-11-09  Ankit Jain  <jankit@novell.com>
14513
14514         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
14515         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
14516         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
14517
14518 2006-11-07  Dick Porter  <dick@ximian.com>
14519
14520         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14521         Put the old resolver behaviour back for pre-2.0 profiles.
14522
14523 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
14524
14525         * threadpool.c: precise GC and locking fixes.
14526
14527 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14528
14529         * class.c: don't load types that have an explicit unaligned
14530         managed reference. Provide better info in the TypeLoad exception.
14531         Part of the fix for bug #79744.
14532         * object.c: use the correct check for class type load issues.
14533
14534 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
14535
14536         * class.c: enforce alignment of fields with managed references
14537         even when Pack=1 is forced by the user (bug #77788).
14538
14539 2006-11-03  Dick Porter  <dick@ximian.com>
14540
14541         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14542         If the address reverse lookup fails, return it as the hostname
14543         anyway.  Fixes bug 79721.
14544
14545 2006-11-03  Dick Porter  <dick@ximian.com>
14546
14547         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
14548         Fix build on Windows.
14549
14550 2006-11-02  Dick Porter  <dick@ximian.com>
14551
14552         * icall-def.h: 
14553         * object-internals.h: 
14554         * exception.c (mono_get_exception_thread_interrupted): 
14555         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
14556         Fixes bug 74525.
14557
14558         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
14559         Check for pending Thread.Interrupt.
14560
14561 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
14562         * loader.c: Fixed bug 79684.
14563
14564 2006-10-27  Dick Porter  <dick@ximian.com>
14565
14566         * file-io.c (get_file_attributes): Force symlinks to directories
14567         to be returned as a regular file.  Fixes bug 79733.
14568 2006-10-26  Dick Porter  <dick@ximian.com>
14569
14570         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
14571         CreateFile to open a directory then we need to set the
14572         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
14573
14574 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
14575
14576         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
14577         friends.
14578
14579 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14580
14581         * sgengc.c: small cleanup of timer code.
14582
14583 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14584
14585         * sgen-gc.c: fix some warnings and start adding support for
14586         complete object removal on domain unload.
14587
14588 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
14589
14590         * assembly.c: build_assembly_name should not consider a version
14591         number without build or revision number invalid. Fixes bug #79715.
14592
14593 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
14594
14595         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
14596         call kernel32 function OutputDebugString directly.
14597         
14598         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14599         
14600 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
14601
14602         * reflection.c: small cleanup, using a function to insert a MonoString
14603         in the string heap.
14604
14605 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
14606
14607         * reflection.c: moving GC fixes.
14608
14609 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14610
14611         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
14612         all the objects with finalizers belonging to an unloading appdomain.
14613
14614 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
14615
14616         * sgen-gc.c: added ability to allocate even when the nursery is fully
14617         pinned and fixed a couple of bugs.
14618
14619 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
14620
14621         * threads.h: Revert the last change for now.
14622
14623         * threads.h (mono_thread_get_pending_exception): Rename this to
14624         mono_thread_get_undeniable_exception ().
14625
14626 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
14627
14628         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
14629         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
14630         when fname does not refer to valid assembly. This result in a more
14631         meaningful error message.
14632         * exception.c: added mono_get_exception_bad_image_format2 which 
14633         constructs a BadImageFormatException using the ctor taking a custom
14634         message and the file name. Passing in a NULL msg results in a default
14635         message.
14636         * exception.h: define mono_get_exception_bad_image_format2 function.
14637         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
14638         when file name pointed to an invalid IL image. Use 
14639         mono_get_exception_file_not_found2 to construct FileNotFoundException,
14640         as this results in a more meaningful error message.
14641
14642 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
14643
14644         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
14645         #79465.
14646
14647 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
14648
14649         * metadata.c (mono_type_size): Change the align parameter to guint32 for
14650         consistency with the other _size functions.
14651         (mono_type_stack_size): Ditto.
14652
14653         * class.c object.c icall.c: Fix warnings caused by the above change.
14654
14655         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
14656
14657         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
14658
14659         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
14660
14661 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
14662
14663         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
14664         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
14665         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
14666         threadpool.h, threads-types.h: mark more internal functions.
14667
14668 2006-10-11  Dick Porter  <dick@ximian.com>
14669
14670         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14671         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
14672         reproduce the bug even before applying the fix.)
14673
14674 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
14675
14676         * reflection.c: allow retrieving attributes for arguments in generic
14677         methods (bug #79241).
14678
14679 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
14680
14681         * debug-mono-symfile.c: properly check fopen () result (found by
14682         coverity).
14683
14684 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
14685
14686         * reflection.c: make error message clearer and fixed two
14687         issuelets found by Coverity.
14688
14689 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
14690
14691         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
14692
14693 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14694
14695         * object-internals.h, gc-internal.h, profiler-private.h:
14696         mark internal functions.
14697
14698 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14699
14700         * reflection.c: put data in the text section.
14701         * icall.c: recognize more types in type_from_typename ().
14702         * process.c, marshal.c: added some GC FIXMEs.
14703
14704 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14705
14706         * loader.c: check for NULL before initializing.
14707
14708 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
14709
14710         * gc.c (finalizer_thread): Use a non-alertable wait here.
14711
14712         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
14713         until the correct solution is found.
14714
14715 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
14716
14717         * reflection.c (mono_module_get_object): Avoid an assert when operating on
14718         modules with no metadata. Fixes #79596.
14719
14720         * image.c (load_metadata_ptrs): Put back the error message when
14721         the #- heap is encountered since the support is not complete yet.
14722
14723 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14724
14725         * gc.c: do not allow the user to SuppressFinalize () a
14726         delegate because it would leak the trampoline if present.
14727
14728 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
14729
14730         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
14731         PropertyPtr table.
14732
14733 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
14734
14735         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
14736
14737         * metadata.c (mono_metadata_get_param_attrs): Ditto.
14738
14739         * row-indexes.h: Add definitions for *Ptr tables.
14740
14741         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
14742
14743         * metadata.c (mono_metadata_translate_token_index): New helper function to
14744         translate table indexes used in uncompressed metadata.
14745         (mono_metadata_decode_table_row): Ditto.
14746         (mono_metadata_decode_table_row_col): Ditto.
14747
14748         * metadata.c: Add table schema for *Ptr tables.
14749
14750         * class.c loader.c: Use the new helper function to access the affected metadata
14751         tables.
14752         
14753         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
14754         #38532.
14755         
14756 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
14757
14758         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
14759         sequences which can be unbounded in size. Fixes #79583.
14760
14761 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
14762
14763         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
14764         static initialization.
14765
14766         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
14767
14768         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14769
14770         * domain.c (mono_domain_free): Free up type_init_exception_hash.
14771
14772         * object.c (mono_runtime_class_init): Implement correct semantics when a static
14773         ctor fails, i.e. throw the same exception on subsequent accesses.
14774         
14775 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
14776
14777         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
14778         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
14779         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
14780         Handle marshalling of interfaces and VARIANTs contained in structs.
14781         
14782         Code is contributed under MIT/X11 license.
14783         
14784 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
14785
14786         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
14787         
14788         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
14789         mempool.
14790
14791 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14792
14793         * console-io.c: ignore previous SIGINT handler.
14794
14795 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
14796
14797         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
14798         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
14799         #79460, #79461, #79485.
14800
14801         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
14802
14803         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
14804         #79217.
14805
14806 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14807
14808         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
14809         could be generated from it.
14810
14811 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
14812
14813         * rand.c: fix read loop to correctly handle EINTR.
14814
14815 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14816
14817         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
14818         internal calls are defined to keep methods closer to the declaring
14819         type and allow a significant reduction in runtime relocations and
14820         memory usage.
14821
14822 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
14823
14824         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
14825         exception message to have FileNotFoundException use the default
14826         assembly load error message. Fixes bug #79426.
14827         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
14828
14829 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14830
14831         * threadpool.c: (start_thread_or_queue) use the root domain when
14832         creating the thread instead of the async object one.
14833
14834 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
14835
14836         * class.c, object.c, class-internals.h, reflection.c:
14837         for arrays, store element_size inside MonoClass (speedup
14838         for array object creation).
14839
14840 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
14841
14842         * icall.c: fixed CodeBase to use the file name and not the module
14843         name (bug #79365).
14844
14845 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14846
14847         * mono-debug.c, mono-debug.h: export find_method as
14848         mono_debug_find_method ().
14849
14850 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14851
14852         * debug-helpers.c, class-internals.h: added a few functions useful
14853         when debugging under gdb.
14854
14855 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14856
14857         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
14858         characters that need special handling.
14859
14860 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14861
14862         * mono-config.c: make the os/cpu specification more flexible,
14863         allowing lists and negation.
14864
14865 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
14866
14867         * marshal.c: COM Interop fixes. Handle case where method->klass.
14868         is interface. Handle BSTR/MonoString when null. Use CDECL as 
14869         calling convention on non-windows platforms. This is for
14870         compatibility with XPCOM and MainWin COM.
14871         
14872         Code is contributed under MIT/X11 license.
14873         
14874
14875 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
14876
14877         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
14878         correctly. Fixes #79217.
14879
14880         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
14881
14882 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
14883
14884         * mono-config.c: allow both an os and cpu attribute for dllmap
14885         and dllentry elemnets to enable a single config file to be used
14886         for multiple architectures.
14887
14888 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
14889
14890         * loader.c: MonoLoaderError was cleared too soon on load failure.
14891         Fixes bug #79424.
14892
14893 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
14894
14895         * icall.c: use the defining class vtable when accessing a
14896         static field, not a pobblibly derived class.
14897
14898 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
14899
14900         * icall.c string-icalls.c: Remove references to unicode.h.
14901
14902         * unicode.h unicode.c Makefile.am: Remove these unused source files.
14903
14904         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14905
14906         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
14907         indicating the image where custom marshaller types should be looked up.
14908         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14909         custom marshallers, instead of corlib. Fixes #79425.
14910
14911 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
14912
14913         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14914
14915 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
14916
14917         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
14918         Implement Environment.ProcessorCount.
14919         
14920         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
14921         Implement Environment.ProcessorCount.
14922         
14923         * icall.c: 
14924         Add Environment.ProcessorCount icall.
14925         
14926         Patch by Jason McFall.
14927
14928 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14929
14930         * assembly.c: don't append .exe/.dll when the filename already contains
14931         one of those extensions.
14932
14933 2006-09-12  Martin Baulig  <martin@ximian.com>
14934
14935         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14936         to array interfaces.
14937
14938 2006-09-11  Martin Baulig  <martin@ximian.com>
14939
14940         * reflection.c (mono_image_build_metadata): Create the
14941         MethodImpl's after emitting all types and methods, so we don't
14942         need another fixup pass for them.
14943
14944 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
14945
14946         * class.c (mono_class_from_name_case): Fix regression introduced by the last
14947         change.
14948
14949 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14950
14951         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14952         unload.
14953
14954 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
14955
14956         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14957         args is not set. Fixes #78926.
14958
14959 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
14960
14961         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14962
14963         * image.c (load_class_names): Move this to class.c, and rename it to 
14964         'mono_image_init_name_cache'.
14965         (load_modules): Fix a warning.
14966
14967         * class.c icall.c image.c: Initialize image->name_cache lazily.
14968
14969         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14970         on its name using information in the AOT file.
14971
14972         * class.c (mono_class_from_name): Use the new hook function.
14973
14974 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
14975
14976         * reflection.c (mono_param_get_objects): Handle enum default parameter values
14977         correctly.
14978
14979         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14980         Fixes #79289.
14981         
14982 2006-09-06  Martin Baulig  <martin@ximian.com>
14983
14984         * icall.c (mono_lookup_internal_call): Small fix.
14985
14986 2006-09-05  Raja R Harinath  <rharinath@novell.com>
14987
14988         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14989         double g_free.
14990
14991 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
14992
14993         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
14994         when --debug is specified.
14995
14996 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
14997
14998         * class.c (setup_generic_array_ifaces): Fix a warning.
14999
15000 2006-09-04  Miguel de Icaza  <miguel@novell.com>
15001
15002         * Temporarily remove the patch to assemly.c that checks the
15003         assembly versions as it breaks our gacutil.
15004
15005 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
15006
15007         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
15008
15009         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
15010         a net 1.0 runtime.
15011
15012         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
15013         created using the default ctor. Fixes #79152.
15014         (mono_string_builder_to_utf16): Ditto.
15015
15016 2006-09-01  Martin Baulig  <martin@ximian.com>
15017
15018         Fix handling of the generic array interfaces.
15019
15020         * class-internals.h
15021         (MonoDefaults): Removed `generic_array_class' and added
15022         `generic_ilist' class.
15023
15024         * class.c
15025         (mono_bounded_array_class_get): Add the new generic array interfaces.
15026         (setup_generic_array_ifaces): New static method; create vtable
15027         entries for each method in the generic array interfaces.
15028
15029         * metadata.c
15030         (select_container): Allow "parent-less" generic methods.
15031
15032         * marshal.c
15033         (mono_marshal_get_generic_array_helper): New public method.
15034
15035         * icall.c
15036         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
15037         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
15038         moved the interncall into System.Array.
15039
15040 2006-09-01  Raja R Harinath  <rharinath@novell.com>
15041
15042         A few more cases of avoiding work on types with ->byref set.
15043         Has the real fix for #79238
15044         * icall.c (is_generic_parameter): New helper.
15045         (ves_icall_Type_GetGenericParameterPosition): Use it.
15046         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
15047         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
15048         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
15049         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
15050         reference types.
15051         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
15052         reference types.
15053         (ves_icall_Type_get_IsGenericInstance): Likewise.
15054         (ves_icall_Type_get_IsGenericType): Likewise.
15055
15056 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
15057
15058         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
15059         class if possible.
15060
15061         * mempool.h (mono_mempool_get_allocated): New helper function.
15062
15063         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
15064         change.
15065
15066         * mempool.c: Fix warnings and the calculation of stats.
15067
15068         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
15069
15070         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
15071
15072         * loader.c (mono_get_method_from_token): Update method_count stat.
15073
15074         * class-internals.h (MonoStats): Add some stats.
15075
15076 2006-08-31 Robert Jordan  <robertj@gmx.net>
15077
15078         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
15079         with managed variants.
15080         All code is contributed under the MIT/X11 license.
15081         
15082 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
15083
15084         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
15085         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
15086
15087         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
15088
15089         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
15090         with cycles in classes.
15091
15092         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
15093
15094         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
15095         missing a [MarshalAs] directive. Fixes #79203.
15096
15097         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
15098         klass->marshal_info. Fixes #79217.
15099
15100 2006-08-30  Martin Baulig  <martin@ximian.com>
15101
15102         Committing a patch from Joachim Ante <joe@otee.dk>:
15103         Add support for binary data symbol stores.
15104
15105         * debug-mono-symfile.c
15106         (mono_debug_open_mono_symbol_file): Renamed into
15107         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
15108         arguments.
15109
15110         * mono-debug.c
15111         (mono_debug_open_image): Added `raw_contents' and `size' args.
15112         (mono_debug_init_2_memory): New public function.
15113
15114 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
15115
15116         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
15117
15118 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15119
15120         * appdomain.c: implement support for ShadowCopyFiles.
15121
15122 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
15123
15124         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
15125         when value is NULL (and should remove CID #51).
15126
15127 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15128
15129         * image.c: moved 2 functions to ../utils.
15130
15131 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
15132
15133         * gc.c: cope with the target object of a GC handle being NULL
15134         (bug #78877).
15135
15136 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15137
15138         * class.c: recursively check parent's explicit implementations
15139         of interface methods (fixes bug #79125).
15140
15141 2006-08-19  Miguel de Icaza  <miguel@novell.com>
15142
15143         * filewatcher.c: Avoid warnings when building, do not redefine
15144         constants that are defined.
15145
15146         Remove warnings.
15147
15148 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15149
15150         * image.c: don't fail when the link points to an absolute path.
15151
15152 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
15153
15154         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
15155         Fix CID #3.
15156
15157 2006-08-17  Miguel de Icaza  <miguel@novell.com>
15158
15159         * image.c (full_path): A new method used to obtain the actual path
15160         of an assembly even in the presence of symbolic links.  
15161
15162         This is necessary for the case where we are running a binary that
15163         has been GACed, but we are using the "published" path name
15164         ($prefix/mono/1.0/blah.exe) which happens to point to the real
15165         file in the GAC.
15166
15167         This was the source of the failure for the `xsp' command with the
15168         recent AppDomain changes, as far as the runtime was concerned,
15169         there were two different assemblies: $prefix/mono/1.0/blah.exe and
15170         $prefix/mono/gac/blah/version/blah.exe.
15171
15172         (do_mono_image_open): use full path
15173
15174 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
15175
15176         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
15177
15178 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
15179
15180         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
15181         domain_id is supplied. Fix CID #241 and corlib's unit tests.
15182
15183 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
15184
15185         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
15186         small structures. Fixes #78990.
15187
15188 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
15189
15190         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
15191
15192         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
15193
15194 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15195
15196         * appdomain.c:
15197         * marshal.c: don't load all the assemblies from a domain into newly
15198         created ones. The new domains might have different rules and load
15199         assemblies from different locations. Fixes bug #76757.
15200
15201         Patch by Lluis. Conflicts resolved by Brian Crowell.
15202
15203 2006-08-16  Alp Toker  <alp@atoker.com>
15204
15205         * socket-io.c: First half of the fix for #79084.
15206         Set sa_size to the length of the content, not that of the struct.
15207         Don't add NULL suffix to the content, this should be done in
15208         managed code if needed.
15209
15210 2006-08-14  Raja R Harinath  <rharinath@novell.com>
15211
15212         Fix part of #79012
15213         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
15214         mono_metadata_parse_type returns NULL.
15215
15216 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
15217
15218         * normalization-tables.h : new file for string normalization data.
15219         * locales.c, locales.h, icall.c :
15220           added load_normalization_resource() for string normalization,
15221           and icall as well.
15222         * Makefile.am : added normalization-tables.h to the sources.
15223
15224 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
15225
15226         * marshal.c: Add more helper functions to reduce code duplication and use them
15227         everywhere.
15228
15229 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
15230
15231         * marshal.c: Fix non-x86 stdcall warnings.
15232         
15233         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
15234         them everywhere.
15235
15236 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
15237
15238         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
15239         type check on multi-dimensional arrays. Fixes #79000.
15240
15241 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
15242
15243         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
15244         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
15245         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
15246         * class-internals.h: add is_com_object to class structure.
15247         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
15248         null checks to COM object marshalling. Fix .ctor call on RCW.
15249         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
15250         
15251         All code is contributed under the MIT/X11 license.
15252
15253 2006-08-09  Dick Porter  <dick@ximian.com>
15254
15255         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
15256         racing mono_monitor_allocator_lock() somewhere, so don't delete
15257         the critical section for now.  Found by running and exiting
15258         monodevelop.
15259
15260 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
15261
15262         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
15263         (ves_icall_System_ComObject_FindInterface): Ditto.
15264         (ves_icall_System_ComObject_CacheInterface): Ditto.
15265
15266         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
15267         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
15268
15269 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15270
15271         * threadpool.c: treat pipes from process asynchronous reads as sockets
15272         when reading from them, so we get select/poll or epoll to wait for
15273         data.
15274
15275 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
15276
15277         * loader.c: Fix a typo (CID #233) in the null check.
15278
15279 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
15280
15281         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
15282         Hopefully fixes #78949.
15283         
15284         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
15285         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
15286         bytes. Fixes #78972.
15287
15288 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15289
15290         * filewatcher.c: we need to set errno here.
15291
15292 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15293
15294         * filewatcher.c: let Win32Exception get the error value.
15295
15296 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15297
15298         * filewatcher.c: translate errno into win32 errors for Win32Exception
15299         to know what happened.
15300
15301 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
15302
15303         * threadpool.c: Fix more warnings.
15304
15305         * assembly.c (search_loaded): Fix warnings.
15306
15307         * threadpool.c (mono_thread_pool_finish): Fix warnings.
15308         (mono_async_invoke): Ditto.
15309
15310 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
15311
15312         * object.c (mono_remote_class_vtable): Need to create proxy vtable
15313         entries for __ComObject type in addition to ComImport types.
15314         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
15315         about hash table.
15316         
15317         All code is contributed under the MIT/X11 license.
15318
15319 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
15320
15321         * image.c: avoid tentative loading of modulerefs that contain
15322         no metadata (P/Invoke library names).
15323
15324 2006-07-28  Dick Porter  <dick@ximian.com>
15325
15326         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
15327         mono_loader_lock() somewhere, so don't delete the critical section
15328         for now.  Found by running and exiting monodevelop.
15329
15330 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15331
15332         * filewatcher.c: define the inotify syscalls when we're building on
15333         linux and have sys/syscall.h. The build system might not have support
15334         for inotify but the target system might have it.
15335
15336 2006-07-26  Miguel de Icaza  <miguel@novell.com>
15337
15338         * domain.c: Documentation updates.
15339
15340         * loader.c (mono_free_method): Do not release the method
15341         information if we are being profiled, as profilers will use this
15342         information at shut down to present some data to the user.
15343
15344         This is needed so that the profiler does not crash, as the
15345         profiler tends to keep MonoMethods around, and they might become
15346         invalid if we free these.
15347
15348         (mono_get_method_constrained): Return the original CIL stream
15349         method as well, so verification can be performed against it.
15350
15351 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15352
15353         * filewatcher.[ch]: support for inotify file system watcher.
15354         * icall.c: add new internal calls for the inotify file system watcher.
15355
15356 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15357
15358         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
15359         #78888.
15360
15361 2006-07-20  Dick Porter  <dick@ximian.com>
15362
15363         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
15364         warning.
15365
15366 2006-07-20  Dick Porter  <dick@ximian.com>
15367
15368         * threads.c (start_wrapper): Do the thread cleanup while we still
15369         hold a reference to its object.  Fixes bug 78123.
15370
15371 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
15372
15373         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
15374         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
15375           "managed-to-managed".
15376         * icall.c: Redirect string constructors that take sbyte* to
15377           ves_icall_System_String_ctor_RedirectToCreateString.
15378         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
15379           to CreateString () methods with matching signature.
15380         * reflection.c: Use original security informations for
15381           MONO_WRAPPER_MANAGED_TO_MANAGED.
15382         * security-manager.c: Use original security informations for
15383           MONO_WRAPPER_MANAGED_TO_MANAGED.
15384         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
15385           that is a placeholder and only its address should be used.
15386         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
15387           that is a placeholder and only its address should be used.
15388
15389 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
15390
15391         Begin implementing COM Interop.
15392         * appdomain.c: Increment corlib version.
15393         * class.c: Set ComImport classes' parent to __ComObject.
15394         * loader.c: Mark cominterop methods as such.
15395         * domain.c: Add __ComObject class to MonoDefaults structure.
15396         * image.c: Add 2 hashtables to the image for COM Interop related methods
15397         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
15398         using the mempool allocator
15399         
15400         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
15401         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
15402         declaration for mono_metadata_type_dup_mp.
15403         
15404         * debug-helpers.c: Added strings for two additional wrapper types
15405         * object.c: Create proxy objects for ComImport classes
15406         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
15407         and added __ComObject class to MonoDefaults structure.
15408         
15409         * object-internals.h: Finish MonoRealProxy definition, and add definition of
15410         MonoComInteropProxy and MonoComObject.
15411         
15412         * marshal.c: Added support for COM Interop
15413         (signature_cominterop): Converts managed signature to corresponding
15414         unmanaged COM signature.
15415         (cominterop_get_function_pointer): gets unmanaged function pointer via
15416         COM object vtable
15417         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
15418         (cominterop_get_method_interface): returns interface type that method is defined on
15419         (mono_mb_emit_cominterop_call): emits native call to function pointer
15420         gotten from vtable
15421         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
15422         that matches signature of unmanaged function.
15423         (cominterop_get_native_wrapper): wrapper around adjusted method call.
15424         (cominterop_get_invoke): forwards call from proxy to __ComObject
15425         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
15426         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
15427         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
15428         
15429         * marshal.h: Added Marshal icall declarations.
15430         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
15431         so we can access them in finalizer
15432         
15433 2006-07-14  Dick Porter  <dick@ximian.com>
15434
15435         * object.c (mono_type_initialization_cleanup): Fix a race
15436         condition by temporarily commenting out the critical section
15437         deletion.
15438
15439 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
15440
15441         * reflection.c (create_custom_attr): Fix some warnings.
15442         (create_custom_attr_data): Ditto.
15443         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
15444         types. Fixes #78855.
15445
15446 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
15447
15448         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
15449
15450         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
15451
15452 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
15453
15454         * reflection.c (resolve_object): Add support for DynamicMethod.
15455
15456         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
15457         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
15458
15459 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
15460
15461         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
15462         don't leak GPtrArray's pdata has we have no use (nor free) for it.
15463
15464 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
15465
15466         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
15467         Fixes #77888.
15468
15469 2006-06-30  Raja R Harinath  <rharinath@novell.com>
15470
15471         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
15472         slightly: remove a shadow local variable.
15473
15474 2006-06-29  Raja R Harinath  <rharinath@novell.com>
15475
15476         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
15477         definition that introduces the virtual function slot.
15478         Also fix Coverity #105.
15479
15480 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
15481
15482         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
15483         for dynamic assemblies. Fixes #78724.
15484
15485 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
15486
15487         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
15488         Fixes #78722.
15489
15490 2006-06-21  Martin Baulig  <martin@ximian.com>
15491
15492         * reflection.c
15493         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
15494         fixes #76484.
15495
15496 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
15497
15498         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
15499
15500 2006-06-20  Raja R Harinath  <rharinath@novell.com>
15501
15502         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
15503         nor TYPEREFs.
15504         * class.c (mono_class_create_from_typespec): Add 'context' argument.
15505         Inflate result if necessary.
15506         (mono_class_get_full): Remove old version.  Rename from
15507         'mono_class_get' and add 'context' argument.  Pass it to
15508         ..._create_from_typespec.
15509         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
15510         (mono_ldtoken): Revert change below.
15511
15512 2006-06-20  Martin Baulig  <martin@ximian.com>
15513
15514         * class.c (mono_ldtoken): Don't pass the generic context to
15515         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
15516
15517 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
15518
15519         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
15520         and later freeing it. Fixes #78638.
15521
15522 2006-06-15  Miguel de Icaza  <miguel@novell.com>
15523
15524         * icall.c (mono_class_get_throw): Revert over-zealous error
15525         throwing, the caller for mono_class_get_throw will cope with
15526         errors when classes are not properly initialized already.
15527
15528         The code still copes with loader exceptions though.
15529
15530         Fixes the regression in reftype1 and reftype3 from the CAS tests.
15531         
15532 2006-06-14  Miguel de Icaza  <miguel@novell.com>
15533
15534         Fixes the `make run1' version of RuntimeAbort (to be commited,
15535         source is in Bugzilla).
15536         
15537         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
15538         FALSE on class loading failure instead of returning true.
15539
15540         * class.c (mono_class_create_from_typedef): It is possible for
15541         mono_metadata_interfaces_from_typedef_full to fail if a class is
15542         not found, cope with this.
15543         
15544
15545 2006-06-14  Dick Porter  <dick@ximian.com>
15546
15547         * socket-io.c: 
15548         * process.c: Fix a bunch of signed/unsigned warnings from gcc
15549         4.1.1
15550
15551 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
15552
15553         * culture-info-table.h : oops, forgot to make it nsync with r61548.
15554
15555 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
15556
15557         * icall.c: Another fix for building mono in Visual Studio.
15558
15559 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
15560
15561         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
15562         
15563 2006-06-09  Martin Baulig  <martin@ximian.com>
15564
15565         * debug-mono-symfile.c: Put this back and really fix it this
15566         time. Sorry for all the trouble.
15567
15568 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
15569
15570         * icall.c (mono_class_get_throw): Fix a warning.
15571         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
15572         ReflectionTypeLoadException if needed. Fixes #78606.
15573
15574         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
15575         (mono_class_init): Ditto.
15576
15577         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
15578         ref_only exceptions.
15579         (mono_loader_clear_error): Make this work even if there is no error.
15580
15581 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
15582
15583         * object-internals.h marshal.c marshal.h icall.c: Implement method 
15584         Marshal.GetComSlotForMethodInfo using internal call.
15585
15586 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
15587
15588         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
15589         a function for signalling it.
15590
15591         * class.c (mono_class_from_typeref): Use the new kind of loader error when
15592         a referenced assembly is not found.
15593
15594         * loader.c (mono_loader_error_prepare_exception): Add support for 
15595         LOADER_ERROR_ASSEMBLY. Fix formatting.
15596
15597 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
15598
15599         * domain.c appdomain.c class-internals.h marshal.c: Add support 
15600         for VARIANT marshalling on windows and increment corlib version
15601         since Variant struct was added.
15602
15603 2006-06-03  Miguel de Icaza  <miguel@novell.com>
15604
15605         * debug-mono-symfile.c: Revert Martin's previous patch which broke
15606         stack trace line information:
15607
15608         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
15609         (Martin) when looking up B which is between A and C, return A not C.
15610
15611         Bug is #78573.
15612
15613         Thanks to Alexander Olk for tracking this down.
15614
15615 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
15616
15617         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
15618         
15619         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
15620         avoid clobbering its value.
15621         (mono_string_to_lpstr): Fix a warning on windows.
15622
15623 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
15624
15625         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
15626
15627         * reflection.c loader.c: Removed references to 'dummy' flag.
15628
15629         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
15630
15631         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
15632         it gets GC tracking.
15633
15634         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
15635         GC tracking.
15636         
15637         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
15638
15639         * marshal.c threadpool.c: Update callers of mono_async_result_new.
15640
15641         * appdomain.c: Bump corlib version.
15642
15643 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
15644
15645         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15646         CEE_STIND_REF when working with object references.
15647
15648 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
15649
15650         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
15651         Fixes #78539.
15652
15653 2006-05-30  Miguel de Icaza  <miguel@novell.com>
15654
15655         * loader.c (method_from_memberref): Fix argument value for
15656         mono_loader_set_error_method_load (I was passing the MonoClass
15657         instead of the class name char *).
15658
15659 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
15660
15661         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15662         CEE_STIND_REF when working with object references.
15663
15664 2006-05-30  Martin Baulig  <martin@ximian.com>
15665
15666         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
15667         mono_method_full_name() change and replace the ':' with a '.'
15668         here.
15669
15670 2006-05-30  Martin Baulig  <martin@ximian.com>
15671
15672         * debug-mono-symfile.c
15673         (mono_debug_symfile_lookup_location): Fix the algorithm:
15674         when looking up B which is between A and C, return A not C.
15675
15676 2006-05-29  Martin Baulig  <martin@ximian.com>
15677
15678         * mono-debug.h
15679         (MonoDebugMethodInfo): Make the typedef public.
15680         (MonoDebugSourceLocation): New public struct.
15681
15682         * mono-debug.c
15683         (mono_debug_source_location_from_address): Removed.
15684         (mono_debug_source_location_from_il_offset): Removed.
15685         (mono_debug_il_offset_from_address): Removed.
15686         (mono_debug_address_from_il_offset): Removed.
15687         (mono_debug_lookup_method): New public function.
15688         (mono_debug_lookup_source_location): New public function; replaces
15689         the old mono_debug_source_location_from_*() functions; see the
15690         inline documentation.
15691         (mono_debug_free_source_location): New public function.
15692         (mono_debug_print_stack_frame): New public function; see the
15693         inline documentation.
15694
15695         * debug-mono-symfile.c
15696         (mono_debug_find_source_location): Renamed into
15697         mono_debug_symfile_lookup_location(); only take a
15698         `MonoDebugMethodInfo *' and an `offset' argument; added inline
15699         documentation.
15700         (mono_debug_find_method): Renamed into
15701         mono_debug_symfile_lookup_method().
15702
15703 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
15704
15705         * assembly.c (mono_assembly_open_full): Dont overwrite the status
15706         returned by mono_image_open_full ().
15707
15708         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
15709         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
15710         #78517.
15711
15712         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
15713         #78518.
15714
15715 2006-05-27  Miguel de Icaza  <miguel@novell.com>
15716
15717         * class.c (mono_class_from_typeref): handle missing images
15718         earlier, deals with bug #78418.   Refactor code; 
15719
15720         Fix a warning introduced in my previous commit (some stale code
15721         from before I revisited my patch).
15722
15723         * class.c (mono_class_create_from_typedef): On failure, remove the
15724         class from the MonoImage->class_cache as the class is not
15725         initialized;   Fixes the leak pointed out by Paolo.
15726
15727 2006-05-25  Dick Porter  <dick@ximian.com>
15728
15729         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
15730         DeleteCriticalSections until I figure out which one may still be
15731         sometimes locked when mono_thread_cleanup is called.
15732
15733 2006-05-24  Dick Porter  <dick@ximian.com>
15734
15735         * threads.c (mono_thread_cleanup): Move the threading cleanup out
15736         of mono_thread_manage and back into its own function, so it can be
15737         called after the finalizer thread has finished.
15738
15739         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
15740
15741 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
15742
15743         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
15744         Fixes #78495.
15745
15746         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
15747         with non-blittable elements.
15748         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
15749
15750 2006-05-24  Martin Baulig  <martin@ximian.com>
15751
15752         * mono-debug-debugger.h (MonoDebuggerEvent): Added
15753         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
15754
15755         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
15756         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
15757         `mono_debugger_event_handler' to NULL.
15758
15759 2006-05-24  Martin Baulig  <martin@ximian.com>
15760
15761         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
15762
15763 2006-05-24  Martin Baulig  <martin@ximian.com>
15764
15765         * mono-debug-debugger.h
15766         (mono_debugger_create_notification_function): Added
15767         `MonoCodeManager *' argument.
15768
15769 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
15770
15771         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
15772
15773 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
15774
15775         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
15776         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
15777         implementation.
15778
15779 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
15780
15781         * icall.c: precise GC support: objects can't be stored in unmanaged
15782         memory anymore, even if they are kept alive by other references: since
15783         they can move the GC needs to be able to always find them.
15784
15785 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15786
15787         * object.c: precise GC support for static fields. Support
15788         for moving GCs: write barriers and pinned allocation for interned
15789         strings.
15790
15791 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
15792
15793         * domain.c, domain-internals.h: precise GC support for the MonoDomain
15794         structure.
15795
15796 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15797
15798         * class.c, gc.c: sgen and precise GC updates.
15799
15800 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15801
15802         * marshal.h, marshal.c: added write barrier wrapper and precise type
15803         fixes.
15804
15805 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
15806
15807         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
15808         support.
15809
15810 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15811
15812         * reflection.c: precise and sgen GC updates.
15813
15814 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15815
15816         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
15817
15818 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
15819
15820         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
15821
15822 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
15823
15824         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
15825         MONO_TYPE_OBJECT. Fixes #78462.
15826
15827 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
15828
15829         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
15830         and blittable types.
15831
15832 2006-05-17  Miguel de Icaza  <miguel@novell.com>
15833
15834         * class.c (mono_class_get_exception_for_failure): Implement parts
15835         of a TODO: if the loader error is set (instead of the class
15836         error), we return a Loader exception that can be properly thrown
15837         elsewhere.
15838
15839         This was exposed by some Winforms 2.0 code that I tried to run
15840         (Atsushi pointed me to it).
15841
15842 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
15843
15844         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
15845         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
15846         
15847         * marshal.c (emit_marshal_vtype): Add limited support for 
15848         UnmanagedType.LPStruct. Fixes #78427.
15849
15850         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
15851         Applied a patch from kangaroo to fix #77523.
15852
15853 2006-05-17  Martin Baulig  <martin@ximian.com>
15854
15855         * threads.c
15856         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
15857         (debugger_thread_created): Removed.
15858         (debugger_thread_exited): Removed.
15859
15860 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
15861
15862         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15863
15864         * object-internals.h (MonoReflectionResource): Sync with managed version.
15865
15866 2006-05-12  Wade Berrier <wberrier@novell.com>
15867
15868         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
15869
15870 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
15871
15872         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
15873         functions try to allocate from the image mempool.
15874
15875 2006-05-12  Dick Porter  <dick@ximian.com>
15876
15877         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
15878
15879 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
15880
15881         * object.c: The FieldGetter and FieldSetter methods require the full
15882         name of the class, not only the name. Fixes bug #78277.
15883
15884 2006-05-11  Miguel de Icaza  <miguel@novell.com>
15885
15886         * loader.c (method_from_memberref): Do not pass the NULL klass to
15887         mono_loader_set_error_() methods.  Pass the non-NULL value
15888         (class). 
15889
15890 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
15891
15892         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
15893         (mono_assembly_close): Null out assembly->image->references after freeing it.
15894
15895         * image.c (mono_image_close): Free image->references.
15896         
15897         * reflection.c (mono_image_basic_init): Fix a small memory leak.
15898
15899 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
15900
15901         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
15902         before checking if it's NULL (g_assert).
15903
15904 2006-05-10  Martin Baulig  <martin@ximian.com>
15905
15906         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15907         I thought I already killed that two months ago, but now it somehow reappeared.
15908
15909 2006-05-10  Martin Baulig  <martin@ximian.com>
15910
15911         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15912
15913 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
15914
15915         * reflection.c: Allocate memory for dynamically created methods in the image
15916         mempools.
15917
15918 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
15919
15920         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
15921         don't use the ad pointer before checking if it's NULL (g_assert).
15922
15923 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
15924
15925         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15926         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15927
15928         * marshal.c: Allocate all signatures from mempools.
15929
15930         * marshal.c: Allocate some more signatures from mempools.
15931
15932 2006-05-09  Miguel de Icaza  <miguel@novell.com>
15933
15934         * object.c (mono_load_remote_field): The code used to provide a
15935         temporary variable for returning results if the user did not
15936         provide a result pointer.  But our temporary variable was allocted
15937         on the satck.
15938
15939         Fix calling code to always pass a result area.   Coverity ID 103.
15940
15941 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
15942
15943         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15944         value, not the old. Fixes #78312.
15945         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15946
15947         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15948         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
15949         per-image cache.
15950
15951         * assembly.c (mono_assembly_close): Free image->references.
15952
15953         * assembly.c (mono_assembly_names_equal): Fix a warning.
15954         (mono_assemblies_cleanup): Cleanup more global data.
15955
15956         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15957
15958         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15959         ptr_cache and image->modules.
15960
15961         * image.c (mono_image_init): Allocate array_cache lazily.
15962         
15963 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15964
15965         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15966         behavior was changed recently and has bad side effects.
15967
15968 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
15969
15970         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15971         
15972         * assembly.c (mono_assembly_close): Remove a debug printf.
15973
15974         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15975
15976         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15977         to also allow for temporary references between mono_image_open ()/close ().
15978
15979         * domain.c (get_runtimes_from_exe): Add a FIXME.        
15980
15981 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
15982
15983         * marshal.c: Fix support for dynamic methods.
15984
15985         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15986
15987         * marshal.c (mono_marshal_cleanup): New cleanup function.
15988
15989         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
15990         image mempools.
15991
15992         * class.c (mono_class_init): Fix leaking class->nested_classes.
15993
15994         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15995
15996         * image.c (mono_image_init): Initialize the new cashes.
15997
15998         * image.c (mono_image_close): Destroy the new cashes.
15999
16000         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
16001
16002         * mempool.c (mono_mempool_strdup): New helper function.
16003
16004         * class-internals.h: Add prototype for mono_loader_unlock ().
16005
16006         * domain.c (mono_jit_info_table_find): Fix a warning.
16007         (mono_debugger_check_runtime_version): Ditto.
16008
16009         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
16010         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
16011         functions to these modules.
16012
16013         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
16014         metadata modules.
16015         
16016         * marshal.c (mono_free_bstr): Fix a warning.
16017
16018         * assembly.c (mono_assembly_open_full): Fix another small leak.
16019
16020         * object.c: Fix some unload leaks in the remoting code.
16021
16022         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
16023         function.
16024
16025         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
16026
16027         * reflection.c: Fix some unload leaks in dynamic assemblies.
16028
16029 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
16030
16031         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
16032         * marshal.h: Add BSTR support on Win32
16033         * icall.c: Add BSTR icalls
16034         * metadata.h: Add BSTR enums
16035
16036 2006-04-28  Miguel de Icaza  <miguel@novell.com>
16037
16038         Work to catch the crash from #76795 and turn it into an
16039         exception.   As I stubbed out pieces of the VisualBasic support,
16040         I found a number of places where the code was failing and I added
16041         checks to those places. 
16042         
16043         * metadata.c (do_mono_metadata_parse_generic_class): Make this
16044         function return a status code.  If we fail to parse the signature
16045         from mono_metadata_parse_generic_inst, return FALSE.
16046
16047         * loader.c (mono_get_method_from_token): If we fail to load the
16048         method (mono_class_get) return NULL.   
16049
16050         * (method_from_memberref): Return NULL if we are unable to parse
16051         the method signature
16052
16053         (mono_loader_error_prepare_exception): Since we now use the
16054         loader_error flag internally to stop processing, and obtaining
16055         exceptions that might be thrown will walk this code path the
16056         proper way of going from a MonoLoaderError into a
16057         MonoException was convoluted.   This new routine encapsulates the
16058         process of turning the error into an exception and *clearing* the
16059         error afterwards.
16060         
16061 2006-04-27  Miguel de Icaza  <miguel@novell.com>
16062
16063         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
16064         with missing assemblies), and to cope with:
16065
16066                 * Missing fieldref from a non-existing assembly.
16067                 * Missing methodref from a non-existing assembly.
16068
16069         The first batch of work to address *some* of the issues from 76661.
16070         
16071         * object.c (mono_class_create_runtime_vtable): If we fail to
16072         initialize the class raise the exception here. 
16073
16074         * metadata.c (mono_class_get_overrides_full): If any methods fail
16075         to load return the failure to the caller.
16076
16077         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
16078         flagging assemblies that failed to load.   
16079
16080         Do not crash if we are unable to load the assembly.
16081
16082         (mono_assembly_close): Do nothing with REFERENCE_MISSING
16083         assemblies. 
16084
16085         * loader.c (mono_loader_set_error_type_load): Change the
16086         convention to always pass unallocated strings, so we make our own
16087         copies (I know our own code had duplicated strings before, but
16088         this keeps the normal conventions).
16089         (method_from_memberref): Call mono_loader_set_error_method_load
16090         for all possible failures of loading the class. 
16091         Remove assert, turn into a loader error.
16092
16093         (mono_loader_error_to_exception): Move this routine from mini
16094         (mini_loader_error_to_exception) there was no need to have that in
16095         mini. 
16096
16097         * class.c (mono_class_from_typeref): If we were not able to load
16098         the assembly with mono_assembly_load_reference, call the
16099         mono_loader_set_error_type_load to register the problem.
16100
16101         (mono_class_setup_fields): If we fail to load the type from
16102         mono_metadata_parse_type_full, call mono_class_set_failure and
16103         break from the loop.
16104
16105         If class->exception_type is set, we do not layout the fields as
16106         that might crash the runtime, and instead return (from breaking
16107         from the previous loop).
16108
16109         (mono_class_setup_vtable): This now returns a boolean indicating
16110         whether the table was properly setup.   The decision is driven by
16111         mono_class_get_overrides_full which might run into non-existing
16112         methods. 
16113         
16114         (mono_class_init): Returns TRUE on success or FALSE if there was a
16115         problem in loading the type (incorrect assemblies, missing
16116         assemblies, methods, etc).
16117
16118         When we call mono_class_setup_fields we also check for a potential
16119         error inside this call (either a class exception or a general
16120         loader exception).
16121
16122         (mono_class_create_from_typedef): If the parent fails to load
16123         (calling mono_class_get_full) return NULL.
16124         
16125         ** Important **
16126
16127         calls to mono_metadata_parse_type_full should be checked
16128         everywhere and set the mono_class_set_failure
16129         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
16130
16131         The current patch checks the places where my manually constructed
16132         tests show the errors are showing up, but we should do it
16133         everywhere. 
16134
16135         ** Important2 **
16136
16137         mono_class_init return values should be tested everywhere, like
16138         the previous case this is something that we should audit
16139         everywhere and not only on the cases exposed by the tests I
16140         created. 
16141
16142 2006-04-26  Miguel de Icaza  <miguel@novell.com>
16143
16144         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
16145         boolean parameter and instead pass the information on `options'
16146         parameter (FileOptions).
16147
16148         * icall.c: Register the new signature for MonoIO.Open.
16149
16150         * debug-helpers.c (dis_one): Trying to understand how coverity
16151         works.  Fix Run 5, item 78.
16152
16153 2006-04-26  Dick Porter  <dick@ximian.com>
16154
16155         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
16156         dereference.
16157
16158 2006-04-25  Martin Baulig  <martin@ximian.com>
16159
16160         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
16161
16162         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
16163         debugger_thread_created().
16164         (debugger_gc_push_all_stacks): Don't handle the main thread in any
16165         special way.
16166         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
16167         (mono_debugger_finalize_threads): New function; undo the effects
16168         of mono_debugger_init_threads().
16169         (mono_debugger_create_all_threads): Removed.
16170
16171 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
16172
16173         * image.c (mono_image_close): Tidy up trace messages.
16174
16175         * assembly.c (mono_assembly_close): Ditto.
16176
16177         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
16178         no longer references an already freed assembly. Fixes #78168.
16179
16180 2006-04-21  Dick Porter  <dick@ximian.com>
16181
16182         * threads.c (mono_thread_detach): Fix reference counting when
16183         detaching threads.
16184
16185 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
16186
16187         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
16188         #78155.
16189
16190 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
16191
16192         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
16193         (mono_type_to_stind): Ditto.
16194
16195         * marshal.c: Use the new helper functions to simplify code.
16196
16197         * image.c (mono_image_close): Add some code for help debug assembly unloading
16198         problems.
16199
16200         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
16201         image mempool.
16202
16203         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
16204         assembly was already loaded in another appdomain. Fixes #78083.
16205
16206 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
16207
16208         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
16209         referenced assemblies.
16210         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
16211
16212         * domain.c (mono_domain_free): Add a trace message.
16213
16214         * appdomain.c (add_assemblies_to_domain): Ditto.        
16215
16216         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
16217         field.  
16218
16219 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
16220
16221         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
16222
16223 2006-04-12  Martin Baulig  <martin@ximian.com>
16224
16225         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
16226         `USE_INCLUDED_LIBGC'.   
16227
16228 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
16229
16230         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
16231         the patch contains ../ and a small directory name later. Hopefully fixes
16232         #78035.
16233
16234 2006-04-10  Martin Baulig  <martin@ximian.com>
16235
16236         Clean up the debugger's thread-handling code.
16237
16238         The debugger's thread-handling code has been moved from
16239         ../mini/debug-debugger.c to threads.c.  We now iterate directly
16240         over the `threads' hash, keep track of exiting threads and also
16241         use proper locking.
16242
16243         We can now debug XSP and XSP based applications with the debugger.
16244
16245         * object-internals.h (MonoThread): Added `gpointer end_stack'.
16246
16247         * threads.h
16248         (MonoThreadCallbacks): Removed; this was only used by the debugger.
16249         (mono_install_thread_callbacks): Likewise.      
16250
16251         * threads.c (mono_thread_callbacks): Removed.
16252         (debugger_thread_created, debugger_thread_exited): New static functions.
16253         (start_wrapper): Call debugger_thread_created().
16254         (thread_cleanup): Call debugger_thread_exited().
16255         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
16256         (mono_debugger_init_threads): New public function.
16257         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
16258         iterate directly over the `threads' hash and also use proper locking.
16259
16260         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
16261
16262         * mono-debug-debugger.h
16263         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
16264
16265 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
16266
16267         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
16268         argument type=array. Fixes #78057.
16269
16270 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
16271
16272         * culture-info-table.h : regenerated. Fixed bug #69652.
16273
16274 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
16275
16276         * loader.c metadata.c: Reapply a variant r59116.
16277         
16278         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
16279
16280         * class.c (mono_class_setup_interface_offsets): New internal function.
16281
16282         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
16283         interfaces too. Fixes #77398.
16284
16285         * reflection.c (encode_cattr_value): Add support for 
16286         parameter type=object, argument type=array.
16287         (load_cattr_value): Ditto. Fixes #77916.
16288
16289         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
16290         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
16291
16292         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
16293         a byval char array and CharSet is Ansi.
16294
16295         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
16296
16297 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
16298
16299         * metadata.c: Add some locking comments.
16300         
16301         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
16302         mempool.
16303         (mono_metadata_free_method_signature): Don't free the signature itself.
16304
16305         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
16306
16307         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
16308         reference the same MonoImage.
16309         (mono_assembly_load_from_full): Add an assert.
16310
16311 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
16312
16313         * image.c (mono_image_close): Don't put the image we are about to free into the
16314         loaded_images_guid_hash.
16315
16316         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
16317         to reduce code duplication.
16318
16319         * marshal.c: Register the native functions called by this module as icalls, to
16320         somewhat centralize the creation of MonoMethodSignature's.
16321
16322         * loader.c (mono_method_signature): Add a cache for method signatures.
16323
16324         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
16325         the parameter attributes of a method.
16326         (mono_metadata_parse_method_signature_full): Refactored the computation of
16327         parameter attributes into a separate function. Also avoid one allocation in
16328         most cases.
16329
16330         * assembly.c (mono_assembly_close): Ditto.
16331
16332         * image.c (mono_image_close): Log trace messages with INFO level.
16333
16334         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
16335
16336         * image.c reflection.c: Correct reference counting of image modules.
16337         
16338         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
16339         of this function from the image mempool.
16340         
16341         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
16342         to allow more cached types to be used.
16343
16344         * mono-debug.c (mono_debug_add_method): Appled patch from
16345         David S. Miller  <davem@sunset.davemloft.net>: Access 
16346         minfo->lexical_blocks[] entry elements using read32().
16347
16348 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
16349
16350         * loader.c (mono_free_method): No longer free the method header for non-dynamic
16351         methods as it is allocated from the mempool.
16352
16353         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
16354         image mempool.
16355
16356         * metadata-internals.h: Add comments describing the reference counting scheme
16357         used for MonoImage and MonoAssembly.
16358
16359         * image.c assembly.c reflection.c: Rework reference counting of images and 
16360         assemblies so they are freed when the runtime is shut down. Free some 
16361         additional memory structures when an image is unloaded.
16362         
16363 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
16364
16365         * class.c loader.c reflection.c: Allocate more data structures in
16366         the image mempool.
16367
16368 2006-03-31  Miguel de Icaza  <miguel@novell.com>
16369
16370         * icall.c
16371         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
16372         build on pre glib 2.4 systems.
16373
16374 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
16375
16376         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
16377
16378         * icall.c: Fix some warnings.
16379
16380 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
16381
16382         * culture-info-table.h : regenerated.
16383
16384 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
16385
16386         * threads.c, object-internals.h, verify.c: changed the culture caching
16387         code to use a normal MonoArray for storage so the GC can keep track of
16388         them easily. Fixed bits of the cache logic, too and simplified the
16389         code.
16390
16391 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
16392
16393         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
16394         thread for non-Boehm GCs.
16395
16396 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16397
16398         * domain.c, object.c, domain-internals.h: reduce the amount of memory
16399         needed to keep track of the data for static fields.
16400
16401 2006-03-29  Raja R Harinath  <rharinath@novell.com>
16402
16403         Fix #75172
16404         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
16405         for interface classes.  Use 'num_methods' instead.
16406         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
16407         before using '->vtable_size' field.
16408
16409 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16410
16411         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
16412         doesn't contain managed pointers, so use a normal hashtable.
16413
16414 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16415
16416         * reflection.c, class-internals.h, domain.c: fixed handling of types
16417         used as values for objects in custom attributes (bug #77915):
16418
16419 2006-03-24  Martin Baulig  <martin@ximian.com>
16420
16421         * class.c (mono_class_setup_fields): Added support for generic
16422         instances; fixes #77580.
16423
16424 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16425
16426         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
16427
16428 2006-03-24  Dick Porter  <dick@ximian.com>
16429
16430         * file-io.c (get_file_attributes): More stat macro breakage.
16431         Fixes bug 77759.
16432
16433 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
16434
16435         * profiler.c: added the file=filename option in the default profiler
16436         to output the profile data to filename.
16437
16438 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16439
16440         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
16441         bug #77877.
16442
16443 2006-03-22  Martin Baulig  <martin@ximian.com>
16444
16445         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
16446         allocated `MonoClassField *' in `fb->handle'.
16447
16448 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16449
16450         * class.c, image.c, metadata-internals.h: implemented new mechanism to
16451         allocate interface ID to save memory and allow better ID reuse on
16452         appdomain unload. setup_generic_vtable () removal from Martin.
16453
16454 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16455
16456         * object.h, appdomain.c, domain.c, exception.c, icall.c,
16457         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
16458         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
16459         write barriers for reference stores with managed objects accessed with
16460         C structures in the runtime and in embedding programs.
16461
16462 2006-03-20  Raja R Harinath  <rharinath@novell.com>
16463
16464         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
16465         'interface_id' and 'max_interface_id' fields of MonoClasses
16466         representing open generic types.
16467
16468 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
16469
16470         * object.h, object.c, icall.c: added functions to deal with
16471         storing valuetypes that contain references in managed objects.
16472         * reflection.c, string-icalls.c, threads.c, marshal.c: small
16473         fixes and comments around uses of mono_array_addr ().
16474
16475 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
16476
16477         * object.h, icall.c, monitor.c: object.GetHashCode ()
16478         implementation that supports the moving garbage collector.
16479
16480 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16481
16482         * icall.c, threads-types.h, threads.c: implemented finalizer for
16483         LocalDataStoreSlot.
16484
16485 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
16486
16487         * metadata.c (mono_type_size): Add a fixme.
16488         (mono_type_stack_size): Ditto.
16489
16490         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
16491         'type_forwarders' field.
16492
16493         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
16494         attribute from net 2.0.
16495
16496         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
16497         from class.c.
16498
16499         * class.c (mono_class_setup_fields): Fix a warning.
16500         
16501         * class.c (mono_class_from_name): Add support for assemblyref entries
16502         in the EXPORTEDTYPE table.
16503
16504         * reflection.c: Add support for handling type forwarders under net 2.0.
16505
16506         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
16507         
16508 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
16509
16510         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
16511         overwriting entries in ModuleBuild->types, also clean up the code
16512         a little. Fixes #77774.
16513
16514 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16515
16516         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
16517         load friend assembly info when present.
16518
16519 2006-03-14  Raja R Harinath  <rharinath@novell.com>
16520
16521         Fix crasher on gtest-158.cs.
16522         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
16523         the return value if the MonoClass we want is yet in an
16524         inconsistent state.
16525         * class.c (mono_class_create_from_typedef): Add an comment
16526         explaining an order dependency between mono_class_setup_parent and
16527         mono_class_setup_mono_type.
16528
16529 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16530
16531         * class.c: documentation updates and events bug fix.
16532
16533 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16534
16535         * class.c: some cleanup, locking fixes.
16536
16537 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16538
16539         * class.c: fix the generics code to setup nested
16540         type info to the instantiated type (bug #77770).
16541
16542 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16543
16544         * marshal.c: fixed a few type correctness issues.
16545
16546 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16547
16548         * loader.c: the Set/Get/Addrtess array methods should be public.
16549
16550 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
16551
16552         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
16553         
16554         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
16555         info->wrapper.
16556
16557 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
16558
16559         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
16560
16561         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
16562
16563         * mempool.c (mono_mempool_alloc): Speed this up a bit.
16564         (mono_mempool_alloc0): Ditto.
16565
16566 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16567
16568         * socket-io.c:
16569         (create_object_from_sockaddr): it was allocating 4 extra bytes
16570         for the AF_UNIX data. Fixes bug #77747.
16571
16572 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
16573
16574         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
16575
16576 2006-03-09  Dick Porter  <dick@ximian.com>
16577
16578         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
16579         Fixes bug 76966 again.
16580
16581 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
16582
16583         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
16584         names from r57532
16585         * appdomain.c: Bumped corlib version to 48 (due to r57532)
16586
16587 2006-03-07  Martin Baulig  <martin@ximian.com>
16588
16589         * object.c
16590         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
16591
16592 2006-03-07  Martin Baulig  <martin@ximian.com>
16593
16594         * class.c
16595         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
16596         regression introduced in r56970; see gtest-252.cs.
16597
16598         * loader.c (mono_get_method_constrained): Correctly handle generic
16599         methods; see gtest-253.cs.
16600
16601 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
16602
16603         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
16604
16605 2006-03-04  Martin Baulig  <martin@ximian.com>
16606
16607         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
16608         compute the parent type at runtime, just like we're already doing
16609         it for interfaces.
16610
16611         * reflection.c
16612         (mono_reflection_bind_generic_parameters): Don't compute the
16613         parent type anymore.
16614
16615         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
16616
16617 2006-03-04  Martin Baulig  <martin@ximian.com>
16618
16619         * mono-debug-debugger.h
16620         (mono_debugger_create_notification_function): Allocate memory at
16621         runtime and return a pointer to it.
16622
16623 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
16624
16625         * assembly.c: Fix windows build.
16626         
16627         * assembly.c: Fix build.
16628
16629         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
16630
16631         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
16632         
16633 2006-03-03  Dick Porter  <dick@ximian.com>
16634
16635         * process.c
16636         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16637         Check parameters before dereferencing them.  Fixes Aaron's part of
16638         bug 77393.
16639
16640 2006-03-03  Raja R Harinath  <rharinath@novell.com>
16641
16642         Fix performance regression.
16643         * loader.c (find_method_in_class): Add 'from_class' argument.
16644         Rename 'klass' argument to 'in_class'.  The signature is compared
16645         against the method in 'in_class', and the corresponding method is
16646         returned from 'from_class'.
16647         (find_method): Walk both 'in_class' and 'from_class' in parallel.
16648         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
16649         type definition and generic instantiation in parallel.
16650         (mono_get_method_constrained): Update to changes.
16651
16652 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16653
16654         * threads.c: make sure the domain is correct, too when doing
16655         mono_thread_attach ().
16656
16657 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
16658
16659         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
16660         windows. Fixes #77683.
16661
16662 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16663
16664         * object.h, *: introduced specific way to set elements of an array
16665         of references to be used as write barrier. Still need to audit the
16666         uses of mono_array_addr.
16667
16668 2006-03-01  Miguel de Icaza  <miguel@novell.com>
16669
16670         * object-internals.h: New field to cache the assmebly name, patch
16671         from Tambet Ingo (tambet@ximian.com)
16672
16673 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16674
16675         * decimal.h, class-internals.h, metadata-internals.h,
16676         file-io.h: mark a few function declarations as internal, to
16677         reduce the number of PLT entries.
16678
16679 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16680
16681         * file-io.c: fix typo in warning message.
16682
16683 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
16684
16685         * loader.c: on unix, lookup the "*A" version of a function
16686         if charset is auto as a second option before failing.
16687
16688 2006-02-28  Raja R Harinath  <rharinath@novell.com>
16689
16690         * class.h (mono_class_inflate_generic_method): Revert to two
16691         argument version.
16692         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
16693         (mono_class_inflate_generic_method_full): Add.
16694         * class.c (mono_class_inflate_generic_method_full): Rename from
16695         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
16696         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
16697         * loader.c, reflection.c: Update to changes.
16698
16699 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16700
16701         * icall.c: const fixes and small improvements.
16702
16703 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16704
16705         * threadpool.c: for asynchronous connect(), enable the same workaround
16706         for BSD 6 as for the Mac. Fixes bug #77637.
16707
16708 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
16709
16710         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
16711         formatted classes. Fixes #77524.
16712
16713 2006-02-24  Raja R Harinath  <rharinath@novell.com>
16714
16715         * class.c (inflate_generic_type): Add a couple more
16716         micro-optimizations.
16717         (inflate_generic_context): Don't use the 'gmethod' from
16718         'inflate_with'.
16719         (mono_class_inflate_generic_method): If the method has generic
16720         parameters, but the passed-in context doesn't have a 'gmethod',
16721         create one.  Use the possibly simplified generic instantiation
16722         from the declaring class instead of the one passed in.
16723
16724 2006-02-24  Raja R Harinath  <harinath@gmail.com>
16725
16726         Make generic method signature and method header handling lazy.
16727         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
16728         (inflate_generic_header): Likewise.
16729         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
16730         parameter to avoid inflating types.
16731         (mono_get_inflated_method): Empty out.
16732         * class.h (mono_class_inflate_generic_method): Update to changes.
16733         * loader.c (mono_get_method_from_token): Don't parse signature for
16734         generic methods, nor methods of generic classes.
16735         (mono_method_signature): Rename from 'mono_method_signature'.
16736         Inflate signature on demand.
16737         (mono_method_get_header): Inflate method header on demand.
16738         * reflection.c: Update to changes.
16739
16740 2006-02-23  Raja R Harinath  <rharinath@novell.com>
16741
16742         * metadata.c (mono_metadata_inflate_generic_inst): If the
16743         instantiation is closed, don't bother expanding it in the new
16744         context.
16745         * class.c (inflate_generic_class): If the generic instantiation
16746         doesn't change after inflation, return the argument itself.
16747         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
16748         Add bounds checks.
16749         (inflate_generic_context): If neither the generic class nor the
16750         generic method instantiations change, return the original context.
16751         * reflection.c (mono_method_get_object): Do
16752         'mono_get_inflated_method' before accessing the ->klass field.
16753         (inflate_mono_method): Don't create a MonoGenericMethod unless
16754         necessary.
16755         (inflate_method): Don't pass a constructed type as the declaring
16756         type of a methodbuilder.
16757
16758 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
16759
16760         * object.c: fix memory overwrite.
16761
16762 2006-02-22  Dick Porter  <dick@ximian.com>
16763
16764         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
16765         it doesn't work any more.
16766         (mono_threads_request_thread_dump): Fix unused variable warnings.
16767
16768 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16769
16770         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
16771         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
16772         the public header file.
16773
16774 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
16775
16776         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
16777
16778 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16779
16780         * class-internals.h, object.c: reduce the size of MonoVTable
16781         and store the interface_offsets array at negative offsets.
16782
16783 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16784
16785         * metadata.c: tweak table descriptors data structures to reduce
16786         size and runtime relocations.
16787
16788 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16789
16790         * marshal.c: fix some types and opcodes to be type-safe
16791         in marshaling wrappers.
16792
16793 2006-02-21  Ankit Jain  <jankit@novell.com>
16794
16795         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
16796
16797 2006-02-21  Raja R Harinath  <rharinath@novell.com>
16798
16799         * metadata.c (get_constraints): Relax debugging checks for monodis.
16800
16801 2006-02-21  Ankit Jain  <jankit@novell.com>
16802
16803         * metadata.c (mono_metadata_load_generic_params): Move the code
16804         checking for ambiguous generic params from here to mono/dis/get.c
16805         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
16806
16807 2006-02-21  Raja R Harinath  <harinath@gmail.com>
16808
16809         Fix assertion triggered when compiling nemerle.
16810         * class.c (mono_get_shared_generic_inst): Rename from
16811         get_shared_inst and make non-static.
16812         * loader.c (mono_get_shared_generic_method): New.  Used to create
16813         the MonoGenericContext-equivalent of a MonoGenericContainer.
16814         (mono_get_method_from_token): Initialize the 'context' field of
16815         the created MonoGenericContainer.
16816         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
16817         * metadata.c (get_constraints): Add sanity check.
16818         * class-internals.h: Add new internal methods.
16819
16820         * reflection.c (verify_safe_for_managed_space): New sanity check.
16821         Currently checks that owner-less generic parameters aren't allowed
16822         in managed space.
16823         (mono_type_get_object): Use it.
16824         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
16825         that are now in mono_type_get_object.
16826         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
16827
16828 2006-02-19  Raja R Harinath  <harinath@gmail.com>
16829
16830         * metadata.c (mono_type_create_from_typespec): Rename from
16831         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
16832         argument and caching of types in the generic container.
16833         (unwrap_arrays, find_generic_param): Remove.
16834         * metadata-internals.h: Update.
16835         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
16836
16837 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
16838
16839         * class.c (mono_class_get_exception_for_failure): Fix a warning.
16840
16841         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
16842         return values. Fixes #77581.
16843
16844         * class.c (mono_fnptr_class_get): Switch name and name_space.
16845
16846         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
16847         classes and add support for [In, Out] attributes.
16848         (mono_marshal_free_asany): Ditto. Fixes #77524.
16849
16850 2006-02-18  Raja R Harinath  <harinath@gmail.com>
16851
16852         * class.c (mono_class_from_generic_parameter): Make more robust to
16853         incomplete MonoGenericContainers from monodis.
16854
16855 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16856
16857         * class-internals.h: added some more exception types.
16858         * class.c, metadata.c: added a few checks to handle missing
16859         types.
16860
16861 2006-02-17  Raja R Harinath  <rharinath@novell.com>
16862
16863         Use owner-less generic-params some more.
16864         * class.c (my_mono_class_from_generic_parameter): Remove.
16865         (mono_class_from_generic_parameter): Handle null image,
16866         param->name and param->owner.
16867         (mono_class_from_mono_type): Update.
16868         (mono_class_create_from_typespec): Remove 'container' parameter.
16869         If that parameter is non-null, the result is always inflated by
16870         'mono_class_get_full' anyway.
16871         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
16872         parameter.
16873         (mono_class_get_full): Update.
16874
16875         * class.c (inflate_generic_type) [GENERICINST]: If the generic
16876         instance is not open, don't bother inflating.
16877         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
16878         parse metadata for inflated classes.
16879         (_mono_class_get): Change GenericContext* parameter to
16880         GenericContainer*.
16881         (mono_class_create_from_typespec): Likewise.  Simplify, and
16882         implement trivially.  All the cases are handled in
16883         mono_class_from_mono_type.  Don't inflate returned class.
16884         (mono_class_get_full): Delegate GENERICINST optimization to
16885         inflate_generic_type.
16886         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
16887
16888 2006-02-16  Dick Porter  <dick@ximian.com>
16889
16890         * socket-io.c (create_object_from_sockaddr): Fix typo.
16891         (create_sockaddr_from_object): Check array lengths before
16892         potentially accessing items off the end.
16893         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
16894         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
16895         (ves_icall_System_Net_Sockets_Socket_Send_internal)
16896         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
16897         length checks to avoid wraparound overflows.
16898         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
16899         contents of the array of sockets
16900         (hostent_to_IPHostEntry2)
16901         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
16902         Check return value of inet_ntop ().
16903         (addrinfo_to_IPHostEntry): Fix typo
16904
16905 2006-02-16  Raja R Harinath  <rharinath@novell.com>
16906
16907         Type metadata parsing doesn't use generic-instantiation information.
16908         * metadata.c (mono_metadata_parse_array_full): Change
16909         MonoGenericContext* parameter to MonoGenericContainer*.
16910         (mono_metadata_parse_type_full): Likewise.
16911         (mono_type_create_from_typespec_full): Likewise.
16912         (mono_metadata_parse_mh_full): Likewise.
16913         (mono_metadata_parse_generic_inst): Likewise.
16914         (do_mono_metadata_parse_generic_class): Likewise.
16915         (do_mono_metadata_parse_type): Likewise.
16916         * metadata-internals.h: Update to changes.
16917         * class.c (mono_class_find_enum_basetype): Likewise.
16918         (mono_class_setup_fields): Likewise.
16919         (mono_class_create_from_typespec): Likewise.
16920         * loader.c (method_from_methodspec): Likewise.
16921         (mono_get_method_from_token): Likewise.
16922         (mono_method_get_header): Likewise.
16923
16924 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16925
16926         * marshal.c: handle additional GENERICINST case (patch from
16927         Thong Nguyen <tum@veridicus.com>).
16928         Fix a few cases where LDIND_I/STIND_I was used for references.
16929
16930 2006-02-16  Raja R Harinath  <rharinath@novell.com>
16931
16932         * reflection.c (mono_reflection_get_token): Remove unused variable.
16933
16934 2006-02-16  Martin Baulig  <martin@ximian.com>
16935
16936         * reflection.c (mono_reflection_get_token): Add support for fields
16937         in instantiated generic types.
16938
16939         * icall.c
16940         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16941
16942 2006-02-15  Martin Baulig  <martin@ximian.com>
16943
16944         * icall.c
16945         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16946         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16947         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16948         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16949
16950 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16951
16952         * class.c, metadata.c, metadata.h, object.c, icall.c,
16953         marshal.c: changed mono_type_get_underlying_type () to do
16954         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16955         Fixed handling of instantiated generic valuetypes (bug #75479).
16956
16957 2006-02-15  Raja R Harinath  <rharinath@novell.com>
16958
16959         * metadata.c (mono_metadata_decode_signed_value): Simplify.
16960         Delegate to mono_metadata_decode_value, and work on the returned value.
16961
16962         * icall.c (ves_icall_MonoType_GetGenericArguments):
16963         Add consistency check here too.
16964         
16965 2006-02-15  Ankit Jain  <jankit@novell.com>
16966
16967         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16968         char/short etc.
16969
16970 2006-02-15  Ankit Jain  <jankit@novell.com>
16971
16972         * metadata.c (mono_metadata_decode_signed_value): New function to decode
16973         signed values, used only for representing lower bounds of arrays.
16974         (mono_metadata_parse_array_full): Use new
16975         mono_metadata_decode_signed_value to decode lower bounds.
16976
16977 2006-02-14  Martin Baulig  <martin@ximian.com>
16978
16979         * reflection.c
16980         (mono_reflection_get_token): Support "MonoGenericMethod" and
16981         "MonoGenericCMethod" and allow generic instances / methods.
16982
16983 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
16984
16985         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16986         to obtain the terminal size using an ioctl.
16987
16988         * object.c (mono_nullable_init): Revert this as nullable reference
16989         types are not valid.
16990         (mono_nullable_box): Ditto.
16991
16992 2006-02-09  Dick Porter  <dick@ximian.com>
16993
16994         * threads.c (mono_thread_detach): Drop a reference to the thread
16995         we're detaching.
16996
16997 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
16998
16999         * object.c (mono_nullable_init): Handle nullable reference types.
17000         (mono_nullable_box): Ditto. Fixes #77446.
17001
17002 2006-02-07  Martin Baulig  <martin@ximian.com>
17003
17004         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
17005
17006 2006-02-07  Ankit Jain  <jankit@novell.com>
17007
17008         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
17009         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
17010         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
17011         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
17012         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
17013         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
17014
17015 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
17016
17017         * class.c (mono_class_create_generic): Set type_token as well.
17018
17019         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
17020         compatible with MS.
17021
17022 2006-02-02  Martin Baulig  <martin@ximian.com>
17023
17024         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
17025         has never been used so far.
17026
17027 2006-02-02  Martin Baulig  <martin@ximian.com>
17028
17029         * mono-debug-debugger.h: Changed comment at the top of this file;
17030         the header is not installed, but it's safe to #include it from
17031         within the JIT.
17032
17033         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
17034         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
17035
17036 2006-02-02  Martin Baulig  <martin@ximian.com>
17037
17038         * mono-debug.h
17039         (MonoSymbolTable): Removed the `metadata_info' field.
17040
17041         * mono-debug.c
17042         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
17043
17044         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
17045         (mono_debugger_add_builtin_types): Removed.
17046         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
17047         (mono_debugger_create_notification_function): We now operate on a
17048         pre-allocated area; take a `gpointer' and return `void'.
17049
17050         * mono-debug-debugger.c
17051         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
17052         (mono_debugger_add_builtin_types): Removed.
17053
17054 2006-02-02  Martin Baulig  <martin@ximian.com>
17055
17056         * threads.c (mono_debugger_create_all_threads): New public method.
17057
17058 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
17059
17060         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
17061         breaks on several platforms.
17062
17063 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
17064
17065         * assembly.c: the VS.NET build doesn't supply default values for
17066         MONO_ASSEMBLIES and MONO_CFG_DIR.
17067
17068 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
17069
17070         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
17071         helper function.
17072
17073         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
17074
17075         * loader.c (method_from_memberref): Fix a warning.
17076
17077         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
17078
17079         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
17080         with explicit layout. Fixes #77433.
17081
17082 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
17083
17084         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
17085         max_interface_id is initialized before using it. Fixes #77398.
17086         (ves_icall_Type_GetInterfaces): Ditto.
17087
17088 2006-01-30  Raja R Harinath  <rharinath@novell.com>
17089
17090         * metadata.c (mono_metadata_parse_method_signature_full): Don't
17091         allocate memory for parameter attributes when parsing memberref
17092         signatures.
17093         * loader.c (mono_loader_set_error_method_load): Don't warn.
17094         (method_from_memberref): Ensure MissingMethodException gets thrown
17095         if method is not found.  Make warning more informative.
17096
17097 2006-01-29  Raja R Harinath  <harinath@gmail.com>
17098
17099         Fix #77397
17100         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
17101         return true if is byref.
17102         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17103         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
17104         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17105
17106 2006-01-27  Raja R Harinath  <rharinath@novell.com>
17107
17108         Fix tests/find-method.2.il
17109         * loader.c (find_method, find_method_in_class): Remove is_inflated
17110         argument.  Revert 2006-01-18 change.
17111         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
17112         is generic, search for method in its generic definition.
17113         * class.c (mono_class_setup_vtable_general): Print generic
17114         arguments of generic types in debugging printf.
17115
17116 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
17117
17118         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
17119
17120         * threads.c (mono_threads_request_thread_dump): New helper function.
17121
17122 2006-01-25  Raja R Harinath  <rharinath@novell.com>
17123
17124         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
17125
17126 2006-01-25  Ankit Jain  <jankit@novell.com>
17127
17128         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
17129         move definition to ..
17130         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
17131         
17132 2006-01-25  Ankit Jain  <jankit@novell.com>
17133             Raja R Harinath  <rharinath@novell.com>
17134
17135         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
17136         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
17137         as necessary.
17138
17139 2006-01-25  Martin Baulig  <martin@ximian.com>
17140
17141         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
17142         `MonoDebuggerThread' into debug-debugger.c.
17143
17144 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17145
17146         * profiler.c: fix printing of data.
17147
17148 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
17149
17150         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
17151           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
17152
17153 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17154
17155         * object.c: fix deadlock related to string interning.
17156
17157 2006-01-23  Martin Baulig  <martin@ximian.com>
17158
17159         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
17160
17161         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
17162
17163 2006-01-23  Martin Baulig  <martin@ximian.com>
17164
17165         * mono-debug.h: Moved the prototypes of some functions which are
17166         used by the JIT here from mono-debug-debugger.h.
17167
17168 2006-01-21  Martin Baulig  <martin@ximian.com>
17169
17170         * Makefile.am: Don't install mono-debug-debugger.h.
17171
17172 2006-01-21  Martin Baulig  <martin@ximian.com>
17173
17174         * mono-debug-debugger.h: Enforce the private status of this header
17175         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
17176         Moved some stuff from mono-debugger-jit-wrapper.h here.
17177
17178 2006-01-20  Raja R Harinath  <rharinath@novell.com>
17179
17180         * class.c (mono_class_from_typeref): Add a sanity test to help
17181         catch lack of assembly load/search hooks.
17182
17183 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
17184
17185         * marshal.c (emit_struct_conv): Relax the fields with same offset
17186         check even more. Fixes #77230.
17187
17188 2006-01-18  Martin Baulig  <martin@ximian.com>
17189
17190         * loader.c (find_method_in_class): Added `gboolean is_inflated'
17191         argument; if false, we compare the uninstantiated signatures.
17192         (method_from_memberref): Compare the uninstantiated signatures;
17193         fixes #76417.
17194
17195 2006-01-18  Robert Jordan  <robertj@gmx.net>
17196
17197         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
17198         Clear the weak link. Fixes bug #77170.
17199
17200         * gc.c (mono_gchandle_free):
17201         Reflect *-gc.c changes (tiny optimization).
17202
17203 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
17204
17205         * metadata.c (mono_metadata_signature_dup): Applied patch from
17206         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
17207         Fixes #77288.
17208
17209 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
17210
17211         * marshal.c (emit_struct_conv): Allow fields with the same offset when
17212         marshalling from native to managed code. Fixes #77230.
17213
17214 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17215
17216         * threadpool.c: fix problem (Mac only) when more than one asynchronous
17217         connect. Fixes bug #77020.
17218
17219 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
17220
17221         * class.c: fixed id assignement for nested interfaces (bug #77275).
17222         Added also better info for --print-vtable debugging.
17223
17224 2006-01-12  Martin Baulig  <martin@ximian.com>
17225
17226         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
17227         interfaces on-the-fly; fixes #76625.
17228
17229         * class-internals.h
17230         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
17231         don't need that anymore.
17232
17233 2006-01-12  Miguel de Icaza  <miguel@novell.com>
17234
17235         * socket-io.c
17236         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
17237         To avoid initing the nested_classes when not needed I turned the
17238         PeerCredData as a toplevel internal class, as it has to be shared
17239         anyways. 
17240
17241         Fixes the CASA issue.
17242
17243 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
17244
17245         * domain.c: Accessors for MonoJitInfo
17246
17247         * profiler-private.h: Add jitinfo to the end jit hook
17248
17249         * profiler.[ch]: Define new hooks, called after jitting which give
17250         the MonoJitInfo that was compiled
17251
17252 2006-01-10  Martin Baulig  <martin@ximian.com>
17253
17254         * class.c (mono_class_setup_events): Add support for generic
17255         classes; fixes #76440.
17256
17257 2006-01-06  Raja R Harinath  <rharinath@novell.com>
17258
17259         Fix #77160.
17260         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
17261         on passed-in method.
17262
17263 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
17264
17265         * object.c (mono_runtime_invoke_array): Add Nullable support.
17266
17267         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
17268
17269 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
17270
17271         * file-io.c: Don't consider sockets as directory and avoid an endless
17272         loop. Fix bug #76966.
17273
17274 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
17275
17276         * object.c (mono_nullable_init): New helper function.
17277         (mono_nullable_box): Ditto.
17278
17279         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
17280
17281         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
17282
17283         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
17284         
17285 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
17286
17287         * class.c (mono_class_is_assignable_from): Make T assignable to 
17288         Nullable<T>.
17289
17290 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
17291
17292         * appdomain.c: Bump corlib version to 46.
17293         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
17294         serialization purpose) and changed ves_icall_System_Reflection_
17295         Assembly_get_code_base signature to accept a boolean (to escape, or 
17296         not, the assembly code base).
17297
17298 2005-12-23  Dick Porter  <dick@ximian.com>
17299
17300         * icall.c: 
17301         * threads-types.h: 
17302         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
17303         CreateEvent icall now returns "created" boolean parameter.
17304
17305 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
17306
17307         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
17308         #76967.
17309
17310         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
17311         when attr_klass is an interface. Fixes #77045.
17312
17313 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
17314
17315         * marshal.c (emit_struct_conv): Fix previous patch.
17316         
17317         * marshal.c (emit_struct_conv): Add a check for fields with the same
17318         offset.
17319
17320 2005-12-20  Raja R Harinath  <rharinath@novell.com>
17321
17322         Fix regression in Mono.C5.
17323         * class.c (mono_class_create_generic): If 'klass' is an interface
17324         set up the interface offsets.
17325         (mono_class_is_assignable_from): Don't throw away generic arguments.
17326
17327 2005-12-19  Raja R Harinath  <rharinath@novell.com>
17328
17329         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
17330         type parameters.
17331
17332 2005-12-15  Raja R Harinath  <rharinath@novell.com>
17333
17334         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
17335         dead store.
17336         (do_mono_metadata_parse_generic_class): Don't pass the current
17337         generic context when parsing the type being instantiated: it
17338         cannot use it, anyway.
17339
17340         * loader.c (method_from_memberref): Don't inflate a signature if
17341         it doesn't contain any type parameters.
17342
17343 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
17344
17345         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
17346
17347 2005-12-14  Martin Baulig  <martin@ximian.com>
17348
17349         * class.c
17350         (mono_type_get_name_recurse): Don't return null for type
17351         parameters and open generic classes.
17352         (mono_class_setup_methods): Don't exclude generic instances.
17353         (mono_get_unique_iid): Use different IDs for different
17354         instantiations of the same generic type.
17355         (mono_class_setup_vtable): Only use setup_generic_vtable() for
17356         open generic instances; create a normal vtable for closed generic
17357         instances.
17358         (mono_class_setup_vtable_general): We're now also called for
17359         closed generic instances.
17360
17361         * reflection.c
17362         (mono_reflection_bind_generic_parameters): Correctly use
17363         mono_metadata_lookup_generic_inst() everywhere.
17364
17365 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
17366
17367         * object.c (mono_class_create_runtime_vtable): Call 
17368         mono_class_setup_vtable ().
17369
17370         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
17371         function.
17372         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
17373         #76959.
17374
17375         * loader.c (mono_loader_set_error_type_load): Print the type load
17376         warnings to the console so they are more visible to the user.
17377         (mono_loader_set_error_method_load): Ditto.
17378
17379         * reflection.c (ensure_runtime_vtable): Revert the last change as it
17380         is still broken.
17381         
17382         * reflection.c (ensure_runtime_vtable): Fix build.
17383
17384         * reflection.c (ensure_runtime_vtable): Disable an optimization which
17385         doesn't work in all cases.
17386
17387 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
17388
17389         * object.c (mono_array_new_full): Treat a single dimensional array
17390         with 0 lower bounds as an szarray. Fixes #76973.
17391
17392         * reflection.c (custom_attr_visible): Really fix this.
17393
17394 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
17395
17396         * reflection.c (custom_attr_visible): Allow nested public attributes
17397         as well.
17398
17399         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
17400         interface check.
17401
17402 2005-12-12  Raja R Harinath  <harinath@gmail.com>
17403
17404         * class.c (set_generic_param_owner): Delete.
17405         (mono_class_create_from_typedef): Don't set ->owner field of
17406         generic parameters to "param containers" of enclosing classes.
17407         * reflection.c (mono_reflection_initialize_generic_parameter):
17408         Likewise.
17409
17410 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
17411
17412         * reflection.c (custom_attr_visible): Fix build.
17413
17414 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
17415
17416         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
17417         private attributes.
17418         
17419         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
17420         handling of null parameter defaults.
17421
17422 2005-12-09  Raja R Harinath  <rharinath@novell.com>
17423
17424         * class.c (mono_class_from_generic_parameter): Don't set
17425         klass->generic_container.
17426         (my_mono_class_from_generic_parameter): Likewise.
17427
17428 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
17429
17430         * reflection.c (load_public_key): Fix a warning.
17431         (method_encode_code): Fix unaligned accesses.
17432
17433 2005-12-07  Martin Baulig  <martin@ximian.com>
17434
17435         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
17436
17437         * reflection.c
17438         (write_generic_param_entry): Encode our custom attrs.
17439
17440         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
17441
17442 2005-12-07  Martin Baulig  <martin@ximian.com>
17443
17444         * reflection.c (encode_new_constraint): Removed; we don't use the
17445         `NewConstraintAttribute' anymore.
17446
17447 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
17448
17449         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
17450         not fire a TypeResolve event when Assembly.GetType () is called.
17451
17452 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
17453
17454         Beginning of support for nullable types in the runtime. Parts of
17455         this patch are from Martin.
17456
17457         * appdomain.c (MONO_CORLIB_VERSION): Bump
17458
17459         * domain.c (mono_init_internal): get the nullable type
17460
17461         * class.c (mono_class_is_nullable): New method
17462         (mono_class_get_nullable_param): New mehod
17463         (mono_class_create_generic): In types T? set cast_class to T
17464
17465         * class-internals.h (MonoDefaults): new nullable default class
17466         (mono_class_get_nullable_param, mono_class_get_nullable_param):
17467         new methods.
17468
17469 2005-12-05  Raja R Harinath  <rharinath@novell.com>
17470
17471         * metadata.c (select_container): New.  Refactor code to select the
17472         appropriate GenericContainer given the type of generic parameter
17473         we are looking for.
17474         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
17475         not a MonoGenericContext.  Use select_container.  Update parameters.
17476         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
17477         and MONO_TYPE_MVAR.
17478         (unwrap_arrays): Remove duplicate tests.
17479         (find_generic_param): Rename from 'has_same_context'.  Now walks a
17480         generic instantiated class to find any arguments that are generic
17481         parameters.
17482         (mono_type_create_from_typespec_full): Use find_generic_param to
17483         avoid evicting some generic instantiations from the typespec
17484         cache.
17485
17486 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
17487
17488         * reflection.c: fixed writing of doubles on ARM FPA.
17489
17490 2005-12-02  Robert Jordan  <robertj@gmx.net>
17491
17492         * icall.c: Fixed EventInfo.ReflectedType (#76829).
17493
17494 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17495
17496         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
17497         least on SUSE 10 they are not the same (on debian, they are just the
17498         same thing).
17499
17500 2005-12-01  Raja R Harinath  <rharinath@novell.com>
17501
17502         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
17503         DeclaringType for VARs and MVARs.
17504         * class.c (set_generic_param_owner): Fix initialization of owner
17505         fields.
17506
17507 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
17508
17509         * icall.c: fixed Enum.ToObject() to correctly convert the values.
17510
17511 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17512
17513         * threadpool.c: workaround for a bug that shows up on the Mac:
17514         select()+connect() on a blocking socket is not like it should
17515         be, so we proceed to connect() in that case, wasting the I/O
17516         threadpool thread until connect succeedes. Fixes bug #75436.
17517
17518 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17519
17520         * threadpool.c: fix typo when setting file descriptor states.
17521
17522 2005-11-28  Raja R Harinath  <rharinath@novell.com>
17523
17524         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
17525         * metadata.c (mono_metadata_parse_method_signature_full): Don't
17526         create a temporary signature container.
17527         (mono_metadata_parse_generic_param): Update to changes.
17528         (mono_type_create_from_typespec_full): Update to changes.
17529         * loader.c (method_from_memberref): Don't use a
17530         MonoGenericContainer while parsing a memberref signature.
17531         (method_from_methodspec): Remove dead-store of the 'container'
17532         variable.  It's overwritten before use.
17533
17534         * metadata.c (mono_type_create_from_typespec_full): Make debugging
17535         checks tighter.
17536         (mono_metadata_parse_generic_param): Likewise.
17537         * loader.c (find_method_in_class): Does not need a
17538         MonoGenericContainer.  Use 'mono_method_signature' rather than
17539         'mono_method_signature_full'.
17540         (find_method, mono_get_method_constrained, method_from_memberref):
17541         Update to changes.
17542
17543         * metadata.c (mono_type_create_from_typespec_full): Ensure that
17544         owner-less generic-parameters are never evicted from the typespec
17545         cache.
17546
17547         * loader.c (method_from_memberref): Don't use the current context
17548         when parsing signatures.
17549         (method_from_methodspec, mono_get_method_from_token): Update to changes.
17550
17551         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
17552         side-effects in g_assert.
17553         * loader.c (mono_get_method_from_token): Resolve klass earlier so
17554         that we don't potentially lose information.
17555
17556 2005-11-26  Dick Porter  <dick@ximian.com>
17557
17558         * icall.c:
17559         * threads.c: icalls to implement basic (ie, not named)
17560         System.Threading.Semaphore.
17561
17562 2005-11-24  Dick Porter  <dick@ximian.com>
17563
17564         * process.c
17565         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
17566         Use GetProcessId() if it's available.
17567
17568 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
17569
17570         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
17571
17572 2005-11-23  Raja R Harinath  <rharinath@novell.com>
17573             Ankit Jain  <jankit@novell.com>
17574
17575         * loader.c (mono_get_method_from_token): Initialize 'method' field
17576         of all generic parameters before parsing the signature.  Remove
17577         code that "fixed"-up MVAR references.
17578
17579 2005-11-23  Ankit Jain  <jankit@novell.com>
17580
17581         * metadata.c (mono_metadata_has_generic_params):
17582         (mono_metadata_load_generic_param_constraints):
17583         (mono_metadata_load_generic_params): Move duplicate code ...
17584         (mono_metadata_get_generic_param_row): ... here. Returns the
17585         first row-id in GenericParam table for a given owner (token).
17586         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
17587         prototype.
17588
17589 2005-11-23  Raja R Harinath  <rharinath@novell.com>
17590             Ankit Jain  <jankit@novell.com>
17591
17592         * metadata.c (mono_metadata_class_equal): Pass signature_only when
17593         comparing VARs too.
17594         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
17595         type->data.generic_param only if the type is an MVAR.
17596         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
17597         leak owner-less VARs and MVARs into managed space.
17598
17599 2005-11-21  Martin Baulig  <martin@ximian.com>
17600
17601         * class-internals.h
17602         (MonoMethod): Moved the `generic_container' here from
17603         `MonoMethodNormal' since we now also need it for
17604         `MonoMethodPInvoke';
17605         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
17606         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
17607         an union containing both `MonoMethodNormal' and
17608         `MonoMethodPInvoke'.
17609
17610         * loader.c
17611         (mono_get_method_from_token): Allow implementing generic methods
17612         as interncalls.
17613
17614         * threads.c
17615         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
17616         icall.
17617
17618 2005-11-17  Dick Porter  <dick@ximian.com>
17619
17620         * icall.c: 
17621         * process.h: 
17622         * process.c: Split the Process Start_internal icall into
17623         ShellExecuteEx_internal and CreateProcess_internal, which are
17624         called depending on whether UseShellExecute is true.  Fixes bug
17625         76670.
17626
17627         * appdomain.c (MONO_CORLIB_VERSION): Incremented
17628
17629 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
17630
17631         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
17632         'msize' parameters, use the information in 'mspec' instead.
17633         (emit_object_to_ptr_conv): Ditto.
17634
17635         * marshal.c (emit_struct_conv): Handle explicit layout structs with
17636         fields out of order. Fixes #76733.
17637
17638 2005-11-17  Ankit Jain  <jankit@novell.com>
17639
17640         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
17641
17642 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
17643
17644         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
17645           bug #76575.
17646
17647 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
17648
17649         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
17650         for types with non-auto layout. Fixes #76717.
17651
17652 2005-11-16  Ankit Jain  <jankit@novell.com>
17653
17654         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
17655         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
17656         if generic_context is null.
17657           (mono_metadata_generic_param_equal): param->owner can be null.
17658           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
17659         null.
17660
17661 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
17662
17663         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
17664         the correct value.
17665
17666 2005-11-15  Martin Baulig  <martin@ximian.com>
17667
17668         * object.c (set_value): Use mono_class_from_mono_type() instead of
17669         the hack for generic instances; fixes #76136.
17670
17671 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
17672
17673         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
17674         fields.
17675
17676         * image.c (load_metadata_ptrs): Initialize the new fields.
17677
17678         * reflection.c (create_dynamic_mono_image): Ditto.
17679
17680         * reflection.c (build_compressed_metadata): Use the new fields.
17681
17682         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
17683         icall.
17684
17685         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
17686         icall.
17687         
17688 2005-11-15  Ankit Jain  <jankit@novell.com>
17689             Raja R Harinath  <harinath@gmail.com>
17690
17691         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
17692         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
17693         new per-generic_container cache if the cached MonoType's context matches
17694         the current context.
17695           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
17696         to the expected context.
17697           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
17698
17699 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17700
17701         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
17702         we changed the signature of an icall.
17703         * icall.c: Modify to mono_double_ParseImpl return true/false 
17704         depending on the success, instead of throwing the exception. This will
17705         help us in Double.TryParse methods.
17706         
17707 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
17708
17709         * marshal.c (emit_marshal_object): Throw an exception when
17710         marshalling 'object' instead of crashing. Fixes #76696.
17711
17712 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
17713
17714         * class-internals.h: Add prototype for mono_type_get_full_name ().
17715
17716 2005-11-11  Dick Porter  <dick@ximian.com>
17717
17718         * threads.c (mono_thread_manage): Make sure the main thread has
17719         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
17720
17721 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
17722
17723         * loader.c (mono_loader_set_error_type_load): Log a warning to the
17724         console about the missing type.
17725         (mono_loader_set_error_method_load): Ditto.
17726
17727 2005-11-09  Miguel de Icaza  <miguel@novell.com>
17728
17729         * mono-config.c (mono_get_config_dir): Set the system defaults if
17730         none is specified.
17731
17732         * assembly.c (mono_set_dirs): New API entry point to set the
17733         assembly and the config directory in one call
17734
17735 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
17736
17737         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
17738         the ftnptr was created from a delegate in a domain other than the
17739         current domain. Fixes #75377.
17740
17741         * exception.h exception.c: Add mono_get_exception_not_supported ().
17742
17743 2005-11-08  Martin Baulig  <martin@ximian.com>
17744
17745         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
17746
17747 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
17748
17749         * security-manager.h: Added definitions to deal with strongname key 
17750         pairs bigger (and smaller) than 1024 bits.
17751         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
17752         adjust wrt the public key length being used.
17753
17754 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
17755
17756         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
17757           Windows build (r51396-51397).
17758
17759 2005-11-03  Martin Baulig  <martin@ximian.com>
17760
17761         * class.c (mono_class_setup_vtable_general): Also add generic
17762         methods to the vtable; fixes #76581.
17763
17764 2005-11-01  Miguel de Icaza  <miguel@novell.com>
17765
17766         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
17767         sure that we lookup GetString method from the System.Text.Encoding
17768         class, not the derived class or we get an empty method.
17769
17770         Fixed class #76612.
17771
17772 2005-10-25  Miguel de Icaza  <miguel@novell.com>
17773
17774         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
17775         if it has been previously set (embedders). 
17776
17777         Make mono_set_rootdir available also on Unix.
17778
17779 005-10-24  Robert Jordan  <robertj@gmx.net>
17780
17781         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
17782
17783 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
17784
17785         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
17786         only calls which are made to native code use this flag.
17787
17788         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
17789
17790 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
17791
17792         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17793         Add support for FieldBuilders.
17794
17795 2005-10-29  Martin Baulig  <martin@ximian.com>
17796
17797         * mono-debug.c
17798         (mono_debug_using_mono_debugger): New public method; returns
17799         whether we're running inside the debugger.
17800
17801 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
17802
17803         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
17804         for Method/Constructor/FieldBuilders.
17805
17806 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
17807
17808         * reflection.c (module_add_cattrs): Save custom attributes for global methods
17809         and fields as well.
17810
17811 2005-10-26  Martin Baulig  <martin@ximian.com>
17812
17813         * mono-debug-debugger.c
17814         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
17815
17816 2005-10-24  Raja R Harinath  <harinath@gmail.com>
17817
17818         * icall.c (base64_to_byte_array): Don't pass an out-of-range
17819         integer to isspace.
17820
17821 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
17822
17823         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
17824         when passing valuetypes byref. Fixes #76502.
17825
17826 2005-10-19  Jackson Harper  <jackson@ximian.com>
17827
17828         * profiler.c: Don't put a . in front of types that are not in a
17829         namespace.
17830
17831 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
17832
17833         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
17834
17835 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
17836
17837         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
17838         #76436.
17839         (mono_marshal_get_ldflda_wrapper): Fix a warning.
17840
17841 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17842
17843         * assembly.c metadata-internals.h icall.c: Define an additional
17844         parameter for mono_assembly_name_parse_full, so we can avoid creating
17845         S.R.AssemblyName.Version when no version info wasn't passed.
17846         
17847 2005-10-09  Miguel de Icaza  <miguel@novell.com>
17848
17849         * class.c (mono_type_get_full_name): Reimplement method that was
17850         removed. 
17851
17852         * image.c: Some docs
17853
17854 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
17855
17856         * profiler.c (output_newobj_profile): Fix printing of Total memory
17857         on x86.
17858
17859 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
17860
17861         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
17862
17863 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
17864
17865         * threads.c: remove debug output.
17866
17867 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
17868
17869         * threads.c (mono_thread_manage): Fix crashes if more than 64
17870         threads need to be aborted. Hopefully fixes #75899.
17871
17872         * assembly.c (mono_stringify_assembly_name): New helper function.
17873
17874         * class.c: Use mono_stringify_assembly_name instead of the similar
17875         static function.
17876
17877         * assembly.h assembly.c: Add support for calling a postload search 
17878         hook if an assembly cannot be loaded.
17879
17880         * appdomain.c: Register new search hooks which call the AssemblyResolve
17881         events in AppDomain. Fixes #75231
17882
17883 2005-10-07  Martin Baulig  <martin@ximian.com>
17884
17885         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
17886         methods without debug info.
17887
17888 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
17889
17890         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
17891         wrappers.
17892
17893 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17894
17895         * file-io.c: now that we return symlinks, use lstat and, when the file
17896         is a symbolic link, stat, to get the file attributes. Also avoid the
17897         conversion to/from utf16/external.
17898
17899 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
17900
17901         * class.c (mono_class_layout_fields): Compute klass->has_references
17902         correctly if an embedded valuetype is not yet initialized. Fixes
17903         #76331.
17904
17905 2005-10-04  Martin Baulig  <martin@ximian.com>
17906
17907         * metadata.c
17908         (mono_metadata_load_generic_param_constraints): New public
17909         function; splitted the constraints loading out from
17910         mono_metadata_load_generic_params().
17911
17912         * class.c (mono_class_create_from_typedef): Call
17913         mono_metadata_load_generic_param_constraints() after setting up
17914         the type and creating our parent; fixes #75329.
17915
17916 2005-10-04  Martin Baulig  <martin@ximian.com>
17917
17918         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17919         non-dynamic parent classes.
17920
17921 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
17922
17923         * file-io.c : win32 build fix (ETXTBSY seems not found).
17924
17925 2005-10-04  Martin Baulig  <martin@ximian.com>
17926
17927         * reflection.c
17928         (mono_image_get_methodspec_token): Make the cache actually work;
17929         fixes #75974.
17930
17931 2005-10-04  Martin Baulig  <martin@ximian.com>
17932
17933         * class.c (mono_class_name_from_token): Removed the unneccessary
17934         `MonoGenericContext *' argument.
17935
17936 2005-10-04  Martin Baulig  <martin@ximian.com>
17937
17938         * loader.c
17939         (method_from_methodspec): Make the caching work again; fixes the
17940         performance regression from #76262.
17941
17942 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17943
17944         * file-io.c:
17945         * file-io.h:
17946         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17947         GetFileSystemEntries that performs the same work but without going
17948         into io-layer, locking, etc.
17949
17950 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
17951
17952         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
17953         ThreadState_Stopped as well. Fixes #76047.
17954
17955 2005-09-29  Martin Baulig  <martin@ximian.com>
17956
17957         * class.c
17958         (inflate_generic_context): If the new context has a `gmethod', set
17959         its `container' that that gmethod's `container'.
17960
17961         * metadata.c
17962         (mono_metadata_parse_generic_param): Simplify things;
17963         `generic_container = generic_context->container;' is just fine.
17964
17965         * loader.c (method_from_methodspec): Code cleanups.
17966
17967 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17968
17969         * decimal.c: fix warning (and let gcc generate correct
17970         code on ARM with optimizations).
17971
17972 2005-09-28  Martin Baulig  <martin@ximian.com>
17973
17974         * loader.c
17975         (method_from_memberref): Added `MonoGenericContext *class_context'
17976         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17977         (method_from_methodspec): If we're a memberref, use the enclosing
17978         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
17979
17980 2005-09-28  Martin Baulig  <martin@ximian.com>
17981
17982         * object.c (mono_runtime_invoke_array): Added support for
17983         MONO_TYPE_GENERICINST; fixes #75917.
17984
17985 2005-09-27  Martin Baulig  <martin@ximian.com>
17986
17987         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17988         `k->byval_arg.type' to determine the actual type.
17989
17990         * loader.c (method_from_methodspec): Removed some hacks.
17991
17992 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
17993
17994         * class-internals.h (mono_field_is_deleted): Do the test for
17995         rtspecialname before we check the actual name of the field. This
17996         prevents us from dereferencing a pointer into the string table,
17997         saving us from accessing a few pages
17998
17999         * *.c: Replace the use of {Enter,Leave}CriticalSection with
18000         macros. This will allow a deadlock debugger to easily be plugged
18001         in.
18002
18003 2005-09-27  Martin Baulig  <martin@ximian.com>
18004
18005         * loader.c (method_from_methodspec): Create a "signature"
18006         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
18007
18008 2005-09-27  Martin Baulig  <martin@ximian.com>
18009
18010         * class.c
18011         (inflate_generic_class): Correctly set the new context's
18012         container.
18013
18014         * loader.c
18015         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
18016         instead of a `MonoGenericContext *'.
18017         (mono_method_signature_full): Take a `MonoGenericContainer *'
18018         instead of a `MonoGenericContext *'.
18019
18020         * metadata.c
18021         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
18022         instead of a `MonoGenericContext *'.
18023         (mono_metadata_parse_method_signature_full): Likewise.
18024
18025 2005-09-26  Martin Baulig  <martin@ximian.com>
18026
18027         * class.c
18028         (mono_class_from_generic_parameter): Set `klass->generic_container'
18029         (mono_class_from_generic_parameter): Likewise.
18030         (mono_bounded_array_class_get): We inherit the generic container
18031         from the element class.
18032
18033         * loader.c
18034         (find_method, find_method_in_class): Take a `MonoGenericContext *'
18035         argument rather than computing it here.
18036         (method_from_memberref): Correctly set the generic context before
18037         parsing the signature.  Fixes #75681.
18038
18039 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
18040
18041         * object.c (mono_class_has_special_static_fields): Fix warnings.
18042
18043 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18044
18045         * assembly.c: Add parse_public_key function, to
18046         par the public keys. Also added mono_assembly_name_parse_full,
18047         to define it the parsed key should be freed or not.
18048         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
18049         to parse a long format assembly name.
18050         * metadata-internals.h: Keep mono_assembly_name_parse_full as
18051         private, since calling it to preserve the key requires
18052         freeing it manually.
18053         
18054 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
18055
18056         * locales.c : removed HAVE_ICU part.
18057
18058 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18059
18060         * object.c (mono_class_create_runtime_vtable): Avoid calling 
18061         field_is_special_static if the klass has no special static fields.
18062
18063         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
18064         (MonoCachedClassInfo): Likewise.
18065
18066         * object.c (mono_class_has_special_static_fields): New helper function.
18067
18068 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
18069
18070         * class.c (mono_class_create_from_typedef): Don't call 
18071         interfaces_from_typedef_full for enums.
18072         (mono_class_create_from_typedef): Compute the base types of enums directly
18073         without calling mono_class_setup_fields ().
18074         (mono_class_find_enum_basetype): New helper function.
18075
18076         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
18077         one place inside the string heap.
18078         
18079 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
18080
18081         * class.c: locking fixes, code cleanups, some docs added.
18082         Allocate some data structures in the image mempool.
18083
18084 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
18085
18086         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
18087         the example code.
18088         
18089 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
18090
18091         * class-internals.h, class.c, reflection.c: reduce memory taken by
18092         MonoClass.
18093
18094 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
18095
18096         * metadata.c, metadata.h, loader.h: documentation updates, code and
18097         API cleanups.
18098
18099 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
18100
18101         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
18102         the example code.
18103
18104         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
18105         page faults caused by the runtime while reading metadata.
18106
18107 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18108
18109         * socket-io.c: the field names were changed 3 months ago and no one
18110         realized until bug #76077 got filed!
18111
18112 2005-09-20  Martin Baulig  <martin@ximian.com>
18113
18114         * icall.c (assembly_icalls): Removed some unused debugger icalls.
18115
18116 2005-09-20  Martin Baulig  <martin@ximian.com>
18117
18118         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
18119         write the rank into the class entry.
18120
18121 2005-09-20  Martin Baulig  <martin@ximian.com>
18122
18123         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
18124
18125 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
18126
18127         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18128
18129         * icall.c (custom_attrs_defined_internal): New icall.
18130
18131         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
18132         function.
18133         (mono_custom_attrs_construct_by_type): New helper function.
18134
18135 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
18136
18137         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
18138         terminate the resulting string. Fixes #76123.
18139
18140 2005-09-16  Martin Baulig  <martin@ximian.com>
18141
18142         * mono-debug.c
18143         (mono_debug_add_method): Ignore inflated methods for the moment.
18144
18145 2005-09-14  Martin Baulig  <martin@ximian.com>
18146
18147         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
18148
18149 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
18150
18151         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
18152         return a success/failure indication.
18153         (mono_metadata_interfaces_from_typedef_full): Ditto.
18154         (get_constraints): Ditto.
18155
18156 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
18157
18158         * marshal.c (emit_marshal_array): Fix handling of null arrays.
18159         
18160         * marshal.c (emit_marshal_array): Add support for returning string
18161         arrays from delegates. Fixes #76063.
18162
18163         * marshal.c: Use the emit_ldloc/stloc macros where possible.
18164
18165 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18166
18167         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
18168         icall.
18169
18170 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
18171
18172         * reflection.c icall.c: Fix after mono_get_exception_type_load
18173         signature change.
18174
18175         * assembly.c (mono_assembly_get_assemblyref): New helper function.
18176         (mono_assembly_load_reference): Use the new helper.
18177
18178         * class-internals.h (MonoLoaderError): New structure containing 
18179         information about type loading errors.
18180
18181         * class-internals.h loader.c: Add APIs to store per-thread loader
18182         error information.
18183
18184         * loader.c class.c: Set the loader error if needed.
18185
18186         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
18187
18188 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
18189
18190         * decimal.c: fixed to handle the broken ARM fp format.
18191
18192 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
18193
18194         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
18195         broken.
18196
18197 2005-09-06  Martin Baulig  <martin@ximian.com>
18198
18199         * domain.c (supported_runtimes): Added v2.0.50727.
18200
18201 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
18202
18203         * culture-info.h: reduce the size of some structures.
18204
18205 2005-09-05  Martin Baulig  <martin@ximian.com>
18206
18207         Reflect latest API changes in the August CTP.
18208
18209         * icall.c
18210         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
18211         ("MonoType.HasGenericArguments"): Removed.
18212         ("MonoMethod.BindGenericParameters"): Renamed to
18213         "MakeGenericMethod".
18214         ("MethodBuilder.BindGenericParameters"): Renamed to
18215         "MakeGenericMethod".    
18216
18217 2005-09-05  Martin Baulig  <martin@ximian.com>
18218
18219         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
18220
18221 2005-09-05  Martin Baulig  <martin@ximian.com>
18222
18223         Applying a patch from Michal Moskal <malekith@nemerle.org>.
18224
18225         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
18226         generic_container is non-NULL.
18227
18228 2005-09-05  Martin Baulig  <martin@ximian.com>
18229
18230         Applying a patch from Michal Moskal <malekith@nemerle.org>.
18231
18232         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
18233
18234 2005-08-29  Michal Moskal  <malekith@nemerle.org>
18235
18236         * reflection.c (encode_locals,
18237         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
18238         for large generic types.
18239
18240 2005-09-05  Martin Baulig  <martin@ximian.com>
18241
18242         Applying a patch from Michal Moskal <malekith@nemerle.org>.
18243
18244         * class.c (mono_dup_array_type): New public method.
18245         (mono_metadata_signature_deep_dup): New public method.
18246         (dup_type): Correctly duplicate array and function types.
18247
18248 2005-09-05  Martin Baulig  <martin@ximian.com>
18249
18250         Applying a patch from Michal Moskal <malekith@nemerle.org>.
18251
18252         * reflection.c (get_default_param_value_blobs): Handle generic types
18253         and generic methods.
18254
18255 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
18256
18257         * class.c: Fixed error reporting (method/class were inversed) for 
18258         inheritance demands.
18259         * security-manager.c|h: Added the AppDomain when calling the managed
18260         System.Security.SecurityManager.InheritanceDemand method.
18261
18262 2005-09-01  Raja R Harinath  <rharinath@novell.com>
18263
18264         * reflection.c (encode_marshal_blob): 'marshaltype' and
18265         'marshaltyperef' are alternate sources for the custom marshaler
18266         name.
18267
18268 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
18269
18270         * class.c: fix creation of array classes with rank == 1
18271         (patch by Ankit Jain <jankit@novell.com>).
18272
18273 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
18274
18275         * object.c: fix check for creating the bound data for arrays vs
18276         szarrays.
18277
18278 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18279
18280         * object.c: configuration file name is now based on the executable name,
18281         not the image name. Fixes bug #75931.
18282
18283 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
18284
18285         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
18286         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
18287
18288 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
18289
18290         * rand.c: Use wincrypt.h instead of WinCrypt.h.
18291
18292 2005-08-24  Ankit Jain  <jankit@novell.com>
18293             Raja R Harinath  <rharinath@novell.com>
18294
18295         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
18296           called by it recursively.
18297           (mono_class_init): Remove special case in pending_init handling, since it's
18298           superseded by the fix to mono_class_from_typeref.
18299
18300 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18301
18302         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
18303         BROKEN_THREAD_START stuff.
18304
18305 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
18306
18307         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
18308         trampoline.
18309
18310         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
18311         
18312         * object.c (mono_delegate_ctor): Replace the original function address with
18313         a delegate trampoline.
18314
18315 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
18316
18317         * icall.c: add boolean argument to base64_to_byte_array and 
18318         InternalFromBase64String to control whether a whitespace-only string
18319         is allowed (or should casue a FormatException to be thrown). We need
18320         this as the behavior has changed between MS.NET 1.x and 2.0, and we
18321         to match the MS behaviour in both profiles.
18322         * appdomain.c: Bump corlib version.
18323
18324 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18325
18326         This patch implements a big portion of publisher policy
18327         support, used to bind assembly versions and redirect
18328         one assembly from version A to version B.
18329
18330         * assembly.c:
18331         New GSList loaded_assembly_bindings, for storing the cached
18332         assembly bindings.
18333         (assembly_binding_maps_name): New static function for checking if a 
18334         assembly binding information maps an assembly name.
18335         (mono_assembly_binding_info_free): New function for freeing
18336         assembly binding information resources.
18337         (get_publisher_policy_info): New static function for retrieving 
18338         assembly binding information from a MonoImage.
18339         (compare_versions): New static function for comparing an assembly
18340         binding information data and the version of an assembly name.
18341         (check_policy_versions): New static function for checking if an
18342         assembly binding info mapping an assembly name is valid for it.
18343         (mono_assembly_load_publisher_policy): New static function for
18344         loading the 'policy.major.minor.MyAssembly' image for an assembly
18345         with an assembly name 'aname'.
18346         (mono_assembly_bind_version): New static function for updating
18347         assembly redirection.
18348         (mono_assembly_apply_binding): New static function for applying
18349         assembly binding.
18350         (search_binding_loaded): New static function for searching 
18351         loaded assembly binding infos in the cache domain.
18352         (mono_assembly_load_full): Don't apply assembly binding for
18353         reflection only assemblies.
18354
18355         * metadata-internals.h: Add MonoAssemblyBindingInfo,
18356         which contains information about assembly binding. Also
18357         declare signature for mono_config_parse_publisher_policy ()
18358         function, used to retrieve pub policy info.
18359         
18360         * mono-config.c:
18361         (publisher_policy_start): New static function used to parse publisher 
18362         policy config files.
18363         (publisher_policy_parser): New static MonoParseHandler containing 
18364         the functions used when parsing config files.
18365         (mono_config_parse_publisher_policy): New function for parsing
18366         publisher policy files.
18367         
18368 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
18369
18370         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
18371
18372         * marshal.c (mono_delegate_free_ftnptr): Ditto.
18373
18374         * object.c (mono_get_addr_from_ftnptr): New helper function.
18375
18376         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
18377
18378         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18379
18380 2005-08-19  Dick Porter  <dick@ximian.com>
18381
18382         * threads.c, threads.h, appdomain.c, appdomain.h,
18383         profiler-private.h, monitor.c, object.c, object-internals.h,
18384         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
18385         store the thread ID, so it can hold a 64 bit value if needed.
18386
18387 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
18388
18389         * reflection.c (mono_reflection_create_dynamic_method): Store the
18390         handle class into the method references as well so ldtoken works in
18391         dynamic methods.
18392
18393         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
18394         types.
18395
18396 2005-08-19  Ankit Jain <jankit@novell.com>
18397
18398         Fix #75847.
18399         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
18400           here rather than using the method signature of a arbitrary function
18401           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
18402           two arguments.
18403           Hack done with Harinath.
18404
18405 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18406
18407         * threadpool.c: disable printing stack traces when we get a exception
18408         in a threadpool thread. I need to do more testing to figure out which
18409         cases actually print this. Fixes bug #75828.
18410
18411 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18412
18413         * icall.c: there might be ignored whitespace after the last '='. This
18414         fixes length computation and bug #75840.
18415
18416 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
18417
18418         * assembly.c (mono_assembly_load_full): Consider .exe extension as
18419         well. Fixes #75809.
18420
18421         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
18422         #75784.
18423         
18424         * reflection.c (create_custom_attr_data): Ditto.
18425
18426 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
18427
18428         * locales.c, culture-info.h : removed RegionLCIDMap.
18429         * culture-info-tables.h : regenerated.
18430
18431 2005-08-16  Martin Baulig  <martin@ximian.com>
18432
18433         * class.c (mono_type_get_name_recurse): Small fix.
18434
18435 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
18436
18437         * locales.c : indentation fixie.
18438
18439 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
18440
18441         * object-internals.h,
18442           locales.h,
18443           locales.c,
18444           culture-info.h,
18445           icall.c : added RegionInfo table support.
18446         * culture-info-table.h : regenerated for region support.
18447
18448 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
18449
18450         * reflection.c (resolve_object): handle all kinds of MonoMethod
18451         including generic ones
18452
18453 2005-08-12  Ankit Jain <jankit@novell.com>
18454
18455         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
18456           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
18457
18458 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
18459
18460         * process.c: Don't close a thread handle when it's NULL. This is a
18461         workaround for bug #75733.
18462
18463 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
18464
18465         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
18466
18467 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
18468
18469         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
18470
18471 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18472
18473         * threadpool.c: if a work item in the thread pool has a callback that
18474         catches a exception, don't propagate it after invoking the callback.
18475         Fixes bug #75336.
18476
18477 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
18478
18479         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
18480
18481         * class-internals.h (MonoCachedClassInfo): Add some new fields.
18482
18483         * class.c (mono_class_init): Load field info lazily in the AOT case.    
18484
18485         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
18486
18487 2005-08-03  Ankit Jain  <jankit@novell.com>
18488
18489         Fix #75683.
18490         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
18491           PInvoke calling convention is 0.
18492
18493 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
18494
18495         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
18496         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
18497
18498 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
18499
18500         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
18501         to handle threads not started by the GC (patch by Michael Meeks
18502         <michael.meeks@novell.com>).
18503
18504 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
18505
18506         * reflection.c: Make buffer used in emitting types larger for some
18507         big generic types (patch by Michal Moskal).
18508
18509 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
18510
18511         * mono-debug.c: Fix some (not all) alignment problems.
18512
18513 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18514
18515         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
18516         Invoke mono_image_load_from_data_full passing the refonly
18517         parameter.
18518
18519         * assembly.c
18520         (mono_assembly_open_from_bundle): Add the refonly argument, 
18521         in order to pass it to other methods it calls to.
18522         (do_mono_assembly_open): Add the refonly argument, in order 
18523         to pass it to other methods it calls to.
18524         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
18525         the refonly parameter to it.
18526
18527         * image.c: Add loaded_images_refonly_hash and
18528         loaded_images_refonly_guid_hash to cache the reflection
18529         only loaded images.
18530         (mono_images_init): Initialize the hash tables used for
18531         caching the reflection only images.
18532         (load_modules): Invoke mono_image_open_full passing the refonly
18533         parameter to load the modules the correct way.
18534         (build_guid_table): Add the refonly argument, to re-build the 
18535         correct hash table.
18536         (do_mono_image_open): Added the refonly argument, in order to
18537         define it for the loaded image.
18538         (mono_image_loaded_full): New function, which receives an
18539         additional parameter to look for the image in the refonly or
18540         non-refonly section.
18541         (mono_image_loaded): Updated, using mono_image_loaded_full.
18542         (mono_image_loaded_by_guid_full): The same case that happens
18543         with mono_image_loaded_full.
18544         (mono_image_loaded_by_guid): Likewise.
18545         (register_image): Use the ref_only variable inside MonoImage
18546         to decide in which hash table store the current image.
18547         (mono_image_open_from_data_full): Rename
18548         mono_image_open_from_data to mono_image_open_from_data_full,
18549         adding the refonly argument, to define the ref_only variable 
18550         inside MonoImage.
18551         (mono_image_open_from_data): Return 
18552         mono_image_open_from_data_full.
18553         (mono_image_open_full): Rename mono_image_open to
18554         mono_image_open_full, receiving the new refonly argument,
18555         to pass it to inner methods.
18556         (mono_pe_file_open): Update this function, to open
18557         a MonoImage as a non-refonly image.
18558         (mono_image_close): Use the refonly variable inside
18559         MonoImage to remove the image from the correct caches.
18560
18561         * image.h: Add the signatures of mono_image_open_full,
18562         mono_image_open_from_data_full, mono_image_loaded_full,
18563         mono_image_loaded_by_guid_full.
18564
18565         * metadata-internals.h: Add the ref_only field to 
18566         MonoImage.
18567         
18568 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18569
18570         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
18571         Fix the last behavior, which used to load the assemblies and
18572         extract MonoReflectionAssemblyName information, instead of
18573         extract it from the metadata tables. Needed for Reflection
18574         Only assemblies.
18575         
18576 2005-07-29  Martin Baulig  <martin@ximian.com>
18577
18578         * mono-debug-debugger.c
18579         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
18580         not initialized.
18581
18582         * mono-debug.c
18583         (mono_debug_address_from_il_offset): Check whether we have
18584         debugging support before attempting to take the lock.
18585         (mono_debug_source_location_from_address): Likewise.
18586         (mono_debug_source_location_from_il_offset): Likewise.
18587         (mono_debug_il_offset_from_address): Likewise.
18588         (mono_debug_address_from_il_offset): Likewise.
18589
18590 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
18591
18592         * class.c (mono_class_from_name_case): Add support for dynamic images.
18593         Fixes #75650.
18594
18595         * object.c (mono_class_compute_gc_descriptor): Add a workaround
18596         for #75479.
18597
18598 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
18599         
18600         * reflection.c (mono_method_get_object): Fix warning.
18601
18602 2005-07-28  Martin Baulig  <martin@ximian.com>
18603
18604         * mono-debug.c
18605         (mono_debug_add_wrapper): Also write the wrapper type.
18606
18607 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
18608
18609         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
18610         
18611         * class.c (mono_class_init): Avoid reading nested classes if the AOT
18612         data indicates the class has none.
18613
18614 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
18615
18616         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
18617         loader lock with the debugger lock. Prevents deadlocks for beagle.
18618
18619         Beagle can now run on an smp box for a weekend without any
18620         issues. Woohoo!
18621
18622 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
18623
18624         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
18625         in a module. Fixes #75629.
18626
18627 2005-07-26  Martin Baulig  <martin@ximian.com>
18628
18629         * mono-debug.c (mono_debug_add_wrapper): New static method.
18630         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
18631         interncall or a wrapper.
18632
18633         * mono-debug.h (MonoDebugWrapperData): New public typedef.
18634         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
18635         (MONO_DEBUGGER_VERSION): Bump to 51.
18636
18637         * mono-debug-debugger.c
18638         (mono_debugger_add_type): Removed this empty function.
18639         (mono_debugger_add_method): Likewise.
18640
18641 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
18642
18643         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
18644         before accessing method->slot.
18645
18646 2005-07-21  Jb Evain  <jbevain@gmail.com>
18647
18648         * reflection.c (method_encode_clauses/class): Handle filters clauses.
18649         Fixes #75010.
18650
18651 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
18652
18653         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
18654         #75587.
18655
18656 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
18657
18658         * image.h image.c: Add mono_image_get_guid () API function.
18659
18660 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
18661
18662         There were issues when multiple threads tried to load
18663         assemblies. A deadlock was created between assemblies_mutex and
18664         mono_domain_assemblies_lock. This fixes the issue by making the
18665         assembly ref counting be lock free. See bug 75586.
18666         
18667         * image.c (mono_image_close): The add ref function here was using
18668         Interlocked operations while the unref was using a mutex and a
18669         --. I don't think this was ever a bug that would be exposed in a
18670         non-pendantic way (ie, by an embedder doing a ref on one thread
18671         and an unref on another), but for the sake of correctness, this is
18672         now Interlocked.
18673
18674         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
18675         (mono_assembly_load_reference): Call mono_assembly_addref rather
18676         than touching the refcount ourselves.
18677         (mono_assembly_close): Use InterlockedDecrement to unref the
18678         assembly. Don't acquire the lock unless it is actually needed.
18679
18680 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
18681
18682         * class.c (mono_class_layout_fields): Fix calculation of has_references
18683         for generic types.
18684
18685 2005-07-12  Martin Baulig  <martin@ximian.com>
18686
18687         Applying a patch from Michal Moskal <malekith@nemerle.org>.
18688
18689         * metadata.c
18690         (mono_type_hash): Provide better hashing for generic instances.
18691         (mono_generic_inst_hash): Improve hashing.
18692         (mono_generic_class_hash): Likewise.
18693
18694         * reflection.c (mymono_metadata_type_hash): Improve hashing for
18695         generic instances.
18696
18697 2005-07-12  Martin Baulig  <martin@ximian.com>
18698
18699         * reflection.c (mono_reflection_create_runtime_class): Remove the
18700         hack for generic type definitions and non-`Run' assemblies.
18701         (mono_reflection_bind_generic_parameters): Also use
18702         `klass->wastypebuilder' to check for TypeBuilders.
18703
18704 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
18705
18706         * class.c (mono_class_layout_fields): Fix calculation of has_references
18707         for generic types.
18708
18709         * class.c (inflate_generic_class): Fix a leak.
18710         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
18711         for generic types.
18712
18713 2005-07-11  Martin Baulig  <martin@ximian.com>
18714
18715         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
18716         on error.
18717
18718 2005-07-11  Martin Baulig  <martin@ximian.com>
18719
18720         * loader.c (find_method): Also lookup in
18721         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
18722
18723 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18724
18725         * appdomain.c (mono_domain_unload): Don't free the error message
18726         before passing it to mono_get_exception_...
18727
18728         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
18729         
18730 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
18731
18732         * threads.c: try to better guess an available RT signal (bug #75387).
18733
18734 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18735
18736         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
18737         and CACHE_OBJECT.
18738
18739 2005-07-07  Martin Baulig  <martin@ximian.com>
18740
18741         * class.c (mono_type_get_name_full): Return NULL for
18742         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
18743         fixes #75408.
18744
18745 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18746
18747         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
18748         exit the appdomain as well being aborted.
18749
18750         * threadpool.c: Create all threadpool threads inside the root appdomain, and
18751         change back to the root domain after calling managed code. This enables
18752         appdomains using threadpools to be unloaded.
18753
18754 2005-07-07  Martin Baulig  <martin@ximian.com>
18755
18756         * class-internals.h
18757         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
18758         into `MonoDynamicGenericClass' since we only need it for dynamic
18759         types.
18760
18761         * reflection.c (mono_class_bind_generic_parameters): We don't need
18762         to compute the `parent' here.
18763
18764 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
18765
18766         * culture-info-table.h : regenerated.
18767
18768 2005-07-06  Martin Baulig  <martin@ximian.com>
18769
18770         * icall.c
18771         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
18772
18773         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
18774
18775 2005-07-06  Martin Baulig  <martin@ximian.com>
18776
18777         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
18778         we're doing a signature-only comparision; fixes #74945.
18779
18780 2005-07-06  Martin Baulig  <martin@ximian.com>
18781
18782         * class-internals.h (MonoGenericClass): Moved some things out into
18783         a new `MonoInflatedGenericClass' type.  
18784         (MonoInflatedGenericClass): New type; the `klass' of a
18785         `MonoGenericClass' is now computed lazyly in
18786         mono_get_inflated_generic_class().      
18787
18788         * class.c (mono_get_inflated_generic_class): New public function.
18789         (mono_class_inflate_generic_method): Removed the unused
18790         `MonoClass *' argument.
18791         (setup_generic_vtable): Don't call mono_get_inflated_method() on
18792         all the methods.
18793         (mono_class_create_generic): Make this static and merge it with
18794         mono_class_create_generic_2(); we're now called automatically from
18795         mono_get_inflated_generic_class().
18796
18797         * loader.c (mono_method_signature): Call
18798         mono_get_inflated_method() here.
18799
18800 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
18801
18802         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
18803         type of fields with RVA.
18804
18805         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
18806         for this pseudo class.
18807         (my_mono_class_from_generic_parameter): Likewise.
18808         (mono_class_init): Allow interfaces to have cctors.
18809
18810 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
18811
18812         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
18813         lazily for AOT methods.
18814
18815 2005-07-05  Martin Baulig  <martin@ximian.com>
18816
18817         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
18818         returns FALSE for a successful match, not TRUE.
18819
18820 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
18821
18822         * loader.c (mono_method_get_index): Optimize this a bit.
18823
18824 2005-07-04  Martin Baulig  <martin@ximian.com>
18825
18826         * class.c
18827         (class_compute_field_layout): Move the check for generic type
18828         definitions into mono_class_layout_fields().  Fixes #74684.
18829         (mono_class_from_generic_parameter): Correctly compute
18830         `klass->parent'; fixes #75457.
18831
18832         * reflection.c (register_assembly, register_module): Make sure
18833         `domain->rejobject_hash' is already created.
18834
18835 2005-07-02  Martin Baulig  <martin@ximian.com>
18836
18837         * class-internals.h
18838         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
18839         `MonoDynamicGenericClass'.      
18840
18841 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
18842
18843         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
18844         returned by a field getter is null, since null is a valid value.
18845
18846 2005-07-01  Martin Baulig  <martin@ximian.com>
18847
18848         * reflection.c (mono_reflection_generic_class_initialize): Update
18849         the `dgclass->fields [i].parent' to the correct class.
18850         (mono_image_get_fieldref_token): Use the declaring type, not the
18851         reflected type.
18852
18853 2005-07-01  Martin Baulig  <martin@ximian.com>
18854
18855         * loader.c (find_method): Also look in the interfaces; fixes #75429.
18856
18857 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
18858
18859         * threads.c (thread_cleanup): assert that thread != NULL
18860         (wait_for_tids_or_state_change): We were using the wrong variable
18861         when accessing wait->threads. `i' was always out of the bounds of
18862         the array.
18863
18864 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18865
18866         * loader.c: map user32 and kernel32 to libMonoSupportW
18867
18868 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
18869
18870         * appdomain.c (unload_thread_main): Mark this as WINAPI.
18871
18872 2005-06-28  Martin Baulig  <martin@ximian.com>
18873
18874         * loader.c (method_from_methodspec): Fix #75334.
18875
18876 2005-06-28  Martin Baulig  <martin@ximian.com>
18877
18878         Fix #74953 - Arrays now implement the generic IList<T> interface
18879         on the 2.0 platform.
18880
18881         * class-internals.h (MonoDefaults): Added `generic_array_class'.
18882
18883         * reflection.c (mono_class_bind_generic_parameters): New public
18884         function; similar to mono_reflection_bind_generic_parameters(),
18885         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
18886
18887         * domain.c (mono_init_internal): Try to initialize.
18888         `mono_defaults.generic_array_class' here; this'll only succeed if
18889         we're using the 2.0 corlib.
18890
18891         * icall.c
18892         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
18893         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
18894         (mono_lookup_internal_call): Added support for nested classes.
18895
18896         * loader.c
18897         (mono_get_method_from_token): Set `result->signature->pinvoke' if
18898         we're an interncall and have generic arguments.
18899
18900         * class.c
18901         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
18902         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
18903         instance of System.Array.InternalArray<T> for arrays, so they
18904         implement the generic IList<T> interface.
18905
18906 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
18907
18908         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18909         (chastamar@yahoo.com). Fixes #75374.    
18910
18911 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
18912
18913         * culture-info-table.h: regenerated.
18914
18915 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18916
18917         * icall.c: handle spaces correctly for base64 strings.
18918
18919 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
18920
18921         * *.c: Kill some warnings.
18922
18923 2005-06-23  Duncan Mak  <duncan@novell.com>
18924
18925         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18926         that this builds on Solaris 10 (x86).
18927
18928 2005-06-23  Martin Baulig  <martin@ximian.com>
18929
18930         * class.c
18931         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18932         generic type definitions.
18933
18934 2005-06-23  Martin Baulig  <martin@ximian.com>
18935
18936         Fix #75331.
18937
18938         * metadata.c (mono_class_get_overrides): Renamed to
18939         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18940         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18941         pass it to mono_get_method_full().
18942
18943 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
18944
18945         * reflection.c (mono_reflection_create_runtime_class): take the
18946         mono_domain_lock in this method. Prevents deadlocks
18947
18948 2005-06-22  Martin Baulig  <martin@ximian.com>
18949
18950         * loader.c (method_from_methodspec): Fix #75330.
18951
18952 2005-06-22  Martin Baulig  <martin@ximian.com>
18953
18954         * reflection.c (type_get_qualified_name): Use
18955         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18956         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18957         argument; use it if we don't have an assembly name.
18958
18959 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
18960
18961         * object.c: In mono_message_init, set "copy out" flag for in
18962         parameters with the [Out] flag.
18963
18964 2005-06-21  Martin Baulig  <martin@ximian.com>
18965
18966         * class.c
18967         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18968         and MONO_TYPE_PTR.
18969
18970 2005-06-21  Martin Baulig  <martin@ximian.com>
18971
18972         * class.c (mono_class_init): Don't initialize `class->fields' for
18973         generic instances since they're initialized again in
18974         compute_field_layout(). 
18975         (compute_field_layout): Set the field's `generic_info' here; fix
18976         #75320. 
18977
18978 2005-06-21  Martin Baulig  <martin@ximian.com>
18979
18980         * class-internals.h
18981         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18982
18983         * metadata.c (mono_metadata_generic_method_equal): Also
18984         distinguish the `generic_class'; fixes #75334.
18985
18986 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18987
18988         * domain.c:
18989         * appdomain.c:
18990         * domain-internals.h:
18991         * reflection.c: 'domain_assemblies' field is now protected by its own
18992         lock. Don't call into managed code to run the AssemblyLoad event if we
18993         now there are no registered delegates for it.
18994
18995 2005-06-20  Martin Baulig  <martin@ximian.com>
18996
18997         * class.c (mono_class_is_assignable_from): Use a custom version of
18998         mono_class_has_parent() to make things work for generic instances;
18999         fix #75300.
19000
19001 2005-06-20  Martin Baulig  <martin@ximian.com>
19002
19003         * loader.c (method_from_methodspec): Apply a patch from
19004         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
19005
19006 2005-06-20  Martin Baulig  <martin@ximian.com>
19007
19008         * class.c (mono_class_init): Reverted Zoltan's last change; it
19009         breaks generics.
19010
19011 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
19012
19013         * threads.c (wait_for_tids_or_state_change): Add missing locking.
19014
19015 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19016
19017         * socket-io.c: fix the index in the socket array for writable/error
19018         sockets. Fixes bug #75306.
19019
19020 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
19021
19022         * class.c (mono_class_init): Allow interfaces to have static ctors.
19023
19024 2005-06-17  Martin Baulig  <martin@ximian.com>
19025
19026         * loader.c (method_from_methodspec): Use `context->container' when
19027         parsing the `gmethod->inst'.
19028
19029 2005-06-17  Martin Baulig  <martin@ximian.com>
19030
19031         * class.c (mono_type_get_name_recurse): Don't add the assembly
19032         name for type arguments.
19033
19034 2005-06-15  Martin Baulig  <martin@ximian.com>
19035
19036         * reflection.c (mono_image_get_inflated_method_token): Encode
19037         correct klass; fixes #75260.
19038
19039 2005-06-13 Michal Moskal <malekith@nemerle.org>
19040
19041         * icall.c: Make GetCorrespondingMethod/Constructor take
19042         MonoReflectionMethod method not MonoMethod. Removed
19043         MonoType.GetCorrespondingField, and make
19044         MonoGenericType.GetCorrespondingField take name not
19045         MonoClassField.
19046
19047 2005-06-13  Michal Moskal <malekith@nemerle.org>
19048
19049         * reflection.c (field_encode_signature, encode_locals):
19050          Make sizes of buffers for types larger (for big generic types).
19051          (create_generic_typespec,
19052          mono_reflection_sighelper_get_signature_local,
19053          mono_reflection_sighelper_get_signature_field):
19054          Add asserts for too small buffers.
19055
19056 2005-06-15  Martin Baulig  <martin@ximian.com>
19057
19058         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
19059         if our parent is not a dynamic type.
19060
19061 2005-06-15  Martin Baulig  <martin@ximian.com>
19062
19063         * class-internals.h (MonoTypeNameFormat): New enum.
19064
19065         * class.c
19066         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
19067         (mono_type_get_full_name): Removed.
19068         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
19069         argument instead of the boolean's.
19070
19071         * icall.c (ves_icall_System_MonoType_getFullName):
19072         Added `gboolean assembly_qualified'.    
19073
19074         * reflection.h
19075         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
19076
19077         * reflection.c (mono_reflection_parse_type): Parse the new type
19078         name format.
19079
19080 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19081
19082         * icall.c: no need to convert from utf16 to utf8 and then back again
19083         after the call to GetLogicalDrives.
19084
19085 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19086
19087         * icall.c: frombase64. Fix problems exposed by new tests.
19088
19089 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19090
19091         * icall.c: added internal calls for converting char [] and strings in
19092         base64 into byte [].
19093
19094 2005-06-10  Martin Baulig  <martin@ximian.com>
19095
19096         * class.c (mono_class_create_generic_2): Read the nested classes
19097         from the metadata rather than from `gklass->nested_classes' since
19098         `gklass' might not be initialized yet.
19099
19100 2005-06-09  Duncan Mak  <duncan@novell.com>
19101
19102         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
19103         all public headers. Fixes #74919.
19104
19105 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
19106
19107         * domain.c: The key for proxy_vtable_hash is now a pointer
19108         array. Added new GHashFunc and GCompareFunc functions for this.
19109
19110         * class.h: The list of interfaces in MonoRemoteClass is known in
19111         advance and can't grow (we create a new MonoRemoteClass if needed),
19112         so now the interface array can be allocated together with
19113         MonoRemoteClass.
19114         
19115         * object.c: Added a new method create_remote_class_key.
19116         Fixed mono_remote_class so it does not depend on
19117         mono_upgrade_remote_class.
19118         Removed extend_interface_array.
19119         Added new method clone_remote_class(), which makes a copy of a remote
19120         class and adds a new interface or class to it.
19121         mono_upgrade_remote_class() now creates a new remote class (or gets
19122         it from the cache) if an vtable upgrade is needed. In this way
19123         we make sure that other objects sharing the same remote class
19124         don't get the new vtable with unwanted interfaces.
19125         
19126         * object-internals.h:
19127         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
19128         
19129         * marshal.c: Track changes in mono_upgrade_remote_class().
19130
19131 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
19132         * icall.c: Add runtime methods for obtaining members of inflated
19133         class, which were created from supplied non-inflated members. It
19134         is used in internal Get{Method,Constructor,Field} methods in
19135         System.Type
19136
19137 2005-06-09  Martin Baulig  <martin@ximian.com>
19138
19139         * reflection.c
19140         (mono_reflection_bind_generic_method_parameters): Fix #75169.
19141
19142 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
19143         * reflection.c (mono_image_basic_init): Define
19144         Version in MonoDynamicAssembly. 
19145         
19146 2005-06-08  Martin Baulig  <martin@ximian.com>
19147
19148         Fix #75136.
19149
19150         * loader.c
19151         (mono_method_signature_full): New public method; takes a
19152         `MonoGenericContext *'.
19153         (find_method): Use mono_method_signature_full() and pass the
19154         klass'es context to it.
19155
19156         * class.c (mono_class_is_inflated_method): Use
19157         mono_method_signature_full() and pass the context to it.
19158
19159 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
19160
19161         * object.c: add proper locking in mono_remote_class_vtable(),
19162         fixes possible memory corruption.
19163
19164 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
19165
19166         * marshal.c (mono_remoting_marshal_init): set
19167         initialized after initialization.
19168
19169 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
19170
19171         * locales.c : hush.
19172
19173 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
19174
19175         * object.c (extend_interface_array): fix really silly
19176         memory corrupting / comparison bug.
19177
19178 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
19179
19180         * reflection.c: Functions added to support the creation
19181         of CustomAttributeData, which includes Attribute data
19182         used by ReflectionOnly methods.
19183
19184         * reflection.h:  mono_reflection_get_custom_attrs_data and
19185          mono_custom_attrs_data_construct added (functions exposed).
19186
19187          * icall.c: Added mono_reflection_get_custom_attrs_data
19188          as icall.
19189         
19190 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
19191
19192         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
19193         lupus's request.
19194
19195 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
19196
19197         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
19198
19199         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
19200         dynamic DllImportAttribute.
19201
19202         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
19203         dynamic DllImportAttribute.
19204
19205         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
19206         Fixes #75162.
19207
19208 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19209
19210         * threads.c: avoid segfault when an unstarted thread is aborted.
19211
19212 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
19213
19214         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
19215         Returns the name and version of the runtime for reporting.
19216
19217 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19218
19219         * appdomain.c: bump corlib version.
19220         * object-internals.h: new field in MonoReflectionAssembly.
19221
19222 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19223
19224         * object-internals.h: Carlos forgot to add this field.
19225
19226 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
19227
19228         * icall.c: Added create_version to create instances
19229         of Version of MonoReflectionAssemblyName. This change helps
19230         the AssemblyName tests to keep running fine.
19231         
19232 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
19233   
19234         * object.c (mono_method_return_message_restore): A somehow less
19235         intrusive fix for #75138.
19236
19237 2005-06-03  Raja R Harinath  <rharinath@novell.com>
19238
19239         * object.c (mono_method_return_message_restore): Fix computation
19240         of expected number of out args.
19241
19242 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
19243
19244         * reflection.c (mono_image_get_method_info): Fix the case when the
19245         charset is empty.
19246
19247 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
19248
19249         * object.c: Added missing null check in
19250           mono_method_return_message_restore.
19251
19252 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
19253
19254         * reflection.c (mono_image_get_method_info): Handle the case when
19255         dllentry is empty.
19256
19257 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
19258
19259         * object.c: When creating the vtable for a proxy, take into account
19260         all inherited interfaces, not only the ones registered in
19261         iclass->interfaces. This fixs bug #74996.
19262         Also, in mono_method_return_message_restore, verify that the array
19263         of out args has the expected lengh.
19264
19265 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19266
19267         * socket-io.c: update the timeout in Poll when the call is interrupte.
19268
19269 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19270
19271         * socket-io.c: support abort/suspend in Select_internal after last
19272         change.
19273
19274 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19275
19276         * threadpool.c: remove warning.
19277
19278 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19279
19280         * icall.c:
19281         * socket-io.[ch]: Select_internal uses poll() now when available, thus
19282         removing the 1024 limit from select(). Runtime part of the fix for
19283         bug #71203.
19284
19285 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19286
19287         * socket-io.c: when resolving the addresses for the same
19288         host returned by gethostname(), get the local IPs from the interface
19289         list. Loopback addresses are discarded if the are interfaces up with
19290         non-loopback ones. Fixes bug #63265.
19291
19292 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
19293
19294         * appdomain.c, verify.c, object-internals.h, reflection.c:
19295         bumped corlib number to 36, and added new extra_flags field
19296         to ReflectionMethodBuilder and friends.  Fixes #75060.
19297
19298 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
19299
19300         * gc.c: register a new weak link only if the object is non-null
19301         (fixes bug#75047).
19302
19303 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
19304
19305         * culture-info.h : short time pattern too.
19306
19307 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
19308
19309         * culture-info.h : expand long time pattern string length.
19310
19311 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
19312
19313         * culture-info-table.h : update (more French date format; #72788).
19314
19315 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
19316
19317         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
19318         the method is static. Fixes #75029.
19319
19320 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
19321
19322         * reflection.c: Update the table_idx field of method builders after
19323         saving the module, since it can change. This is a workaround for
19324         bug #74914. 
19325
19326 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
19327
19328         * culture-info-table.h : update (additional French date format).
19329
19330 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
19331
19332         * icall.c (ves_icall_type_Equals): Revert last change.
19333         
19334         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
19335
19336         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
19337
19338 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
19339
19340         * class-internals.h: Added executioncontext_class field to 
19341         MonoDefaults structure.
19342         * domain.c: Cache System.Threading.ExecutionContext class in 
19343         mono_defaults.
19344         * object.c: Capture the ExecutionContext for asynchroneous calls in
19345          mono_async_result_new.
19346         * object-internals.h: Added execution_context and original_context 
19347         fields to MonoAsyncResult. Added execution_context to MonoThread.
19348         * security-manager.c|.h: Added mono_get_context_capture_method to 
19349         return the capture method (if required by the security manager or by
19350         the framework version used).
19351         * threadpool.c: Apply capture (if present) ExecutionContext in 
19352         mono_async_invoke and revert to original context after it completes.
19353
19354 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
19355
19356         * culture-info-table.h : updated (real hacky solution for zh-CHT).
19357
19358 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
19359
19360         * culture-info-table.h : zh-CHT related workaround.
19361
19362 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
19363
19364         * marshal.c (emit_marshal_custom): Add some error checking and call the
19365         methods in the ICustomMarshaler interface. Fixes #74875.
19366         
19367         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
19368         native->managed wrappers.
19369
19370 2005-05-12  Martin Baulig  <martin@ximian.com>
19371
19372         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
19373         here and use the loader lock.
19374
19375         * mono-debug.c: Properly lock when the debugger is not attached.
19376         (mono_debug_init): Release the initial lock if we're not running
19377         in the debugger.
19378
19379 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
19380
19381         * marshal.c (emit_marshal_custom): Pass through NULL values without
19382         calling the custom marshalling routines.
19383
19384         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
19385         conversion in structures. Fixes #74882.
19386
19387 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
19388
19389         * culture-info-table.h : zh-* cultures were missing.
19390
19391 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
19392
19393         * threads.c: Added a new event background_change_event which is signaled
19394         when a thread changes its background mode.
19395         Moved here several checks previously done in managed code. The checks
19396         require the thread lock, and using the thread lock in managed code
19397         can result in deadlocks.
19398         Merged Start_internal and Thread_internal into a single method. Now 
19399         Thread_internal does all work of creating and starting a thread.
19400         Added icalls for setting and getting the state of the object. Moved from
19401         managed code to avoid locking there.
19402         Added wait_for_tids_or_state_change() which is called instad of
19403         wait_for_tids when waiting for non-backround threads to end. This method
19404         will return if one of the threads ends or the background_change_event
19405         is signaled.
19406         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
19407         the background mode. This method signals the background_change_event
19408         event.
19409         * icall.c:
19410         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
19411         removed Start_internal.
19412         
19413 2005-05-11  Martin Baulig  <martin@ximian.com>
19414
19415         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
19416         to order of some fields to get proper alignment on 64-bit machines.
19417
19418 2005-05-11  Martin Baulig  <martin@ximian.com>
19419
19420         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
19421         changes as they're broken and completely fuck up the debugger.
19422
19423         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
19424
19425 2005-05-10  Martin Baulig  <martin@ximian.com>
19426
19427         * reflection.c (mono_reflection_generic_class_initialize): Don't
19428         call mono_class_setup_parent() here.
19429
19430 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19431
19432         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
19433         send/receive timeout use an integer in milliseconds. We were using a
19434         struct timeval.
19435
19436 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19437
19438         * locales.c:
19439         (internal_get_cultures): reserve the first slot of the array for the
19440         InvariantCulture, which will be filled in managed code.
19441
19442 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
19443
19444         * reflection.c (mono_image_fill_module_table): Initialize the
19445         GENERATION field as well.
19446
19447 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19448
19449         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
19450         Monitor.Enter on the object.
19451
19452 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
19453
19454         * threads.c: Enable the wait for running threads when exiting.
19455         * icall.c: Suspend all threads before exiting.
19456
19457 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
19458
19459         * assembly.c (mono_assembly_load_reference): Fix warning.
19460
19461 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19462
19463         * threadpool.c: changed the default number of threads per cpu. From now
19464         on, the default will be 20 + (5 * number of cpus) instead of 50.
19465
19466 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
19467
19468         * loader.c (mono_method_get_signature_full): Add locking here.
19469
19470 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
19471
19472         * appdomain.c: Moved methods for parsing and freeing assembly
19473         names to assembly.c.
19474         * assembly.c, domain-internals.h: Created public methods for parsing
19475         assembly names. Fixed mono_assembly_load_with_partial_name:
19476         it now finds the best match, taking into account the version,
19477         token and culture specified in the partial name. Also return
19478         the latest version if no version information is specified.
19479
19480 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
19481
19482         * threadpool.c: replace check for SocketAsyncCall class.
19483
19484 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19485
19486         * threadpool-internals.h:
19487         * Makefile.am: added threadpool-internals.h
19488
19489         * threadpool.c: call mono_unhandled_exception on exceptions not handled
19490         that happen in threadpool threads (tested on MS).
19491         (mono_thread_pool_remove_socket): new function that dispatch any pending
19492         AIO call on a socket that is closing. By now only epoll really needs it,
19493         as select/poll wake up when the socket closes.
19494
19495
19496         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
19497
19498 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
19499
19500         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
19501
19502 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
19503
19504         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
19505
19506 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
19507
19508         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
19509         has an abort request, convert it into a suspend request.
19510
19511 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
19512
19513         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
19514         warning for the usage of `UnmanagedFunctionPointerAttribute' which
19515         is not supported yet.
19516
19517 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19518
19519         * image.c: register assemblies loaded from data (bundles) in the loaded
19520         assemblies hash. Fixes bug #74772.
19521
19522 2005-04-29  Martin Baulig  <martin@ximian.com>
19523
19524         * class.c (mono_type_get_name_recurse): Update to the new naming
19525         schema from the latest .NET 2.x beta2.
19526         (mono_class_setup_vtable_general): If we're a generic instance,
19527         copy the vtable from our generic type definition and inflate all
19528         the methods in it.
19529
19530         * loader.c (find_method): Update to the new naming schema from the
19531         latest .NET 2.x beta2.
19532
19533 2005-04-29  Raja R Harinath  <harinath@gmail.com>
19534
19535         * class.c (mono_class_init): Add a mono_loader_unlock to the
19536         #74734 fix.
19537
19538 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
19539
19540         * icall.c (ves_icall_System_Environment_Exit): Remove the 
19541         suspend_all_other_threads () call for the time being, since it can hang.
19542
19543         * threads.c (mono_thread_manage): Similarly, disable the waiting for
19544         the background threads to exit, since it can also hang.
19545
19546         * class.c (mono_class_init): Applied patch from Ankit Jain 
19547         (radical@gmail.com). Avoid pending init errors when a field refers
19548         to a nested class using a typeref. Fixes #74734.
19549
19550         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
19551         this for dynamic modules.
19552
19553 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19554
19555         * threads.c: don't wait for threads that are in the process of aborting
19556         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
19557         and waiting for background threads to finish. This makes xsp and
19558         mod-mono-server exit without random length delays and/or hangs.
19559
19560 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19561
19562         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
19563
19564 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
19565
19566         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
19567         dynamic types to prevent infinite loops. Fixes #74727.
19568
19569         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
19570         ..._is_assignable_to.
19571
19572 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
19573
19574         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
19575
19576 2005-04-25  Martin Baulig  <martin@ximian.com>
19577
19578         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
19579
19580         * domain.c
19581         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
19582
19583         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
19584
19585         * reflection.c (build_compressed_metadata): Set metadata header
19586         version to 2.0.
19587
19588 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
19589
19590         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
19591         number into an integral and a decimal part. Fixes #70473.
19592
19593         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
19594
19595 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
19596
19597         * culture-info-table.h : reflected the latest locale-builder output.
19598
19599 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19600
19601         * threadpool.c: check for SuspendRequested too when deciding if
19602         mono_thread_interruption_checkpoint should be called.
19603
19604 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19605
19606         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
19607         * threads.c: remove interruption_mutex and use Interlocked instead. When
19608         suspending all the threads, wait for all the suspended events at once.
19609         If we're shutting down and get an APC that is going to be queued,
19610         call mono_thread_execute_interruption immediately, as the thread might
19611         be sleeping on a pthread condition or mutex.
19612
19613         * icall.c: call mono_runtime_set_shutting_down before suspending the
19614         threads.
19615
19616         Fixes bug #74693. And now xsp is happier when exiting.
19617
19618 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
19619
19620         * loader.c (mono_stack_walk): Fix #74690.
19621
19622 2005-04-22  Martin Baulig  <martin@ximian.com>
19623
19624         * mono-debug.h (MonoDebugMethodJitInfo): Added
19625         `MonoDebugMethodJitInfo *jit'.
19626
19627         * mono-debug.c (mono_debug_read_method): Cache the
19628         MonoDebugMethodJitInfo in `address->jit'.
19629         (mono_debug_free_method_jit_info): New public method.
19630
19631 2005-04-22  Martin Baulig  <martin@ximian.com>
19632
19633         * class.c (mono_class_is_assignable_from): Disallow
19634         type parameter -> interface.
19635
19636 2005-04-21  Dick Porter  <dick@ximian.com>
19637
19638         * threads.c (mono_thread_create): Turn an assertion into an error.
19639
19640 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
19641
19642         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
19643         
19644         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
19645         Fix some gcc 4.0 warnings.
19646
19647 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
19648
19649         * file-io.c: fix alt dir separator char on unix systems
19650         and cleanup (fixes bug #71214).
19651
19652 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
19653
19654         * marshal.c: Use CALLVIRT instead of CALL when dispatching
19655         a call to a remote domain, since the method may be an
19656         interface method in the client domain. This fixes bug #74192.
19657
19658 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19659
19660         * threadpool.c: recv/send are now performed before going back to managed
19661         code to save one transition.
19662
19663 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19664
19665         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
19666
19667         * metadata/threadpool.c: removed hack to workaround the bug above.
19668
19669         Fixes bug #74618.
19670
19671 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
19672
19673         * reflection.c reflection.h: Fix handling of parameter defaults in
19674         dynamic methods. Also fixes handling of parameter attributes.
19675         Fixes #74609.
19676
19677         * mono-debug.c (mono_debug_close_image): Fix warning.
19678
19679 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19680
19681         * socket-io.h: replaced old unused field with new 'blocking'.
19682         * threadpool.c: restore socket blocking state on windows(tm).
19683
19684 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
19685
19686         * icall.c: don't return the codebase in the AssemblyName[] returned by
19687         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
19688         * object-internals.h: Removed FIXME (fields were presents) and fixed
19689         versioncompat declaration.
19690
19691 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19692
19693         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
19694         not closed, so don't cleanup when it happens.
19695
19696 2005-04-13  Chris Toshok  <toshok@ximian.com>
19697
19698         * mono-debug-debugger.h: change prototype for
19699         mono_debugger_lookup_type.
19700
19701         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
19702         this function, although it should probably be named
19703         mono_debugger_init_type.
19704
19705 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19706
19707         * threadpool.c: fix non-AIO case.
19708
19709 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
19710
19711         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
19712         the built-in profiler to measure just JIT compilation times.
19713
19714 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19715
19716         * threadpool.c: the epollfd might be closed by another thread at
19717         any time, so ignore EBADF at treat it as a "we're closing" sign.
19718
19719 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19720
19721         * threadpool.c: release the semaphores with a count equals to the number
19722         of working threads in both IO and regular pools. Fixed typo that messed
19723         up the count of IO pool threads. Don't initialize the pipe handles if
19724         we're using epoll.
19725
19726 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19727
19728         * threadpool.c: some systems don't like a NULL when deleting the socket
19729         from epoll.
19730
19731 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19732
19733         * threadpool.c: fix semaphore allocation.
19734
19735 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19736
19737         * threadpool.c: added epoll() based implementation for asynchronous IO
19738         that is used instead of the default poll() when available.
19739         It can be disabled by setting MONO_DISABLE_AIO.
19740
19741 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19742
19743         * threadpool.c: windows needs 'closesocket' and instead of returning
19744         0 when the stream is closed while in select, it returns -1. Fixes bug
19745         #74573.
19746
19747 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
19748
19749         * class.c (class_compute_field_layout): Fix the regression caused by
19750         the previous try.
19751
19752 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19753
19754         * threadpool.c: separate pool for socket async. IO.
19755         * threadpool.h: mono_max_worker_threads is not a global any more.
19756
19757 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
19758
19759         * class.c (class_compute_field_layout): Fix #74549.
19760
19761 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19762
19763         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
19764         use 2 connected sockets instead.
19765
19766 2005-04-08  Miguel de Icaza  <miguel@novell.com>
19767
19768         * mono-config.c: Add new entry point for mkbundle
19769         mono_config_parse_memory. 
19770
19771 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19772
19773         * threadpool.c: removed another unused function.
19774
19775 2005-04-08  Ankit Jain  <radical@corewars.org>
19776
19777         * reflection.c (get_default_param_value_blobs): Add 'types'
19778         parameter to get the types encoded in the constant table.
19779         (mono_param_get_objects): Use the type from the constant table,
19780         not the type of the parameter, when creating default values.
19781         Handle null default values correctly.
19782
19783 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19784
19785         * file-io.c:
19786         * file-io.h:
19787         * threadpool.c:
19788         * threadpool.h:
19789         * icall.c:
19790         * socket-io.c: removed dead code for async IO.
19791
19792 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19793
19794         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
19795
19796         * threadpool.c: intercept socket async. calls and pass them to a thread
19797         that is polling and dispatching the job items to the threadpool as
19798         socket become ready. Fixes bugs #71217, #71933.
19799
19800         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
19801         between char and short/ushort arrays.
19802
19803         * socket-io.c: remove dead code.
19804
19805 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
19806
19807         * locales.c,
19808           icall.c : removed InternalToUpper_Comp() and
19809           InternalToLower_Comp().
19810
19811 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
19812
19813         * char-conversions.h : The tables were incorrectly generated. Should
19814           be generated against invariant culture.
19815
19816 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
19817
19818         * object.c (mono_runtime_invoke_array): Fix return value when 
19819         passing pre-created valuetype objects to ctors.
19820
19821         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
19822         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
19823         Fixes #74338.
19824
19825 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
19826
19827         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
19828         only used with --security and hides the wrong corlib version error.
19829
19830 2005-03-30  Joshua Tauberer  <tauberer@for.net>
19831
19832         * class.c: Changed mono_class_name_from_token so that types
19833         outside of a namespace don't have an initial period.  Improved
19834         the g_warning message used in _mono_class_get when loading
19835         fails.
19836         * assembly.c: In mono_assembly_load_reference, when an assembly
19837         can't be found, "No such file or directory" is misleading and
19838         unhelpful because a few paths were checked for the presence of
19839         the assembly.  When that happens (ENOENT), display a nicer
19840         message indicating the directories that were searched.  In all
19841         cases, the warning is made easier to read for non-hackers.
19842
19843 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
19844
19845         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
19846         project/solution.
19847         * appdomain.h|domain.c: Removed inline from functions.
19848         * appdomain.c: Reduced warnings when compiling on windows.
19849         * icall.c: Fixed output_debug declaration to gunichar2*.
19850         * mono-config.c: Reduced warnings when compiling on windows.
19851         * rand.c: Added missing "windows.h". Added missing return value.
19852         * rawbuffer.c: Added missing winsock2.h for windows.
19853         * sysmath.h: Added mono-compiler.h header to allow/ease 
19854         compilation with non-GCC compilers.
19855         * threads.c: Fixed declarations to compile with VS.NET C compiler.
19856         Removed cast warnings.
19857
19858         Adapted from the work of J Lothian (for VC6).
19859
19860 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19861
19862         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
19863         from default_path.
19864
19865 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
19866
19867         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
19868         the 2.0 profile.
19869
19870 2005-03-27  Raja R Harinath  <harinath@gmail.com>
19871
19872         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
19873         has to be in $(exec_prefix).  $(prefix) is for arch-independent
19874         stuff, and it would probably use $(prefix)/share rather than
19875         $(prefix)/lib.
19876
19877 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19878
19879         * console-io.c: added 2 includes that might be missing.
19880
19881 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19882
19883         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
19884         profile.
19885
19886         * reflection.c (create_custom_attr): Allocate the params array using
19887         alloca so it gets GC tracking.
19888
19889 2005-03-23  Chris Toshok  <toshok@ximian.com>
19890
19891         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
19892         out some spew.
19893
19894 2005-03-24  Raja R Harinath  <rharinath@novell.com>
19895
19896         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
19897         changes to pick up any changes in prefix, etc.
19898
19899 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19900
19901         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
19902         
19903         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
19904         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
19905
19906 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19907
19908         * class-internals.h object-internals.h class.c reflection.c: Extend the
19909         mono_lookup_dynamic_token () function to return the class of the
19910         token as well. 
19911
19912         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19913         well. Fixes #73848.
19914
19915 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19916
19917         * security-manager.c: Skip inheritance checks for intra-corlib
19918         class inheritance and method overrides. This skips a lot of checks
19919         and (anyway) permissions cannot work until corlib is loaded.
19920
19921 2005-03-23  Martin Baulig  <martin@ximian.com>
19922
19923         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19924         MONO_TYPE_GENERICINST.  
19925
19926 2005-03-23  Martin Baulig  <martin@ximian.com>
19927
19928         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19929
19930 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19931
19932         * class.c: added locking comments to some functions.
19933         Cache the interface offsets arrays (saves about 20 KB
19934         of runtime memory in a typical app).
19935         Reduce the time overhead in mono_class_setup_supertypes ().
19936
19937 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19938
19939         * icall.c: speedup and fix leaks in GetMethodsByName and
19940         GetPropertiesByName.
19941
19942 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19943
19944         * reflection.c: some locking fixes.
19945
19946 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19947
19948         * metadata.c: added missing break in case statement.
19949
19950 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
19951
19952         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19953         typedbyref return values. Fixes #73941.
19954
19955 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
19956
19957         * security-manager.c|h: Added demandunmanaged method and 
19958         suppressunmanagedcodesecurity class to MonoSecurityManager.
19959         Renamed aptc class to allowpartiallytrustedcallers.
19960
19961 2005-03-17  Martin Baulig  <martin@ximian.com>
19962
19963         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19964
19965 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19966
19967         * file-io.c: disabled file async. IO using aio_*. It uses the
19968         threadpool now. Workaround for bug #73718.
19969
19970 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19971
19972         * assembly.h, mono-config.c: added code to deal with bundled configs
19973         for bundled assemblies.
19974
19975 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19976
19977         * *.c, private.h: cleanup, removing old private.h header file.
19978
19979 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19980
19981         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19982         and throw_on_unmappable_char attributes.
19983
19984 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
19985
19986         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19987         _ProcessName_internal.
19988
19989 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19990
19991         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19992         #73631.
19993
19994         * icall.c threads.c threads-types.h: Remove slothash icalls as they
19995         are no longer used.
19996
19997 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19998
19999         * object.c (compute_class_bitmap): Add support for generics. Fixes
20000         #73527.
20001
20002 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
20003
20004         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
20005
20006 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20007
20008         * filewatcher.c: commented out the code for windows watcher, as we don't
20009         use it (we use the managed implementation instead).
20010
20011 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
20012
20013         * object-internals.h (MonoThread): Remove 'unused1' field.
20014
20015         * appdomain.c: Bump corlib version.
20016
20017         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
20018
20019         * reflection.c (mono_reflection_create_runtime_class): Remove the
20020         AssemblyBuilder.Save optimization since it causes too many problems.
20021
20022 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
20023
20024         * exception.c|h: Added mono_get_exception_reflection_type_load to
20025         create a ReflectionTypeLoadException object.
20026         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
20027         to return NULL is a InheritanceDemand fails during reflection. Updated
20028         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
20029         ReflectionTypeLoadException if an InheritanceDemand fails during 
20030         reflection. Added icall mapping for GetLinkDemandSecurity.
20031         * security-manager.c|h: Added ves_icall_System_Security_
20032         SecurityManager_GetLinkDemandSecurity internal call to return the
20033         class and methods permissions set for a LinkDemand. Removed unused
20034         fields in MonoSecurityManager.
20035
20036 2005-03-10  Martin Baulig  <martin@ximian.com>
20037
20038         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
20039         it's a generic instance.
20040
20041 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
20042
20043         * reflection.c (mono_get_object_from_blob): Applied patch from
20044         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
20045
20046         * class.c (mono_class_is_assignable_from): Another try at fixing 
20047         #73469 without breaking anything.
20048
20049 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
20050
20051         * class.c: (mono_class_is_assignable_from): Revert the last changes
20052         since they don't work with generics.
20053         
20054         * class.c (mono_class_is_assignable_from): Fix build bustage.
20055
20056         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
20057         the managed IsAssignableFrom method. Fixes #73469.
20058
20059         * reflection.c (mono_reflection_call_is_assignable_from): New helper
20060         function.
20061
20062 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
20063
20064         * object.c (mono_load_remote_field_new): Fix returning uninitialized
20065         memory when the remoting callback does not sets the out arguments.
20066         Fixes #73007.
20067
20068         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
20069         by mistake.
20070
20071         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
20072
20073         * object-internals.h (MonoStackFrame): Sync with managed object layout.
20074
20075         * appdomain.c: Bump corlib version.
20076
20077 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
20078
20079         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
20080         function.
20081
20082         * threads.c (mono_thread_attach): Detect threads which are not started
20083         by the GC pthread wrappers.
20084
20085 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
20086
20087         * icall.c: Added new icall for RNG.
20088         * rand.c|h: Added new icall to open the RNG. This allows to share a 
20089         single handle on Linux to access /dev/urandom and fix #73183.
20090
20091 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
20092
20093         * object.c: setting the new vtable in a transparent proxy object must
20094         not change the GC descriptor.
20095
20096 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20097
20098         * object.c: fixed compilation without GCJ support.
20099         * reflection.c: for runtime-created types ensure klass->has_references
20100         is correct (bug #73215).
20101
20102 2005-03-02  Martin Baulig  <martin@ximian.com>
20103
20104         * class.c (mono_class_is_assignable_from): Make this work if
20105         `oklass' is a generic instance; fixes #72831.
20106
20107 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
20108
20109         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
20110         with hasthis set.
20111         
20112         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
20113
20114         * marshal.c: Reorganize native->managed marshalling code to also use
20115         the emit_marshal_... functions.
20116
20117 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
20118
20119         * object.c: typed allocs have issues with bitmap sizes > 30,
20120         so check for max_set >= 30.
20121
20122 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
20123
20124         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
20125         managed code. Fixes #73012.
20126
20127         * metadata.h (MonoMarshalSpec): Add elem_mult field.
20128
20129         * metadata.c reflection.c: Load/Emit elem_mult as well.
20130         
20131         * metadata.h (MonoMarshalSpec): Add comment.
20132
20133         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
20134
20135         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
20136         num_elem to -1 if not given.
20137
20138         * object-internals.h (MonoReflectionMarshal): Add has_size field.
20139
20140         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
20141         given values.
20142
20143 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
20144
20145         * null-gc.c (mono_gc_free_fixed): Was not compilable.
20146
20147 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
20148
20149         * reflection.c (encode_marshal_blob): Encode param_num field as well.
20150
20151         * object-internals.h (MonoReflectionMarshal): Add param_num field.
20152
20153 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
20154
20155         * object.c: generalized the reference bitmap creation
20156         and added hooks for the new GC.
20157         * class-internals.c: removed the gc_bitmap field from MonoClass.
20158
20159 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20160
20161         * domain.c: help the compiler to produce better code
20162         in mono_jit_info_table_find ().
20163
20164 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20165
20166         * object.c: make all allocations look typed.
20167
20168 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20169
20170         * socket-io.c: load Mono.Posix if it's not loaded already
20171         (fixes bug#73033).
20172
20173 2005-02-24  Martin Baulig  <martin@ximian.com>
20174
20175         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
20176         * reflection.c (dup_type): Likewise.
20177
20178 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
20179
20180         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
20181         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
20182
20183 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20184
20185         * domain.c, threads.c, object-internals.h: make the critical thread
20186         local vars use the fast access mode (even when we're compiled in
20187         a lib). Provide accessors to be used by the jit during codegen.
20188
20189 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20190
20191         * appdomain.c: Changed hook functios behavior to include
20192         support for the reflection only assemblies. Some icalls were changed
20193         to support the mentioned assemblies too. Signatures of static methods
20194         try_assembly_resolve and real_load now have an additional parameter:
20195         refonly.
20196
20197         * assembly.c: General changes to mono_assembly_ methods to support
20198         reflection only api. Functions mono_assembly_open, mono_assembly_load,
20199         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
20200         suffix, to support an additional gbool parameter to specify whether
20201         the assembli is reflection only or not. Created some new hook functions 
20202         to add support for reflection only assemblies. Signatures of static 
20203         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
20204         have now an additional parameter: refonly.
20205
20206         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
20207         indicating whether the assembly is reflection only or not.
20208
20209         * exception.c: Add mono_get_exception_invalid_operation.
20210
20211         * icall.c: Throw an InvalidOperationException when trying to invoke
20212         a property/method/event, or trying to set/get the value of a field.
20213         Also add an icall to retrieve the ref_only flag to the
20214         MonoReflectionAssembly.
20215
20216 2005-02-23  Chris Toshok  <toshok@ximian.com>
20217
20218         Part of fix for #72827.
20219         * mono-debug.c (mono_debug_add_method): add lexical block data to
20220         the info we write.  Kind of a hack at the moment - we copy the
20221         lexical block info from the MonoDebugMethodInfo to the
20222         MonoDebugMethodJitInfo here, before writing it.
20223         (mono_debug_read_method): read the lexical block info.
20224
20225         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
20226
20227         * debug-mono-symfile.h: add lexical block support.
20228
20229         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
20230         support.
20231
20232 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
20233
20234         * loader.c (mono_lookup_pinvoke_call): Fix warning.
20235
20236         * object.c (mono_runtime_free_method): Call mono_free_method () and
20237         put the TODOs there.
20238
20239         * loader.c (mono_free_method): Free up most memory allocated for 
20240         dynamic methods.
20241
20242 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20243
20244         * reflection.c: properly flag a Type argument to a
20245         named custom attr value (bug #72248).
20246
20247 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20248
20249         * reflection.c: reduce code duplication in named custom
20250         attribute encoding.
20251
20252 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
20253
20254         * reflection.c: properly encode custom attrs of type object
20255         (bug #72649).
20256
20257 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
20258
20259         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
20260
20261 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
20262
20263         * socket-io.c: load System.dll if it's not loaded already
20264         (bug #72850 and #70477).
20265
20266 2005-02-21  Martin Baulig  <martin@ximian.com>
20267
20268         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
20269         generic instances.
20270
20271 2005-02-21  Martin Baulig  <martin@ximian.com>
20272
20273         * reflection.c (mono_image_build_metadata): We also need to
20274         "fixup" the MethodImpl table after we computed the final method
20275         indices.  Call fixup_methodimpl() to do that.
20276         (fixup_methodimpl): New private method.
20277
20278 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20279
20280         * assembly.c: special case mscorlib.dll (bug#72536),
20281         patch from Carlos Alberto Cortez.
20282
20283 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
20284
20285         * threads-types.h threads.c: Fix build bustage.
20286
20287         * threads.c: Use a union for long<->double conversions.
20288
20289         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
20290         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
20291
20292         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
20293         containing the checkpoint call with NOT_TAKEN.
20294         
20295         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
20296         checkpoint before pushing the arguments, so they won't have to be
20297         spilled to stack.
20298
20299 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20300
20301         * domain.c, assembly.c, domain-internals.h: make some data
20302         const and relocation-free.
20303
20304 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20305
20306         * object.c, appdomain.c, class-internals.h: introduce the
20307         MonoClassRuntimeInfo structure to hold the info needed to
20308         use a class at runtime. Made mono_class_vtable() lock-free
20309         for all the appdomains.
20310
20311 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
20312
20313         * metadata-internals.h, image.c: introduce a per-image mempool to
20314         be used for memory that has the same lifetime as the image.
20315
20316 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
20317
20318         * domain.c: In mono_init_internal(), instead of selecting the first
20319         runtime version supported by an executable, get a list of all
20320         supported versions and select the one for which an mscorlib exists
20321         (since even if the runtime supports a given version, it doesn't mean
20322         that the framework for that version is installed).
20323         Modified get_runtimes_from_exe to support this behavior.
20324         In supported_runtimes, added information about additional system
20325         assembly versions.
20326         
20327         * assembly.c: Added support for more than one system assembly version
20328         per runtime version. Updated the assembly list.
20329         In mono_assembly_remap_version, removed the initial version check,
20330         since we don't know to which version we need to compare until we
20331         get the version set on which the assembly is based.
20332         Moved the code for loading corlib into the new method
20333         mono_assembly_load_corlib(), so it can be used by the initialization
20334         code.
20335         
20336         * domain-internals.h: Updated data structures and added declaration
20337         for mono_assembly_load_corlib.
20338
20339 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
20340
20341         * reflection.c (resolve_object): Fix the creation of the signature in 
20342         the SignatureHelper case.
20343
20344         * assembly.c (mono_assembly_remap_version): Fix binary search.
20345         
20346 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
20347  
20348         * class.c: Added inheritance check when a method is overloaded (from a
20349         virtual method or when implementing an interface) and when a class is
20350         inherited. Added functions to set a failure for a class and to 
20351         retreive the exception from a failure.
20352         * class-internals.h: Added fields to MonoClass to keep the exception
20353         information status for inheritance (or other exceptions) to be thrown
20354         later (i.e. not at load time).
20355         * object.c: Throw the inheritance SecurityException when a type is to 
20356         be created with either class or method inheritance violations.
20357         * reflection.c|h: Fix when getting declsec from a class. Removed 
20358         unrequired code for class. Improved sanity in parameter naming.
20359         * security-manager.c|h: Added functions to check for class and method
20360         inheritance.
20361
20362 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
20363
20364         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
20365         and has_finalize in dynamic types as well.
20366
20367 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
20368
20369         * culture-info-table.h : fixed currency format for en-GB (and so on).
20370
20371 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
20372
20373         * gc.c: ensure the GC handles never have 0 as a value.
20374
20375 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
20376
20377         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
20378         a pointer to a struct to unmanaged code. Fixes #72625.
20379
20380 2005-02-16  Martin Baulig  <martin@ximian.com>
20381
20382         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
20383
20384 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
20385
20386         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
20387
20388 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
20389
20390         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
20391
20392         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
20393         UnmanagedFunctionPointerAttribute, use it for determining calling convention
20394         etc. Fixes #71471.
20395
20396         * reflection.c (mono_custom_attrs_get_attr): New helper function.
20397
20398         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
20399
20400 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
20401
20402         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
20403         changes to make the current context a field in MonoThread.
20404
20405 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
20406
20407         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
20408         the last change.
20409         
20410         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
20411         extracted from mono_marshal_get_native_wrapper.
20412
20413         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
20414         to create wrappers around native functions.
20415
20416         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
20417         delegates for arbitrary function pointers. Fixes #71472.
20418
20419 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20420
20421         * threads.c: cleaned up the code a little.
20422
20423 2005-02-15  Martin Baulig  <martin@ximian.com>
20424
20425         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
20426         the data table.
20427
20428         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
20429         allocate larger chunks if needed.
20430
20431 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
20432
20433         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
20434         in by mistake.
20435
20436 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
20437
20438         * domain.c: keep the domains in an array and ensure the domain ids
20439         are kept small, so they can be used as indexes to domain-specific data
20440         with a small memory overhead.
20441
20442 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
20443
20444         * icall.c: Handle byref types in Type icalls. Fixes #72544.
20445
20446 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
20447
20448         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
20449
20450 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
20451
20452         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
20453
20454         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
20455         values.
20456
20457         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
20458         
20459 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
20460
20461         * domain-internals.h: add the hashtable here.
20462
20463         * class-internals.h: Remove `info' from MonoMethod
20464
20465         * domain.c: Add a new hashtable, jit_trampoline_hash
20466
20467 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20468
20469         * object.c: don't set the value of static fields
20470         (fixes bug#72494).
20471
20472 2005-02-11  Martin Baulig  <martin@ximian.com>
20473
20474         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
20475         (mono_debug_add_method): Silently ignore the method if it's too big.
20476         (mono_debug_add_type): Likewise.
20477
20478 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
20479
20480         * threads.c, appdomain.c: remove #ifdefs from the code.
20481
20482 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
20483
20484         * metadata-internals.h: Added flags to MonoAssembly to cache the most
20485         common security informations. This allows us to stay in unmanaged code
20486         when doing LinkDemand and it's special cases (except for the first 
20487         time for initialization). The flags a very much used with --security.
20488         * reflection.c|h: Added code to get declarative security attributes 
20489         for LinkDemand and InheritanceDemand. This required to refactor the
20490         existing code for Demand.
20491         * security-manager.c|h: Added new method fields for the special cases
20492         of LinkDemand.
20493
20494 2005-02-10  Martin Baulig  <martin@ximian.com>
20495
20496         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
20497         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
20498
20499 2005-02-10  Martin Baulig  <martin@ximian.com>
20500
20501         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
20502         debugging code; this is almost a complete rewrite.
20503
20504         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
20505
20506 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20507
20508         * domain.c, object.h: expose mono_string_equal () and 
20509         mono_string_hash ().
20510         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
20511         it's implemented in managed code.
20512
20513 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20514
20515         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
20516         lo leak objects between appdomains.
20517
20518 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20519
20520         * assembly.c: old compilers compilation fix from 
20521         robertj@gmx.net (Robert Jordan).
20522
20523 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
20524
20525         * class-internals.h: Little reminder for the future.
20526
20527         * debug-helpers.c: Fix up wrapper_type_names
20528
20529 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20530
20531         * image.c, metadata-internals.h: when loading an image from a file,
20532         mmap all of it and use the same codepaths as when using a
20533         in-memory image: the code is simpler and we use less memory
20534         (both writable and readonly).
20535
20536 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20537
20538         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
20539         API to alloc runtime data structures that need to be tracked by the
20540         GC and contain pointers.
20541         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
20542         make the code more readable and eventually use a different GC.
20543
20544 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
20545
20546         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
20547         for out arguments.
20548         
20549 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
20550
20551         * object.c: In release_type_locks(), don't release the cctor lock
20552         if it has already been released. This fixes a crash in the
20553         thread5 test.
20554
20555 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20556
20557         * gc.c, marshal.c, icall.c: register a delegate for finalization
20558         only when the native function pointer has been allocated for it.
20559
20560 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20561
20562         * object.c: cleaned up some code, allocate objects that are
20563         pointer free with the atomic malloc variant. Allocate memory
20564         for static data from the mempool if it's pointer-free.
20565         Allocate the bounds array at the end of the array data, when needed.
20566         * object-internals.h, object.h: move a private function in a private
20567         header.
20568         * class.c: handle missing case in tracking references in fields.
20569
20570 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20571
20572         * class.c, class-internals.h: keep track if a type has
20573         reference fields in either the instance or static fields.
20574
20575 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
20576
20577         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
20578         and renamed to MonoRuntimeInfo. Added fields to store the expected
20579         framework assembly version. Changed mono_get_framework_version and
20580         mono_get_runtime_version for a single mono_get_runtime_info method.
20581         
20582         * assembly.c: Added method to remap system assembly versions to the
20583         current executing runtime version. Removed old mapping code.
20584         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
20585         
20586         * icall.c, reflection.c: Track api changes.
20587
20588 2005-02-06  Miguel de Icaza  <miguel@novell.com>
20589
20590         * loader.c (method_from_memberref): Improve error reporting,
20591         produce the class name instead of the typeref/typedef index. 
20592
20593 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
20594
20595         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
20596
20597 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20598
20599         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
20600         stdcall and charset name mangling.  Reorganize the code and add
20601         some tracing stuff.
20602
20603 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
20604
20605         * monodiet.c: More iters!
20606
20607         * marshal.c: Iter usage.
20608
20609         * icall.c: Iter usage.
20610
20611         * object.c: Use iters.
20612
20613         * debug-helpers.c: More iters
20614
20615 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20616
20617         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
20618         under win32.
20619
20620 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
20621
20622         * mono-debug-debugger.c: use iters
20623
20624         * class.c, class-internals.h: mono_class_setup_events is static
20625         now
20626
20627         * All callers: use iters
20628
20629 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20630
20631         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
20632         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20633
20634 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
20635
20636         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
20637
20638         * marshal.h: Add prototypes for ldfld/stfld_remote.
20639
20640         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
20641         this is called during startup.
20642         
20643 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20644
20645         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
20646         MonoThreadsSync struct private in monitor.c. Changed the way
20647         MonoThreadsSync is allocated so it's faster and there is no
20648         need to keep track of it with a finalizer and it uses less memory.
20649         This also finally allows us to allocate mono objects as ptrfree when
20650         there are no reference fields.
20651
20652 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
20653
20654         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
20655         disappearing link to the GC interface and use them to simplify
20656         the gchandles code.
20657
20658 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
20659
20660         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
20661         stfld_remote which call mono_load/store_field_new. This allows methods
20662         calling ldfld/stfld wrappers to be AOTed.
20663
20664         * console-io.c: Include sys/filio.h under solaris.
20665         
20666         * console-io.c: Include curses.h if needed correctly.
20667
20668 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
20669         
20670         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
20671         method->klass as well.
20672
20673         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
20674
20675         * class.c (mono_class_init): Switch on lazy initialization of 
20676         methods.
20677
20678         * class.c (mono_class_get_finalizer): Handle the case when the 
20679         finalizer is inherited.
20680
20681 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20682
20683         * console-io.c: <curses.h> is needed by term.h on solaris.
20684
20685 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
20686
20687         * icall.c, class-internals.h, monodiet.c, class.c: Remove
20688         mono_class_setup_properties where possible. Remove this ftn from
20689         the header file, and make it static.
20690
20691 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
20692
20693         * loader.c: Add missing setup_... call.
20694
20695         * class.c: Add missing setup_... calls.
20696
20697         * class.c (mono_class_init): Switch on lazy initialization of 
20698         the generic vtable.
20699         
20700         * class.c (mono_class_init): Fix generics broken by the recent changes.
20701
20702         * monodiet.c (handle_type): Add missing setup_... calls.
20703
20704         * class.c: Back out garbage in previous patch.
20705         
20706         * class.c: Add missing setup_... calls.
20707
20708         * class.c (mono_class_get_method_from_name_flags): Avoid calling
20709         mono_class_setup_methods () if possible.
20710
20711         * class-internals.h (MonoClass): Add 'has_cctor' flag.
20712
20713         * class-internals.h (MonoCachedClassInfo): New structure.
20714
20715         * class.c: Initialize properties and events fields of MonoClass lazily.
20716
20717         * class.c: Add infrastructure for lazily initializing the methods and
20718         vtable fields of MonoClass. Not yet used.
20719
20720         * class.c (mono_class_get_finalizer): New helper function.
20721
20722         * class.c: Add infrastructure for loading some class related data from
20723         an AOT file.
20724
20725         * object.c: Add infrastructure for initializing the vtable from data
20726         in the AOT file.
20727
20728         * gc.c (run_finalize): Use mono_class_get_finalizer ().
20729
20730         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
20731         appropriate initialization function before accessing parts of the
20732         MonoClass structure.
20733
20734         * marshal.c: Fix warnings.
20735         
20736         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
20737
20738         * mono-debug-debugger.c (get_exception_message): Use 
20739         mono_class_get_method_from_name_flags ().
20740
20741 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
20742
20743         * reflection.c, appdomain.c: Replace a few manual searches that
20744         Zoltan missed. (Paolo approved this part of my initial patch).
20745
20746 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
20747
20748         * profiler.c: disable recording statistical events at report time.
20749
20750 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20751
20752         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
20753         to byteswap arrays of enum values, too (bug #72080).
20754
20755 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
20756
20757         * appdomain.c (set_domain_search_path): Allow this to be called if
20758         domain->setup is not yet set.
20759
20760         * loader.c (mono_method_get_index): New helper function.
20761
20762         * loader.c reflection.c: Use mono_method_get_index ().
20763
20764         * class.c (mono_class_get_method_from_name_flags): New helper method.
20765
20766         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
20767         this.
20768
20769         * class.c (mono_class_get_cctor): New helper method.
20770
20771         * string-icalls.c object.c class.c marshal.c reflection.c: Use
20772         mono_class_get_method () to look up methods.
20773
20774 2005-02-01  Miguel de Icaza  <miguel@novell.com>
20775
20776         * console-io.c: Fix the build, this should work on Windows.
20777
20778 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
20779
20780         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
20781         be set to null to keep things valid
20782
20783 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20784
20785         * icall.c: added Console 2.0 icalls.
20786         * Makefile.am: added console-io.[ch]
20787         * console-io.[ch]: internal calls for Console 2.0 API.
20788
20789 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20790
20791         * class.c: make sure we consider all the interfaces
20792         when calculating max_interface_id (bug found by
20793         Jeroen Frijters running ikvm).
20794
20795 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
20796
20797         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
20798         valuetype fields to null.
20799
20800         * object.c (set_value): Ditto. Fixes #71669.    
20801
20802 2005-01-31  Martin Baulig  <martin@ximian.com>
20803
20804         * metadata.c (mono_metadata_has_generic_params): New public
20805         function; checks whether something is a generic method.
20806
20807 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20808
20809         * appdomain.c: fix infinite recursion when adding assemblies.
20810
20811 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
20812
20813         * object.c: Fix small typo to return all items for Environment.
20814         GetCommandLineArgs.
20815
20816 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20817
20818         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
20819         reflection.c: more domain and assembly-unload related fixes
20820         and memory leaks plugs.
20821
20822 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
20823
20824         * 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.
20825
20826 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
20827
20828         * loader.c (mono_method_signature): Make this method lazy
20829         (mono_get_method_from_token): Don't computate the signature here.
20830
20831         Doing this saves quite a bit of memory. I got 90 kb on starting up
20832         monodoc. It should also save some disk reads on startup.
20833
20834         * *: MonoMethod->signature might be NULL now. You *MUST* use
20835         mono_method_signature.
20836
20837 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
20838
20839         * object.c (mono_runtime_get_main_args): Return an array from the
20840         current domain here. Fixes #71938.
20841
20842 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20843
20844         * monitor.c: formatting changes to comply with the
20845         mono coding style and remove #ifdefs from the code.
20846
20847 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20848
20849         * metadata.c, private.h: remove some unneeded data
20850         and use a more compact representation for table schemas.
20851
20852 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20853
20854         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
20855         to get a better distribution in hash tables.
20856         * *.c: use mono_aligned_addr_hash() where appropriate.
20857         * assembly.c: make var static.
20858
20859 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
20860
20861         * domain-internals.h: Put MonoJitInfo on a diet.
20862
20863         * domain.c: Fix a warning.
20864
20865 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20866
20867         * gc.c: rework the gc handles code to reuse handles
20868         when freed.
20869
20870 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20871
20872         * domain.c: fixed long standing bug in mono_string_equal() which
20873         was brought to light with the ldstr changes.
20874
20875 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
20876
20877         * reflection.c: Remove warning by adding missing include for marshal.h
20878
20879 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20880
20881         * domain.c, object.c: change the ldstr_table to hold
20882         MonoString* as keys: makes the runtime isinterned lookup
20883         faster and simplifies memory management.
20884
20885 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
20886  
20887         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
20888         possible to add imperative security checks before calling the icall.
20889         * reflection.c: Return security attributes on the original MonoMethod
20890         (and not the wrapped one). This fix permissions on icalls.
20891
20892 2005-01-25  Dick Porter  <dick@ximian.com>
20893
20894         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
20895         the check for mktime() support actually test the mktime() return
20896         value.  "Fixes" bug 71682, though the output is still different to
20897         MS.
20898
20899 2005-01-25  Martin Baulig  <martin@ximian.com>
20900
20901         * class.c (mono_class_is_assignable_from): Make this work for
20902         generic instances.
20903
20904 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
20905
20906         * marshal.c (mono_string_utf8_to_builder)
20907         (mono_string_builder_to_utf16): We might not have ownership of the
20908         string. In thise case, we need to create a new buffer.
20909
20910         * object-internals.h (mono_stringbuilder_capacity): sb->str might
20911         be null, in which case, use the default capacity.
20912
20913 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20914
20915         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20916         GC events to the profiler.
20917
20918 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20919
20920         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20921         if you don't want the GC to run.
20922
20923 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20924
20925         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20926         start providing a GC API and keeping different implementations in
20927         their own file.
20928         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20929
20930 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
20931
20932         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20933         mmap rather than allocating a huge buffer.
20934         (mono_debug_close_mono_symbol_file): Free the buffer allocated
20935         above.
20936
20937 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
20938
20939         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20940         and CheckExecutionRights.
20941         * reflection.c|h: Keep the index of the declarative security to be 
20942         used, instead of the pointer, when AOT compiler is used. Also add 
20943         class initialization when requesting demands.
20944         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20945         CheckExecutionRights. Both properties are now FALSE by default, and
20946         unmodifiable, unless the --security option is used.
20947
20948 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20949
20950         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20951         reflection.c: properly refcount images and assemblies, many leaks fixed.
20952
20953 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20954
20955         * threadpool.c: increase the timeout for threads in the thread pool to
20956         10s.  Fixes bug #67159.
20957
20958 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
20959
20960         * class-internals.h: Sun's compiler insists on explicit
20961         signed on bit fields to handle then correctly.
20962
20963 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
20964
20965         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20966         Make the size of the array fit only the number of invalid path
20967         chars that we have.
20968
20969         * class.c (_mono_class_get): Improve the error reporting when a
20970         class referenced is not found, to assist debugging. 
20971
20972 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20973
20974         * threads.c: fix off-by-one error.
20975         * domain.c: free data allocated in the domain.
20976
20977 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
20978
20979         * reflection.c (mono_method_body_get_object): Fill out exception info
20980         as well.
20981
20982         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
20983         structure.
20984         
20985 2005-01-19  Martin Baulig  <martin@ximian.com>
20986
20987         * loader.c (mono_get_method_constrained): Make this work again.
20988
20989 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
20990
20991         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
20992         guint16 to match the managed side.
20993
20994         * reflection.c (mono_reflection_body_get_object): Fill out local
20995         variables array.
20996
20997         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20998         as well.
20999
21000         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
21001         'local_var_sig_token'.
21002
21003 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
21004
21005         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
21006         System.Drawing.
21007
21008         * reflection.c (mono_method_body_get_object): Handle abstract and
21009         runtime methods.
21010
21011 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
21012
21013         * marshal.c, loader.c, class-internals.h, reflection.c:
21014         store the emthod data for a wrapper in an array instead of a list.
21015
21016 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
21017
21018         * marshal.c: change the code to allocate memory more
21019         conservatively for method wrappers.
21020
21021 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
21022
21023         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
21024         fields from MonoClass to the marshal info structure where they belong.
21025
21026 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
21027
21028         * class.c, object.c, class-internals.h, marshal.c: rearrange
21029         some fields and tweak some types to lower memory usage.
21030
21031 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
21032
21033         * threads.c (signal_thread_state_change): Handle the case when the
21034         target thread is the current thread.
21035
21036         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
21037
21038         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
21039         emit_ptr_to_object_conv. 
21040
21041         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
21042         marshalling. Fixes #71352.
21043
21044 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
21045
21046         * metadata.h, blob.h: move table enum to blob.h so it can be included
21047         in any header.
21048         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
21049         cut the size of MonoImage/MonoDynamicImage.
21050
21051 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
21052
21053         * profiler.c (mono_profiler_install_simple): Fix default arguments.
21054
21055 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
21056
21057         * reflection.c, reflection.h, icall.c: add a function to check
21058         if an attribute type is defined for a metadata object.
21059
21060 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
21061
21062         * object-internals.h: Added some needed fields from StringBuilder class.
21063         * marshal.c: Set the maxCapacity when creating a StringBuilder.
21064
21065 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
21066
21067         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
21068         threads before shutting down the runtime.
21069
21070         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
21071
21072 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
21073
21074         * object-internal.h, threads.c: implement stacksize and 
21075         parameterized thread start functionality (requires
21076         matching corlib). Marked broken code for later removal.
21077
21078 2005-01-12  Martin Baulig  <martin@ximian.com>
21079
21080         * class-internals.h (MonoGenericClass): Moved the `initialized'
21081         flag to MonoDynamicGenericClass, removed `init_pending'.
21082         (MonoGenericInst): Added `is_reference' flag.
21083
21084 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
21085
21086         * reflection.c (mono_image_create_pefile): Only set the pe_offset
21087         inside the MSDOS header. Fixes #71201.
21088
21089         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
21090         gc thread.
21091         (mono_domain_finalize): Ditto.
21092
21093 2005-01-12  Martin Baulig  <martin@ximian.com>
21094
21095         * class.c (mono_get_shared_generic_class): Use the cache for
21096         non-dynamic generic classes.
21097
21098         * class-internals.h (mono_class_create_generic_2): Removed
21099         function prototype, this function is now static inside class.c.
21100
21101         * class.c (mono_class_create_generic_2): Made this static, only
21102         call it from mono_class_init() and mono_class_setup_parent().
21103         (collect_implemented_interfaces_aux): Call mono_class_init() on
21104         the interfaces we collect.
21105         (mono_class_setup_vtable): Call mono_class_init (class->parent).
21106
21107 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
21108
21109         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
21110         it a real thread handle.
21111
21112         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
21113         MonoJitExceptionInfo, since each catch clause needs its own variable.
21114         
21115 2005-01-11  Dick Porter  <dick@ximian.com>
21116
21117         * image.c (mono_pe_file_open): New variant on mono_image_open()
21118         that does not set up the CLI metadata; used for FileVersionInfo so
21119         it can get the data for windows binaries too.
21120         
21121         * process.c (process_read_string_block): Don't read off the end of
21122         the StringTable block.
21123
21124         These both fix bug 70766.
21125
21126 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
21127
21128         * gc.c: set some fields to NULL at GC cleanup time.
21129         * threads.c: if we quit the main thread, call exit ().
21130
21131 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
21132
21133         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
21134
21135 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
21136
21137         * threads.h, threads.c, object.c: added accessor and settor for
21138         main_thread. Handle it specially when exiting from it: wait
21139         for other foreground threads to exit.
21140
21141 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
21142
21143         * process.c, verify.c: remove some bloat.
21144
21145 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
21146
21147         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
21148         the calling convention to cdecl under win32.
21149
21150 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
21151
21152         * object.c (mono_object_get_size): New function to get the size of
21153         an object instance.
21154
21155         * profiler.c (simple_allocation): Use above.
21156
21157 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
21158
21159         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
21160         ves_icall_System_AppDomain_getRootDomain (as it's not required to
21161         get an appdomain by it's id and we can't assume the root's id is 0).
21162         * domain-internals.h: Change the function prototype to match.
21163         * icall.c: Change the icall table for AppDomain.
21164
21165 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
21166
21167         * locales.c (string_invariant_compare_char): Only compute
21168         GUnicodeTypes in the case where we need them.  Test for ordinality
21169         first and return if so.
21170
21171         From the commit:
21172
21173                 /*
21174                  * FIXME: here we must use the information from c1type and c2type
21175                  * to find out the proper collation, even on the InvariantCulture, the
21176                  * sorting is not done by computing the unicode values, but their
21177                  * actual sort order.
21178                  */
21179
21180 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
21181
21182         * loader.c: for P/Invoke methods, allow the "Internal" shared
21183         library name to refer to the calling process symbol namespace.
21184
21185 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
21186
21187         * Makefile.am: Add the security manager to the build.
21188         * security-manager.c|h: New. Initialization of the security manager.
21189
21190 2005-01-07  Dick Porter  <dick@ximian.com>
21191
21192         * threads.c: 
21193         * monitor.c: Update thread state during Monitor and WaitHandle
21194         waits.  Fixes bug 71031.
21195
21196 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
21197
21198         * reflection.c (property_encode_signature): Correctly handle when the
21199         property has no methods.
21200
21201 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
21202
21203         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
21204         
21205         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
21206         fields from mb, not rmb. Fixes #71017.
21207
21208         * marshal.c (emit_ptr_to_str_conv): Add support for 
21209         ByValTStr -> string conversion. Fixes #71015.
21210
21211         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
21212
21213         * mempool.c (mono_mempool_contains_addr): New helper function.
21214
21215 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
21216
21217         * metadata.c (mono_metadata_compute_size): Fix size calculation of
21218         HasSematics encoded fields.
21219         
21220         * metadata.c (mono_type_to_unmanaged): Improve error message for 
21221         invalid string marshalling.
21222
21223         * metadata.c: Fix warnings.
21224         
21225 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
21226
21227         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
21228         profiler support.
21229
21230 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
21231
21232         * domain.c object.c domain-internals.h: Revert part of r38077 since the
21233         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
21234         tests.
21235
21236 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
21237
21238         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
21239         so methods containing these can be AOTed.
21240
21241 2005-01-03  Martin Baulig  <martin@ximian.com>
21242
21243         * loader.c (find_method): Removed the hack for generic instances.
21244         (method_from_memberref): If our parent is a generic instance, pass
21245         its generic type definition to find_method() and then inflate the
21246         method.
21247         (mono_get_method_constrained): Pass the generic type definition to
21248         find_method() and inflate the method later.
21249
21250         * class-internals.h (MonoStats): Added `generic_class_count'.
21251
21252         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
21253         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
21254
21255         * reflection.c (mono_custom_attrs_from_params): Don't ignore
21256         generic type definitions.
21257
21258 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
21259
21260         * loader.c icall.c: Fix warnings.
21261
21262 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
21263
21264         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
21265         blittable types. Fixes #70864.
21266
21267 2004-12-29  Martin Baulig  <martin@ximian.com>
21268
21269         * icall.c
21270         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
21271
21272         * reflection.c (mono_method_get_object): Create a
21273         "System.Reflection.MonoGenericMethod" for inflated methods; don't
21274         call mono_get_inflated_method().
21275
21276         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
21277
21278 2004-12-27  Martin Baulig  <martin@ximian.com>
21279
21280         * class-internals.h (MonoMethod): Added `is_inflated' flag.
21281         (MonoMethodInflated): Added `inflated' field.
21282
21283         * class.c (mono_class_inflate_generic_method): Don't really
21284         inflate the method here; just set the `is_inflated' flag in the
21285         MonoMethod.
21286         (mono_class_get_inflated_method): Actually inflate the method here
21287         if it's not already inflated; we use the MonoMethodInflated's new
21288         `inflated' field as a cache.
21289
21290 2004-12-26  Martin Baulig  <martin@ximian.com>
21291
21292         * class.c
21293         (inflate_generic_class): Moved some code out of inflate_generic_type().
21294         (mono_class_inflate_generic_method): If we're already inflated,
21295         inflate the context and use the declaring method; ie. make sure
21296         the declaring method of an inflated method is always the generic
21297         method definition.
21298         (mono_class_create_from_typedef): Create
21299         `class->generic_container->context->gclass'.
21300
21301 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
21302
21303         * metadata-internals.h, marshal.c, reflection.c: More
21304         MonoGHashTable->GHashTable.
21305
21306         * domain-internals.h, class.c: Change MonoGHashTable's into
21307         GHashTables for some cases where no gc stuff is used
21308
21309         All users: update apis
21310
21311 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
21312
21313         * metadata.c (builtin_types): Make this `const'. Makes this get
21314         put into the shareable section.
21315         (mono_metadata_init): Casts to make gcc happy.
21316
21317 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
21318
21319         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
21320
21321 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
21322
21323         * icall.c: Added an internal call to retrieve the position and length
21324         of assembly-level declarative security attributes (RequestMinimum, 
21325         RequestOptional and RequestRefuse). This is used by the Assembly class
21326         to re-create the corresponding permission sets.
21327
21328 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21329
21330         * marshal.c: fix the stelemref wrapper to be type correct
21331         (and faster).
21332
21333 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
21334
21335         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
21336         to do key & 0x7fffffff. Hashtable already does this. It just
21337         results in longer code.
21338
21339 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
21340
21341         * appdomain.c: Bump corlib version.
21342         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
21343         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
21344         * reflection.c|h: Add functions to get declarative security infos
21345         (blob position and length) for assemblies, classes and methods.
21346
21347 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
21348
21349         * reflection.c: sort the constant table (bug #70693).
21350
21351 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
21352
21353         * object-internals.h, threads.c, domain.c: add accessors for
21354         the MonoThread and MonoDomain tls keys.
21355
21356 2004-12-18  Martin Baulig  <martin@ximian.com>
21357
21358         * class.c (inflate_generic_type): If we're inflating a generic
21359         instance, set `ngclass->context->container = context->container';
21360         ie. the container we inflated into.
21361
21362         * metadata.c (mono_metadata_parse_generic_param): Reflect above
21363         inflate_generic_type() changes.
21364
21365 2004-12-17  Martin Baulig  <martin@ximian.com>
21366
21367         * class-internals.h
21368         (MonoGenericClass): Replaced `MonoType *generic_type' with
21369         `MonoClass *generic_class'.  Removed `dynamic_info'; if
21370         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
21371         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
21372
21373 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
21374
21375         * exception.c (mono_exception_from_token): New helper function.
21376
21377 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
21378
21379         * assembly.c (mono_assembly_load_with_partial_name): Call 
21380         mono_assembly_loaded before invoking the preload hooks. Fixes
21381         #70564.
21382
21383         * object-internals.h (MonoThread): Change culture_info and 
21384         ui_culture_info into an array.
21385
21386         * threads.c: Cache culture info objects from more than one appdomain.
21387
21388         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
21389         current UI culture.
21390
21391 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
21392
21393         * threads.h threads.c appdomain.c: Clear the culture_info field of
21394         all threads during unloading if they point to an object in the dying
21395         appdomain.
21396
21397 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
21398
21399         * culture-info.h (TextInfoEntry): New struct
21400         * object-internals.h: sync with managed
21401         * locales.c: fill the `text_info_data' field
21402         * culture-info-tables.h: update
21403
21404 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
21405
21406         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
21407         collector.
21408
21409 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
21410
21411         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
21412         (ves_icall_ModuleBuilder_getMethodToken): Ditto
21413
21414 2004-12-12  Martin Baulig  <martin@ximian.com>
21415
21416         * mono-debug-debugger.c (write_type): If we're an enum and the
21417         builtin types have already been initialized, call mono_class_init().
21418
21419 2004-12-11  Martin Baulig  <martin@ximian.com>
21420
21421         * metadata.c (mono_metadata_load_generic_params): Added
21422         `MonoGenericContainer *parent_container' argument; automatically
21423         compute `container->is_method'; pass the correct owner to
21424         get_constraints().      
21425
21426         * reflection.c (compare_genericparam): Sort the GenericParam table
21427         according to increasing owners. 
21428
21429 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21430
21431         * profiler.c: allow disabling the default profiler.
21432
21433 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
21434
21435         * decimal.c, icall.c: allow disabling System.Decimal support.
21436
21437 2004-12-09  Marek Safar <marek.safar@seznam.cz>
21438
21439         * reflection.c: Add support for null attribute arguments.
21440
21441 2004-12-09  Martin Baulig  <martin@ximian.com>
21442
21443         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
21444         names to get rid of compiler warnings.
21445
21446 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
21447
21448         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
21449         mono_marshal_load_type_info (). Fixes #69625.
21450         (mono_marshal_get_ptr_to_struct): Likewise.
21451
21452 2004-12-08  Martin Baulig  <martin@ximian.com>
21453
21454         * mono-debug.h: Bumped version number to 47.
21455
21456         * mono-debug-debugger.c
21457         (mono_debugger_event_handler, mono_debugger_event): Take two
21458         guint64 arguments insteed of a gpointer and a guint32.  
21459
21460 2004-12-08  Martin Baulig  <martin@ximian.com>
21461
21462         * debug-mono-symfile.h
21463         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
21464         `address' to `native_offset'.
21465
21466 2004-12-08  Martin Baulig  <martin@ximian.com>
21467
21468         * class.c (mono_class_create_from_typespec): Only inflate if we
21469         either have `context->gclass' or `context->gmethod'.
21470
21471 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
21472
21473         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
21474
21475         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
21476
21477         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
21478
21479         * reflection.c (mono_assembly_get_object): Remove the workaround put
21480         in for the release.
21481         
21482         * appdomain.c: Use the corlib_internal field from MonoAssembly.
21483
21484         * appdomain.c: Bump corlib version.
21485
21486         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
21487         be visible in other appdomains.
21488
21489 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
21490
21491         * threads.c: Interlocked inc and dec for longs were messed up,
21492         use a KISS based impl for this. Fixes 70234
21493
21494 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
21495
21496         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
21497
21498 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21499
21500         * icall.c: fix to follow policy not to allow struct
21501         arguments in icalls.
21502
21503 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21504
21505         * process.c: make the patch that handles spaces in file paths work
21506         on mono/windows too.
21507
21508 2004-12-06  Martin Baulig  <martin@ximian.com>
21509
21510         * class.c (mono_class_create_generic): Call
21511         mono_class_setup_supertypes() if we're dynamic.
21512         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
21513
21514 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
21515
21516         * object-internals.h: Add new fields to MonoThread.
21517
21518         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21519
21520         * icall.c threads-types.h threads.c: Add new icalls.
21521
21522         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
21523
21524         * object-internals.h (MonoReflectionAssembly): Sync object layout with
21525         managed side.
21526
21527         * appdomain.c: Bump corlib version.
21528
21529         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
21530         internal assemblies. Fixes #69181.
21531
21532 2004-12-05  Martin Baulig  <martin@ximian.com>
21533
21534         * class.c (mono_class_inflate_generic_signature): Make this a
21535         no-op if `context' is NULL or we don't have any type parameters;
21536         also copy `sentinelpos'.        
21537
21538 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
21539
21540         * image.c: Add unbox_wrapper_cache.
21541
21542         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
21543
21544         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
21545         function generator.
21546         
21547         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
21548         Fixes #70173.
21549
21550         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
21551         
21552 2004-12-04  Martin Baulig  <martin@ximian.com>
21553
21554         * loader.c (mono_method_get_signature_full): New public function;
21555         like mono_method_get_signature(), but with an additional
21556         `MonoGenericContext *' argument.
21557
21558         * class.c (mono_class_inflate_generic_signature): Formerly known
21559         as inflate_generic_signature(); make this public.
21560
21561 2004-12-04  Martin Baulig  <martin@ximian.com>
21562
21563         * metadata.c
21564         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
21565         instead of a `MonoGenericContainer *'.  
21566         (mono_metadata_parse_array_full): Likewise.
21567         (mono_metadata_parse_signature_full): Likewise.
21568         (mono_metadata_parse_method_signature_full): Likewise.
21569         (mono_metadata_parse_generic_inst): Likewise.
21570         (mono_metadata_parse_generic_param): Likewise.
21571         (mono_metadata_parse_mh_full): Likewise.
21572         (mono_type_create_from_typespec_full): Likewise.
21573
21574 2004-12-03  Martin Baulig  <martin@ximian.com>
21575
21576         * class-internals.h (MonoGenericContainer): Replaced the
21577         `MonoGenericContext * pointer with a `MonoGenericContext'
21578         structure and made it the first element.
21579
21580 2004-12-03  Martin Baulig  <martin@ximian.com>
21581
21582         * class.c
21583         (inflate_generic_type): Set the `context->container' when creating
21584         a new MonoGenericContext.
21585         (mono_class_inflate_generic_method): Likewise.
21586         (mono_class_create_from_typespec): Just use `context->container'
21587         to get the container.
21588
21589         * loader.c (method_from_methodspec): Set `context->parent' from
21590         `context->container' - and if that's a method container, use its
21591         parent.  Also set the `context->container' when creating a new
21592         MonoGenericContext.
21593         (mono_get_method_from_token): Use just `context->container' to get
21594         the container.
21595
21596         * metadata.c (do_mono_metadata_parse_generic_class): Also set
21597         `gclass->context->container'.
21598
21599         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
21600         the `context->container' when creating a new MonoGenericContext.
21601
21602 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
21603
21604         * reflection.c (compare_genericparam): Sort params with identical
21605         owner by their number. Fixes gen-111 on sparc.
21606
21607 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
21608
21609         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
21610         around the domain changes.
21611
21612         * appdomain.c (mono_domain_unload): Handle the case when the thread
21613         calling Unload is itself being aborted during unloading. Fixes #70022.
21614
21615         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
21616
21617         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
21618         checkpoint_func as an icall so it gets a wrapper.
21619         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
21620         in the cross-appdomain wrappers too.
21621
21622         * threads.c (mono_thread_has_appdomain_ref): Make this public.
21623
21624         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
21625
21626         * reflection.c: Fix some memory leaks.
21627         
21628 2004-12-02  Martin Baulig  <martin@ximian.com>
21629
21630         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
21631
21632         * metadata.c (generic_class_cache): New static hashtable.
21633         (mono_metadata_lookup_generic_class): New public method.
21634
21635 2004-12-02  Martin Baulig  <martin@ximian.com>
21636
21637         * class.c (mono_class_create_from_typedef): Call
21638         mono_class_setup_parent() and mono_class_create_mono_type() before
21639         parsing the interfaces.
21640
21641 2004-12-02  Martin Baulig  <martin@ximian.com>
21642
21643         * metadata.c (generic_inst_cache): New static hashtable.
21644         (mono_metadata_lookup_generic_inst): New public function.
21645         (mono_metadata_inflate_generic_inst): New public function.
21646         (mono_metadata_parse_generic_inst): New public function.
21647         (do_mono_metadata_parse_generic_class): Use the new
21648         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
21649         since this'll also use the cache.
21650
21651         * reflection.c (mono_reflection_bind_generic_method_parameters):
21652         Use mono_metadata_lookup_generic_inst() to use the new cache.
21653
21654         * class.c (inflate_mono_type): Use
21655         mono_metadata_inflate_generic_inst() to inflate a generic
21656         instance; this'll also use the new cache.
21657
21658         * loader.c (method_from_methodspec): Use
21659         mono_metadata_parse_generic_inst() and
21660         mono_metadata_inflate_generic_inst() rather than parsing it
21661         manually, so we can use the new cache.
21662
21663 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
21664
21665         * threads.c (wait_for_tids): Do not incorrectly free threads when 
21666         the wait times out.
21667
21668 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21669
21670         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
21671         iter->args based on whether parameters are passed in registers (i.e.
21672         MONO_ARCH_REGPARMS is defined)
21673
21674 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
21675
21676         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
21677         the exception message. Fixes #70070.
21678         (method_from_methodspec): Fix warnings.
21679
21680 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21681
21682         * process.c: (complete_path) return the path quoted
21683
21684 2004-12-01  Martin Baulig  <martin@ximian.com>
21685
21686         * class-internals.h (MonoGenericInst): New structure.
21687         (MonoGenericClass): Replaced `type_argc', `type_argv' and
21688         `is_open' with `MonoGenericInst *inst'.
21689         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
21690         `is_open' with `MonoGenericInst *inst'.
21691
21692 2004-11-30  Martin Baulig  <martin@ximian.com>
21693
21694         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
21695
21696         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
21697         to `generic_class_cache'.
21698
21699         * metadata.c
21700         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
21701         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
21702         (mono_generic_inst_is_valuetype): Renamed to
21703         mono_generic_class_is_valuetype().
21704
21705         * class-internals.h
21706         (MonoGenericInst): Renamed to MonoGenericClass.
21707         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
21708         (MonoClass): Renamed `generic_inst' to `generic_class'.
21709         (MonoGenericContext): Renamed `ginst' to `gclass'.
21710
21711         * object-internals.h
21712         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
21713
21714         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
21715         mono_reflection_generic_class_initialize().
21716
21717         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
21718         now known as "System.Reflection.MonoGenericClass".
21719         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
21720
21721 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
21722
21723         * class-internals.h: Added a flag field to MonoClass to cache the
21724         declarative security attributes actions associated with the class.
21725         * domain-internals.h: Added booleans to MonoJitInfo to cache the
21726         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
21727         applicable to the JITted method.
21728         * reflection.c|h: Added functions to extract (as flags) which security
21729         actions are available (declaratively) for a method, class or assembly.
21730         * metadata.c|h: Added functions to search the declarative security
21731         table in the metadata.
21732         
21733 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
21734
21735         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
21736         EXPORTEDTYPES are already in the class name cache, so there is no
21737         need to add extra code here to look at them. Just removes a bit of
21738         cruft.
21739
21740         (ves_icall_System_Environment_get_TickCount): No need for #if
21741         WINDOWS. We already have the code in io-layer.
21742
21743 2004-11-28  Martin Baulig  <martin@ximian.com>
21744
21745         * loader.c
21746         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
21747         Fixes gen-112.cs.
21748
21749 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
21750
21751         * assembly.c (do_mono_assembly_open): Instead of having a
21752         conditional WITH_BUNDLE, incorporate support for bundles here, by
21753         having a global `bundles' variable holding a pointer to the actual
21754         bundles. 
21755
21756         (mono_register_bundled_assemblies): New API call used by the
21757         bundle code. 
21758
21759         See mkbundle.1 for details.
21760         
21761 2004-11-27  Martin Baulig  <martin@ximian.com>
21762
21763         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
21764         the vtable for generic methods.
21765
21766 2004-11-26  Martin Baulig  <martin@ximian.com>
21767
21768         * metadata.c
21769         (mono_metadata_generic_method_hash): New public function.
21770         (mono_metadata_generic_method_equal): Likewise.
21771
21772         * class-internals.h
21773         (MonoGenericContainer): Added `GHashTable *method_hash'.
21774
21775         * reflection.c (ReflectionMethodBuilder): Added
21776         `MonoGenericContainer *generic_container'.
21777         (reflection_methodbuilder_to_mono_method): Don't create a new
21778         MonoGenericContainer each time we're called.
21779         (mono_reflection_bind_generic_method_parameters): Use
21780         `container->method_hash' to cache the results so we don't create a
21781         different method if we're called several times with the same
21782         arguments.
21783
21784         * loader.c (method_from_methodspec): Use the new
21785         `container->method_hash' here, too.
21786
21787 2004-11-26  Martin Baulig  <martin@ximian.com>
21788
21789         * class.c (inflate_generic_signature): Correctly compute
21790         `res->has_type_parameters'.
21791         (mono_class_vtable): Use the `has_type_parameters' flag to
21792         determine whether we're a generic method.
21793
21794         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
21795
21796 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
21797
21798         * object.c (mono_runtime_run_main): Fix a small memory leak.
21799
21800 2004-11-25  Martin Baulig  <martin@ximian.com>
21801
21802         * class.c (set_generic_param_owner): Fixed the loop.
21803
21804 2004-11-25  Martin Baulig  <martin@ximian.com>
21805
21806         * object.c (mono_class_vtable): Don't create any JIT wrappers for
21807         generic methods.
21808
21809 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
21810
21811         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
21812         names. Fixes #69787.
21813
21814 2004-11-24  Martin Baulig  <martin@ximian.com>
21815
21816         * class.c (mono_class_create_generic_2): If we don't have a
21817         `ginst->parent', inflate `gklass->parent' to get our parent.
21818
21819 2004-11-24  Martin Baulig  <martin@ximian.com>
21820
21821         * reflection.c (compare_genericparam): Correctly sort the
21822         GenericParam table; fixes #69779.
21823
21824 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
21825
21826         * reflection.c: When writing a PE file, don't create a huge
21827         buffer in memory. Just write the arrays we have to the file.
21828         This reduces memory usage.
21829
21830         * metadata-internals.h: MonoDynamicStream pefile is no longer used
21831         globally.
21832
21833 2004-11-17  Martin Baulig  <martin@ximian.com>
21834
21835         * class.c (mono_class_init): Don't setup `class->parent' for
21836         dynamic instances; moved this to mono_class_generic_2().
21837         (mono_class_create_generic): Also set `klass->inited' for dynamic
21838         generic instances.
21839         (mono_class_create_generic_2): Don't do anything for dynamic
21840         generic instances.  Set `klass->parent' here and also call
21841         mono_class_setup_parent() here. 
21842
21843         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
21844         `MonoType *parent' argument; set `ginst->parent' before calling
21845         mono_class_create_generic_2(), so we set the correct parent.
21846
21847 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
21848
21849         * reflection.c: allow getting attributes from ModuleBuilder
21850         (used by ikvm).
21851
21852 2004-11-17  Martin Baulig  <martin@ximian.com>
21853
21854         * class.c (mono_class_create_from_typedef): If a type parameter is
21855         inherited from an outer class, set its owner to that class.
21856
21857 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
21858
21859         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
21860           for (int*) written size. This fixes bug #69592.
21861
21862 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
21863
21864         * icall.c: Added IsAuthenticodePresnet internal call.
21865         * image.c|h: New function that check a MonoImage for an Authenticode
21866         signature in the certificate PE data directory.
21867         * security.c|h: New internal call to ask the runtime if an 
21868         Authenticode signature seems referenced in the PE header.
21869
21870 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
21871
21872         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
21873
21874         * reflection.c (mono_image_create_pefile): Free the assembly streams
21875         after writing out the assembly file.
21876
21877         * object.c (mono_runtime_run_main): Fix small memory leak.
21878
21879         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
21880         property access modifiers. Fixes #69389.
21881
21882 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21883
21884         * domain.c, object.c, object-internals.h, domain-internals.h,
21885         object.h, marshal.c: keep dynamic code info per domain.
21886
21887 2004-11-15  Martin Baulig  <martin@ximian.com>
21888
21889         * class.c (mono_type_get_name_recurse): Put type arguments in
21890         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
21891         see bug #68387.
21892
21893 2004-11-15  Martin Baulig  <martin@ximian.com>
21894
21895         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
21896         (mono_class_setup_vtable): When computing `the_cname' for a
21897         generic instance, don't include the namespace since we'd otherwise
21898         add it twice.
21899
21900 2004-11-15  Martin Baulig  <martin@ximian.com>
21901
21902         * class.c (mono_class_create_generic): Changed return type to void.
21903         (mono_class_create_generic_2): New public function; setup
21904         `class->method', `class->field' and `class->interfaces' here
21905         instead of in mono_class_init().
21906
21907         * class.h (mono_class_create_generic): Moved to class-internals.h.
21908
21909 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
21910
21911         * reflection.c (mono_image_create_pefile): take a file HANDLE.
21912         rather than writing to memory, write to this file. Right now,
21913         we are just writting into a buffer, and copying that. However
21914         we can avoid the buffer later.
21915
21916         (mono_dynamic_stream_reset): new function
21917
21918         * icall.c, object-internals.h: update for the above.
21919
21920 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
21921
21922         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21923         have been using gc'd memory. First it is slower, unlikely
21924         the comment in the source code said, secondly, it increases
21925         our footprint to do it in the gc.
21926
21927         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21928         the method so that it does not have to copy to managed code.
21929
21930 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
21931
21932         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21933
21934 2004-11-12  Martin Baulig  <martin@localhost>
21935
21936         * reflection.c (mono_image_create_token): Allow generic method
21937         definitions here, since they may appear in an `.override'; see
21938         gen-98/gen-99 for an example.
21939
21940 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
21941
21942         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21943         #69365.
21944
21945         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21946         descriptive.
21947
21948 2004-11-11  Martin Baulig  <martin@ximian.com>
21949
21950         * class.c (mono_class_setup_vtable): In an explicit interface
21951         implementation, the method name now includes the arity.
21952
21953 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
21954
21955         * object.c (mono_array_full_copy): Fix warning.
21956
21957 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
21958
21959         * appdomain.c: Removed look_for_method_by_name(). Use the new method
21960         mono_class_get_method_from_name() instead.
21961         
21962         * class-internals.h: Added two new types of wrappers. 
21963         Added MonoRemotingTarget enum. Added new trampoline function type, which
21964         takes an additional MonoRemotingTarget value as parameter, so it is
21965         possible to request a trampoline for a specific target.
21966         
21967         * class.c: Added new mono_class_get_method_from_name() method.
21968         
21969         * class.h: In MonoRemoteClass, we can have now to vtables, one for
21970         general remoting sinks and one specific for cross domain calls.
21971         
21972         * debug-helpers.c: Added new wrapper names.
21973         
21974         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21975         of a remote class.
21976         
21977         * image.c: Porperly delete value objects form the remoting invoke hashtable.
21978         
21979         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21980         with several other methods (mono_marshal_get_xappdomain_dispatch,
21981         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21982         and others) can generate a fast remoting wrapper for cross domain calls.
21983         More information can be found in docs/remoting.
21984         Other changes: Removed mono_find_method_by_name, and used
21985         mono_class_get_method_from_name instead.
21986         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21987         is stored in the remoting invoke hashtable.
21988         
21989         * marshal.h: published the new method for getting the xdomain wrapper,
21990         and also added a method for getting the adequate wrapper for a given
21991         method and target.
21992         
21993         * object-internals.h, object.c: Added a couple of methods for capying and
21994         cloning arrays.
21995         Modified mono_install_remoting_trampoline, which takes the new remoting
21996         trampoline that has a remoting target as parameter.
21997         mono_class_proxy_vtable now also takes a remoting target as parameter, and
21998         will return the most suitable vtable for the target.
21999         Added mono_remote_class_vtable, which returns the vtable of a remote class
22000         (which can be the normal remoting vtable or the xdomain vtable).
22001         
22002         * threads.c: the xdomain invoke and dispatch wrappers must also be
22003         protected against interruptions.
22004
22005 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22006
22007         * icall.c: use memmove in BlockCopyInternal when the source and
22008         destination arrays are the same.
22009
22010 2004-11-09  Martin Baulig  <martin@ximian.com>
22011
22012         * class-internals.h (MonoGenericContainer): Removed `method' and
22013         `signature', replaced them with `is_method' and `is_signature'
22014         flags.  Added `context'.
22015
22016         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
22017         instead of a `MonoGenericContainer *'.
22018
22019         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
22020         for dynamic type parameters.
22021         (mono_metadata_load_generic_params): Setup `container->context'.
22022
22023         * reflection.c (mono_reflection_setup_generic_class): Setup
22024         `tb->generic_container->context'.
22025         (do_mono_reflection_bind_generic_parameters): Use
22026         mono_class_inflate_generic_type() to correctly inflate types,
22027         rather than using our own hack just for MONO_TYPE_VAR.
22028
22029 2004-11-09  Martin Baulig  <martin@ximian.com>
22030
22031         * class.c (mono_class_inflate_generic_method): Small fix; don't
22032         crash here.
22033
22034         * icall.c
22035         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
22036         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
22037         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
22038         (ves_icall_Type_BindGenericParameters): Likewise.
22039         (ves_icall_Type_get_IsGenericInstance): Likewise.
22040         (ves_icall_Type_GetGenericParameterPosition): Likewise.
22041         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
22042         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
22043         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
22044
22045 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
22046
22047         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
22048         assembly versions and public key tokens. Fixes #69113.
22049
22050 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
22051
22052         * metadata.c: fix bug introduced with the type cache changes
22053         on 2004-11-06.
22054
22055 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
22056
22057         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
22058         the MonoClass pointer instead of the token in exception clauses.
22059         * reflection.c: updates for the above and make the code not depend
22060         on the structure of MonoExceptionClause.
22061
22062 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
22063
22064         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
22065         Add support for dynamic assemblies. Fixes #69114.
22066
22067         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
22068
22069 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
22070
22071         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
22072         since most only those methods use it. the code member of
22073         MonoMethodPInvoke was dead, so that can be removed too. Also,
22074         remove inline_count (again, not used), and move slot so that it
22075         can share bits with some other flags. This saves 8 bytes in the
22076         structure and gives us about 50 kb back for mcs helloworld.cs
22077
22078         * *.[ch]: Do naming changes for the above.
22079
22080         * loader.c (mono_method_get_header): Lazily init the header
22081         on first access.
22082         (mono_get_method_from_token): don't init the header here
22083         (mono_free_method): the header may never be allocated
22084
22085         Overall, this saves 150 kb of unmanaged allocations
22086         for mcs helloworld.cs. That accounts for 10% of the unmanaged
22087         memory at runtime.
22088         
22089         * loader.c, loader.h (mono_method_get_header): new accessor.
22090
22091         * *.[ch]: use the above method. Prepares us to lazily load
22092         the header.
22093
22094         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
22095         three warnings, which are actual bugs (see 69206).
22096
22097         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
22098         unused. Saves a cool 4 bytes / method.
22099
22100 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
22101
22102         * metadata.c (builtin_types): Add types for System.Object here.
22103         (mono_metadata_parse_type_full): Cache MonoType*'s that are
22104         for a class or valuetype from klass->this_arg or klass->byval_arg.
22105
22106         On mcs for a hello world, this gets us down from 21836 MonoType's
22107         to 14560.
22108
22109         (mono_metadata_free_type): Account for the above change.
22110
22111 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
22112
22113         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
22114         exception instead of asserting if name is null.
22115         (ves_icall_System_AppDomain_GetData): Ditto.
22116
22117 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
22118
22119         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
22120         EnumBuilder.
22121
22122         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
22123         Return NULL when the domain does not have entry_assembly set.
22124
22125         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
22126         Add a 'resource_modules' argument.
22127         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
22128
22129         * reflection.c (mono_reflection_create_runtime_class): Move setting
22130         of wastypebuilder here, so mono_get_type_object () returns a MonoType
22131         for enums too.
22132
22133         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
22134         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
22135         Throw an ArgumentNullException if 'ptr' is null.
22136
22137         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
22138         assemblies here. Fixes #69020.
22139
22140 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
22141
22142         * reflection.c (build_compressed_metadata): Fix the previous patch for
22143         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
22144         the stack.
22145
22146 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
22147
22148         * assembly.c (mono_assembly_names_equal): Allow a match if one of
22149         the cultures is false. Fixes #69090.
22150
22151         * reflection.c (build_compressed_metadata): Fix invalid memory read 
22152         detected by valgrind.
22153         
22154         * reflection.c (mono_reflection_get_type): Avoid triggering a 
22155         TypeResolve multiple times for the same type. Fixes #65577.
22156
22157 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
22158
22159         * marshal.c: Avoid using ldftn to call managed functions. It is
22160         much slower than just a call.
22161
22162         * reflection.c (mono_module_get_object): free the basename we
22163         allocate here from glib.
22164         
22165         * reflection.c (ensure_runtime_vtable): make sure to free
22166         overrides.  Also, we were allocating an array of MonoMethod not an
22167         array of MonoMethod*.
22168
22169         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
22170
22171         * image.c (mono_image_close): free image->guid here.
22172
22173 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
22174
22175         * reflection.c: Fix some spec conformance issues with the PE file
22176         structures so mcs compiled apps run on the Net 2.0 beta.
22177
22178 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
22179
22180         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
22181         Implement this. Fixes #67264.
22182
22183         * debug-helpers.h debug-helpers.c marshal.c: Move 
22184         mono_find_method_by_name to debug-helpers.c.
22185
22186 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
22187
22188         * object.c (mono_release_type_locks): type_initialization_hash is
22189         a GHashTable.
22190
22191         * reflection.c object.c object-internals.h: Fix warnings.
22192
22193         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
22194         without accessors. Fixes #61561.
22195
22196         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
22197         application base from the root domain if not set. Fixes #65641.
22198         (mono_runtime_init): Fix warning.
22199
22200 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22201
22202         * appdomain.c: call mono_thread_pool_init.
22203         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
22204         of worker threads based on the number of CPUs and the environment
22205         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
22206         for non-windows (windows) systems.
22207
22208 2004-10-27  Chris Toshok  <toshok@ximian.com>
22209
22210         * mono-debug-debugger.c (write_class): don't call mono_class_init
22211         here, as even with the check for (!klass->init_pending), we get
22212         into a situation where we're hitting cycles in class
22213         initialization.  Fixes #68816.
22214
22215 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
22216
22217         * image.c: Avoid overwriting values in the loaded_images_hash when an
22218         assembly is loaded multiple times. Fixes #61152.
22219
22220         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
22221         so multiple satellite assemblies for the same name can be loaded.
22222         Fixes #68259.
22223
22224         * mono_domain_assembly_preload: Actually return the loaded assembly, 
22225         not NULL.
22226
22227         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
22228         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
22229
22230         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
22231         pending finalizers are not invoked after the appdomain has been 
22232         unloaded. Fixes #67862.
22233
22234 2004-10-22  Martin Baulig  <martin@ximian.com>
22235
22236         * mono-debug-debugger.c
22237         (mono_debugger_runtime_invoke): Don't box valuetypes.
22238
22239 2004-10-22  Chris Toshok  <toshok@ximian.com>
22240
22241         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
22242         don't hide private methods.
22243
22244 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
22245
22246         * icall.c: Allows the runtime to "share" (when known) the public key
22247         token of an assembly. This avoid the need to recalculate the token 
22248         (from the public key) in managed code.
22249
22250 2004-10-21  Chris Toshok  <toshok@ximian.com>
22251
22252         * debug-helpers.c (append_class_name): argh, revert last patch.
22253         
22254 2004-10-21  Chris Toshok  <toshok@ximian.com>
22255
22256         * debug-helpers.c (append_class_name): use '+' as the delimiter,
22257         not '/', so that it matches what the debugger uses to look up
22258         methods.
22259
22260 2004-10-21  Martin Baulig  <martin@ximian.com>
22261
22262         * mono-debug-debugger.c (mono_debugger_throw_exception): New
22263         public method; this is called each time an exception is thrown and
22264         allows the debugger to use exception catch points.
22265
22266 2004-10-21  Martin Baulig  <martin@ximian.com>
22267
22268         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
22269         the stack pointer and the exception object in some struct and pass
22270         that to the debugger.
22271
22272 2004-10-21  Chris Toshok  <toshok@ximian.com>
22273
22274         * mono-debug-debugger.c (do_write_class): add instance/static
22275         event support.  We don't expose "raise" or "other" yet.
22276         (event_is_static): new method.
22277
22278 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
22279
22280         * mono-debug-debugger.c
22281         (mono_debugger_handle_exception): Remove
22282         bogus return value for fussy compilers.
22283
22284 2004-10-20  Martin Baulig  <martin@ximian.com>
22285
22286         * mono-debug-debugger.c
22287         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
22288         (mono_debugger_handled_exception): Likewise.
22289
22290 2004-10-20  Martin Baulig  <martin@ximian.com>
22291
22292         * mono-debug-debugger.h (MonoDebuggerEvent): Added
22293         MONO_DEBUGGER_EVENT_EXCEPTION.
22294
22295         * mono-debug-debugger.c (mono_debugger_handle_exception): New
22296         public function to send the debugger a notification for an
22297         exception and inform it about a catch/finally clause.
22298
22299 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
22300
22301         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
22302         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
22303         fix 2.95 build. 
22304
22305         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
22306
22307 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
22308
22309         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
22310         marshalled as [In,Out]. Fixes #58325.
22311
22312 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
22313
22314         * reflection.c (mono_method_body_get_object): Implement some fields.
22315
22316 2004-10-12  Martin Baulig  <martin@ximian.com>
22317
22318         * reflection.c (mono_reflection_bind_generic_parameters): Small
22319         fix, correctly retrieve our parent from a generic instance.
22320
22321 2004-10-12  Martin Baulig  <martin@ximian.com>
22322
22323         * metadata.c (mono_metadata_generic_param_equal): We always have
22324         an owner.
22325
22326         * class.c
22327         (mono_class_from_generic_parameter): We need to have an owner.
22328         (my_mono_class_from_generic_parameter): Likewise.
22329
22330         * reflection.c (mono_reflection_setup_generic_class): Renamed to
22331         mono_reflection_create_generic_class() and added a new
22332         mono_reflection_setup_generic_class().  
22333         (mono_reflection_initialize_generic_param): If we're a nested
22334         generic type and inherited from the containing class, set our
22335         owner to the outer class.
22336
22337 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
22338
22339         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
22340
22341         * reflection.c (mono_method_body_get_object): New function to create
22342         a MethodBody object.
22343
22344         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
22345
22346 2004-10-11  Martin Baulig  <martin@ximian.com>
22347
22348         * metadata.c (_mono_metadata_type_equal): Renamed to
22349         do_mono_metadata_type_equal() and made static.
22350
22351 2004-10-11  Martin Baulig  <martin@ximian.com>
22352
22353         * appdomain.c: Bump corlib version number to 28.
22354
22355 2004-10-10  Martin Baulig  <martin@ximian.com>
22356
22357         * class-internals.h
22358         (MonoGenericInst): Added `MonoGenericContainer *container'.
22359         (MonoGenericMethod): Likewise.
22360         (MonoGenericContext): Likewise.
22361         (MonoGenericParam): Added `MonoGenericContainer *owner'.
22362
22363         * metadata.c
22364         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
22365         (do_mono_metadata_parse_generic_inst): Likewise.
22366         (mono_metadata_parse_type_full): New public method.  This is the actual
22367         mono_metadata_parse_type() implementation - with an additional
22368         `MonoGenericContainer *' argument.
22369         (mono_metadata_parse_array_full): Likewise.
22370         (mono_metadata_parse_signature_full): Likewise.
22371         (mono_metadata_parse_method_signature_full): Likewise.
22372         (mono_metadata_parse_mh_full): Likewise.
22373         (mono_type_create_from_typespec): Likewise.
22374         (mono_metadata_interfaces_from_typedef_full): New public method;
22375         this is similar to the other _full() methods, but we take a
22376         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
22377         (mono_metadata_parse_generic_param): Take an additional
22378         `MonoGenericContainer *' argument and lookup the MonoGenericParam
22379         from that container.
22380         (mono_metadata_generic_param_equal): New static method to compare
22381         two type parameters.
22382         (_mono_metadata_type_equal): New static method; takes an
22383         additional `gboolean signature_only' argument - if true, we don't
22384         compare the owners of generic parameters.
22385         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
22386         with a TRUE argument - do a signature-only comparision.
22387
22388         * loader.c: Use the new _full() methods and pass the
22389         MonoGenericContainer to them.
22390
22391         * object-internals.h (MonoReflectionTypeBuilder): Added
22392         `MonoGenericContainer *generic_container' field.
22393         (MonoReflectionMethodBuilder): Likewise.
22394
22395 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
22396
22397         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
22398         case initial images of dynamic assemblies.
22399
22400         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
22401
22402         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
22403
22404         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
22405         length of event->other array.
22406         (typebuilder_setup_events): Ditto.
22407
22408         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
22409         'assembly_by_name' and add an 'assemblies' list.
22410
22411         * assembly.h assembly.c: Add a new search hook for determining whenever
22412         an assembly is already loaded. Use this instead of searching in the
22413         loaded_assemblies list.
22414
22415         * domain.c appdomain.c: Implement the new search hook so loaded 
22416         assemblies are now scoped by appdomain. Fixes #67727.
22417
22418 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
22419
22420         * threads.c (mono_thread_attach): Initialize synch_lock field so
22421         mono_thread_detach works again.
22422
22423         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
22424         'lib' too. Fixes #63130.
22425
22426 2004-10-06  Jackson Harper  <jackson@ximian.com>
22427
22428         * culture-info-tables.h: regenerated.
22429
22430 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
22431
22432         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
22433         implemented by other interfaces in the result. Fixes #65764.
22434         
22435         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
22436         Handle unloadable modules without crashing.
22437
22438         * image.c (load_modules): Revert the previous patch since modules must
22439         have a fixed index inside the array.
22440         
22441         * image.c (load_modules): Don't include native modules in the modules
22442         array.
22443
22444 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
22445
22446         * reflection.h: Add param_defaults field.
22447
22448         * reflection.c: Add support for parameter defaults in dynamic methods.
22449         Fixes #64595.
22450
22451         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
22452         an empty string when a type has no namespace. Fixes #64230.
22453
22454 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
22455
22456         * tabledefs.h: Added "internal" security actions to support non-CAS
22457         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
22458         Note: they do not seems to be used anymore in 2.0 (new metadata format)
22459
22460 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
22461
22462         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
22463         constructor of abstract class. Fixes #61689.
22464
22465 2004-10-04  Martin Baulig  <martin@ximian.com>
22466
22467         * class-internals.h (MonoGenericContainer): New type.
22468         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
22469         `MonoGenericContainer *generic_container'.
22470         (MonoClass): Replaced `gen_params' and `num_gen_params' with
22471         `MonoGenericContainer *generic_container'.
22472
22473         * metadata.c (mono_metadata_load_generic_params): Return a
22474         `MonoGenericContainer *' instead of a `MonoGenericParam *';
22475         removed the `num' argument.
22476
22477 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
22478
22479         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
22480         for dynamic images.
22481
22482         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
22483         machine fields.
22484
22485         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
22486
22487         * reflection.c: Save pe_kind and machine values into the generated
22488         image file.
22489
22490         * appdomain.c: Bump corlib version number.
22491
22492         * object-internals.h: Reorganize layout of LocalBuilder.
22493
22494         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
22495         New helper function.
22496
22497         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
22498         created MonoType for dynamic types. Fixes #66180.
22499
22500 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
22501
22502         * threadpool.c: the ares hashtable needs a critical section around it.
22503         this prevents some nasty segfaults
22504
22505 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
22506
22507         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
22508         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
22509         bug 67324).
22510         
22511 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
22512
22513         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
22514         
22515 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
22516
22517         * image.c: Always canonicalize image file names, to avoid loading
22518         the same assembly twice when referenced using a relative path.
22519
22520 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
22521
22522         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
22523
22524         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
22525
22526         * marshal.c: Fix warnings.
22527
22528 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
22529
22530         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
22531         attempting to marshal the delegate_trampoline as the method_addr.
22532         This patch has a static hashtable of marshalled delegates so that 
22533         we can map delegate_trampoline addresses back to delegates.  This
22534         allows a delegate passed to managed code to be passed back into native
22535         code.  Fixes #67039
22536
22537 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
22538
22539         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
22540
22541         * reflection.c (method_encode_code): Align method headers properly.
22542         Fixes #66025.
22543
22544 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
22545
22546         * marshal.c: In the runtime invoke wrapper, reset the abort
22547         exception if it is cached. This avoids the automatic rethrowal of 
22548         the exception after the catch of the wrapper. Also check for pending
22549         interruptions before calling the managed method. This is done using
22550         the new method emit_thread_force_interrupt_checkpoint, since the
22551         normal checkpoint method is ignored when running the invoke wrapper.
22552         * object.c: If the abort exception is rethrown, set the abort_exc
22553         field of the thread, so it will be rethrown aftere every catch.
22554         * threadpool.c: Only run an interruption checkpoint if what has been
22555         requested is a stop of the thread (aborts will be ignored).
22556         * threads.c: By default, a thread will now never be interrumped while
22557         running the runtime invoke wrapper (this ensures that runtime_invoke
22558         will always return to the caller if an exception pointer is provided).
22559         There is a new special method mono_thread_force_interruption_checkpoint()
22560         to force an interruption checkpoint even if running a protected
22561         wrapper, which is used by the same runtime invoke wrapper to do a check
22562         at a safe point.
22563
22564 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
22565
22566         * object.c, object-internals.h: Implemented mono_release_type_locks,
22567         which releases the cctor locks held by a thread.
22568         * threads.c, threads.h: In thread_cleanup, release cctor locks held
22569         by a thread. Added mono_thread_exit() method to be used to safely stop
22570         a thread.
22571
22572 2004-09-28  Raja R Harinath  <rharinath@novell.com>
22573
22574         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
22575         Move null check before dereference.  Avoid indexing beyond the end
22576         of the 'modules' array.
22577
22578 2004-09-28  Raja R Harinath  <rharinath@novell.com>
22579
22580         * metadata-internals.h (MonoImage): Add module_count field.
22581         * image.c (load_modules): Set image->module_count.
22582         (mono_image_load_file_for_image): Use image->module_count.
22583         * reflection.c (mono_image_load_module): Append to image->modules array 
22584         of dynamic assembly.
22585         (mono_module_get_object): Fix loop to actually increment index.
22586         Use image->module_count.
22587         * assembly.c (mono_assembly_load_references): Use image->module_count.
22588         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22589         Likewise.
22590
22591 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
22592
22593         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
22594         Avoid assert on generic types.
22595
22596 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
22597
22598         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
22599
22600         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
22601
22602         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
22603         function to convert a MarshalSpec structure to its managed counterpart.
22604
22605         * reflection.c: Fix warnings.
22606         
22607         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
22608         field.
22609
22610         * icall.c (mono_create_icall_signature): Fix build.
22611
22612 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
22613
22614         * icall.c: Add MakePointType icall.
22615
22616         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
22617         warnings.
22618
22619 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22620
22621         * threadpool.c: reuse allocated slots in the queue.
22622
22623 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
22624
22625         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
22626
22627         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
22628
22629         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
22630         previous change.
22631
22632         * tabledefs.h: Add constants for pinvoke attributes BestFit and
22633         ThrowOnUnmappableChar.
22634
22635         * icall.c (ves_icall_Type_GetPacking): New icall.
22636
22637 2004-09-24  Martin Baulig  <martin@ximian.com>
22638
22639         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
22640
22641 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22642
22643         * appdomain.c:
22644         (mono_domain_set): allow setting a domain that is being unloaded.
22645         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
22646         being unloaded.
22647
22648 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
22649
22650         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
22651         the GetCustomAttributes icall.
22652
22653 2004-09-23  Martin Baulig  <martin@ximian.com>
22654
22655         * object-internals.h (MonoReflectionGenericParam): Replaced
22656         'has_ctor_constraint', `has_reference_type' and `has_value_type'
22657         with `guint32 attrs'.
22658
22659 2004-09-23  Martin Baulig  <martin@ximian.com>
22660
22661         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
22662
22663 2004-09-23  Martin Baulig  <martin@ximian.com>
22664
22665         * object-internals.h (GenericParameterAttributes): New enum.
22666
22667 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
22668
22669         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
22670         
22671         * class.c (init_events): Fill out event->other field.
22672
22673         * class.c: Fix warnings.
22674
22675         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
22676
22677 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22678
22679         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
22680         walk which doesn't supply the IL offset.
22681
22682 2004-09-22  Martin Baulig  <martin@ximian.com>
22683
22684         * reflection.c (mono_reflection_setup_internal_class): If we're
22685         System.ValueType, System.Object or System.Enum, set
22686         `klass->instance_size' and create the vtable.
22687         (mono_reflection_create_internal_class): If we're an enum type,
22688         get the base class from our current corlib.
22689
22690 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
22691
22692         * reflection.h (MonoResolveTokenError): New type.
22693
22694         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
22695         icall.
22696
22697         * icall.c: Add an 'error' argument to the ResolveToken icalls.
22698
22699 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
22700
22701         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
22702         Support also calling constructors, but only for already allocated objects.
22703
22704 2004-09-17  Geoff Norton <gnorton@customerdna.com>
22705
22706         * reflection.c (type_get_qualified_name): If the klass is null
22707         return the typename to avoid a NullRefEx.
22708         (encode_cattr_value): Get the qualified name of the boxed type,
22709         not the underlying enumtype.  Fixes #62984.
22710
22711 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
22712
22713         * marshal.c: Fix problems with previous checkin.
22714
22715 2004-09-21    <vargaz@freemail.hu>
22716
22717         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
22718         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
22719
22720         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
22721
22722 2004-09-21  Geoff Norton <gnorton@customerdna.com>
22723
22724         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
22725         should only return a type for pointers, arrays, and passbyref types.
22726         Fixes bug #63841.
22727
22728 2004-09-21  Martin Baulig  <martin@ximian.com>
22729
22730         * domain.c (mono_debugger_check_runtime_version): New public
22731         function.
22732
22733         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
22734
22735 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
22736
22737         * reflection.c: Added missing sort to the declarative security 
22738         attributes table. MS implementation stops seeing the attributes if the
22739         token number regress in the table (as shown by ildasm and permview).
22740
22741 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
22742
22743         * object-internals.h (MonoReflectionModule): Add 'token' field.
22744         
22745         * reflection.c (mono_reflection_get_token): Add support for Module
22746         and Assembly.
22747         (mono_module_get_object): Set 'token' field.
22748         (mono_module_file_get_object): Set 'token' field.
22749
22750         * icall.c: Add new Assembly and Module icalls.
22751
22752         * appdomain.c: Bump corlib version.
22753
22754 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
22755
22756         * loader.h loader.c class.h class.c: Add helper functions for obtaining
22757         tokens of metadata objects.
22758
22759         * reflection.h reflection.c (mono_reflection_get_token): New function
22760         to obtain the token of a metadata object.
22761
22762         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
22763
22764 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
22765
22766         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
22767         
22768         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
22769
22770 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
22771
22772         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
22773         * object-internals.h: Added 3 MonoArray* members to MonoReflection
22774         AssemblyBuilder to access the permissions set in the class lib.
22775         * reflection.c: Added security attributes encoding step in 
22776         mono_image_build_metadata.
22777         * tabledefs.h: Added new security actions defined in 2.0:
22778         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
22779
22780 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
22781
22782         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
22783         macro parameter.
22784
22785 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
22786  
22787         * locales.c: nullify the ICU_collator member of CompareInfo when it is
22788           finalized. There where random SIGSEVs at program termination, when
22789           an object being finalized was trying to do a string comparison and
22790           the current culture was already finalized.
22791  
22792 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22793
22794         * threads.c: call thread_cleanup before finishing the thread if we get
22795         there.
22796
22797 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
22798
22799         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
22800         assemblies from the parent. Fixes #65665.
22801
22802 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
22803
22804         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
22805         modifiers.
22806
22807 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
22808
22809         * reflection.h: add prototype for mono_get_dbnull_object
22810         * reflection.c: add prototypes for get_default_param_value_blobs 
22811         and mono_get_object_from_blob for fussier compilers
22812
22813 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
22814  
22815         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
22816         false deadlock checks in class initialization.
22817  
22818 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
22819
22820         * image.c (mono_image_addref): Fix comment.
22821
22822         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
22823         possible.
22824
22825 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
22826
22827         * reflection.c (mono_param_get_objects): Modified to return
22828         ParameterInfo.DefaultValue object.
22829
22830         (get_default_param_value_blobs):
22831         (mono_get_object_from_blob):
22832         (mono_get_dbnull_object): New helper routines. 
22833
22834         * object.c (mono_get_constant_value_from_blob): New helper routine
22835         carved out from get_default_field_value ()
22836
22837         * object-internals.h (mono_get_constant_value_from_blob): Added
22838         function declaration.
22839
22840 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
22841
22842         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
22843         referenced assemblies. Fixes #62135.
22844
22845         * exception.h exception.c (mono_get_exception_file_not_found2): New
22846         helper function.
22847
22848 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
22849
22850         * class.h class.c: Add mono_type_get_underlying_type ().
22851
22852 2004-09-09  Geoff Norton <gnorton@customerndna.com>
22853
22854         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
22855         Fix GetTypes() to support dynamically created assemblies.
22856
22857 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
22858
22859         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
22860         
22861         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
22862         previous patch.
22863
22864         * reflection.h reflection.c loader.c: Allow dynamic construction of
22865         pinvoke methods. Fixes #65571.
22866         
22867         * reflection.c (mono_reflection_get_type): Revert previous change since
22868         it causes regressions.
22869
22870 2004-09-08  Martin Baulig  <martin@ximian.com>
22871
22872         * class.c (class_compute_field_layout): Don't call
22873         mono_class_layout_fields() for open generic instances.
22874
22875 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
22876         * threads.c appdomain.c: fix typo in GC macro
22877
22878 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22879
22880         * threads.c: don't call mono_thread_detach() in start_wrapper(),
22881         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
22882
22883 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
22884
22885         * image.c (mono_image_close): Applied patch from 
22886         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
22887         assembly is loaded multiple times from data.
22888         
22889         * image.c (mono_image_open): Fix warning.
22890
22891 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22892
22893         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
22894         once. Fixes #58334.
22895         
22896         * reflection.c (mono_reflection_create_runtime_class): Initialize
22897         klass->nested_classes. Fixes #61224.
22898
22899 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22900
22901         * threads.c: sched_yield() on exit, to allow threads to quit.
22902
22903 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22904
22905         * object.c (mono_unhandled_exception): Remove leftover debug code.
22906
22907 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
22908
22909         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22910
22911 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22912
22913         * marshal.c (emit_marshal_array): Really null terminate string arrays.
22914         
22915         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22916
22917 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22918
22919         * marshal.c (emit_marshal_array): Null terminate string arrays.
22920         
22921         * marshal.c (raise_auto_layout_exception): Fix warning.
22922
22923         * reflection.c (mono_param_get_objects): Initialize the default value
22924         with DBNull.Value, not null. Fixes #62123.
22925
22926 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
22927
22928         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22929         throw an exception with a cute explanation.
22930
22931 2004-09-06  Dick Porter  <dick@ximian.com>
22932
22933         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22934         Close the new process's thread handle, as we don't use it.  The
22935         handle stays around forever otherwise.
22936
22937 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22938
22939         * object.c (arith_overflow): Fix warning.
22940
22941         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22942         calling conventions in method refs. Fixes #65352.
22943
22944         * reflection.c: Fix warnings.
22945
22946 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
22947
22948         * icall.c: Add a new icall for Array.Clear
22949
22950 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
22951
22952         * object.c: When allocating an array, we have to throw
22953         an overflow exception if any of the lengths are < 0.
22954
22955 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22956
22957         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22958         properly. Also move implementation of string array marshalling to 
22959         managed code. Fixes #42316.
22960
22961 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22962
22963         * assembly.c: provide more information when loading an assembly fails.
22964
22965 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22966
22967         * filewatcher.c: don't expect the development fam package to be
22968         installed.
22969
22970 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
22971
22972         * marshal.c: Make a copy of the signature cookie since it will be
22973         freed by the caller.
22974         
22975         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22976
22977         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22978
22979         * metadata.c (mono_metadata_free_marshal_spec): New function to free
22980         marshal specs.
22981
22982         * marshal.c: More refactoring.
22983         
22984         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22985         smaller functions.
22986
22987 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
22988
22989         * object.c: In mono_message_invoke, fill the output parameter array after
22990           calling the managed method (it was done before the call). This fixes
22991           bug #59299.
22992
22993 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
22994
22995         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22996         as well.
22997
22998 2004-09-02  Martin Baulig  <martin@ximian.com>
22999
23000         * class.c (mono_class_instance_size): Don't allow generic type
23001         definitions or open generic instances.
23002         (mono_class_array_element_size): If we're a value type, call
23003         mono_class_instance_size() on the original class.
23004
23005         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
23006         handle generic instances.
23007
23008         * mono-debug-debugger.c (write_type): Handle generic instances
23009         like classes.
23010
23011 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
23012
23013         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
23014         the allocation request fails. Fixes #65089.
23015
23016         * object.c (mono_runtime_free_method): Do not call mono_free_method.
23017         
23018         * object.c (mono_runtime_free_method): New function to free a dynamic
23019         method.
23020
23021         * marshal.c (mono_delegate_free_ftnptr): New function to free the
23022         delegate trampoline.
23023
23024         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
23025         with hasthis as dynamic,
23026
23027         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
23028
23029         * domain.c (mono_jit_info_table_remove): New function to remove an
23030         entry from the jit info table.
23031
23032         * class-internals.h (MonoMethod): Add 'dynamic' field.
23033
23034         * loader.c: Fix warnings.
23035
23036 2004-09-01  Martin Baulig  <martin@ximian.com>
23037
23038         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
23039         instead of mono_debugger_lock() because the latter one is a no-op
23040         unless running in the debugger.
23041
23042 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
23043
23044         * class.c (class_compute_field_layout): Classes with auto-layout or
23045         reference fields are not blittable.
23046         
23047 2004-09-01  Dick Porter  <dick@ximian.com>
23048
23049         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
23050         mono_image_get_filename() to get the assembly location.
23051
23052         * icall.c:
23053         * metadata.h: Fix compile warnings
23054
23055 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
23056
23057         * class.c (class_compute_field_layout): System.Object is blittable.
23058
23059         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
23060         as in/out. Fixes #59909.
23061
23062 2004-09-01  Martin Baulig  <martin@ximian.com>
23063
23064         * metadata.h (MONO_TYPE_ISREFERENCE): Call
23065         mono_metadata_generic_inst_is_valuetype() if we're a generic
23066         instance to check whether our underlying type is a reference type.
23067
23068 2004-09-01  Martin Baulig  <martin@ximian.com>
23069
23070         * metadata.c (mono_type_size): If we're a generic instance, call
23071         mono_class_value_size() for value types.
23072
23073 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
23074
23075         * marshal.c: Implement more custom marshalling functionality. Fixes
23076         #64915.
23077
23078 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23079
23080         * mono-debug.c, debug-mono-symfile.c: add some locking love.
23081
23082 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
23083
23084         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
23085
23086         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
23087
23088         * icall.c: Fix some warnings.
23089
23090         * threads.c (abort_appdomain_thread): Fix unref errors.
23091         (mono_thread_current): Fix THREAD_DEBUG define.
23092
23093 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
23094
23095         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
23096
23097         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
23098
23099 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
23100
23101         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
23102         string arrays.
23103
23104 2004-08-28  Martin Baulig  <martin@ximian.com>
23105
23106         * metadata.c
23107         (mono_metadata_generic_inst_is_valuetype): New public function.
23108
23109         * metadata.h (MONO_TYPE_ISSTRUCT): Call
23110         mono_metadata_generic_inst_is_valuetype() if we're a generic
23111         instance to check whether our underlying type is a valuetype.
23112
23113 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
23114
23115         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
23116         #63768.
23117
23118 2004-08-25  Martin Baulig  <martin@ximian.com>
23119
23120         * loader.c (mono_get_method_from_token): Abstract methods can also
23121         be generic and thus have type parameters.
23122
23123         * metadata-internals.h
23124         (MonoDynamicImage): Added `GPtrArray *gen_params'.
23125
23126         * reflection.c (mono_image_get_generic_param_info): Don't create a
23127         metadata row, just add an entry to the `gen_params' array.
23128         (build_compressed_metadata): Sort the `gen_params' array and then
23129         actually create the metadata.
23130
23131 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23132
23133         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
23134
23135 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
23136
23137         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
23138
23139 2004-08-24  Martin Baulig  <martin@ximian.com>
23140
23141         * class.cs (mono_class_is_subclass_of): Like an interface, a
23142         generic instance also derives from System.Object.
23143
23144 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
23145
23146         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
23147         custom modifiers to be in any order. Fixes #61990.
23148
23149 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
23150
23151         * object.c: Register mono_object_new_fast icall.
23152         
23153         * object.c (mono_class_get_allocation_ftn): Return to calling
23154         mono_object_new_fast, since it seems faster to compute the object 
23155         size in unmanaged code than passing it as a parameter.
23156
23157         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
23158
23159         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
23160         this function with Boehm as the oom handler, so we don't have to check
23161         the result of GC_malloc.
23162
23163         * object.c: Remove checks for oom.
23164
23165         * object.h object.c (mono_class_get_allocation_ftn): New function to
23166         return the icall which can be used to allocate an instance of a given
23167         class. 
23168
23169         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
23170
23171         * class-internals.h: Add 'enabled' field.
23172
23173 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
23174
23175         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
23176
23177 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
23178         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
23179         value 0x0010.
23180
23181 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
23182
23183         * appdomain.c: use the Tls function for appdomain too,
23184         at Zoltan's request. Actually return in mono_context_get
23185
23186         * appdomain.c, profiler.c, threads.c: use __thread
23187
23188 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
23189
23190         * appdomain.c threads.c: Call GC_CreateThread on windows.
23191
23192         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
23193         multiple libraries since this don't work on windows.
23194
23195 2004-08-18  Martin Baulig  <martin@ximian.com>
23196
23197         * class-internals.h
23198         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
23199         MonoMethodHeader.
23200
23201         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
23202         MonoMethodNormal since we also need it for abstract and interface
23203         methods.
23204
23205         * reflection.c
23206         (build_compressed_metadata): Sort the GenericParam table.
23207         (mono_image_create_token): Added `gboolean create_methodspec'
23208         argument; this is false when generating a MethodImpl token.
23209         (reflection_methodbuilder_to_mono_method): Abstract and interface
23210         methods may also have generic parameters.
23211
23212 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
23213
23214         * appdomain.c: thread local alloc
23215
23216 2004-08-17  Martin Baulig  <martin@ximian.com>
23217
23218         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
23219
23220         * icall.c
23221         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
23222         argument.
23223
23224         * class.c (mono_type_get_full_name): New public function.
23225         (mono_type_get_name): Don't include the type arguments.
23226
23227 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
23228
23229         * Makefile.am: Build static versions of libmetadata and libmonoruntime
23230         for inclusion into the mono executable.
23231
23232 2004-08-16  Martin Baulig  <martin@ximian.com>
23233
23234         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
23235         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
23236
23237 2004-08-14  Martin Baulig  <martin@ximian.com>
23238
23239         * class.c (dup_type): Also copy the `byref' field.
23240
23241 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
23242
23243         * reflection.c (create_dynamic_mono_image): Revert the last change 
23244         since it breaks bootstrap.
23245
23246 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
23247
23248         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
23249
23250         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
23251         not free them with g_free.
23252
23253 2004-08-11  Martin Baulig  <martin@ximian.com>
23254
23255         * reflection.c (mono_reflection_setup_internal_class): Also call
23256         mono_class_setup_mono_type() if we already have a `tb->type.type'.
23257
23258 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
23259
23260         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
23261         called during default (first) AppDomain creation. Keep track of
23262         Evidence when loading assemblies.
23263
23264 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23265
23266         * opcodes.c, opcodes.h: reduce runtime relocations.
23267
23268 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
23269
23270         * culture-info.h, locales.c: fixes and chages to sue the new
23271         optimized format of the locale data.
23272         * culture-info-tables.h: regenerated.
23273
23274 2004-08-06  Geoff Norton <gnorton@customerdna.com>
23275         
23276         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
23277
23278 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
23279
23280         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
23281         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
23282         * domain-internals.h: icall declaration.
23283         * icall.c: icall registration.
23284         * object-internals.h: New fields in MonoAssembly for CAS.
23285
23286 2004-08-05  Duncan Mak  <duncan@ximian.com>
23287
23288         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
23289         CEE_LDELEM_ANY.
23290
23291 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23292
23293         * reflection.c: fix to deal with object[] arrays in custom ctors
23294         (bug #62550).
23295
23296 2004-08-05  Martin Baulig  <martin@ximian.com>
23297
23298         * class.c (mono_class_array_element_size): Added support for
23299         generic instances and correctly handle "recursive" types.
23300
23301 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
23302
23303         * assembly.c: Fix warnings.
23304
23305 2004-08-04  Martin Baulig  <martin@ximian.com>
23306
23307         * class.c
23308         (mono_type_get_name_recurse): Added `gboolean include_arity'
23309         argument specifying whether or not we should include the generic
23310         arity in the type name.
23311         (_mono_type_get_name): New static function.
23312         (mono_class_setup_vtable): If we're a generic instance, don't
23313         include the generic arity in the names of explicit method
23314         implementations.        
23315
23316 2004-08-03  Martin Baulig  <martin@ximian.com>
23317
23318         * class.c (mono_type_get_name_recurse): Enclose the generic type
23319         arguments in `<', '>'.
23320
23321 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23322
23323         * gc.c: make GC warning messages use the trace API, they are just
23324         noise to most of the users.
23325
23326 2004-08-03  Martin Baulig  <martin@ximian.com>
23327
23328         * debug-mono-symfile.c (read_string): Correctly read the string.
23329
23330 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
23331
23332         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
23333         
23334         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
23335         icalls.
23336         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
23337
23338 2004-07-30  Martin Baulig  <martin@ximian.com>
23339
23340         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
23341         Reflect latest symbol writer changes.   
23342
23343 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23344
23345         * object.c: always create an object if null is passed
23346         to Invoke() where a valuetype is expected.
23347
23348 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
23349
23350         * marshal.c (mono_marshal_init): make managed
23351         signatures match native ones better for 64bits.
23352
23353 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23354
23355         * appdomain.c: hack to build correctly the private bin path on windows.
23356         Fixes bug #61991.
23357
23358 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
23359
23360         * assembly.c: Load mscorlib from the correct framework directory
23361           (mono/<version>/mscorlib.dll).
23362         * appdomain.h: Added prototypes for new functions.
23363         * internals.h: Added some prototypes.
23364         * domain.c: When initializing the runtime, get from the executable and
23365           the configuration files the runtime version that the app supports.
23366           Added support methods for reading app.exe.config. Added list of versions
23367           supported by the JIT. Added two new methods: mono_init_from_assembly,
23368           which initializes the runtime and determines the required version from
23369           the provided exe file, and mono_init_version, which initializes
23370           the runtime using the provided version.
23371         * icall.c: Get machine.config from version-specific directory.
23372         * reflection.c: When generating an image, embed the version number
23373           of the current runtime.
23374
23375 2004-07-28  Dick Porter  <dick@ximian.com>
23376
23377         * socket-io.c
23378         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
23379         returned sockaddr size before creating the remote address object.
23380         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
23381         61608.
23382
23383 2004-07-28  Dick Porter  <dick@ximian.com>
23384
23385         * locales.c (string_invariant_compare_char): Fix invariant char
23386         compares between upper and lower cases.  Fixes bug 61458.
23387
23388 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
23389         
23390         * marshal.c: actually cache stelem.ref wrappers.
23391         
23392 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23393
23394         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
23395         sections and remove the mono_cli_rva_map () function.
23396
23397 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23398
23399         * debug-mono-symfile.c: fix one more endianess issue, from a patch
23400         by Geoff Norton (<gnorton@customerdna.com>).
23401
23402 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23403
23404         * class.c: fix class loads for pointer types (typeof(int) !=
23405         typeof(int*)).
23406
23407 2004-07-27  Martin Baulig  <martin@ximian.com>
23408
23409         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
23410         reading the debugging information from an external ".mdb" file.
23411
23412 2004-07-24  Martin Baulig  <martin@ximian.com>
23413
23414         * reflection.c (mono_image_get_type_info): Only write a class
23415         layout entry if we actually have a size or a packing size.
23416
23417 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
23418
23419         * reflection.c (type_get_fully_qualified_name): 
23420         insert cast to get type checking of ?: with non-gcc compilers
23421
23422 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
23423
23424         * rand.c: use g_getenv for both lookups of
23425         MONO_EGD_SOCKET
23426
23427 2004-07-17  Martin Baulig  <martin@ximian.com>
23428
23429         * reflection.c (mono_reflection_bind_generic_method_parameters):
23430         Set `gmethod->reflection_info'.
23431
23432 2004-07-17  Martin Baulig  <martin@ximian.com>
23433
23434         * class.c (mono_class_create_from_typedef): Insert the newly
23435         created class into the hash table before computing the interfaces
23436         since we could be called recursively.
23437
23438 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
23439
23440         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
23441         function to implement stelem.ref in managed code
23442         * class-internals.h, debug-helpers.c: a new wrapper type
23443         for the above.
23444
23445 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23446
23447         * gc.c: allow GC handles to work even when no GC is compiled in.
23448         Fix part of bug #61134 (GetAddrOfPinnedObject).
23449
23450 2004-07-13  Peter Williams  <peter@newton.cx>
23451  
23452         * process.c (complete_path): Make sure we don't attempt to execute
23453         directories.
23454  
23455 2004-07-12  Geoff Norton <gnorton@customerdna.com>
23456
23457         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
23458           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
23459           and will add/subtract the hour if needed
23460
23461 2004-07-12  Martin Baulig  <martin@ximian.com>
23462
23463         * reflection.c (mono_field_get_object): If we have
23464         `field->generic_info', take the attributes from
23465         `field->generic_info->generic_type'.    
23466
23467 2004-07-12  Martin Baulig  <martin@ximian.com>
23468
23469         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
23470         This function must be called before initializing the runtime.
23471         (mono_debug_init_1): New function; call this after initializing
23472         the runtime, but before loading the assembly.  It tells the
23473         debugger to load corlib and the builtin types.
23474
23475         * mono-debug-debugger.c: Did some larger changes in the debugging
23476         code; support recursive class declarations, make sure we actually
23477         add all classes.
23478
23479 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23480
23481         * debug-helpers.c: undo my previous patch and fixed the real issue in
23482         ../mini/exceptions-x86.c
23483
23484 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23485
23486         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
23487         when no HOME env. variable was set and a NullRef was thrown in a .cctor
23488         called from other .cctors.
23489
23490 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
23491
23492         * loader.c: Removed the mono_loader_wine_init hack now that we are
23493         doing a managed version of Windows.Forms.
23494
23495 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
23496
23497         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
23498         threadpool.c, threads.c: remove static data from rootset.
23499
23500 2004-07-09  Dick Porter  <dick@ximian.com>
23501
23502         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
23503         Don't do any more processing if the matched length was 0.  It was
23504         increasing the size of the string before.  Fixes bug 61167.
23505
23506 2004-07-09  Dick Porter  <dick@ximian.com>
23507
23508         * socket-io.h:
23509         * socket-io.c
23510         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
23511         Add support for SO_PEERCRED if its available.
23512
23513 2004-07-09  Peter Bartok <pbartok@novell.com>
23514         * loader.c: winelib.exe.so error message is now only displayed if
23515         MONO_DEBUG is set. To help us avoid questions when people are trying
23516         out the new Managed.Windows.Forms.
23517
23518 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
23519
23520         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
23521         for isinst and castclass wrappers.
23522
23523         * class-internals.h icall.c: Move registration and lookup of JIT icalls
23524         to libmetadata from the JIT, so they could be used by the marshalling
23525         code and the interpreter.
23526
23527         * marshal.c: Register marshalling related JIT icalls here instead of
23528         in mini.c. Use CEE_MONO_ICALL instead of the family of 
23529         CEE_MONO_PROC<x> opcodes to call marshalling functions.
23530
23531         * metadata.h: Remove unneeded marshalling conversions.
23532
23533         * opcodes.c: Update for new opcodes.
23534         
23535 2004-07-08  Martin Baulig  <martin@ximian.com>
23536
23537         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
23538         (mono_debug_get_domain_data): Make this function static.
23539
23540 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23541
23542         * gc.c, object.h: add nice GC handle API for embedders.
23543
23544 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
23545
23546         * reflection.c: more changes for the new api
23547
23548         * object.c: When we reflect on a field w/ a constant value, it
23549         will not have a memory location, so we must access metadata. Also,
23550         allow easier reading of strings so that we can read them from
23551         the constant data.
23552
23553         * class.c (mono_class_layout_fields): no need for literal fields here.
23554
23555         * class-internals.h: api changes for const fields
23556
23557         * icall.c (ves_icall_get_enum_info): use new apis for const fields
23558
23559 2004-07-06  Martin Baulig  <martin@ximian.com>
23560
23561         * mono-debug.h: Increment version number to 44.
23562
23563         * mono-debug.c (mono_debug_add_wrapper): The second argument is
23564         now a gpointer, rewrote this whole method.
23565
23566         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
23567         function.  Add information about the wrapper in a new "misc table".
23568
23569         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
23570         for the new misc table.
23571
23572 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
23573
23574         * metadata-internals.h image.c: Add a cache for helper signatures.
23575
23576         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
23577
23578 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
23579
23580         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
23581         delegates from a delegate. Fixes #61033.
23582         
23583         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
23584         marshalling of stringbuilder arrays. Fixes #59900.
23585
23586 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
23587
23588         * icall.c: Add EnumBuilder:setup_enum_type icall.
23589
23590 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
23591
23592         * icall.c: Added a new icall for the property version of
23593         OffsetOfStringData.
23594
23595 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
23596
23597         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
23598         it has a constant size across platforms.
23599
23600         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
23601         stack trace.
23602
23603 2004-06-29  Martin Baulig  <martin@ximian.com>
23604
23605         * mono-debug.c (mono_debug_add_method): Protect the whole function
23606         in mono_debugger_lock(), not just parts of it.
23607
23608 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
23609
23610         * reflection.c: make sure padding bytes in heaps are zeroed.
23611
23612 2004-06-24  David Waite  <mass@akuma.org>
23613
23614         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
23615         image.c, loader.c, locales.c, marshal.c, metadata.c,
23616         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
23617         string-icalls.c, threads.c: change to C90-style comments from C99 /
23618         C++ -style
23619
23620 2004-06-24  Dick Porter  <dick@ximian.com>
23621
23622         * threads.c
23623         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
23624         return createdNew.  Fixes bug 60412.
23625
23626         * threads-types.h: 
23627         * icall.c: Add createdNew parameter to CreateMutex icall
23628
23629 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23630
23631         * reflection.c, object-internals.h: save default value in params.
23632
23633 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23634
23635         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
23636         no need to build a new path combining that with the application base.
23637         Fixes bug #60442.
23638
23639 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
23640
23641         * reflection.c: fixed minor standard compliance issues.
23642
23643 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23644
23645         * reflection.c: fixed issue with encoding some custom attributes
23646         (arrays in properties and fields, bug #60411).
23647
23648 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23649
23650         * reflection.c: fix start address when copying the public key token.
23651
23652 2004-06-23  Martin Baulig  <martin@ximian.com>
23653
23654         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
23655         the `exc' object in a static object to put it into the GC's root set.
23656
23657 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23658
23659         * reflection.c: make mono_reflection_setup_internal_class ()
23660         callable a second time to setup a new parent class.
23661
23662 2004-06-23  Dick Porter  <dick@ximian.com>
23663
23664         * threads.c: Check for WAIT_IO_COMPLETION return values.
23665
23666 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
23667
23668         * appdomain.c: Removed the g_free on the public key token. Now copy 
23669         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
23670         * assembly.c: Added public key token string value when loading 
23671         assemblies. Fix bug #60439.
23672         * icall.c: Added missing informations (like public key) in 
23673         GetReferencedAssemblies. Fix #60519.
23674         * image.h: Changed definition for public key token from const char*
23675         public_tok_value to guchar public_key_token [17];
23676         * reflection.c: Updated for changes to public key token.
23677
23678 2004-06-22  Lluis Sanchez Gual
23679
23680         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
23681         for the field in base classes.
23682
23683 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23684
23685         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
23686         mark headers as not supported, they are installed only for use by the
23687         debugger.
23688
23689 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
23690
23691         * *.c, *.h: avoid namespace pollution in public headers.
23692
23693 2004-06-21  Martin Baulig  <martin@ximian.com>
23694
23695         * exception.c (mono_get_exception_security): It's in
23696         "System.Security", not in "System".
23697
23698         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
23699         the exception classes.
23700
23701 2004-06-21  Martin Baulig  <martin@ximian.com>
23702
23703         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
23704         Protect the exception object from being finalized.
23705
23706 2004-06-21  Martin Baulig  <martin@ximian.com>
23707
23708         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
23709         public function.
23710
23711 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
23712
23713         * reflection.c: Load the assembly in mono_reflection_type_from_name,
23714         if it was not loaded before. Fix parts of #60439.
23715
23716 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
23717
23718         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
23719         code that was broken since Ben's change: wrappers are now
23720         dependent on the method signature only again.
23721
23722 2004-06-21  Martin Baulig  <martin@ximian.com>
23723
23724         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
23725         added interface support.
23726
23727 2004-06-21  Martin Baulig  <martin@ximian.com>
23728
23729         * class.c (mono_vtable_get_static_field_data): New public method.
23730
23731 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
23732
23733         * filewatcher.c : Windows build fix to be compliant with API changes.
23734
23735 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23736
23737         * class.h, class.c: more accessors.
23738         * metadata.h, metadata.c: prepare for hiding MonoType and
23739         MonoMethodSignature: people should use the accessors from now on
23740         outside of the tree.
23741
23742 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23743
23744         * *.c, *.h: more API cleanups.
23745
23746 2004-06-18  Jackson Harper  <jackson@ximian.com>
23747
23748         * assembly.c: Trace loading assemblies.
23749         * loader.c: Trace loading native libraries.
23750         * mono-config.c: Trace loading config files.
23751         
23752 2004-06-18  Dick Porter  <dick@ximian.com>
23753
23754         * locales.c: Tell ICU the lengths of strings, it can cope with
23755         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
23756
23757 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
23758
23759         * image.c: swapped name/filename;
23760
23761 2004-06-18  Martin Baulig  <martin@ximian.com>
23762
23763         * mono-debug-debugger.c (write_class): Write the parent class at
23764         the end of the header.
23765
23766 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23767
23768         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
23769
23770 2004-06-17  Raja R Harinath  <rharinath@novell.com>
23771
23772         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
23773         (bundle_obj): New conditional define.
23774         (BUILT_SOURCES): Remove.
23775         ($(bundle_srcs)): Make parallel-make safe.
23776         (libmonoruntime_la_LIBADD): Make unconditional.
23777         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
23778         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
23779
23780 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
23781
23782         * culture-info-tables.h: It was inconsistent with the latest
23783           supp info files.
23784
23785 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
23786
23787         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
23788         be loaded.
23789
23790         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
23791         with gcc 2.95.
23792
23793 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23794
23795         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
23796         cleaned up public header threads.h.
23797
23798 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23799
23800         * Makefile.am, *.c, *.h: more API cleanups.
23801
23802 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23803
23804         * Makefile.am: removed monosn from compilation.
23805         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
23806         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
23807         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
23808         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
23809         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
23810         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
23811
23812 2004-06-15  Jackson Harper  <jackson@ximian.com>
23813
23814         * assembly.c: Make locales lower case when searching the GAC for
23815         assemblies. gacutil will always make locales lowercase when
23816         installing so this effectively makes them case insensitive.
23817         
23818 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
23819
23820         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
23821         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
23822           parameter which allows to choose whether the wait can be interrupted or 
23823           not. Also added the method mono_monitor_enter(), which locks the monitor
23824           using an infinite wait and without allowing interruption.
23825           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
23826           interrupted.
23827         * object.h: Added new fields in MonoThread. suspend_event holds the event
23828           used to susped/resume the thread. synch_lock is the lock object to use for
23829           modifying the thread state.
23830         * threads.c: Use the new synch_lock object for locking, instead of "this",
23831           which can generate deadlocks.
23832           Moved thread state change in Thread.Sleep and Thread.Join from managed
23833           to unmanaged code. This avoids a deadlock when the thread was suspended
23834           just after acquiring the thread lock.
23835           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
23836           Implemented Thread.Suspend using an event instead of ThreadSuspend,
23837           which is not fully implemented in the io-layer.
23838         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
23839
23840 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
23841
23842         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
23843         threads-types.h: more API cleanups.
23844
23845 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23846
23847         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
23848         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
23849         threadpool.c, threads.c: first pass at the exported API cleanup.
23850
23851 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23852
23853         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
23854
23855 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23856
23857         * icall.c: added internalGetHome.
23858
23859 2004-06-14  Dick Porter  <dick@ximian.com>
23860
23861         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
23862         possible to return successfully when '.' or '..' were the only
23863         entries in a directory, but were skipped.  The MonoIOStat was not
23864         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
23865         Fixes bug 59574.
23866
23867 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23868
23869         * reflection.c: make binaries run on .Net 1.1 by default.
23870
23871 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23872
23873         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
23874
23875 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
23876
23877         * marshal.c: keep track of struct size with explicit layout
23878         (bug #59979).
23879
23880 2004-06-12  Martin Baulig  <martin@ximian.com>
23881
23882         * mono-debug-debugger.c: Comment out a debugging g_message().
23883
23884 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23885
23886         * reflection.c, reflection.h: do not free custom attrs that are cached.
23887         * icall.c: use braces to make code clearer.
23888
23889 2004-06-11  Martin Baulig  <martin@ximian.com>
23890
23891         * class.h (MonoInflatedField): New type.
23892         (MonoClassField): Replaced `MonoType *generic_type' with
23893         `MonoInflatedField *generic_info'.
23894
23895         * icall.c
23896         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
23897
23898 2004-06-11  Martin Baulig  <martin@ximian.com>
23899
23900         * reflection.c (mono_image_create_method_token): Correctly encode
23901         varargs methods.
23902
23903 2004-06-11  Martin Baulig  <martin@ximian.com>
23904
23905         * metadata.c (mono_metadata_parse_method_signature): When parsing
23906         a MethodDef which has VarArgs, also set sentinelpos if we don't
23907         have any parameters.
23908
23909 2004-06-11  Martin Baulig  <martin@ximian.com>
23910
23911         * verify.c (mono_method_verify): In CEE_CALL, use
23912         mono_method_get_signature() to get the method's signature, unless
23913         we're a PInvoke method.
23914
23915 2004-06-10  Jackson Harper  <jackson@ximian.com>
23916
23917         * assembly.c: Use <path>/lib/mono/gac for the extra paths
23918         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23919         logical name as the supplied path is just a prefix to the gac not
23920         the direct path to it.
23921         
23922 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23923
23924         * reflection.c: make the token for a created method match
23925         the token of the MethodBuilder it was created from
23926         (IKVM requires this behaviour now).
23927
23928 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23929
23930         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23931         reflection.c, socket-io.c: leak fixes.
23932
23933 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23934
23935         * icall.c: handle sentinel pos in vararg methods in position different
23936         from 0.
23937
23938 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23939
23940         * culture-info-tables.h: freshly generated.
23941
23942 2004-06-09  Martin Baulig  <martin@ximian.com>
23943
23944         * loader.c (mono_get_method_constrained): Call `mono_class_init
23945         (constrained_class)'.   
23946
23947 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
23948
23949         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23950         any methods. Fixes #59629.
23951
23952 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23953
23954         * culture-info-tables.h: reflecting locale-builder updates.
23955
23956 2004-06-08  Dick Porter  <dick@ximian.com>
23957
23958         * object.h:
23959         * locales.c: Fixed compile warnings, including a real bug in
23960         CompareInfo_internal_compare.
23961         
23962 2004-06-08  Dick Porter  <dick@ximian.com>
23963
23964         * locales.c
23965         (ves_icall_System_Globalization_CompareInfo_internal_index):
23966         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23967         Double-check the resuls of usearches, because ICU currently
23968         ignores most of the collator settings here.  Fixes bug 59720.
23969         
23970 2004-06-08  Dick Porter  <dick@ximian.com>
23971
23972         * locales.c
23973         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23974         Fix memory leak and segfault-causing typo.  No idea how this one
23975         lasted so long without being noticed.
23976
23977 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
23978
23979         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23980         any methods. Fixes #59629.
23981
23982 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23983
23984         * assembly.c:
23985         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23986         own the critical section before). Removed dead code (that's done
23987         in the preload hook).
23988
23989         (mono_assembly_load_with_partial_name): call the preload hook.
23990
23991 2004-06-08  Martin Baulig  <martin@ximian.com>
23992
23993         * metadata.c (mono_metadata_signature_alloc): Default
23994         `sentinelpos' to -1.
23995
23996         * reflection.c (mono_image_get_array_token): Likewise.
23997
23998 2004-06-08  Martin Baulig  <martin@ximian.com>
23999
24000         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
24001
24002         * metadata.c (mono_metadata_parse_method_signature): When parsing
24003         a MethodDef which has VarArgs, set sentinelpos.
24004
24005         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
24006         `gint16' since we're using -1 for non-varargs methods.
24007
24008         * reflection.c
24009         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
24010         (method_encode_signature): Added varargs support.
24011         (method_builder_encode_signature): Likewise.
24012         (mono_image_get_varargs_method_token): New static method.
24013         (mono_image_create_method_token): New public method; this is
24014         called via an icall instead of mono_image_create_token() when
24015         calling a varargs method.       
24016
24017 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
24018
24019         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
24020
24021 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
24022
24023         * culture-info-tables.h : Reflecting the latest locale-builder that
24024           fixed empty array representation ({} to {0}).
24025
24026 2004-06-07  Jackson Harper  <jackson@ximian.com>
24027
24028         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
24029         looking up extra gac paths. This allows MONO_GAC_PATH to act
24030         exactly like a prefix.
24031         
24032 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
24033
24034         * reflection.c (mono_reflection_type_from_name): Make a copy of the
24035         type name before modifying it. Fixes #59405.
24036
24037 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
24038
24039         * culture-info.h: added fields for "all datetime patterns".
24040         * locales.c: (  ves_icall_System_Globalization_CultureInfo
24041           _construct_datetime_format ()): fill xxx_patterns fields.
24042         * object.h: added fields for "all datetime patterns" to
24043           MonoDateTimeFormatInfo.
24044         * culture-info-tables.h: reflecting locale-builder updates.
24045
24046 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
24047
24048         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
24049         the event has no add and remove methods. Fixes #59629.
24050
24051 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
24052
24053         * object.c: Fixed possible integer overflow when allocating large
24054         strings.
24055
24056 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
24057
24058         * culture-info-tables.h: reflecting locale-builder updates.
24059
24060 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
24061
24062         * culture-info-tables.h: reflecting locale-builder updates.
24063
24064 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
24065
24066         * culture-info-tables.h: reflecting locale-builder updates.
24067
24068 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
24069
24070         * threads.c: Made Thread.Sleep abortable.
24071
24072 2004-06-02  Martin Baulig  <martin@ximian.com>
24073
24074         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
24075
24076         * debug-mono-symfile.h: Bumped symbol file version number to 37.
24077
24078 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
24079
24080         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
24081
24082 2004-05-30  Jackson Harper  <jackson@ximian.com>
24083
24084         * reflection.c: Do not hardcode assembly versions or public key
24085         tokens anymore. All of this except the corlib section was dead
24086         code anyways.
24087         
24088 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
24089
24090         * object.c (mono_runtime_invoke_array): Automatically create boxed
24091         objects for byref valuetypes if needed. Fixes #59300.
24092         
24093         * object.c (mono_method_return_message_restore): Handle 
24094         MONO_TYPE_OBJECT as well.
24095
24096 2004-05-28  Jackson Harper  <jackson@ximian.com>
24097
24098         * reflection.c: The modified type encoding was causing build
24099         problems. Reverted for now.
24100         
24101 2004-05-28  Jackson Harper  <jackson@ximian.com>
24102
24103         * reflection.c/h: Take an assembly ref so that we dont create
24104         fully qualified names when encoding types in the same assembly as
24105         the custom attribute being emitted.
24106         * appdomain.c: Increment version number.
24107         
24108 2004-05-26  Duncan Mak  <duncan@ximian.com>
24109
24110         * icall.c
24111         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24112         Set the full version number (major, minor, build, revision).
24113
24114 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
24115
24116         * marshal.c (emit_struct_conv): increment src/dst after blit
24117         (mono_marshal_get_managed_wrapper,
24118         mono_marshal_get_native_wrapper): make sure we have marshalling
24119         info before marshalling params (info computation affects
24120         blittable)
24121
24122         * class.c (class_compute_field_layout): correctly deal with
24123         blittable
24124         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
24125         value types (as per what windows dows by default)
24126         (mono_class_setup_mono_type): System.ValueType is blittable
24127         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
24128         blittable
24129
24130         * marshal.c (mono_marshal_load_type_info): flag types  as
24131         non-blittable if the native layout doesn't match the managed
24132         layout
24133
24134 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24135
24136         * appdomain.c: don't add stuff in the private search path that is
24137         above the application base. If application base is not set, there's
24138         no private search path.
24139
24140 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
24141
24142         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
24143         byref struct arguments in native->managed marshalling.
24144
24145 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
24146
24147         * marshal.c (mono_marshal_get_runtime_invoke): correctly
24148         cache methods using signature (special case for methods
24149         that are value type or string class)
24150         
24151         * image.c (mono_image_close): clean up allocated GSList's
24152         in runtime_invoke_cache.
24153
24154 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24155
24156         * mono-config.c: set the correct path for mono_cfg_dir on windows when
24157         there's no MONO_CFG_DIR environment variable defined.
24158
24159 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24160
24161         * threads.c: windows version must be >= 0x0500 to include OpenThread.
24162
24163 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
24164
24165         * threadpool.c: Really wait for 500ms after the async call, even if the wait
24166           is interrumped.
24167         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
24168           before waiting for it, and call CloseHandle after the wait to unref it.
24169           This will make sure that handles are not disposed too early.
24170
24171 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24172
24173         * appdomain.c:
24174         * appdomain.h:
24175         * icall.c: removed
24176         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
24177         needed now.
24178
24179         * object.c: se the application_base only for the domain that runs
24180         Main. Fixes bug #59216,
24181
24182 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24183
24184         * appdomain.c:
24185         * object.c: only the domain in which Main is run have
24186         SetupInformation.ConfigurationFile set, so moved a few lines from
24187         appdomain.c to object.c.
24188
24189 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24190
24191         * appdomain.c: we tried to load [name].(dll|exe), but according
24192         to bug #57710, we must also try [culture]/[name].(dll|exe) and
24193         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
24194         There's a test case attached to bug #58922.
24195
24196 2004-05-27  Dick Porter  <dick@ximian.com>
24197
24198         * icall.c:
24199         * file-io.c: Implemented icalls for locking and unlocking regions
24200         in a file.
24201         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
24202         FALSE on error (fixes both compiler warning and real bug.)
24203
24204 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
24205
24206         * culture-info-tables.h: reflecting locale-builder updates.
24207
24208           (Added missing ChangeLog entry for 05/26)
24209
24210 2004-05-27  Jackson Harper  <jackson@ximian.com>
24211
24212         * locales.c: Fix some cut and paste errors.
24213         
24214 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24215
24216         * mono-config.c: set the correct path for config. directory on windows.
24217
24218 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
24219
24220         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
24221           on win32.
24222
24223 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
24224
24225         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
24226         from pinvoke functions.
24227         
24228         * marshal.c (mono_ftnptr_to_delegate): Implement this.
24229
24230 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
24231
24232         * culture-info-tables.h: reflecting locale-builder updates.
24233
24234 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
24235
24236         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
24237         #59086.
24238
24239 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
24240
24241         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
24242         * icall.c: Modified icalls for RNG.
24243         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
24244         Windows (CryptoAPI).
24245
24246 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
24247
24248         * locales.c: Fix build.
24249
24250 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
24251
24252         * culture-info-tables.h: reflecting locale-builder updates.
24253
24254 2004-05-25  Jackson Harper  <jackson@ximian.com>
24255
24256         * locales.c: When creating the current culture use the $LANGs
24257         specific culture. So DateTimeFormat and NumberFormat entries are created.
24258         
24259 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
24260
24261         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
24262         a char array as parameter.
24263
24264 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
24265
24266         * image.c: In mono_image_open(), always use an absolute path name to
24267           look for already loaded images.
24268
24269 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
24270
24271         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
24272         missing in the windows build (like older cygwin include files).
24273
24274 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
24275
24276         * icall.c: Fixed check for possible integer overflow in Buffer_
24277         BlockCopy icall. Replaced comments style // by /* */.
24278
24279 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
24280
24281         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
24282         
24283         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
24284         check after MONO_VTADDR. Fixes pinvoke2.exe.
24285
24286         * marshal.h marshal.c metadata.h: Add beginnings of support for
24287         ftnptr -> delegate marshalling.
24288
24289 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
24290
24291         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
24292         * threads.c: Fix warnings.
24293
24294 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
24295
24296         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
24297         * icall.c: Registered icalls for Suspend and Resume.
24298         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
24299           Thread.Abort.
24300         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
24301         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
24302         * process.c: Use WaitForSingleObjectEx.
24303         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
24304           checkpoints.
24305         * threads.c, threads.h: Make use of new Ex wait methods. Improved
24306           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
24307           for Suspend and Resume. Added new mono_thread_stop, used for stoping
24308           background threads. Added basic support for Abort in Windows.
24309           Start new threads using a managed delegate invoke wrapper. This wrapper
24310           has an interruption checkpoint that is needed since an interruption
24311           can be requested before the thread leaves the unmanaged code that starts 
24312           the thread.
24313         * marshal.c: Added interruption checkpoint after every native call, and
24314           also before managed calls for wrappers called from unmanaged code to
24315           go into managed code.
24316         * object.h: Added new field in MonoThread to keep track of interruption
24317           requests.
24318
24319 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
24320
24321         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
24322         calls.
24323
24324 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24325
24326         * appdomain.c:
24327         * assembly.c:
24328         * gc.c:
24329         * locales.c:
24330         * mono-config.c:
24331         * rand.c: getenv -> g_getenv (windows!)
24332
24333         * process.c: complete_path is also used on non-windows platforms.
24334
24335 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24336
24337         * icall.c: new signature for Process_Start.
24338
24339         * process.[ch]: new signature for Process_Start. If we're on windows
24340         and UseShellExecute is false, we have to search for the program by
24341         ourselves if we don't get a full path.
24342
24343 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
24344
24345         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
24346         marshalling and call CleanUpNativeData if needed. Fixes #58646.
24347
24348 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24349
24350         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
24351         Fixes bug #58373.
24352
24353 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24354
24355         * process.c: use double quotes to quote program name and arguments on
24356         windows. Fixes bug #58575.
24357
24358 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24359
24360         * file-io.c: don't return "." and ".." when using windows Find*File.
24361
24362 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
24363
24364         * marshal.c: Don't pass wrappers to message init because method 
24365         addressed used to lookup metadata. part of remoting[2|3] fix.
24366
24367 2004-05-15  Jackson Harper  <jackson@ximian.com>
24368
24369         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
24370         path is essentially the same as MONO_PATH except that it points to
24371         GACs instead of lib directories.
24372         * loader.h: The user gac is gone so we dont need function to
24373         enable/disable it.
24374         * mono-config.c: user gac option is now gone.
24375         
24376 2004-05-15  Jackson Harper  <jackson@ximian.com>
24377
24378         * culture-info.h: Make defines more consistent, add calendar data
24379         to the culture info table.
24380         * culture-info-tables.h: Add basic calendar data. Basically
24381         everyone gets default gregorian until all the data is
24382         updated.
24383         * locales.c: Use the new consistent defines. Set calendar data for
24384         culture info objects.
24385         * object.h: add a field for calendar data to CultureInfo
24386         
24387 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
24388
24389         * image.c: image->runtime_invoke_cache is keyed on signatures now.
24390         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
24391         a signature.
24392         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
24393         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
24394         an extra param that is the pointer of the method to invoke. The IL for
24395         the invoke method is no longer specific to the method, but to the
24396         signature of the method. Thus, we can share the same code for multiple
24397         methods. This reduces the number of methods that have to be compiled.
24398
24399 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
24400
24401         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
24402
24403         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
24404
24405         * icall.c: Optimize Buffer.BlockCopy.
24406
24407 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24408
24409         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
24410         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
24411         quote). Changed them to "MMMM yyyy".
24412
24413 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
24414
24415         * rand.c
24416         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
24417
24418 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
24419
24420         * reflection.h: Updated after changes to managed structures.
24421
24422         * appdomain.c: Bump corlib version.
24423
24424 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24425
24426         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
24427         windows.
24428
24429 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24430
24431         * Makefile.am: link to ../os/libmonoos.la on windows.
24432
24433         * assembly.c:
24434                 -If MONO_DEBUG, warn about non-existing directories in
24435                 MONO_PATH.
24436                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
24437                 compile time variable.
24438                 -Removed init_default_path and call mono_set_rootdir from
24439                 libmonoos.a instead (windows only).
24440
24441         * assembly.h: declare mono_assembly_getrootdir().
24442
24443         * domain.c:
24444         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
24445
24446         * loader.c: s/getenv/g_getenv/
24447
24448 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
24449
24450         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
24451
24452         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
24453
24454         * metadata.h: Add new marshalling conversions.
24455
24456         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
24457         function.
24458
24459         * reflection.c (mono_reflection_get_type): Lookup the type in all
24460         modules of a multi-module assembly. Fixes #58291.
24461
24462 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
24463
24464         * threads.c: Before aborting a background, set the StopRequested
24465         state.  This avoids throwing the Abort exception.
24466         In mono_thread_manage, don't continue with the shutdown until all
24467         aborted threads have actually stopped.
24468
24469 2004-05-10  Jackson Harper  <jackson@ximian.com>
24470
24471         * locales.c: Remove the modifier from culture names.
24472         
24473 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24474
24475         * Makefile.am: monosn is not installed any more. It has been deprecated
24476         in favor of sn.
24477
24478 2004-05-07  Jackson Harper  <jackson@ximian.com>
24479
24480         * locales.c
24481         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
24482         Fix array construction, add bailout if the length is 0.
24483
24484 2004-05-07  Dick Porter  <dick@ximian.com>
24485
24486         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
24487         machine doesn't have a DNS entry.  Patch by Urs Muff
24488         (umuff@quark.com), fixes bug 57928.
24489
24490 2004-05-06  Jackson Harper  <jackson@ximian.com>
24491
24492         * reflection.c: Handle null PublicTokens properly. alloc mem for
24493         assembly names culture so we dont crash when freeing it.
24494         
24495 2004-05-06  Jackson Harper  <jackson@ximian.com>
24496
24497         * assembly.c: Check the usergac when loading with partial names.
24498         
24499 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
24500
24501         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
24502         does nothing for now (not required for Linux/Windows) but the class
24503         library can call it (and a newer or modified runtime could need it).
24504         * icall.c: Registred icall.
24505
24506 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24507
24508         * loader.c: prints a message on module loading error we set MONO_DEBUG
24509         environment variable.
24510
24511 2004-05-05  Jackson Harper  <jackson@ximian.com>
24512
24513         * appdomain.c: Handle PublicKeyToken=null properly.
24514         
24515 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
24516
24517         * environment.c|h: Added icall ves_icall_System_Environment_
24518         GetOSVersionString to get the current OS version as a string.
24519         * icall.c: Registred icall.
24520
24521 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
24522
24523         * object.c: in mono_object_get_virtual_method(), take into account that
24524         non-virtual methods don't have a slot in the vtable. Check needed when
24525         the object is a proxy.
24526
24527 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
24528
24529         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
24530         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
24531
24532         * object.c (mono_class_compute_gc_descriptor): Fix warning.
24533
24534         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
24535         passed when a valuetype is expected.
24536
24537         * object.c (mono_unhandled_exception): Only set the exit code if the
24538         exception happens in the main thread. Fixes thread5.exe.
24539
24540         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
24541         invalid names. Fixes #58047.
24542
24543 2004-05-03  Jackson Harper  <jackson@ximian.com>
24544
24545         * assembly.c: This line was committed accidently and is unneeded.
24546         
24547 2004-05-03  Jackson Harper  <jackson@ximian.com>
24548
24549         * icall.c: Add new icall for Assembly::LoadWithPartialName
24550         * assembly.c/.h: new function that probes the GAC to load partial
24551         assembly names by Paolo Molaro.
24552         
24553 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24554
24555         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
24556         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
24557         (type_get_fully_qualified_name): Added PublicKeyToken when building a
24558         full type name.
24559
24560 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24561
24562         * appdomain.c: fixed check for 'neutral' culture and removed warning.
24563         * reflection.c: fix bug when parsing a full type name and Version is not
24564         the last thing in the string.
24565
24566 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
24567
24568         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
24569         crashes when it is freed.
24570
24571 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24572
24573         * assembly.c: print the compat warning to stderr.
24574
24575 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
24576
24577         * assembly.c (mono_assembly_load_references): Add a compatibility
24578         hack to run old applications that might be still referencing the
24579         3300-based assemblies, only do this for System.xxx.
24580
24581 2004-05-01  Jackson Harper  <jackson@ximian.com>
24582
24583         * appdomain.c: If the culture is neutral we set it to "".
24584         
24585 2004-04-29  Jackson Harper  <jackson@ximian.com>
24586
24587         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
24588
24589 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
24590  
24591         * string-icalls.c: added low overhead function for copying chars
24592         * icall.c: added needed icall for the above function
24593  
24594 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24595
24596         * icall.c: fix return value of get_global_assembly_cache.  Implemented
24597         Environment.GetLogicalDrives.
24598
24599 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
24600
24601         * rand.c: try and talk to egd or prngd
24602         for random bytes if opening devices fail.
24603
24604 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
24605
24606         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
24607         alignment for the type using the native alignment of its members 
24608         instead of using klass->min_align.
24609
24610         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
24611
24612 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24613
24614         * file-io.c:
24615         * socket-io.c: added check for sys/aio.h.
24616
24617 2004-04-28  Dick Porter  <dick@ximian.com>
24618
24619         * threads.c: Don't abort a thread thats already aborting, when
24620         terminating everything.
24621
24622 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24623
24624         * icall.c: added 2 new async calls for Socket.
24625
24626         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
24627         IO on *nix systems.
24628
24629         * threadpool.c: removed unused variable.
24630
24631 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
24632
24633         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
24634
24635 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
24636
24637         * locales.c: put back string_invariant_tolower () and
24638         string_invariant_toupper ().
24639
24640 2004-04-26 David Waite <mass@akuma.org>
24641
24642         * file-io.h:
24643         * socket-io.h:
24644         * threads.h:
24645         * unicode.h: remove comma from end of enumeration declarations
24646
24647 2004-04-26 David Waite <mass@akuma.org>
24648
24649         * debug-mono-symfile.h:
24650         * decimal.c:
24651         * mono_debug.h:
24652         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
24653
24654
24655 2004-04-26  Jackson Harper  <jackson@ximian.com>
24656
24657         * appdomain.c: Increment version number.
24658         
24659 2004-04-26  Jackson Harper  <jackson@ximian.com>
24660
24661         * appdomain.c: Set assembly references public token value when
24662         PublicKeyToken is specified, not the hash_value. Free public token
24663         values when free assembly name data. Previously the public key
24664         token was hex decoded, however we are using hex encoded public key
24665         tokens, so this is not neccasary.
24666         * assembly.c: Lookup assemblies in the gac if their public token
24667         value is set. Add function to allow enabling user gac
24668         lookups. Specify whether or not the assembly was loaded from the
24669         GAC. Compare full assembly names when checking the cache for
24670         assemblies (Temporarily disabled see comment in code). Remove
24671         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
24672         specifies trace-loader they get extra info to stdout on the
24673         loading of assemblies.
24674         * image.h: Add a field for an assembly references public token
24675         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
24676         whether an assembly has been loaded from the GAC.
24677         * image.c: Remove a corlib -> mscorlib name mapping.
24678         * loader.h: Add function to enable/disable the user gac.
24679         * mono-config.c: Check if the usergac is enabled in the config
24680         file.
24681         * icall.c: New icall to determine whether or not an assembly has
24682         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
24683         * tabldefs.h: Add constant for assemblyref flag that specifies a
24684         full public key is used instead of a public token.
24685         * reflection.c: Remove mscorlib -> corlib mappings. Set
24686         PublicTokenValue instead of hash value. This value is a hex
24687         string so it does not need to be expanded.
24688
24689 2004-04-26  Martin Baulig  <martin@ximian.com>
24690
24691         * mono-debug-debugger.c (mono_debugger_initialize): Set
24692         `mono_debugger_initialized' before calling mono_debug_lock().
24693
24694 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
24695
24696         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
24697           InternalToUpper/InternalToLower.
24698         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
24699           removed invariant culture shortcut.  This is now done in managed code.
24700         * locales.c: (string_invariant_toupper/tolower) removed.
24701
24702 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24703
24704         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
24705         Added Poll internal call.
24706
24707         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
24708         call for Poll. Select was too heavy for polling a single socket.
24709
24710         * threadpool.[ch]: added mono_threadpool_cleanup.
24711         * threads.c: use it. Don't use Thread_Abort on windows.
24712
24713 2004-04-23  Martin Baulig  <martin@ximian.com>
24714
24715         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
24716
24717 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
24718
24719         * icall.c: Registred new icalls for key pair protection and added an
24720         icall for Environment.GetFolderPath on Windows.
24721         * security.c|h: Added new icalls for key pair protection.
24722
24723 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24724
24725         * socket-io.c: don't display the non-supported family warning for known
24726         families. Now this is not displayed on windows when checking support
24727         for IPv4/IPv6.
24728
24729 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24730
24731         * class.c: don't display the layout warning for static fields.
24732
24733 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
24734
24735         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
24736         * locales.c, locales.h: Added new icalls for culture-specific
24737         Char.ToLower and Char.ToUpper.
24738
24739 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24740
24741         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
24742         by David Waite.
24743
24744 2004-04-20  Martin Baulig  <martin@ximian.com>
24745
24746         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
24747         of the type name before passing it to mono_reflection_type_from_name().
24748
24749 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
24750
24751         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
24752         encodings here. Fixes #56965.
24753
24754 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
24755
24756         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24757         fix test on strstr result not that I can see anything that
24758         relies on the result.
24759
24760 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
24761
24762         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
24763         Fixes #57081.
24764
24765         * marshal.c (mono_marshal_get_string_encoding): New helper function.
24766
24767         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
24768         function to determine which marshalling to use for strings. Fixes
24769         #56965.
24770
24771         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
24772
24773         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
24774
24775 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
24776
24777         * icall.c: #include mono-config.h
24778
24779 2004-04-15  Jackson Harper  <jackson@ximian.com>
24780
24781         * culture-info-tables.h: Fix date formats for en-US culture.
24782         
24783 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
24784
24785         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
24786         ThreadPool.SetMinThreads.
24787         * threadpool.c: Implemented ThreadPool.GetMinThreads and
24788         ThreadPool.SetMinThreads.
24789
24790 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
24791
24792         * mono-config.c: also load the .config file in the directory
24793         where the assembly was found.
24794
24795 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
24796
24797         * assembly.c: load per-assembly config files.
24798         * icall.c: decrapified code to get the config dir and moved to
24799         mono-config.c.
24800         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
24801         per-assembly config files. When doing a dll map lookup give precedence
24802         to the per-assembly data.
24803
24804 2004-04-14  Martin Baulig  <martin@ximian.com>
24805
24806         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
24807         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
24808         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
24809
24810         * mono-debugger-debugger.c: While the debugger is locked, remember
24811         whether the symbol tables have changes and send one single
24812         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
24813
24814 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
24815
24816         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
24817
24818         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
24819         function.
24820
24821         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
24822         account when marshalling string arrays. Fixes #56965.
24823
24824 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
24825
24826         * icall.c: Add new icalls mapping for security.
24827         * security.c|h: Add internal calls for WindowsIdentity,
24828         WindowsImpersonationContext and WindowsPrincipal.
24829
24830 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
24831
24832         * class.c: Added comment to ensure the System.MonoDummy class
24833         is removed when no longer necessary
24834
24835 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
24836
24837         * appdomain.c: Pass arguments to the bootstraping exceptions to
24838         minimize JITed methods at boot
24839
24840         * metadata.c (mono_exception_from_name_two_strings): Allow for the
24841         second string to be null.
24842
24843         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24844         Change the protocol to minimize the JIT methods at startup.  Now
24845         it Returns the internal codepage, if the value of "int_code_page"
24846         is 1 at entry, and we can not compute a suitable code page
24847         number, returns the code page as a string.
24848
24849 2004-04-13  Jackson Harper  <jackson@ximian.com>
24850
24851         * culture-info-tables.h: Fix number of decimal digits for all
24852         english locales.
24853
24854 2004-04-13  Jackson Harper  <jackson@ximian.com>
24855
24856         * icall.c: Clairfy out of sync error message. It is not always
24857         your corlib that is out of sync.
24858
24859 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
24860
24861         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
24862         properties when only the set accessor is overriden. Fixes #55874.
24863
24864 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
24865
24866         * assembly.c (mono_assembly_load_references): Make this thread safe.
24867         Fixes #56327.
24868
24869 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
24870
24871         * monosn.c: Add missing initialization calls.
24872
24873 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
24874
24875         * locales.c:
24876         ves_icall_System_Globalization_CultureInfo_construct_number_format
24877         Fix g_assert so it compiles on fussier compilers re int/ptr
24878         mismatch
24879
24880 2004-04-08  Dick Porter  <dick@ximian.com>
24881
24882         * socket-io.h:
24883         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
24884         53992.  Also rearrange the code so that the internal calls return
24885         an error value and exceptions are thrown from managed code.
24886
24887         * icall.c: Add type info to the socket icalls.
24888
24889 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24890
24891         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
24892         owes me a beer.
24893
24894 2004-04-07  Martin Baulig  <martin@ximian.com>
24895
24896         * class.c (mono_class_from_generic_parameter): Don't default
24897         `klass->parent' to `mono_defaults.object_type'.
24898
24899 2004-04-07  Martin Baulig  <martin@ximian.com>
24900
24901         * reflection.c (mono_reflection_initialize_generic_parameter): Set
24902         `param->pklass->reflection_info'.       
24903
24904 2004-04-07  Jackson Harper  <jackson@ximian.com>
24905
24906         * culture-info-tables.h: Fix date separator symbol.
24907         
24908 2004-04-07  Martin Baulig  <martin@ximian.com>
24909
24910         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24911         from System.Type to System.MonoType.
24912
24913 2004-04-07  Martin Baulig  <martin@ximian.com>
24914
24915         * reflection.h
24916         (MonoReflectionGenericParam): Added `has_reference_type' and
24917         `has_value_type' fields.
24918
24919         * reflection.c (mono_image_get_generic_param_info): Encode the
24920         correct flags if we have the `class' or `struct' constraint.
24921
24922 2004-04-07  Martin Baulig  <martin@ximian.com>
24923
24924         * reflection.h
24925         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24926
24927 2004-04-07  Jackson Harper  <jackson@ximian.com>
24928
24929         * appdomain.c: Revert extra patches, just wanted to bump the
24930         version number.
24931         
24932 2004-04-07  Jackson Harper  <jackson@ximian.com>
24933
24934         * Makefile.am: Add culture-info private headers.
24935         * icall.c: Add new icalls for contructing locales.
24936         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24937         * locales.h: Declare new culture info construction methods.
24938         * object.h: Add new fields used to avoid the CultureMap to
24939         MonoCultureInfo.
24940         * culture-info.h: Definition of structs used in the culture info
24941         tables.
24942         * culture-info-tables.h: Autogenerated tables that contain culture
24943         info data. This file was generated with the locale-builder tool.
24944         * appdomain.c: Incement corlib version number.
24945         
24946 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
24947
24948         * appdomain.c: (mono_runtime_init) move mono_thread_init
24949         to before mono_object_new calls so critical sections
24950         are initialized before use.
24951
24952 2004-04-07  Martin Baulig  <martin@ximian.com>
24953
24954         * icall.c
24955         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24956         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24957         (ves_icall_MonoGenericParam_initialize): Removed.
24958         (monogenericparam_icalls): Removed.
24959         (generictypeparambuilder_icalls): Added new table for
24960         System.Reflection.Emit.GenericTypeParameterBuilder.
24961
24962         * reflection.c
24963         (mono_reflection_define_generic_parameter): Removed.
24964         (mono_reflection_initialize_generic_parameter): This is now called
24965         from GenericTypeParameterBuilder's .ctor.
24966
24967 2004-04-06  Martin Baulig  <martin@ximian.com>
24968
24969         * class.c (mono_class_init): Don't inflate nested classes in a
24970         generic instance.
24971         (mono_type_get_name_recurse): Include the generic arguments for
24972         generic instances and generic type declarations.
24973         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24974         (_mono_class_get_instantiation_name): Removed.
24975         (mono_class_create_generic): Always use `gklass->name' as our name.
24976
24977         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24978
24979         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24980         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24981         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24982         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24983         closed generic methods here.
24984
24985         * reflection.c
24986         (mono_reflection_generic_inst_get_nested_types): Removed.
24987         (inflate_mono_method): Copy the generic parameters from the
24988         MonoMethodHeader into out MonoGenericMethod.
24989
24990 2004-04-06  Martin Baulig  <martin@ximian.com>
24991
24992         * row-indexes.h
24993         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24994
24995         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24996
24997         * reflection.c (build_compressed_metadata): If we have any entries
24998         in the GenericParam, MethodSpec or GenericParamConstraint tables,
24999         set the header version to 1.1.
25000
25001 2004-04-06  Martin Baulig  <martin@ximian.com>
25002
25003         * class.c (mono_class_init): If we're a generic instance,
25004         initialize our nested classes, too.
25005         (_mono_class_get_instantiation_name): Deal with the new `!%d'
25006         suffix. 
25007
25008 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25009
25010         * process.c: quote the argument passed to the shell on windows.
25011
25012 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
25013
25014         * threads.c (mono_alloc_special_static_data): Allow this to be
25015         called during startup.
25016
25017 2004-04-02  Martin Baulig  <martin@ximian.com>
25018
25019         * icall.c
25020         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
25021
25022 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
25023
25024         * icall.c: Fix build.
25025
25026 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
25027
25028         * Makefile.am: Added security.c|h.
25029         * icall.c: Added icall for get_UserName;
25030         * security.c: New file for security related icalls. Added function
25031         get_UserName for System.Environment (fix #56144).
25032         * security.h: New. Header file for security.c
25033
25034 2004-04-02  Dick Porter  <dick@ximian.com>
25035
25036         * icall.c: Deleted the icalls that were obsoleted some time ago
25037         by the ICU string code, and which were mixed into the icall
25038         rearranging.  Fixes bug 55969.
25039
25040         * string-icalls.h: 
25041         * string-icalls.c: Deleted the code that those icalls reference.
25042
25043 2004-04-01  Martin Baulig  <martin@ximian.com>
25044
25045         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
25046
25047         * class.c (mono_class_from_generic_parameter): Don't set 
25048         TYPE_ATTRIBUTE_INTERFACE.
25049         (my_mono_class_from_generic_parameter): Likewise.
25050
25051 2004-04-01  Martin Baulig  <martin@ximian.com>
25052
25053         * loader.c (find_method): Added an optional `MonoClass *ic'
25054         argument to search in a specific interface.
25055         (mono_get_method_constrained): New public function.
25056
25057 2004-04-01  Martin Baulig  <martin@ximian.com>
25058
25059         * reflection.c (mono_image_get_generic_field_token): Use the
25060         `handleref' cache here.
25061
25062 2004-04-01  Martin Baulig  <martin@ximian.com>
25063
25064         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
25065
25066         * reflection.c (create_generic_typespec): Use the `typespec' hash
25067         here, not the `typeref' one.    
25068
25069 2004-04-01  Martin Baulig  <martin@ximian.com>
25070
25071         * class.c (mono_class_inflate_generic_type): Moved the
25072         functionality into a new static inflate_generic_type() which
25073         returns NULL if it didn't do anything.  Only increment the
25074         `mono_stats.inflated_type_count' if we actually inflated
25075         something.
25076         (mono_class_get_full): Check the classes type to see whether we
25077         need to inflate it; also inflate MONO_TYPE_(M)VAR.
25078
25079 2004-04-01  Jackson Harper  <jackson@ximian.com>
25080
25081         * reflection.c: Set culture for assembly references.
25082         
25083 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
25084
25085         * reflection.[ch], icall.[ch], Fix support for pinning variables.
25086
25087 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25088
25089         * assembly.c:
25090         (do_mono_assembly_open): the critical section also covers
25091         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
25092
25093 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25094
25095         * threads.c:
25096         (mono_manage_threads): abort the background threads when finishing.
25097         Fixes bug #47232.
25098
25099 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25100
25101         * gc.c: only close the done_event handle if there was no timeout.
25102         C-ified comments.
25103
25104 2004-03-30  Martin Baulig  <martin@ximian.com>
25105
25106         * icall.c (icall_entries): It's called "System.Activator", not
25107         "System.Activation".    
25108
25109 2004-03-30  Martin Baulig  <martin@ximian.com>
25110
25111         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
25112         (mono_class_create_from_typespec): Likewise.
25113
25114 2004-03-30  Martin Baulig  <martin@ximian.com>
25115
25116         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
25117         `has_ctor_constraint' and `initialized'.
25118
25119 2004-03-30  Martin Baulig  <martin@ximian.com>
25120
25121         * reflection.c (encode_new_constraint): New static function to add
25122         the constructor constraint attribute to a type parameter.
25123         (encode_constraints): Call encode_new_constraint() if necessary.
25124
25125         * reflection.h
25126         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
25127
25128         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
25129         
25130 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
25131
25132         * reflection.c, icall.c: add support for pinning variables. 
25133
25134 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
25135
25136         * marshal.c (mono_marshal_get_managed_wrapper):
25137         init bool local with zero rather than null.
25138
25139 2004-03-29  Martin Baulig  <martin@ximian.com>
25140
25141         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
25142         the "official" behavior here.
25143         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
25144
25145 2004-03-29  Martin Baulig  <martin@ximian.com>
25146
25147         * icall.c: Reflect latest API changes.
25148
25149 2004-03-29  Martin Baulig  <martin@ximian.com>
25150
25151         * loader.c (mono_get_method_from_token): Also call
25152         mono_metadata_load_generic_params () for abstract and interface
25153         methods; replace the type arguments in the method signature with
25154         the ones which are loaded from the metadata.
25155
25156 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
25157
25158         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
25159         of the lock is not the current thread. MS.NET don't do it, in spite of
25160         what the documentation says. See bug #56157.
25161
25162 2004-03-28  Martin Baulig  <martin@ximian.com>
25163
25164         * class.c (mono_class_init): Don't call init_properties() and
25165         init_events() for generic instances; set `prop->parent' when
25166         inflating properties.
25167
25168         * reflection.c (mono_generic_inst_get_object): Call
25169         `mono_class_init (ginst->klass)'.
25170         (mono_type_get_object): Only create a MonoGenericInst if your
25171         generic type is a TypeBuilder.
25172         (do_mono_reflection_bind_generic_parameters): Only set
25173         `ginst->is_dynamic' if our generic type is a TypeBuilder.
25174
25175 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
25176
25177         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
25178         Fixes #56091.
25179
25180 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25181
25182         * icall.c: added Kill_internal icall.
25183         * process.[ch]: added Kill_internal icall.
25184
25185 2004-03-25  Martin Baulig  <martin@ximian.com>
25186
25187         * class.h (MonoStats): Added `generic_instance_count',
25188         `inflated_method_count', `inflated_type_count' and
25189         `generics_metadata_size'.       
25190
25191 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25192
25193         * reflection.c: no warnings now.
25194
25195 2004-03-25  Martin Baulig  <martin@ximian.com>
25196
25197         * class.c (mono_class_get_full): New public function; does a
25198         mono_class_get(), but also takes a `MonoGenericContext *'.
25199
25200         * loader.c (mono_field_from_memberref): Renamed to
25201         `field_from_memberref', made static and added `MonoGenericContext *'
25202         argument.
25203         (mono_field_from_token): Added `MonoGenericInst *' argument.
25204         (method_from_memberef): Likewise.
25205         (mono_get_method_from_token): Likewise.
25206         (mono_get_method_full): New public function; does a
25207         mono_get_method(), but also takes a `MonoGenericContext *'.
25208
25209         * verify.c (mono_method_verify): Get the method's generic context
25210         and pass it to mono_field_from_token(), mono_get_method_full() and
25211         mono_class_get_full().
25212
25213 2004-03-25  Martin Baulig  <martin@ximian.com>
25214
25215         * class.c (mono_class_inflate_generic_type): Take a
25216         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
25217         `MonoGenericMethod *'.
25218
25219 2004-03-25  Martin Baulig  <martin@ximian.com>
25220
25221         * loader.h (MonoMethodInflated): Store the MonoGenericContext
25222         instead of the MonoGenericMethod here.
25223
25224 2004-03-25  Martin Baulig  <martin@ximian.com>
25225
25226         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
25227         each time we create a new MonoGenericInst, we also create a new
25228         context which points back to us.
25229
25230         * class.c (inflate_method): Use `ginst->context' instead of
25231         creating a new context.
25232
25233         * loader.c (method_from_memberref): Use
25234         `klass->generic_inst->context' instead of creating a new context.
25235
25236 2004-03-25  Martin Baulig  <martin@ximian.com>
25237
25238         * class.h (MonoGenericContext): New struct.
25239         (MonoGenericMethod): Removed `generic_inst'.
25240
25241         * class.c (mono_class_inflate_generic_method): Take a
25242         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
25243
25244 2004-03-25  Martin Baulig  <martin@ximian.com>
25245
25246         * loader.h (MonoMethodInflated): New typedef.
25247
25248         * metadata.h (MonoMethodSignature): Removed `gen_method', make
25249         `generic_param_count' consume just 30 bits, added `is_inflated'
25250         and `has_type_parameters' flags (one bit each).
25251
25252         * class.c (mono_class_inflate_generic_method): Create a
25253         MonoMethodInflated instead of a MonoMethodNormal and set
25254         `is_inflated' in the method signature.
25255
25256         * class.h (MonoGenericMethod): Removed `generic_method'.
25257
25258 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
25259
25260         * image.c: Make sure the name of a MonoImage is always an absolute path.
25261           This fixes bug #54415.
25262
25263 2004-03-24  Martin Baulig  <martin@ximian.com>
25264
25265         * class.c (mono_class_setup_vtable): If we're a generic instance,
25266         use our generic type's vtable size.
25267
25268 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
25269
25270         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
25271         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
25272         problems.
25273
25274 2004-03-23  Martin Baulig  <martin@ximian.com>
25275
25276         * class.h (MonoDynamicGenericInst): Added `int count_events' and
25277         `MonoEvent *events'.
25278
25279         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
25280         (typebuilder_icalls): Added "get_event_info"; calls
25281         mono_reflection_event_builder_get_event_info(). 
25282
25283         * reflection.c (mono_reflection_generic_inst_initialize): Added
25284         `MonoArray *events'.
25285         (mono_reflection_event_builder_get_event_info): New function.
25286
25287 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
25288
25289         * object.h: add mono_type_initialization_init
25290
25291         * object.c (mono_runtime_class_init): 
25292         implement class constructor synchronization rules
25293         to cope with threading issues.  
25294         add mono_type_initialization_init
25295
25296         * appdomain.c (mono_runtime_init): call 
25297         mono_type_initialization_init
25298
25299         * class.h: removing initializing field from MonoVTable
25300
25301 2004-03-23  Martin Baulig  <martin@ximian.com>
25302
25303         * class.c (my_mono_class_from_generic_parameter): Use
25304         `param->name' if it's not NULL. 
25305
25306 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
25307
25308         * class.c: do not insert non-virtual methods in the vtable.
25309         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
25310         that means the method is non-virtual. This never would have
25311         happened before.
25312
25313 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
25314
25315         * profiler.c: Added lock for accessing coverage_hash.
25316
25317 2004-03-22  Martin Baulig  <martin@ximian.com>
25318
25319         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
25320         `method->method->signature->generic_param_count != 0' to make it
25321         work for interface methods.
25322
25323 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25324
25325         * process.c: quote the string passed to the shell using g_shell_quote.
25326
25327 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25328
25329         * threads.c:
25330         (mono_threads_manage): don't remove the finalizer thread and self
25331         from the threads hash table so that mono_thread_manage can be called
25332         more than once.
25333
25334 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25335
25336         * process.c: quote the arguments when UseShellExecute is true. Fixes
25337         bug #55790.
25338
25339 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25340
25341         * threads.c: set mono_thread_detach as a cleanup routine for every
25342         thread. This way it's always executed upon thread termination, either
25343         aborted or finished normally. No more xsp hangs!
25344
25345 2004-03-17  Martin Baulig  <martin@ximian.com>
25346
25347         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
25348         `int count_nested' and a `MonoType **nested'.
25349
25350         * reflection.c (mono_reflection_bind_generic_parameters): Moved
25351         most of the functionality into a new static
25352         do_mono_reflection_bind_generic_parameters() and don't take a
25353         `MonoType *nested_in' argument any more.  Don't compute nested
25354         types here.
25355         (mono_reflection_generic_inst_get_nested_types): New public method
25356         to get nested types.
25357
25358         * class.c (mono_class_create_generic): Set `klass->nested_in' if
25359         we're a nested class.
25360
25361         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
25362         mono_reflection_generic_inst_get_nested_types() to compute the
25363         nested types.
25364
25365 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
25366
25367         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
25368         descriptive error message under windows.
25369         
25370 2004-03-17  Martin Baulig  <martin@ximian.com>
25371
25372         * class.c (dup_type): Added `const MonoType *original' argument;
25373         copy the attrs from the original type.
25374
25375 2004-03-17  Martin Baulig  <martin@ximian.com>
25376
25377         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
25378         `m->generic_inst_cache' here.
25379
25380 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
25381
25382         * exception.h exception.c: Add stack_overflow_exception.
25383
25384 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25385
25386         * threadpool.c:
25387         (overlapped_callback): call SetEvent *after* invoking the callback.
25388         No need to call CloseHandle.
25389
25390 2004-03-16  Martin Baulig  <martin@ximian.com>
25391
25392         * reflection.c (mono_image_get_fieldref_token): Take a
25393         `MonoReflectionField *' instead of a `MonoClassField *' and a
25394         `MonoClass *'; store the `MonoReflectionField *' in the hash.
25395
25396 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25397
25398         * appdomain.c: don't add the culture to the filename we're looking for
25399         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
25400
25401 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25402
25403         * locales.c: don't ignore symbols when doing case insensitive compares.
25404         Thanks Dick! Fixes bug #54046.
25405
25406         * threads.c: surround 'threads' usage with enter/leave in
25407         mono_thread_manage.
25408
25409 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
25410
25411         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
25412         implicitly marshalled as [Out]. Fixes #55450.
25413
25414         (mono_marshal_get_runtime_invoke): Zero out the result if there is
25415         an exception.
25416
25417 2004-03-16  Martin Baulig  <martin@ximian.com>
25418
25419         * class.c (mono_class_from_generic_parameter): Use the actual
25420         parameter name. 
25421
25422 2004-03-16  Martin Baulig  <martin@ximian.com>
25423
25424         * reflection.c (type_get_signature_size): New static function.
25425         Compues the size of the type in a method signature.
25426         (method_get_signature_size): New static function; calls
25427         type_get_signature_size() to compute the actual size of the
25428         method's signature.
25429         (method_encode_signature): Use method_get_signature_size() to get
25430         the signature's size rather than using `nparams * 10'.
25431
25432 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25433
25434         * file-io.h: define here WapiOverlapped on windows. I don't want the
25435         regular OVERLAPPED one.
25436
25437         * file-io.c:
25438         * threadpool.c: somehow, BindIoCompletionCallback is not found.
25439         Disabling AIO on windows.
25440
25441 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25442
25443         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
25444         bug #55385.
25445
25446 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25447
25448         * appdomain.c: upgraded corlib version.
25449
25450         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
25451         and BeginWrite. Allow opening files for asynchrnous operations.
25452
25453         * file-io.h: new struct that maps FileStreamAsyncResult.
25454         * icall.c: added new icalls.
25455         * process.[ch]: support setting child process environment variables
25456         and use the SHELL or COMSPEC when UseShellExecute is true.
25457
25458         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
25459         callback for async. IO is here and also BindHandle.
25460
25461         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
25462         from here.
25463
25464 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
25465
25466         * reflection.c (create_custom_attr): Allow len == 0.
25467
25468         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
25469         computation on big-endian machines.
25470
25471 2004-03-13  Martin Baulig  <martin@ximian.com>
25472
25473         * class.h (MonoGenericInst): Added `int count_ifaces'.
25474
25475         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
25476         `ginst->count_ifaces' instead `klass->interface_count' since we
25477         may get called before the vtable is created.
25478
25479         * loader.c (mono_method_get_param_names): If we're a generic
25480         instance, return and don't initialize the class.
25481
25482         * reflection.c (mono_reflection_setup_generic_class): Don't call
25483         ensure_runtime_vtable().
25484         (mono_reflection_bind_generic_parameters): Set
25485         `ginst->count_ifaces'.
25486
25487 2004-03-11  Jackson Harper <jackson@ximian.com>
25488
25489         * icall.c:
25490         * unicode.c:
25491         * unicode.h: Remove unused System.Char icalls.
25492         
25493 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
25494
25495         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
25496         code when we P/Invoke the first library in Windows.Forms, instead
25497         of when we first open the assembly.
25498
25499         * assembly.c: Drop the lookup from here.
25500
25501 2004-03-10  Martin Baulig  <martin@ximian.com>
25502
25503         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
25504         class for properties, fields and events.  Finally fixes #54945.
25505
25506 2004-03-10  Martin Baulig  <martin@ximian.com>
25507
25508         * metadata.c (mono_metadata_class_equal): New static function;
25509         checks whether two generic instances or two generic parameters are
25510         equal.
25511         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
25512         compare classes.        
25513
25514 2004-03-10  Martin Baulig  <martin@ximian.com>
25515
25516         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
25517
25518         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
25519         argument and write it into the `reflection_info' field.
25520
25521         * icall.c
25522         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
25523         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
25524
25525 2004-03-09  Jackson Harper  <jackson@ximian.com>
25526
25527         * char-conversions.h: use 8 bits for numeric data its all we need
25528         * icall.c: numeric data is only 8 bits now.
25529
25530 2004-03-09  Martin Baulig  <martin@ximian.com>
25531
25532         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
25533
25534         * class.c (init_properties, init_events): Initialize the new
25535         `parent' field.
25536
25537         * reflection.c (typebuilder_setup_properties): Likewise.
25538         (typebuilder_setup_events): Likewise.
25539
25540         * reflection.h (MonoEventInfo): Replaced `parent with
25541         `declaring_type' and `reflected_type'.
25542
25543         * icall.c (ves_icall_get_property_info): Distinguish between
25544         declaring and reflected type.
25545         (ves_icall_get_event_info): Likewise.
25546
25547 2004-03-09  Martin Baulig  <martin@ximian.com>
25548
25549         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
25550         (ves_icall_Type_GetField): Correctly set field->klass.
25551
25552 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
25553
25554         * loader.h: Fix warning.
25555
25556 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
25557
25558         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
25559         library routine if present.  Notice that it will still continue
25560         executing even if its missing, for those working on the Gtk#
25561         edition of Windows.Forms.
25562
25563         * assembly.c (do_mono_assembly_open): If loading the
25564         System.Windows.Forms call mono_loader_wini_init.
25565
25566 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
25567
25568         * class.h: Added MonoRemoteClass struct.
25569         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
25570         function for MonoStrings.
25571         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
25572         Added internal call for getting the proxy type.
25573         * marshal.c: Get the type of transparent proxies from its remote_class.
25574         Added methods that generate the IL for type checks and casts:
25575         mono_marshal_get_isinst, mono_marshal_get_castclass, 
25576         mono_marshal_get_proxy_cancast.
25577         * marshal.h: Declaration of the previous new methods.
25578         * object.c: Added new moethods for creating and updating MonoRemoteClass
25579         instances: mono_remote_class, mono_upgrade_remote_class, 
25580         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
25581         * verify.c: FIx transparent_proxy_fields layout.
25582         * appdomain.c: Bump corlib version.
25583
25584 2004-03-04  Jackson Harper  <jackson@ximian.com>
25585
25586         * icall.c: Add icall to access char conversion tables.
25587         * char-conversions.h: Character conversion tables.
25588         * Makefile.am: Add char-conversions.h private header file.
25589         
25590 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
25591
25592         * appdomain.c (unload_thread_main): Increase unloading timeout to
25593         10 sec as a temporary workaround for Nant problems.
25594
25595 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
25596
25597         * gc.c: Add checks for GC_enable and GC_disable.
25598
25599         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
25600         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
25601         (bug #54988).
25602         
25603 2004-02-27  Martin Baulig  <martin@ximian.com>
25604
25605         * reflection.c (mono_reflection_bind_generic_parameters): Take a
25606         `MonoReflectionType *' instead of a `MonoType *'.
25607
25608 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
25609
25610         * gc.c (run_finalize): Avoid finalizing the object representing the
25611         finalizer thread.
25612         (finalizer_thread): Fix warning.
25613
25614 2004-02-25  Martin Baulig  <martin@ximian.com>
25615
25616         * class.c (_mono_class_get_instantiation_name): Added `int offset'
25617         argument for nested types.
25618         (mono_class_create_generic): Added support for nested generictypes.
25619
25620         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
25621         `GList *nested'.
25622
25623         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
25624
25625         * reflection.c (method_encode_signature): Increase the minimum
25626         value of `size' from 10 to 11.
25627         (mono_reflection_bind_generic_parameters): Take `int type_argc'
25628         and `MonoType **types' arguments instead of the `MonoArray
25629         *types'; added `MonoType *nested_in'.  Recursively instantiate
25630         nested classes. 
25631
25632 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
25633
25634         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
25635         stack_overflow_ex members which are used by exception handling.
25636
25637         * appdomain.c (mono_runtime_init): Initialize the new members.
25638
25639         * gc.c (mono_gc_enable): New helper function.
25640         * gc.c (mono_gc_disable): New helper function.
25641
25642 2004-02-23  Martin Baulig  <martin@ximian.com>
25643
25644         * icall.c: I must have been really stupid - make it actually work
25645         this time ;-)
25646
25647 2004-02-23  Martin Baulig  <martin@ximian.com>
25648
25649         * loader.c (method_from_memberref): Only inflate the method if
25650         it's in another klass.
25651
25652 2004-02-23  Martin Baulig  <martin@ximian.com>
25653
25654         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
25655         (mono_class_init): If we're a generic instance and an interface,
25656         compute `class->interface_id'; also create `class->interfaces'
25657         here and inflate them.
25658
25659         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
25660         `ginst->is_open'.
25661         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
25662
25663         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
25664
25665 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
25666
25667         * reflection.c (method_encode_code): Improved the error message
25668         generated by the exception.
25669
25670 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25671
25672         * icall.c: Martin did not do what he said in the ChangeLog for
25673         2004-02-18, but put back the changes for properties and events.
25674         Commenting those changes out again and adding comment to bug #54518.
25675         
25676         * process.c: removed warning.
25677
25678 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
25679
25680         * marshal.c (emit_struct_conv): Print an error message instead of
25681         asserting when a type does not have the StructLayout attribute.
25682
25683 2004-02-20  Martin Baulig  <martin@ximian.com>
25684
25685         * reflection.c (mono_type_get_object): Also use the cache for
25686         generic instances.
25687         (mono_reflection_bind_generic_parameters): Always compute
25688         `ginst->ifaces'.        
25689
25690 2004-02-20  Martin Baulig  <martin@ximian.com>
25691
25692         * class.h (MonoGenericMethod): Removed `klass'.
25693
25694         * class.c (mono_class_inflate_generic_method): Added `MonoClass
25695         *klass' argument.
25696
25697 2004-02-20  Martin Baulig  <martin@ximian.com>
25698
25699         * reflection.c (method_encode_methodspec): Actually use the
25700         uninflated signature for the memberref.
25701
25702 2004-02-20  Martin Baulig  <martin@ximian.com>
25703
25704         * class.h (MonoGenericMethod): Removed `declaring'.
25705
25706         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
25707         is NULL, compute it here.
25708
25709 2004-02-20  Martin Baulig  <martin@ximian.com>
25710
25711         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
25712
25713         * metadata.c (mono_metadata_generic_inst_hash): New method.
25714         (mono_metadata_generic_inst_equal): New method.
25715
25716         * reflection.c (mono_reflection_bind_generic_parameters): Use the
25717         `klass->image->generic_inst_cache' cache to avoid creating
25718         duplicate MonoGenericInst's.
25719
25720         * class.c (mono_class_inflate_generic_type): Use the cache.
25721
25722 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
25723
25724         * object.c: fixed gc descriptor calculation for embedded valuetypes.
25725
25726 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25727
25728         * icall.c: added Socket.WSAIoctl icall.
25729
25730         * socket-io.[ch]: implemented
25731         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
25732
25733 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
25734
25735         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
25736
25737 2004-02-18  Urs C Muff  <umuff@quark.com>
25738
25739         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
25740         this work on PPC and other big-endian architectures.
25741
25742         * debug-mono-symfile.h: Prepended the names of all the `guint32'
25743         fields with an underscore to make sure they're only accessed by
25744         the read32() macro.
25745
25746 2004-02-18  Martin Baulig  <martin@ximian.com>
25747
25748         * icall.c: Put the klass->refclass changes back for methods and
25749         fields, but not for properties and events.  We're currently not
25750         distinguishing between DeclaringType and ReflectedType for
25751         properties and events, that's what caused the regressions.
25752
25753 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25754
25755         * object.c:
25756         (mono_async_result_new): the handle can be NULL.
25757
25758         * threadpool.c: Use an event instead of a semaphore, don't initialize
25759         it until needed. This saves quite a few semaphores from being created
25760         when using the threadpool.
25761
25762 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
25763
25764         * object.c (mono_string_is_interned_lookup): Fix interning of long
25765         strings. Fixes #54473.
25766
25767         * domain.c (ldstr_equal): Optimize if the two strings are equal.
25768
25769         * icall.c: Revert the klass->refclass changes since they introduce
25770         regressions (bug #54518).
25771
25772 2004-02-18  Martin Baulig  <martin@ximian.com>
25773
25774         * class.c (mono_class_init): If we're a generic instance and don't
25775         come from a TypeBuilder, inflate our members here.
25776         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
25777         (mono_class_create_generic): New public method.
25778         (mono_class_initialize_generic): Removed.
25779         (get_instantiation_name): Renamed to
25780         _mono_class_get_instantiation_name() and made it public.
25781
25782 2004-02-18  Martin Baulig  <martin@ximian.com>
25783
25784         * class.c (mono_class_inflate_generic_type): Clear the new
25785         instance's `nginst->klass' when inflating a generic instance.
25786         (mono_class_is_subclass_of): Added (basic) support for generic
25787         instances.
25788
25789 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
25790
25791         * appdomain.h, domain.c: use a MonoCodeManager instead of a
25792         MonoMempool to hold compiled native code.
25793
25794 2004-02-17  Martin Baulig  <martin@ximian.com>
25795
25796         * class.h (MonoDynamicGenericInst): Added `count_properties' and
25797         `properties'.
25798
25799         * reflection.c (mono_reflection_generic_inst_initialize): Added
25800         `MonoArray *properties' argument.
25801
25802         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
25803
25804 2004-02-17  Martin Baulig  <martin@ximian.com>
25805
25806         * icall.c (ves_icall_Type_GetFields): Renamed to
25807         ves_icall_Type_GetFields_internal() and added a
25808         `MonoReflectionType *rtype' argument; pass it to
25809         mono_field_get_object() to set the field's "reflected" type.
25810         (ves_icall_Type_GetConstructors): Likewise.
25811         (ves_icall_Type_GetEvents): Likewise.
25812         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
25813         argument; pass it to mono_method_get_object() to set the method's
25814         "reflected" type.       
25815
25816 2004-02-17  Martin Baulig  <martin@ximian.com>
25817
25818         * class.h (MonoDynamicGenericInst): New type.
25819         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
25820
25821         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
25822         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
25823         (ves_icall_MonoGenericInst_GetFields): New interncall.
25824
25825         * class.c (mono_class_from_generic): Don't call
25826         mono_class_initialize_generic() if this is a dynamic instance;
25827         ie. it's being created from a TypeBuilder.
25828         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
25829         `class->byval_arg.type'.
25830
25831         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
25832         to `inflate_method' and made static.
25833         (mono_reflection_inflate_field): Removed.
25834         (mono_reflection_generic_inst_initialize): New public method.
25835
25836         * reflection.h (MonoReflectionGenericInst): Removed `methods',
25837         `ctors' and `fields'; added `initialized'.
25838
25839 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
25840
25841         * debug-helpers.c (mono_method_full_name): Fix output for empty
25842         namespaces.
25843
25844 2004-02-12  Martin Baulig  <martin@ximian.com>
25845
25846         * class.h (MonoClassField): Added `MonoType *generic_type'.
25847
25848         * reflection.c (mono_image_get_fieldref_token): Added support for
25849         instantiated generic types.
25850         (field_encode_inflated_field): Removed.
25851         (mono_image_get_inflated_field_token): Removed.
25852         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
25853
25854         * reflection.h (MonoReflectionInflatedField): Removed.
25855
25856 2004-02-12  Martin Baulig  <martin@ximian.com>
25857
25858         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
25859         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
25860
25861         * reflection.c (mono_image_get_methodspec_token): Take a
25862         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
25863         (mono_image_create_token): Check whether we have a
25864         `method->signature->gen_method' and call
25865         mono_image_get_methodspec_token() if appropriate.
25866         (inflated_method_get_object): Removed.
25867         (mono_reflection_bind_generic_method_parameters): Return a
25868         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
25869         (mono_reflection_inflate_method_or_ctor): Likewise.
25870
25871         * reflection.h (MonoReflectionInflatedMethod): Removed.
25872
25873 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
25874
25875         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
25876         for custom valuetype marshalling.
25877
25878         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
25879
25880 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25881
25882         * icall.c: fixed WSAGetLastError_internal name.
25883
25884 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
25885
25886         * threads.c (mono_thread_attach): Allow this to be called multiple
25887         times for a thread.
25888         
25889         * threads.c (build_wait_tids): Do not wait for ourselves.
25890
25891         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
25892         appdomain list is empty.
25893
25894         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
25895         memory returned by mono_string_builder_to_utf16, since it points into
25896         managed memory. Thanks to Bernie Solomon for noticing this.
25897
25898         * icall.c: Add AppDomainSetup icalls.
25899
25900         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
25901
25902         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
25903         types.
25904
25905         * reflection.c (reflection_methodbuilder_to_mono_method): Save
25906         custom attributes to the method_aux struct. Also fix array indexes etc.
25907
25908         * loader.c (mono_method_get_param_names): Make dynamic case work again.
25909         
25910 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25911
25912         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25913         (both static and runtime) and reduce startup time.
25914
25915 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
25916
25917         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25918         AsAny marshalling conversion instead of crashing.
25919
25920         * marshal.c: Fix warnings.
25921
25922 2004-02-09  Martin Baulig  <martin@ximian.com>
25923
25924         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25925
25926         * reflection.h (MonoReflectionInflatedMethod): Removed the
25927         `declaring' field, it's now in the unmanaged MonoGenericMethod.
25928
25929         * reflection.c (method_encode_methodspec): Removed the `method'
25930         argument; we get it from `gmethod->declaring'.
25931         (inflated_method_get_object): Removed the `declaring' argument.
25932
25933 2004-02-09  Martin Baulig  <martin@ximian.com>
25934
25935         * class.h (MonoGenericMethod): New type.
25936         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25937         `generic_method'.
25938
25939         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25940         a `MonoGenericMethod *gen_method' one.
25941
25942         * class.c (mono_class_inflate_generic_type): Take an additional
25943         `MonoGenericMethod * argument.  This is only non-NULL if we're
25944         inflating types for a generic method.   
25945         (mono_class_inflate_generic_signature): Renamed to
25946         inflate_generic_signature() and made static; take a
25947         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25948         (inflate_generic_header): Take a `MonoGenericMethod *' argument
25949         instead of a `MonoGenericInst *' one.
25950         (mono_class_inflate_generic_method): Likewise.
25951
25952         * reflection.c (encode_generic_method_sig): Take a
25953         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25954         (method_encode_methodspec): Likewise.
25955         (inflated_method_get_object): Likewise. 
25956
25957         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25958         field with a `MonoGenericMethod *gmethod' one.  
25959
25960 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
25961
25962         * class.h (mono_class_has_parent): add parens to expansion
25963         so you can ! this.
25964
25965 2004-02-08  Martin Baulig  <martin@ximian.com>
25966
25967         * image.h (MonoImage): Removed `generics_cache'.
25968
25969         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25970         instead of a `MonoType *' argument; removed the `inflate_methods'
25971         argument.  Don't inflate methods here.
25972
25973         * loader.c (find_method): If it's a generic instance, call
25974         mono_class_init() on the `sclass->generic_inst->generic_type'.
25975
25976         * metadata.c (mono_type_size): Make this work on uninitialized
25977         generic instances; call it on the `ginst->generic_type's class.
25978
25979         * reflection.c (mono_reflection_bind_generic_parameters): Call
25980         mono_class_from_generic() to create the `ginst->klass'.
25981
25982 2004-02-08  Martin Baulig  <martin@ximian.com>
25983
25984         * class.h (MonoClass): Changed type of `generic_inst' from
25985         `MonoType *' to `MonoGenericInst *'.
25986
25987 2004-02-08  Martin Baulig  <martin@ximian.com>
25988
25989         * icall.c (ves_icall_Type_BindGenericParameters): Just call
25990         mono_type_get_object(), this is now creating a `MonoGenericInst'
25991         for MONO_TYPE_GENERICINST.
25992         (ves_icall_MonoGenericInst_GetParentType): Likewise.
25993         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25994
25995         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25996         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25997         (inflated_method_get_object): Added `MonoClass *refclass' argument.
25998         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25999         and reflected type.
26000
26001         * reflection.h (MonoReflectionInflatedMethod): Removed
26002         `declaring_type' and `reflected_type'.
26003
26004 2004-02-08  Martin Baulig  <martin@ximian.com>
26005
26006         * class.h (MonoGenericInst): Added `MonoType *parent' and
26007         `MonoType **ifaces'.
26008
26009         * reflection.h (MonoReflectionGenericInst): Removed `klass',
26010         `parent' and `interfaces'.
26011
26012         * reflection.c (mono_reflection_bind_generic_parameters): Take a
26013         `MonoType *' argument and return a `MonoType *'.
26014
26015         * icall.c
26016         (ves_icall_MonoGenericInst_GetParentType): New interncall.
26017         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
26018
26019 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
26020
26021         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
26022         valuetype marshalling.
26023
26024 2004-02-06  Martin Baulig  <martin@ximian.com>
26025
26026         * class.c
26027         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
26028         (my_mono_class_from_generic_parameter): Likewise.
26029
26030 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
26031
26032         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
26033         contents of the symbol files lazily.
26034
26035         * object.h (MonoThread): Add 'name' and 'name_len' fields.
26036
26037         * threads.h threads.c icall.c: New icalls for getting and setting the
26038         threads name.
26039
26040 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
26041
26042         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
26043         Raise an exception when the domain is not found.
26044
26045 2004-02-03  Martin Baulig  <martin@ximian.com>
26046
26047         * reflection.c (mono_image_get_methodspec_token): Use the
26048         uninflated signature; fixes gen-33.
26049
26050 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
26051
26052         * gc.c threads.c: Make the finalizer thread a normal managed thread so
26053         the finalizer code can use thread functionality.
26054
26055         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
26056         the finalizer thread.
26057
26058         * threads.c: Make some functions more robust.
26059
26060         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
26061
26062         * metadata.h: Add new marshalling conventions.
26063
26064         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
26065         stringbuilder marshalling. Fixes #53700.
26066
26067         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
26068
26069         * reflection.c (mono_image_get_type_info): Save declarative security
26070         info.
26071
26072         * reflection.c (mono_image_get_field_info): Handle uninitialized 
26073         unmanaged fields as well.
26074
26075         * appdomain.c: Bump corlib version.
26076
26077 2004-02-01  Martin Baulig  <martin@ximian.com>
26078
26079         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
26080         method type arguments.  
26081
26082 2004-01-30  Duncan Mak  <duncan@ximian.com>
26083
26084         * marshal.h: Add prototype for
26085         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
26086         and
26087         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
26088         fix the build.
26089
26090 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
26091
26092         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
26093         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
26094
26095 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
26096
26097         * marshal.c (mono_marshal_get_native_wrapper): Add support for
26098         custom marshalling of valuetypes.
26099
26100         * marshal.c: Fix some warnings.
26101
26102 2004-01-29  Martin Baulig  <martin@ximian.com>
26103
26104         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
26105         for generic method parameters.
26106
26107         * reflection.c (method_encode_methodspec): Write the uninflated
26108         signature into the methodspec table.
26109         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
26110         is always the uninflated method.
26111         (reflection_methodbuilder_to_mono_method): Copy the generic
26112         parameters from the MethodBuilder into `header->gen_params'.
26113
26114 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
26115
26116         * class.c (mono_class_from_generic_parameter): Fix warning.
26117
26118 2004-01-27  Martin Baulig  <martin@ximian.com>
26119
26120         * class.c (mono_class_from_generic_parameter): Don't create
26121         `klass->methods' here.  
26122
26123 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
26124
26125         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
26126         extension since it does not work with libraries named lib<FOO>.dll.so.
26127
26128 2004-01-25  Martin Baulig  <martin@ximian.com>
26129
26130         * class.c (mono_class_inflate_generic_type): Added support for
26131         MONO_TYPE_GENERICINST.
26132
26133         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
26134         inflate methods on open constructed types.      
26135
26136 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26137
26138         * object.c: fire ProcessExit event in the root AppDomain after running
26139         Main. Fixes bug #53299.
26140
26141 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
26142
26143         * socket-io.c: include the new socket-wrappers.h header.
26144         Use the wrappers instead of the unix socket functions to make the code
26145         more clear.
26146
26147 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
26148
26149         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
26150
26151         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
26152         Fixes #22532.
26153
26154 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
26155
26156         * reflection.c (mono_image_create_pefile): Handle the case when the
26157         entry point is not a MethodBuilder.
26158
26159         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
26160         field to ReflectionMethod since it is not allways a builder.
26161
26162         * reflection.c (type_get_fully_qualified_name): New helper function to
26163         return the fully qualified name of a type.
26164
26165         * reflection.c (encode_marshal_blob): Always emit the fully qualified
26166         type name for custom marshallers.
26167
26168         * reflection.c (mono_marshal_spec_from_builder): Ditto.
26169
26170         * class.c (mono_class_setup_vtable): If a parent class already 
26171         implements an interface, use the implementing methods from that class.
26172         Fixes #53148.
26173
26174 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26175
26176         * threadpool.c: just return instead of ExitThread to allow for thread
26177         clean up earlier.
26178
26179 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
26180
26181         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
26182         when closing resource modules.
26183
26184         * reflection.c (mono_image_create_pefile): Handle the case when the
26185         entry point is not a MethodBuilder.
26186
26187         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
26188         field to ReflectionMethod since it is not allways a builder.
26189
26190 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
26191
26192         * marshal.c (mono_marshal_get_managed_wrapper): 
26193         mono_marshal_alloc takes native int so CONV_I
26194         the arg for 64bits.
26195
26196 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
26197
26198         * reflection.c (fixup_cattrs): New function to fixup the methoddef
26199         tokens in the cattr table. Fixes #53108.
26200
26201 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26202
26203         * loader.c: don't trim ".dll" before looking up in the config file.
26204         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
26205
26206 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
26207
26208         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
26209         Return the module which contains the resource as well.
26210         (ves_icall_System_Reflection_Module_Close): New icall.
26211
26212         * appdomain.c: Bump corlib version number.
26213
26214         * image.c (mono_image_addref): New public function.
26215
26216         * assembly.c: Call mono_image_addref.
26217
26218         * reflection.c (mono_module_get_object): Increase reference count of 
26219         the image.
26220
26221         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
26222         Fixes #22532.
26223
26224         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
26225         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
26226         proper exceptions on DllImport problems.
26227
26228 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
26229
26230         * class.c, metadata.c: eliminate CSIZE macro.
26231
26232 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
26233
26234         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
26235         * object.h: Added async_callback field in MonoAsyncResult.
26236         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
26237         * verify.c: Added async_callback in MonoAsyncResult layout.
26238
26239 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
26240
26241         * reflection.c (mono_reflection_get_custom_attrs): Add support
26242         for Modules.
26243
26244 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
26245
26246         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
26247         marshalling.
26248         (mono_marshal_method_from_wrapper): Add null pointer check.
26249
26250 2004-01-16  Martin Baulig  <martin@ximian.com>
26251
26252         * debug-mono-symfile.h: Set version number to 36 and reflect
26253         latest symbol writer changes.
26254
26255 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
26256
26257         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
26258         multi-dimensional arrays.
26259         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
26260         (mono_class_from_mono_type): Use bounded_array_class_get.
26261         
26262         * class.c (mono_bounded_array_class_get): New function which takes
26263         a 'bounded' bool argument to distinguish vectors from one dimensional
26264         arrays.
26265
26266         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
26267         bounded_array_class_get if the array has bounds.
26268
26269         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
26270         Search modules loaded using AssemblyBuilder:AddModule as well.
26271
26272 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26273
26274         * appdomain.c: increased corlib version.
26275         * filewatcher.c: removed g_print.
26276         * icall.c:
26277         (get_property_info): only allocate what is actually requested.
26278         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
26279
26280 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26281
26282         * Makefile.am: added filewatcher.[ch]
26283         * filewatcher.[ch]: FileSystemWatcher runtime support.
26284         * icall.c: added new FSW icalls.
26285
26286 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
26287
26288         * string-icalls.c: fix stringbuilder regression as suggested by
26289         Iain McCoy <iain@mccoy.id.au>.
26290
26291 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
26292
26293         * process.c (process_read_stringtable_block): Recognize '007f' as
26294         a language neutral stringtable block.
26295
26296 2004-01-12  Patrik Torstensson
26297
26298         * object.h (MonoStringBuilder) : Changed layout to support our
26299         new stringbuilder class.
26300         * marshal.c: Change marshalling to support the new layout of 
26301         string builder.
26302         * appdomain.c: increased version number because new layout of
26303         string builder.
26304
26305 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
26306
26307         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
26308         assembly name as an string instead of an AssemblyName, since it is
26309         easier to extract info from it.
26310
26311         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
26312         the culture subdirectories too. Fixes #52231.
26313
26314 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26315
26316         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
26317         It takes 2 new parameters with an optional name for the method to look
26318         for and case ignoring info.
26319
26320         * threadpool.c: removed unused variable.
26321
26322 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26323
26324         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
26325         It takes 2 new parameters with an optional name for the property to look
26326         for and case ignoring info.
26327         Fixes bug #52753.
26328
26329 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
26330
26331         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
26332         Fix #52451.
26333
26334 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26335
26336         * appdomain.c:
26337         * assembly.c: escape the uri before passing it to g_filename_from_uri.
26338         Fixes bug #52630.
26339
26340 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
26341
26342         * reflection.c: Add support for more than one unmanaged resource.
26343
26344         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
26345         in field->def_value, as done in all other cases.
26346
26347         * reflection.c (mono_reflection_get_custom_attrs): Add support for
26348         TypeBuilders.
26349
26350         * reflection.c (mono_reflection_create_runtime_class): Remove 
26351         errorneous assignment to klass->element_class, since it is already
26352         done in mono_reflection_setup_internal_class.
26353
26354 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26355
26356         * gc.c: added missing LeaveCriticalSection.
26357         * icall.c: indented a couple of lines.
26358         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
26359         if we call EndInvoke inside a callback. Fixes bug #52601.
26360
26361 2004-01-07  Martin Baulig  <martin@ximian.com>
26362
26363         * mono-debug-debugger.h
26364         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
26365
26366 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
26367
26368         * appdomain.c: Use messages in NotImplementedException.
26369
26370         * exception.c (mono_get_exception_not_implemented): Now this takes
26371         a message argument.
26372
26373         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
26374         exception instead of g_asserting an aborting when something is not
26375         implemented.
26376
26377         Add some inline docs.
26378
26379 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
26380
26381         * reflection.h: Update after changes to object layout.
26382
26383         * reflection.c: Implement saving of unmanaged aka win32 resources.
26384
26385         * appdomain.c: Bump version number.
26386
26387         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
26388         Handle missing domains gracefully.
26389
26390 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
26391
26392         * file-io.c : On Windows, there are much more invalid_path_chars.
26393
26394 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
26395
26396         * class.h, object.c: prepare for GetType () speedup.
26397
26398 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
26399
26400         * profiler.c: workaround for --profile null reference exception on
26401           cygwin. Patch by Patrik Torstensson.
26402
26403 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
26404
26405         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
26406         make work for unaligned access.
26407
26408 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
26409
26410         * class.c: small cleanup (class->fields [i] -> field).
26411         * image.c: check address of metadata is valid.
26412
26413 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
26414
26415         * assembly.h assembly.c (mono_assembly_loaded): New public function to
26416         search the list of loaded assemblies.
26417
26418         * reflection.c (mono_reflection_type_from_name): Use 
26419         mono_assembly_loaded instead of mono_image_loaded.
26420
26421         * reflection.c: Fix warnings.
26422
26423 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
26424
26425         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
26426         is dynamic. This is needed since an assembly can contain both dynamic and
26427         non-dynamic images.
26428
26429         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
26430         assembly->dynamic.
26431
26432         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
26433
26434         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
26435         to store modules loaded using AddModule.
26436
26437         * reflection.c (mono_image_fill_file_table): Generalize this so it works
26438         on Modules.
26439
26440         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
26441
26442         * reflection.c (mono_image_fill_export_table_from_module): New function to
26443         fill out the EXPORTEDTYPES table from a module.
26444
26445         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
26446         into a separate function. Also handle loaded non-dynamic modules.
26447
26448         * reflection.c (mono_image_basic_init): Fix memory allocation.
26449
26450         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26451
26452         * assembly.c (mono_assembly_load_references): Make this public.
26453
26454 2003-12-19  Martin Baulig  <martin@ximian.com>
26455
26456         * class.c (mono_class_initialize_generic): Made this static, take
26457         a `MonoGenericInst *' instead of a `MonoClass *'.
26458         (mono_class_from_generic): Call mono_class_initialize_generic()
26459         unless we're already initialized or being called from
26460         do_mono_metadata_parse_generic_inst().
26461
26462         * class.h (MonoGenericInst): Added `initialized' and
26463         `init_pending' flags.
26464
26465         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
26466         `mono_class_init (gklass)' or mono_class_initialize_generic()
26467         here; set `generic_inst->init_pending' while parsing the
26468         `type_argv'.
26469
26470 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
26471
26472         * locales.c: include string.h for memxxx prototypes
26473
26474 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
26475
26476         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
26477         constructor when accessing literal fields.
26478
26479 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
26480
26481         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26482
26483         * reflection.c (assembly_add_resource_manifest): New function to fill
26484         the MANIFESTRESOURCE table.
26485
26486         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
26487
26488         * reflection.h: Update to changes in class layout.
26489
26490         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
26491         Reenable call to mono_runtime_is_shutting_down ().
26492
26493         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
26494         determine if the runtime is shutting down.
26495
26496 2003-12-16  Jackson Harper <jackson@ximian.com>
26497
26498         * icall.c: comment out call to mono_runtime_is_shutting_down to
26499         fix build.
26500         
26501 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
26502
26503         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
26504         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
26505
26506 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
26507
26508         * reflection.c: move definition of swap_with_size
26509         to before its first call
26510
26511 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
26512
26513         * appdomain.c (mono_runtime_is_shutting_down): New public function.
26514
26515         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
26516         icall.
26517
26518         * object.c: Fix warnings.
26519
26520         * icall.c (ves_icall_Type_Get...): Only consider inherited static
26521         members if FlattenHierarchy is set.
26522
26523         * reflection.c (mono_image_add_decl_security): New function to emit
26524         declarative security.
26525
26526         * reflection.h reflection.c: Add support for declarative security.
26527
26528         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26529         
26530 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
26531
26532         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26533         
26534         * appdomain.c verify.c: Moved corlib version checking into its own
26535         function in appdomain.c since it needs to create vtables etc.
26536
26537 2003-12-13  Patrik Torstensson <p@rxc.se>
26538
26539         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
26540         instead of unwrapped server.
26541
26542 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
26543
26544         * verify.c (check_corlib): Fix field index.
26545
26546 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
26547
26548         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
26549         GetGacPath icall.
26550
26551 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
26552
26553         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
26554         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
26555         cope with sizeof(size_t) != sizeof(guint32).
26556
26557 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26558
26559         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
26560         in case of failure.
26561
26562 2003-12-10  Mark Crichton <crichton@gimp.org>
26563
26564         * icall.c: removed the GetNonZeroBytes.  We now handle this case
26565         in managed code.
26566
26567         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
26568
26569 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
26570
26571         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
26572         marked as deleted.
26573
26574 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
26575
26576         * verify.c (check_corlib): Handle the case when the version field is 
26577         initialized by a static constructor.
26578
26579 2003-12-08  Patrik Torstensson  <p@rxc.se>
26580
26581     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
26582
26583 2003-12-08  Martin Baulig  <martin@ximian.com>
26584
26585         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
26586         a MonoReflectionGenericParameter, also take the parameter index
26587         and name as arguments.
26588         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26589         (ves_icall_MonoGenericParam_initialize): New interncall.
26590         (ves_icall_Type_make_byref_type): New interncall.
26591
26592         * reflection.h (MonoReflectionGenericParam): Derive from
26593         MonoReflectionType, not just from MonoObject.  Added `refobj' and
26594         `index' fields.
26595
26596         * reflection.c (mono_reflection_define_generic_parameter): Create
26597         and return a new MonoReflectionGenericParam; don't initialize the
26598         constraints here.
26599         (mono_reflection_initialize_generic_parameter): New public method;
26600         initializes the constraints and creates the `param->pklass'.
26601
26602 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
26603
26604         * reflection.h reflection.c: Use the new fields 'num_types', 
26605         'num_fields' and 'num_methods' to track the number of types etc.
26606
26607         * verify.c (check_corlib): Check corlib version number.
26608
26609 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
26610
26611         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
26612         function works on all methods.
26613
26614 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
26615
26616         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
26617         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
26618         the custom_type_info flag of the transparent proxy.
26619         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
26620         objects that supports IRemotingTypeInfo.
26621         * object.h: Added custom_type_info field in transparent proxy.
26622
26623 2003-12-06  Martin Baulig  <martin@ximian.com>
26624
26625         * class.c (mono_class_create_from_generic): Removed.
26626         (mono_class_from_generic): Check `ginst->klass' before doing
26627         anything else.  This is important to fully support "recursive"
26628         generic types.
26629
26630         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
26631         empty `generic_inst->klass' before doing anything else.
26632
26633 2003-12-06  Dick Porter  <dick@ximian.com>
26634
26635         * verify.c: 
26636         * object.h:
26637         * icall.c:
26638         * locales.c: Use C structs to access class fields.  Don't do a
26639         conversion between MonoString and UChar because both are
26640         platform-endian UTF-16.  Compare now takes startindex and count
26641         parameters.  Add a char overload for IndexOf.  Speed up the
26642         invariant string IndexOf.
26643
26644 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
26645
26646         * Makefile.am (monosn_LDADD): Fix parallel build.
26647
26648 2003-12-04  Martin Baulig  <martin@ximian.com>
26649
26650         * icall.c
26651         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26652         (ves_icall_Type_make_array_type): New interncall.       
26653
26654 2003-12-04  Martin Baulig  <martin@ximian.com>
26655
26656         * locales.c: also change it in the !HAVE_ICU case.
26657
26658 2003-12-04  Dick Porter  <dick@ximian.com>
26659
26660         * icall.c:
26661         * locales.c: construct_compareinfo is now in CompareInfo, not
26662         CultureInfo.
26663
26664 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
26665
26666         * image.c (mono_image_load_file_for_image): Cache loaded images in the
26667         image->files array.
26668
26669         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
26670         table as well.
26671
26672         * assembly.c (mono_assembly_load_references): Only load references
26673         once.
26674
26675         * class.c (mono_class_from_name): Avoid linear search of the 
26676         EXPORTEDTYPE table.
26677
26678         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
26679
26680 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
26681
26682         * image.h (MonoImage): Add 'field_cache' field.
26683
26684         * loader.c (mono_field_from_token): Cache field lookups.
26685         
26686         * reflection.c (mono_module_get_object): Fix name property.
26687
26688         * icall.c (ves_icall_get_enum_info): Update after changes to 
26689         mono_metadata_get_constant_index ().
26690
26691         * icall.c: Get rid of get_type_info icall, use a separate icall for
26692         each type property to avoid needless memory allocations. Fixes #51514.
26693
26694         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
26695         to avoid needless binary searches.
26696
26697         * class.c (class_compute_field_layout): Move the initialization of
26698         field->def_value to mono_class_vtable ().
26699
26700         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
26701         non-corlib types.
26702
26703         * object.c (mono_object_allocate): Make it inline.
26704
26705         * object.c (mono_object_allocate_spec): Make it inline.
26706         
26707 2003-12-02  Dick Porter  <dick@ximian.com>
26708
26709         * locales.c (create_NumberFormat): NumberFormatInfo construction.
26710         Patch by Mohammad DAMT (mdamt@cdl2000.com).
26711
26712 2003-12-01  Dick Porter  <dick@ximian.com>
26713
26714         * threads.c: Fix signature and call in CreateMutex and
26715         CreateEvent.
26716
26717 2003-12-01  Dick Porter  <dick@ximian.com>
26718
26719         * icall.c: 
26720         * locales.c: Implement string compares and searching
26721
26722         * object.h: Add extra Thread field
26723
26724 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
26725
26726         * reflection.c (fixup_method): Add support for MonoCMethod.
26727
26728 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
26729
26730         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
26731
26732         * reflection.c (assembly_name_to_aname): Allow extra characters in
26733         assembly names. Fixes #51468.
26734
26735 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
26736
26737         * exception.c (mono_exception_from_name_domain): New helper function.
26738
26739         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
26740         exception object in the correct domain.
26741
26742         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
26743         formatting + make a copy a the input data.
26744
26745         * loader.c (mono_get_method_from_token): Methods which contain
26746         native code do not have entries in the ImplMap.
26747
26748         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
26749         Thanks to Gonzalo for spotting this.
26750         
26751         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
26752         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
26753
26754         * assembly.h (mono_assembly_load_from): Split the second part of 
26755         assembly loading into a new public function.
26756
26757         * exception.h (mono_get_exception_bad_image_format): New function.
26758
26759 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
26760
26761         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
26762         Enumerate all modules inside a dynamic assembly. Fixes #51293.
26763         
26764         * icall.c: Add new icall for creating dynamic methods.
26765
26766         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
26767
26768         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
26769
26770         * reflection.c (mono_reflection_create_dynamic_method): New icall to
26771         create a dynamic method.
26772
26773         * reflection.c (resolve_object): New helper function.
26774
26775         * reflection.c: Generalize ReflectionMethodBuilder and the functions
26776         which manipulate it so they can also work on dynamic methods.
26777
26778         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
26779         creating the MonoReflectionMethodAux structure if it is not needed.
26780         
26781         * reflection.h verify.c: Update after changes to object layout.
26782
26783         * reflection.c (method_builder_encode_signature): Fix compilation on
26784         gcc 2.95.x.
26785
26786 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
26787
26788         * appdomain.h: Added support for context static fields. Added static_data
26789           field to MonoAppContext and renamed thread_static_fields to a more
26790           generic special_static_fields in MonoAppDomain, since it can now contain
26791           context static fields.
26792         * domain.c: Updated hashtable name.
26793         * object.c: Replaced field_is_thread_static() for a more generic
26794           field_is_special_static() which also checks for context static attribute.
26795           In mono_class_vtable(), added support for static context fields.
26796         * threads.c: Changed methods that manage thread static fields to more
26797           generic methods so they can be reused both for thread and context static
26798           data.
26799         * threads.h: Declared some new methods.
26800
26801 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
26802
26803         * reflection.h: Update after changes to the managed types.
26804
26805         * reflection.c (encode_custom_modifiers): New helper function.
26806
26807         * reflection.c (method_encode_signature): Emit custom modifiers.
26808
26809         * reflection.c (field_encode_signature): Emit custom modifiers.
26810
26811 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
26812
26813         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
26814
26815         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
26816         implementation.
26817
26818         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
26819         icall.
26820
26821         * object.c (mono_field_get_value_object): New function.
26822
26823         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
26824         specific.
26825
26826 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
26827
26828         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
26829         return a preallocated out-of-memory exception instance.
26830
26831         * object.c (out_of_memory): Use the new function.
26832
26833         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
26834         flag is before the custom modifiers. Fixes #49802.
26835
26836 2003-11-16  Martin Baulig  <martin@ximian.com>
26837
26838         * class.c (mono_class_is_open_constructed_type): Implemented the
26839         MONO_TYPE_GENERICINST case.
26840
26841 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
26842
26843         * assembly.c (mono_assembly_fill_assembly_name): New function to
26844         fill out the MonoAssemblyName structure.
26845         (mono_assembly_open): Use the new function.
26846
26847         * icall.c (fill_reflection_assembly_name): New helper function.
26848
26849         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
26850         new function.
26851
26852         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
26853
26854 2003-11-15  Martin Baulig  <martin@ximian.com>
26855
26856         * class.c (mono_class_is_open_constructed_type): New public
26857         function; checks whether a type is an open constructed type,
26858         ie. whether it still contains type parameters.
26859         (mono_class_inflate_generic_type): If we're a type parameter and
26860         the inflated type is also a MONO_TYPE_(M)VAR, return the original
26861         type.
26862
26863         * class.h (MonoGenericInst): Added `guint32 is_open'.
26864
26865         * loader.c (method_from_methodspec): Check whether we're an open
26866         or closed constructed type and set `ginst->is_open'.
26867
26868         * reflection.c (mono_reflection_bind_generic_parameters): Check
26869         whether we're an open or closed constructed type and set
26870         `ginst->is_open'.
26871         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
26872         from open constructed types.
26873
26874 2003-11-15  Martin Baulig  <martin@ximian.com>
26875
26876         * reflection.c (mono_reflection_bind_generic_parameters): If we're
26877         a generic instance (instead of a generic type declaration) with
26878         unbound generic parameters, bind them to our actual types.
26879
26880 2003-11-14  Martin Baulig  <martin@ximian.com>
26881
26882         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
26883
26884         * reflection.c (mono_reflection_bind_generic_parameters): If we're
26885         an interface type, populate `res->interfaces' with instantiated
26886         versions of all the interfaces we inherit.
26887
26888 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
26889
26890         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
26891         when MONO_PATH is set but doesn't contain the install dir.
26892
26893 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26894
26895         * icall.c:
26896         (ves_icall_Type_GetInterfaces): don't return an interface twice when
26897         it's also implemented in base classes. Fixes bug #50927.
26898
26899 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
26900
26901         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
26902         if this method is called from a finalizer. Fixes #50913.
26903
26904 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
26905
26906         * threads.c: Implement VolatileRead/VolatileWrite
26907
26908         * icall.c: Add new icalls for VolatileRead/VolatileWrite
26909
26910 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26911
26912         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
26913         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26914         2.95.3.
26915
26916         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
26917         from Peter Ross (pro@missioncriticalit.com).
26918         
26919 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
26920
26921         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26922
26923 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26924
26925         * assembly.c (mono_assembly_load_references): Disable check because it
26926         triggers on older corlibs which lots of people have.
26927
26928 2003-11-12  Jackson Harper  <jackson@ximian.com>
26929
26930         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26931         load corlib.dll if mscorlib.dll is not found.
26932         * assembly.h: Remove corlib name define.
26933         * class.c:
26934         * domain.c:
26935         * image.c: Change corlib name to mscorlib.
26936         
26937 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26938
26939         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26940
26941 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
26942
26943         * appdomain.h: Added loader_optimization here to sync with the C#
26944         code, and add disallow_binding_redirects field.
26945
26946 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
26947
26948         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26949
26950         * reflection.c (mono_image_build_metadata): Fix crash on modules
26951         with no types.
26952
26953         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26954
26955         * icall.c (ves_icall_get_method_info): Return callingConvention as
26956         well.
26957
26958         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
26959         namespaces from the EXPORTEDTYPE table as well.
26960
26961         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26962         from all modules inside the assembly.
26963         
26964 2003-11-11  Martin Baulig  <martin@ximian.com>
26965
26966         * reflection.c (mono_reflection_bind_generic_parameters): Make
26967         this work for interfaces.
26968
26969 2003-11-11  Martin Baulig  <martin@ximian.com>
26970
26971         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26972
26973 2003-11-11  Martin Baulig  <martin@ximian.com>
26974
26975         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26976         "MonoInflatedMethod" and "MonoInflatedCtor".
26977
26978 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
26979
26980         * reflection.c (resolution_scope_from_image): Use the assembly table
26981         from the manifest module, since other modules don't have it.
26982
26983         * debug-helpers.c (mono_type_full_name): New helper function.
26984
26985         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26986
26987         * image.c (mono_image_load_file_for_image): New public function which
26988         is a replacement for the load_file_for_image in class.c.
26989
26990         * assembly.c (mono_assembly_load_module): A wrapper for the function
26991         above which does assembly association and reference loading too.
26992
26993         * class.c (mono_class_from_name): Call mono_assembly_load_module.
26994
26995 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26996
26997         * appdomain.c: not all of the attributes for the full assembly name
26998         are required and the order doesn't matter. Fixes bug #50787.
26999
27000 2003-11-10  Dick Porter  <dick@ximian.com>
27001
27002         * locales.c: Use platform-endian UTF16
27003
27004 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
27005
27006         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
27007         
27008 2003-11-10  Martin Baulig  <martin@ximian.com>
27009
27010         * metadata.c
27011         (mono_metadata_load_generic_params): Make this actually work.
27012
27013         * reflection.c (mono_reflection_bind_generic_parameters): If our
27014         parent is a generic instance, pass all the `types' to it, no
27015         matter whether it has the same number of type parameters or not.
27016
27017 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
27018
27019         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
27020
27021         * assembly.c (mono_assembly_load_references): Move the image<->assembly
27022         assignment code to this function so it gets called recursively for all
27023         modules.
27024
27025         * image.c (load_modules): Remove the assembly assignment since it is
27026         now done by mono_assembly_load_references.
27027         
27028         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
27029         Add 'module' argument.
27030         (mono_module_get_types): New helper function.
27031         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
27032
27033 2003-11-08  Martin Baulig  <martin@ximian.com>
27034
27035         * class.c (mono_class_inflate_generic_method): Interface method
27036         don't have a header.
27037
27038         * reflection.c (mono_image_get_methodspec_token): Take an
27039         additional `MonoGenericInst *' argument instead of reading it from
27040         the header; this is necessary to support interfaces.
27041         (mono_image_create_token): Pass the `MonoGenericInst *' from the
27042         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
27043         (inflated_method_get_object): Take an additional `MonoGenericInst *'
27044         argument.
27045
27046         * reflection.h (MonoReflectionInflatedMethod): Added
27047         `MonoGenericInst *ginst'.
27048
27049 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
27050
27051         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
27052
27053 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
27054
27055         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
27056
27057 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
27058
27059         * reflection.c 
27060         (reflection_methodbuilder_from_method_builder):
27061         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
27062         initialize a ReflectionMethodBuilder structure.
27063         (mono_image_get_methodbuilder_token):
27064         (mono_image_get_ctorbuilder_token): New functions to emit memberref
27065         tokens which point to types in another module inside the same assembly.
27066
27067         * reflection.c: Use the new helper functions.
27068         
27069         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
27070
27071         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
27072         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
27073
27074         * reflection.c (resolution_scope_from_image): Emit a moduleref if
27075         neccesary.
27076
27077         * reflection.c (mono_image_build_metadata): Emit metadata only for the
27078         current module. Emit the manifest only for the main module.
27079
27080         * reflection.c (mono_image_create_token): Add assertion when a 
27081         memberref needs to be created.
27082
27083         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
27084
27085         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
27086         larger buffer for the custom attribute blob. Fixes #50637.
27087         
27088 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27089
27090         * threadpool.c: notify listener on async processing handles after
27091         invoking the async callback. Thanks to Zoltan.
27092
27093 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
27094
27095         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
27096         avoid code duplication.
27097
27098         * reflection.h (MonoDynamicImage): New type which is currently unused,
27099         but will be used through the ref.emit code in place of 
27100         MonoDynamicAssembly.
27101
27102         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
27103         object layout.
27104
27105         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
27106         a MonoDynamicImage instead of just a MonoImage.
27107         
27108         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
27109         icalls to ModuleBuilder but keep their semantics, so they will work
27110         with moduleb->assemblyb. This will change later.
27111         
27112 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
27113
27114         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
27115         object layout.
27116
27117         * reflection.c (mono_image_build_metadata): Avoid creation of a default
27118         main module, since it is now done by the managed code.
27119
27120 2003-11-03  Martin Baulig  <martin@ximian.com>
27121
27122         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
27123         `ginst->klass' here.
27124         (method_encode_methodspec): Don't use the `ginst->generic_method's
27125         klass if it's a generic instance, use `ginst->klass' in this case.
27126
27127 2003-11-03  Martin Baulig  <martin@ximian.com>
27128
27129         * reflection.c (mono_image_get_generic_method_param_info):
27130         Removed, use mono_image_get_generic_param_info() instead.
27131         (mono_image_get_type_info): Write the GenericParam table before
27132         the Method table.  This is neccessary because in the GenericParam
27133         table, type parameters of the class (ie. '!0' etc.) must come
27134         before the ones from its generic methods (ie. '!!0' etc).
27135
27136 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
27137
27138         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
27139
27140 2003-11-02  Martin Baulig  <martin@ximian.com>
27141
27142         * reflection.c (create_generic_typespec): Take a
27143         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
27144         the generic parameters from it.
27145
27146 2003-11-02  Martin Baulig  <martin@ximian.com>
27147
27148         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
27149         instead of a `MonoClassField *' since we just need the type.
27150         (create_generic_typespec): New static function.  Creates a
27151         TypeSpec token for a generic type declaration.
27152         (mono_image_get_generic_field_token): New static function.
27153         (mono_image_create_token): If we're a FieldBuilder in a generic
27154         type declaration, call mono_image_get_generic_field_token() to get
27155         the token.
27156
27157 2003-11-02  Martin Baulig  <martin@ximian.com>
27158
27159         * reflection.h
27160         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
27161         `MonoReflectionGenericInst *declaring_type' and
27162         `MonoReflectionGenericInst *reflected_type' fields.
27163
27164         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
27165         `MonoReflectionGenericInst *declaring_type' and a
27166         `MonoReflectionGenericInst *reflected_type' argument instead of a
27167         single `MonoReflectionGenericInst *type' one.  Set
27168         `res->declaring_type' and `res->reflected_type' from them.
27169         (mono_reflection_inflate_field): Likewise.      
27170
27171 2003-11-02  Martin Baulig  <martin@ximian.com>
27172
27173         * class.c (mono_class_setup_vtable): Don't store generic methods
27174         in the vtable.  
27175
27176 2003-11-02  Martin Baulig  <martin@ximian.com>
27177
27178         * reflection.h (MonoReflectionGenericInst): Added
27179         `MonoReflectionType *declaring_type'.
27180
27181         * reflection.c (mono_reflection_bind_generic_parameters): Use
27182         `if (tb->parent)' instead of `klass->parent'.
27183
27184 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
27185
27186         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
27187         with an empty ASSEMBLY table.
27188
27189         * reflection.c (mono_image_build_metadata): Avoid using the same loop
27190         variable in the inner and outer loops.
27191
27192 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
27193
27194         * metadata.h (mono_metadata_make_token): Put parentheses around macro
27195         argument.
27196
27197         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
27198         
27199         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
27200         icalls. Instead, do everything in managed code. This is needed since
27201         it is hard to restore the original domain etc. in unmanaged code in the
27202         presence of undeniable exceptions.
27203
27204         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
27205         New icalls to push and pop appdomain refs.
27206
27207 2003-10-31  Martin Baulig  <martin@ximian.com>
27208
27209         * class.c (inflate_generic_type): Renamed to
27210         mono_class_inflate_generic_type() and made it public.
27211
27212         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
27213         New interncall.
27214
27215         * loader.c (mono_field_from_memberref): Also set the retklass for
27216         typespecs.
27217
27218         * fielder.c (mono_image_get_inflated_field_token): New static
27219         method; creates a metadata token for an inflated field.
27220         (mono_image_create_token, fixup_method): Added support for
27221         "MonoInflatedField".
27222         (fieldbuilder_to_mono_class_field): New static function.
27223         (mono_reflection_inflate_field): New public function.
27224
27225         * reflection.h
27226         (MonoReflectionGenericInst): Added `MonoArray *fields'.
27227         (MonoReflectionInflatedField): New typedef.     
27228
27229 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
27230
27231         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
27232         for Solaris and other platforms without s6_addr16
27233
27234 2003-10-30  Martin Baulig  <martin@ximian.com>
27235
27236         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
27237         argument instead of two.
27238         (mono_class_inflate_generic_signature): Likewise.
27239         (inflate_generic_header): Likewise.
27240         (mono_class_inflate_generic_method): Likewise.  In addition, if
27241         `ginst->klass' is set, it becomes the new `method->klass'.
27242
27243         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
27244         field.
27245
27246         * reflection.c (encode_generic_method_sig): Write a 0xa as the
27247         first byte. [FIXME]
27248         (method_encode_methodspec): If we have generic parameters, create
27249         a MethodSpec instead of a MethodRef.
27250         (fixup_method): Added support for "MonoInflatedMethod" and
27251         "MonoInflatedCtor".
27252         (mono_image_create_token): Added support for "MonoInflatedMethod"
27253         and "MonoInflatedCtor".
27254         (inflated_method_get_object): New static function; returns a
27255         managed "System.Reflection.MonoInflatedMethod" object.
27256         (mono_reflection_bind_generic_method_parameters): Return a
27257         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
27258         (mono_reflection_inflate_method_or_ctor): Likewise.
27259         (mono_image_get_generic_method_param_info): Initialize unused
27260         fields to zero.
27261         (mono_image_get_generic_param_info): Likewise.
27262
27263         * reflection.h (MonoReflectionInflatedMethod): New public
27264         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
27265         "S.R.MonoInflatedCtor" classes.
27266
27267         * loader.c (method_from_memberref): If we're a TypeSpec and it
27268         resolves to a generic instance, inflate the method.
27269
27270 2003-10-28  Dick Porter  <dick@ximian.com>
27271
27272         * object.c (mono_runtime_run_main): Convert command-line arguments
27273         into utf8, falling back to the user's locale encoding to do so.
27274
27275 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
27276
27277         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
27278         at this time.
27279
27280         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
27281
27282         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
27283         up icalls at method definition time. Partially fixes #33569.
27284
27285 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
27286
27287         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
27288         marshalling of arrays. Fixes #50116.
27289
27290         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
27291
27292         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
27293         points to a vtable in the dying appdomain.
27294
27295         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
27296         listeners into unmanaged code inside the lock.
27297
27298         * object.c (mono_class_vtable): Turn off typed allocation in non-root
27299         domains and add some comments.
27300
27301 2003-10-25  Martin Baulig  <martin@ximian.com>
27302
27303         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
27304
27305         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
27306
27307         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
27308         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
27309         currently parsing.  Create the generic class and store it in
27310         `generic_inst->klass' before parsing the type arguments.  This is
27311         required to support "recursive" definitions; see mcs/tests/gen-23.cs
27312         for an example.
27313         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
27314         to support recursive typespec entries.
27315
27316         * class.c (mono_class_setup_parent): If our parent is a generic
27317         instance, we may get called before it has its name set.
27318         (mono_class_from_generic): Splitted into
27319         mono_class_create_from_generic() and mono_class_initialize_generic().
27320
27321 2003-10-25  Martin Baulig  <martin@ximian.com>
27322
27323         * icall.c (ves_icall_Type_BindGenericParameters): Return a
27324         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
27325         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
27326         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
27327
27328         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
27329         (create_typespec): Likewise.
27330         (mono_reflection_bind_generic_parameters): Return a
27331         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
27332         (mono_reflection_inflate_method_or_ctor): New public function.
27333
27334         * reflection.h (MonoReflectionGenericInst): New typedef.        
27335
27336 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
27337
27338         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
27339         inside the domain lock. Fixes #49993.
27340         
27341         * object.c (mono_class_vtable): When typed allocation is used, 
27342         allocate vtables in the GC heap instead of in the mempool, since the
27343         vtables contain GC descriptors which are used by the collector even
27344         after the domain owning the mempool is unloaded.
27345
27346         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
27347
27348         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
27349         reflect what it does. Also invalidate mempools instead of freeing
27350         them if a define is set.
27351
27352         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
27353         of the appdomain.
27354         
27355         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
27356         hold the finalizable objects in this domain.
27357
27358         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
27359         appdomain.
27360
27361         * appdomain.c (mono_domain_set): New function to set the current
27362         appdomain, but only if it is not being unloaded.
27363
27364         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
27365         appdomain which is being unloaded.
27366         
27367         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
27368         unloading of the root appdomain.
27369
27370         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
27371         icall to execute a method in another appdomain. Intended as a 
27372         replacement for InternalSetDomain, which can confuse the code 
27373         generation in the JIT.
27374
27375         * appdomain.c (mono_domain_is_unloading): New function to determine
27376         whenever an appdomain is unloading.
27377
27378         * appdomain.c (mono_domain_unload): New function to correctly unload
27379         an appdomain.
27380
27381         * assembly.c (mono_assembly_load_references): Check that an assembly
27382         does not references itself.
27383
27384         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
27385         domain manually, it asks the finalizer thread to do it, then waits for
27386         the result. Also added a timeout.
27387
27388         * icall.c: Register the new icalls.
27389
27390         * threads.h threads.c: Export the mono_gc_stop_world and 
27391         mono_gc_start_world functions.
27392         
27393         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
27394         function to fill out the mempool with 0x2a.
27395
27396 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
27397
27398         * reflection.h (MonoReflectionMethodAux): New structure to store
27399         information which is rarely used, thus is not in the MonoMethod
27400         structure.
27401
27402         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
27403         store the aux info.
27404
27405         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
27406         and marshalling info into the aux structure.
27407
27408         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
27409         from the aux structure.
27410
27411         * loader.c (mono_method_get_param_names): Retrieve the param names from
27412         the aux structure.
27413         
27414 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
27415
27416         * exception.h exception.c: Add AppDomainUnloadedException && fix 
27417         warning.
27418
27419 2003-10-21  Dick Porter  <dick@ximian.com>
27420
27421         * socket-io.c
27422         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
27423         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
27424
27425 2003-10-21  Martin Baulig  <martin@ximian.com>
27426
27427         * reflection.c (mono_reflection_bind_generic_parameters):
27428         `klass->parent' is NULL for interfaces.
27429
27430 2003-10-21  Martin Baulig  <martin@ximian.com>
27431
27432         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27433
27434 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
27435
27436         * exception.c (mono_exception_from_name_msg): New helper function for
27437         creating exceptions and initializing their message field.
27438
27439         * exception.c: Simplify functions using the new helper.
27440
27441         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
27442         New function.
27443
27444         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
27445         mono_raise_exception, since otherwise gcc doesn't generate the function
27446         epilog for raise_exception, confusing the stack unwinding in the JIT.
27447         Fixes #45043.
27448
27449         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
27450         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
27451         Fixes #49499.
27452
27453 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27454
27455         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
27456         utf8.
27457
27458 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
27459
27460         * icall.c: Removed GetUninitializedObject method because
27461           AllocateUninitializedClassInstance does the same.
27462
27463 2003-10-18  Martin Baulig  <martin@ximian.com>
27464
27465         * class.c (inflate_generic_signature): Renamed to
27466         mono_class_inflate_generic_signature() and made it public.
27467         (my_mono_class_from_generic_parameter): New static function; if we
27468         don't already have the generic parameter's MonoClass, create a
27469         very simple one which is just used internally in the runtime and
27470         not passed back to managed code.
27471
27472         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
27473
27474         * metadata.h (MonoMethodSignature): Moved the
27475         `MonoGenericParam *gen_params' to the MonoMethodHeader.
27476         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
27477
27478         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
27479         ves_icall_MonoMethod_GetGenericArguments(); this is now an
27480         interncall on the MonoMethod class, not on MethodInfo.
27481         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
27482         calling mono_reflection_bind_generic_method_parameters() directly.
27483
27484         * loader.c (mono_method_get_signature): If this is a MethodSpec;
27485         return the already computed `method->signature'.
27486         (method_from_methodspec): New static function to load a method
27487         from a MethodSpec entry.
27488         (mono_get_method_from_token): Call the new method_from_methodspec()
27489         for MethodSpec tokens.  
27490         (mono_get_method_from_token): If we're a generic method, load the
27491         type parameters.
27492
27493         * reflection.c (mono_image_get_memberref_token): Allow
27494         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
27495         table.
27496         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
27497         (mono_image_create_token): First check whether it's a generic
27498         method (so we'd need to create a MethodSpec), then do the other
27499         two alternatives.
27500         (mono_reflection_bind_generic_method_parameters): Return a
27501         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
27502         called directly from the interncall.
27503
27504 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
27505
27506         * reflection.c (load_public_key): Move loading of the public key
27507         into managed code.
27508
27509         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
27510
27511         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
27512         fields.
27513
27514         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
27515         culture, hash_alg and public_key. Fixes #49555.
27516
27517 2003-10-17  Martin Baulig  <martin@ximian.com>
27518
27519         * class.h (MonoGenericInst): Moved this declaration here and added
27520         `MonoMethod *generic_method'.
27521
27522         * icall.c
27523         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
27524         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
27525
27526         * metadata.c (mono_metadata_type_equal): Two types of
27527         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
27528         index; ie. don't compare the address of the `MonoGenericParam'
27529         structure.
27530         (mono_metadata_load_generic_params): Removed the `MonoMethod
27531         *method' argument.
27532
27533         * metadata.h (MonoGenericInst): Moved declaration to class.h.
27534         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
27535
27536         * reflection.c (method_encode_signature): Encode the number of
27537         generic parameters.
27538         (encode_generic_method_sig): New static function.
27539         (method_encode_methodspec): New static function; creates an entry
27540         in the MethodSpec table for a generic method.
27541         (mono_image_get_methodspec_token): New static function.
27542         (mono_image_create_token): Call mono_image_get_methodspec_token()
27543         for generic methods.
27544         (mono_reflection_bind_generic_method_parameters): New public
27545         function.  Instantiates a generic method.
27546
27547 2003-10-16  Martin Baulig  <martin@ximian.com>
27548
27549         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
27550         *gen_params' here from MonoMethodHeader.
27551
27552         * metadata.c (mono_metadata_parse_method_signature): If we have
27553         generic parameters, initialize `method->gen_params' and then set
27554         the correct `type->data.generic_param' in all the parameters.
27555
27556 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
27557
27558         * threads.c (mono_threads_get_default_stacksize): New function to 
27559         return the default stacksize.
27560
27561         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
27562         termination of the finalizer thread, since the previous method had
27563         race conditions. Fixes #49628.
27564
27565         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
27566         as for the other managed threads.
27567
27568 2003-10-16  Martin Baulig  <martin@ximian.com>
27569
27570         * class.c (inflate_generic_signature): Copy `generic_param_count'
27571         and `gen_params'.
27572
27573         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
27574         New interncall.
27575
27576         * metadata.c (mono_metadata_parse_method_signature): Actually set
27577         the `method->generic_param_count' here.
27578         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
27579
27580 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
27581
27582         * object.h: Add a new field to TypedRef to simplify the implementation
27583         of the REFANY opcodes in the JIT.
27584
27585         * icall.c: Make use of the new field.
27586
27587         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
27588         dynamically.
27589
27590 2003-10-15  Martin Baulig  <martin@ximian.com>
27591
27592         * class.c (mono_class_from_gen_param): Renamed to
27593         mono_class_from_generic_parameter() and moved most of the
27594         functionality from mono_reflection_define_generic_parameter()
27595         here; ie. we create a "real" class here.
27596         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
27597         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
27598         previously been called.
27599
27600         * class.h (MonoGenericParam): Moved the declaration of this struct
27601         here from metadata.h and added `MonoMethod *method'.
27602
27603         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
27604         interncall.
27605
27606         * loader.c (mono_get_method_from_token): If we have any generic
27607         parameters, call mono_metadata_load_generic_params() to read them
27608         from the MONO_TABLE_GENERICPAR.
27609
27610         * metadata.c (mono_metadata_load_generic_params): Added
27611         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
27612
27613         * metadata.h (MonoMethodSignature): Replaced
27614         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
27615         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
27616
27617         * reflection.c (mono_reflection_define_generic_parameter): Moved
27618         most of the functionality into the new
27619         mono_class_from_generic_parameter(); set the `method' field if
27620         we're a method parameter.       
27621
27622 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
27623
27624         * marshal.c (emit_struct_conv): if native size is 0
27625         emit no code.
27626
27627 2003-10-14  Martin Baulig  <martin@ximian.com>
27628
27629         * icall.c: The generics API has changed in the spec since it was
27630         added to System.Type; these modifications make it match the spec
27631         again.
27632         (ves_icall_Type_GetGenericParameters): Renamed to
27633         `ves_icall_Type_GetGenericArguments'.
27634         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
27635         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
27636         `ves_icall_MonoType_get_HasGenericArguments'.
27637         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
27638         `ves_icall_MonoType_get_IsGenericParameter'.
27639         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
27640         this is no interncall anymore.
27641         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
27642         `ves_icall_TypeBuilder_get_IsGenericParameter'.
27643
27644 2003-10-14  Martin Baulig  <martin@ximian.com>
27645
27646         * reflection.c (mono_reflection_bind_generic_parameters): Also
27647         inflate generic methods if we're reading the class from IL.
27648
27649 2003-10-13  Martin Baulig  <martin@ximian.com>
27650
27651         * reflection.c (mono_reflection_define_generic_parameter): This
27652         method isn't called directly from the icall anymore; take a
27653         `MonoReflectionAssemblyBuilder *' so we can use this for type and
27654         method generic parameters.
27655         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
27656         (method_builder_encode_signature): Encode generic parameters.
27657         (mono_image_get_method_info): Write generic params to the
27658         MONO_TABLE_GENERICPARAM table.
27659
27660         * reflection.h (MonoReflectionMethodBuilder): Added
27661         `MonoArray *generic_params'.
27662
27663         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
27664
27665         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
27666         wrapper for mono_reflection_define_generic_parameter().
27667         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
27668
27669 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
27670
27671         * marshal.h: Add missing function to fix build.
27672
27673         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
27674         the SetLastError pinvoke attribute.
27675
27676         * marshal.c (mono_marshal_set_last_error): New helper function called
27677         by the generated code.
27678         
27679         * marshal.c (mono_mb_emit_branch): New helper function.
27680
27681         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
27682
27683         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
27684         classes as parameters and return values of delegates. Fixes #29256. 
27685
27686 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
27687
27688         * locales.c: use gint32 in non HAVE_ICU case
27689
27690 2003-10-11  Martin Baulig  <martin@ximian.com>
27691
27692         * mono-debug.c (mono_debug_add_method): Added a workaround for
27693         bug #48591.
27694
27695 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
27696
27697         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
27698         delegates passed to native code must use the STDCALL calling 
27699         convention. Fixes #35987.
27700
27701 2003-10-10  Martin Baulig  <martin@ximian.com>
27702
27703         * class.c (inflate_generic_type): If we're inflating for a generic
27704         type instance (and not for a generic method), return
27705         MONO_TYPE_MVAR unchanged.
27706
27707 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27708
27709         * string-icalls.c: Join ignores null strings in the source array.
27710         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
27711         * threads.c: GetAvailableTheads is slightly more accurate.
27712
27713 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
27714
27715         * threads.h threads.c : add mono_threads_set_default_stacksize
27716         and pass default to CreateThread calls.
27717
27718 2003-10-09  Dick Porter  <dick@ximian.com>
27719
27720         * icall.c:
27721         * locales.h:
27722         * locales.c: Internal calls for constructing CultureInfo and
27723         related objects from libicu (if its available.)
27724
27725 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
27726
27727         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
27728
27729 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27730
27731         * threadpool.c: added an argument to async_invoke_thread that is the
27732         item to process, pass the MonoAsyncResult to the thread start function
27733         when creating a new thread. This way we don't need to acquire any lock
27734         when we're creating a new thread. Readded a semaphore for faster
27735         response times (instead of that Sleep i added).
27736
27737 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
27738
27739         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27740         get daylight change dates better on Windows, fix handling
27741         of platforms without tm_gmtoff.
27742
27743 2003-10-06  Martin Baulig  <martin@ximian.com>
27744
27745         * class.c (inflate_generic_method): Renamed to
27746         mono_class_inflate_generic_method() and made public.
27747         (mono_class_init): Don't inflate the generic methods here.
27748         (mono_class_from_generic): Added `gboolean inflate_methods'
27749         argument.  Inflate the methods here.
27750
27751         * loader.c (mono_method_get_param_names): Ignore instances of
27752         generic types for the moment.
27753
27754         * reflection.c (fixup_method): Added support for inflated methods.
27755         (mono_image_create_token): Use mono_image_get_methodref_token()
27756         for inflated methods.
27757         (mono_custom_attrs_from_param): Ignore instances of generic types
27758         for the moment.
27759         (mono_reflection_bind_generic_parameters): New public function.
27760         Moved all the functionality from
27761         ves_icall_Type_BindGenericParameters() here and added support for
27762         dynamic types.
27763         (mono_reflection_define_generic_parameter): Initialize
27764         `klass->methods' here.
27765
27766         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
27767         functionality into mono_reflection_define_generic_parameter().
27768         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
27769         TypeBuilder, return that TypeBuilder.
27770
27771 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27772
27773         * appdomain.c: removed mono_delegate_semaphore.
27774
27775         * threadpool.c:
27776         (mono_thread_pool_add): moved hash table creation inside and the thread 
27777         creation outside of the critical region.
27778         (mono_thread_pool_finish): removed obsolete code.
27779         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
27780         continue or exit the thread depending on the queue.
27781
27782 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
27783
27784         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
27785         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
27786         handle more bool marshalling options
27787
27788 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
27789
27790         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
27791         arrays of structs. Also add a more descriptive error message when
27792         a structure member is marshalled as LPArray.
27793
27794 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
27795
27796         * marshal.c (mono_marshal_get_native_wrapper): Add support for
27797         marshalling arrays of complex types. Fixes #29098. Also remove an
27798         usused and incomplete function.
27799
27800 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27801
27802         * gc.c: report heap_size - free_bytes as total memory allocated
27803         (bug#49362).
27804
27805 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
27806
27807         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
27808         fix timezone handling problems on Windows.
27809         
27810         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
27811         asserts when the year is outside the range handled by ms the functions.
27812
27813         * class.c (setup_interface_offsets): If the class is an interface,
27814         fill out its interface_offsets slot.
27815
27816 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27817
27818         * threadpool.c: mark threadpool threads as background.
27819
27820 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
27821
27822         * decimal.c - define DECINLINE to nothing if not using GCC
27823
27824 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
27825
27826         * assembly.c: More refcount fixes.
27827
27828 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27829
27830         * string-icalls.c: if we're not trimming, return the same string.
27831         When not splitting, don't create a new string.
27832
27833 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27834
27835         * image.c:
27836         (mono_image_open): increment the ref_count inside the critical section.
27837
27838 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
27839
27840         * image.c (mono_image_open): Fix reference counting bug.
27841
27842 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
27843
27844         * marshal.c (mono_marshal_type_size) struct alignment changed for 
27845         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
27846         64bits. Avoid leak in mono_marshal_get_native_wrapper when
27847         mono_lookup_pinvoke_call throws.        
27848
27849 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
27850
27851         * reflection.c (mono_reflection_parse_type): Fix #49114.
27852
27853         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
27854         temporary workaround for cygwin header problem.
27855
27856         * object.c (mono_object_isinst): Synchronize this with the code
27857         generated by the JIT for casts.
27858
27859 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
27860
27861         * reflection.c (encode_type): Fix #38332.
27862
27863 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
27864
27865         * marshal.c (mono_marshal_method_from_wrapper): New function to return
27866         the original method from the wrapper method.
27867
27868 2003-09-25  Martin Baulig  <martin@ximian.com>
27869
27870         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
27871         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
27872         (ves_icall_Type_get_IsGenericInstance): New interncall.
27873
27874 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
27875
27876         * object.c: fix cast warning in big endian code.
27877
27878 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
27879
27880         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
27881         
27882 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27883
27884         * assembly.c: don't call check_env from mono_assembly_load. It's
27885         already done once in mono_assemblies_init and may cause headaches when
27886         multiple threads are loading assemblies.
27887
27888 2003-09-19  Martin Baulig  <martin@ximian.com>
27889
27890         * reflection.c (mono_reflection_define_generic_parameter): Don't
27891         allocate `klass->methods', set `klass->flags' to
27892         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
27893
27894 2003-09-18  Martin Baulig  <martin@ximian.com>
27895
27896         * class.c (mono_class_init): Don't create `class->methods' if it's
27897         already initialized.
27898
27899         * metadata.c (mono_metadata_load_generic_params): Make this
27900         actually work.
27901
27902         * reflection.c (mono_reflection_define_generic_parameter): Set
27903         parent class and interfaces from the constraints.
27904
27905         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
27906         to keep this struct in sync with the declaration in TypeBuilder.cs.
27907
27908 2003-09-17  Martin Baulig  <martin@ximian.com>
27909
27910         * metadata.h (MonoType): Replaced the data's `int type_param'
27911         field with `MonoGenericParam *generic_param'.
27912         (MonoGenericParam): Added `MonoClass *klass'.
27913
27914         * class.c (mono_class_from_gen_param): Removed the
27915         `MonoImage *image' and `int type_num' arguments.
27916
27917         * metadata.c (mono_metadata_parse_generic_param): New static
27918         method; creates a MonoGenericParam which just contains the index.
27919         (do_mono_metadata_parse_type): Call
27920         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27921         MONO_TYPE_MVAR.
27922
27923         * reflection.c (mono_image_typedef_or_ref): Generic type
27924         parameters may be in the same assembly, but never use a typedef
27925         for them.
27926         (mono_reflection_define_generic_parameter): We're now creating a
27927         "real" class for the type parameter; it's now safe to call
27928         mono_class_from_mono_type() on the class'es type, it'll do the
27929         right thing.
27930
27931 2003-09-16  Martin Baulig  <martin@ximian.com>
27932
27933         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27934         `symfile->range_entry_size' and `symfile->class_entry_size' here;
27935         the `symfile' data structure must be fully initialized before it
27936         gets added to the table.
27937
27938 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
27939
27940         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27941
27942         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27943         class init trampolines.
27944
27945 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
27946
27947         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27948         to the built-in profiler to turn off time and allocation profiling
27949         respectively.
27950
27951 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
27952
27953         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27954         g_direct_equal.
27955
27956         * debug-helpers.c (mono_method_full_name): Print the wrapper type
27957         in human readable form.
27958
27959 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
27960
27961         * reflection.c icall.c: Fixed warnings.
27962
27963         * image.c (load_class_names): Use a temporary hash table to hold the
27964         namespaces in order to avoid doing many string comparisons.
27965
27966         * image.h: Fix typo.
27967
27968         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27969         Pass NULL instead of g_direct_equal to the GHashTable constructor 
27970         since the NULL case is short-circuited inside g_hash_table_lookup, 
27971         leading to better performance.  
27972
27973         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27974         obtain the first custom attribute for a given index. Depends on the
27975         CustomAttribute table being sorted by the parent field.
27976
27977         * reflection.c (mono_custom_attrs_from_index): Use the new function 
27978         for better performance.
27979
27980 2003-09-07  Martin Baulig  <martin@ximian.com>
27981
27982         * class.c (mono_class_init): If we're a generic instance, inflate
27983         all our methods instead of loading them from the image.
27984         (mono_class_from_generic): Set `class->methods = gklass->methods'.
27985
27986 2003-09-07  Martin Baulig  <martin@ximian.com>
27987
27988         * mono-debug-debugger.c: Added support for constructors.
27989
27990 2003-09-06  Martin Baulig  <martin@ximian.com>
27991
27992         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27993         New interncall.
27994
27995         * reflection.c (mono_reflection_setup_generic_class): Call
27996         ensure_runtime_vtable() to create the vtable.
27997
27998 2003-09-05  Martin Baulig  <martin@ximian.com>
27999
28000         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
28001         MONO_TYPE_MVAR.
28002
28003 2003-09-04  Martin Baulig  <martin@ximian.com>
28004
28005         * reflection.c (mono_reflection_define_generic_parameter): Generic
28006         parameters start with zero.
28007
28008 2003-09-04  Martin Baulig  <martin@ximian.com>
28009
28010         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
28011
28012         * reflection.h (MonoReflectionGenericParam): New typedef.
28013         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
28014         the generic parameters from the managed TypeBuilder.
28015
28016         * reflection.c (mono_reflection_define_generic_parameter): New function.
28017         (mono_reflection_create_runtime_class): Encode generic parameters.
28018         (mono_reflection_setup_generic_class): New function; this is
28019         called after adding adding all generic params to the TypeBuilder.
28020         (encode_type): Added MONO_TYPE_VAR.
28021
28022 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
28023
28024         * class.h class.c (mono_class_needs_cctor_run): Moved this method
28025         here from the JIT.
28026
28027         * assembly.h assembly.c: Moved the AOT loading code into an assembly
28028         load hook.
28029
28030 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
28031
28032         * reflection.h reflection.c class.h class.c: Delete duplicate 
28033         definition of mono_type_get_name () from reflection.c and export the
28034         one in class.c.
28035
28036         * class.c: Class loading fixes from Bernie Solomon 
28037         (bernard@ugsolutions.com).
28038
28039         * reflection.c: Endianness fixes from Bernie Solomon 
28040         (bernard@ugsolutions.com).
28041         
28042 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
28043
28044         * assembly.h assembly.c: Define a file format version for AOT
28045         libraries.
28046         
28047         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
28048
28049         * appdomain.h (MonoJitInfo): New field to determine whenever the
28050         code is domain neutral.
28051         
28052 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
28053
28054         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
28055
28056 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
28057
28058         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
28059         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
28060         Avoid caching the result since strings must be domain specific. Fixes
28061         #48050.
28062
28063 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
28064
28065         * marshal.c (mono_marshal_init): Make this callable multiple times
28066         since it is hard to find a correct place to call it.
28067
28068         * object.c (mono_runtime_class_init): Execute static constructors in
28069         the correct appdomain.
28070
28071         * image.c (build_guid_table): Handle the case when multiple images have
28072         the same GUID.
28073
28074 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28075
28076         * icall.c: added a couple of icalls for System.Web.
28077
28078 2003-08-28  Martin Baulig  <martin@ximian.com>
28079
28080         * icall.c (ves_icall_Type_BindGenericParameters): Use
28081         `klass->generic_inst' instead of `&klass->byval_arg' in the
28082         mono_type_get_object() call.  The returned type must be
28083         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
28084
28085 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
28086
28087         * NOTES: New file.
28088
28089         * object.c (mono_class_proxy_vtable): Make it thread safe.
28090
28091         * pedump.c: Fix warning.
28092
28093         * object.c appdomain.h: Get rid of metadata_section. 
28094         It is no longer needed and it was causing deadlocks with domain->lock.
28095
28096         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
28097
28098 2003-08-26  Martin Baulig  <martin@ximian.com>
28099
28100         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
28101
28102 2003-08-26  Martin Baulig  <martin@ximian.com>
28103
28104         * pedump.c (main): Call mono_metadata_init(),
28105         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
28106         and mono_loader_init().
28107
28108 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
28109
28110         * loader.h: Add missing include to fix build.
28111
28112         * image.h: mono_image_load_references is no more.
28113
28114         * assembly.c: Reworked assembly loading to make it really thread safe.
28115         After these changes, the assembly returned by mono_assembly_open is
28116         fully initialized, i.e. all its references assemblies are loaded.
28117
28118         * assembly.c (mono_image_load_references): Renamed to 
28119         mono_assembly_load_references, and made private, since clients no
28120         longer need to call it.
28121
28122         * class.c: Removed calls to mono_assembly_load_references, since it was
28123         a source of deadlocks.
28124
28125         * loader.h loader.c class.h class.c: Protect data structures using a 
28126         new lock, the loader lock.
28127
28128         * class.c (mono_class_setup_vtable): Create temporary hash tables and
28129         GPtrArrays only when needed.
28130
28131         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
28132         into empty structures by mcs. Fixes pinvoke7.cs.
28133         
28134         * domain.c (mono_init): Call a new initialization function.
28135
28136         * appdomain.c (mono_runtime_init): Call the new initializer function
28137         of the marshal module.
28138
28139         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
28140         inserted into empty structures by mcs. Fixes pinvoke7.cs.
28141
28142         * marshal.h marshal.c: Added locks around the wrapper caches to make
28143         this module thread safe.
28144
28145         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
28146         this argument. Fixes pinvoke1.exe.
28147
28148 2003-08-25  Lluis Sanchez <lluis@ximian.com>
28149
28150         * object.h: Added call_type field to MonoMethodMessage and the corresponding
28151         enumeration of values. Removed fields to store remote call output values in
28152         MonoAsyncResult. Not needed any more.
28153         * object.c: Initialize call_type and async_result fields in mono_message_init.
28154         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
28155         dispatching the message.
28156         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
28157         async call to finish. To do it use a message with EndInvoke call type.
28158
28159 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
28160
28161         * loader.h loader.c (mono_method_hash_marhal_info): New function which
28162         determines whenever a method has marshalling info.
28163
28164 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28165
28166         * assembly.c: fix the build on windows.
28167
28168 2003-08-22 Lluis Sanchez <lluis@ximian.com>
28169
28170         * object.cs: Fixed bug #47785.
28171
28172 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
28173
28174         * string-icalls.c (StringReplace): If their are no occurances of
28175         the old string found return a reference to the supplied
28176         string. This saves some memory and matches MS behavoir.
28177         
28178 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28179
28180         * socket-io.c: fixed compilation for systems that define AF_INET6
28181         and don't define SOL_IP/SOL_IPV6.
28182
28183 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
28184
28185         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
28186         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
28187
28188         * rawbuffer.c rawbuffer.h: Make this module thread safe.
28189
28190         * domain.c: Make this module thread safe.
28191
28192         * domain.c (mono_init): Call new initialization function.
28193
28194         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
28195         reference types too. Fixes #38812.
28196
28197         * image.c (mono_image_init): Fixed warnings.
28198
28199         * class.c (mono_class_from_typeref): Handle assembly load failure
28200         correctly.
28201
28202         * appdomain.c (add_assemblies_to_domain): Handle the case when
28203         the references of an assembly are not yet loaded.
28204
28205         * metadata.c image.c assembly.c: Moved initialization of global
28206         variables to a separate function called at startup since lazy 
28207         initialization of these variables is not thread safe.
28208         
28209         * image.c assembly.c: Made this module thread safe by adding locks in 
28210         the appropriate places.
28211
28212         * domain.c (mono_init): Call the new initialization functions of the
28213         three modules.
28214
28215 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
28216
28217         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
28218           make a direct call. It is proxy's work to make the call asynchronous.
28219           mono_delegate_end_invoke(): If the targe is a proxy, just collect
28220           the return values.
28221         * object.cs: mono_method_call_message_new(): read AsyncResult and
28222           state object from parameters list, if this info is requested.
28223         * object.h: Added fields to store remote call output values in
28224           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
28225
28226 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28227
28228         * object.h: add needed fields to MonoThread.
28229         * threads.c, threads.h: allow registering a function to cleanup data
28230         allocated per thread by the JIT.
28231
28232 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28233
28234         * loader.h: portability fix by Bernie Solomon
28235         * <bernard@ugsolutions.com>.
28236
28237 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
28238
28239         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
28240         return a MonoArray. This simplifies the code and also ensures that
28241         the cache allways contains an object reference as a value.
28242
28243         * icall.c (ves_icall_get_parameter_info): Simplified using the new
28244         function.
28245
28246 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28247
28248         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
28249         fixes a problem with byte ordering when getting the address family for
28250         a socket.
28251
28252 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
28253
28254         * .cvsignore: Added monosn.
28255
28256         * reflection.h reflection.c loader.c: Added support for parameter
28257         marshalling to dynamically created types. Fixes #47295.
28258
28259 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
28260
28261         * rand.c: remove useless warnings.
28262
28263 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28264
28265         * class.c: implemented ldtoken for methods and fieldrefs.
28266
28267 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28268
28269         * threadpool.c: when mono_async_invoke was called, no one took care of
28270         monitoring the queue. So if the method invoked took some time and we
28271         got new async invoke requests after 500 ms (the thread created waited
28272         that long in WaitForSingleObject), the new async invoke was not called
28273         until the previous one finished.
28274
28275         This is fixed now. Thanks to Totte for helping with it.
28276
28277 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28278
28279         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
28280
28281 2003-08-11  Martin Baulig  <martin@ximian.com>
28282
28283         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
28284
28285 2003-08-06  Martin Baulig  <martin@ximian.com>
28286
28287         * mono-debug-debugger.c: Added support for static fields,
28288         properties and methods.
28289
28290 2003-08-06  Martin Baulig  <martin@ximian.com>
28291
28292         * mono-debug-debugger.c: Don't store the MonoString's vtable to
28293         make this work for applications with multiple application domains.
28294
28295 2003-08-04  Martin Baulig  <martin@ximian.com>
28296
28297         * mono-debug-debugger.c: Completely reworked the type support; the
28298         most important thing is that we're now just using one single
28299         `MonoType' instance per type.
28300
28301 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
28302
28303         * mono-endian.h, mono-endian.c, icall.c: Added icall
28304         ves_icall_System_Double_AssertEndianity to assert double word endianity
28305         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
28306
28307 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28308
28309         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
28310         support, icalls and fixes.
28311
28312 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
28313
28314         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
28315         classes that are a punctuation character in .NET is not the same a
28316         g_unichar_ispunct.
28317
28318 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28319
28320         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
28321
28322 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
28323
28324         * icall.c: Add new MemCopy internalcall.
28325         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28326         Simplified code; It is not necessary to handle all the cases here,
28327         as the C# code takes care of it.  Only handle the case of the name
28328         resource embedded into the assembly.
28329
28330         Changed signature to return the data pointer and the size of the
28331         data. 
28332
28333 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
28334
28335         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
28336         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
28337
28338 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
28339
28340         * socket-io.c: ignore EINTR error in select.
28341
28342 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28343
28344         * class.h, class.c: removed unused subclasses field in MonoClass.
28345
28346 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
28347
28348         * icall.c: improve fix of get_base_definition(). If the parent class
28349           doesn't have the mehod, look at the parent of the parent.
28350         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
28351           to check if a parameter is an in or out parameter
28352           (PARAM_ATTRIBUTE_IN is not set by default).
28353           mono_method_return_message_restore(): Use mono_class_value_size to
28354           get the size of a value type. mono_type_stack_size (parameterType)
28355           does not return the correct value if parameterType is byRef.
28356           mono_load_remote_field(), mono_load_remote_field_new(),
28357           mono_store_remote_field(), mono_store_remote_field_new():
28358           raise exception if the remote call returns an exception.
28359
28360 2003-07-28  Martin Baulig  <martin@ximian.com>
28361
28362         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
28363         method.  This is a wrapper around mono_runtime_invoke() which
28364         boxes the instance object if neccessary.
28365
28366 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28367
28368         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
28369         metadata.h, row-indexes.h, verify.c: first cut of generics support.
28370
28371 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28372
28373         * icall.c: disable mcs bug workaround.
28374
28375 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
28376
28377         * object.c (mono_runtime_class_init): Take the metadata_section
28378         mutex before obtaining the domain mutex.
28379
28380         * appdomain.h: Added definition of metadata_section mutex here. 
28381
28382         * object.c: define metadata_mutex here.
28383
28384 2003-07-24  Ravi Pratap  <ravi@ximian.com>
28385
28386         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
28387         fixed.
28388
28389 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
28390
28391         * reflection.c: Fix bug #46669
28392
28393 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28394
28395         * exception.c:
28396         * exception.h:
28397         * icall.c:
28398         * object.h: fill in the type name for TypeLoadException.
28399
28400 2003-07-23  Ravi Pratap  <ravi@ximian.com>
28401
28402         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
28403         relationship between TypeBuilders while compiling corlib) and bug
28404         45993 (Array types returned from the runtime while compiling
28405         corlib were from the loaded corlib).
28406
28407 2003-07-22  Martin Baulig  <martin@ximian.com>
28408
28409         * mono-debug-debugger.c: Reworked the type support a bit more;
28410         distinguish between types and classes.
28411
28412 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
28413
28414         * icall.c: add IsArrayImpl icall.
28415
28416 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
28417
28418         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
28419         initializing real_size only once. Also fix bug #46602.
28420
28421 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
28422
28423         * object.c: Renamed mono_metadata_section to metadata_section.
28424
28425 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
28426
28427         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
28428           empty array if the type is an array. Fixed.
28429           ves_icall_MonoMethod_get_base_definition: if the base method
28430           is abstract, get the MethodInfo from the list of methods of
28431           the class.
28432         * reflection.c: ParameterInfo.PositionImpl should be zero-based
28433           and it was 1-based. Fixed in mono_param_get_objects.
28434
28435 2003-07-20  Martin Baulig  <martin@ximian.com>
28436
28437         * mono-debug.h: Set version number to 31.
28438         (mono_debug_init): Added `MonoDomain *' argument.
28439
28440         * mono-debug-debugger.c: Reworked the type support; explicitly
28441         tell the debugger about builtin types; pass the `klass' address to
28442         the debugger.
28443
28444 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
28445
28446         * image.c: Allow new metadata tables to be loaded without a
28447         warning. Also update the warning message to give the new constant value.
28448                 
28449 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
28450
28451         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
28452         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
28453         array type representation changes.
28454
28455 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28456
28457         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
28458         on Environment.Exit () call.
28459
28460 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28461
28462         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
28463         requires a matching corlib.
28464
28465 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
28466
28467         * Changelog: My editor decided to add a CR to each line. Sorry about that.
28468           Committed again without the CRs.
28469         
28470 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
28471
28472         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
28473           getting it from the "this" socket instance. Did not work
28474           if the socket is a subclass of Socket.
28475           Also fixed bug #35371.
28476
28477 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28478
28479         * metadata.c: fixed size for TypedByRef.
28480         * loader.c: when searching for a method, consider the vararg amrker.
28481         * unicode.c, decimal.c: constify some arrays.
28482
28483 2003-07-15  Dick Porter  <dick@ximian.com>
28484
28485         * socket-io.c: Fixed compilation for gcc < 3.2.
28486
28487         Fixed compilation for machines that don't have AF_INET6 (thanks to
28488         Bernie Solomon <bernard@ugsolutions.com> for that part.)
28489
28490         Fixed compile warnings.
28491         
28492         Fixed formatting and line endings.
28493
28494 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
28495
28496         * socket-io.h:
28497         * socket-io.c: Added IPv6 support.
28498
28499 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
28500
28501         * class.c (mono_class_is_assignable_from): New function to implement
28502         the is_assignable_from logic. Used by mono_object_isinst, 
28503         Type::IsAssignableFrom () and the interpreter.
28504
28505         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
28506         Object, even interfaces.
28507         
28508         * object.c (mono_object_isinst): Implement in terms of 
28509         is_assignable_from.
28510
28511         * icall.c (ves_icall_type_is_assignable_from): New icall.
28512
28513 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
28514
28515         * domain.c (foreach_domain): fix compiler warning.
28516
28517 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
28518
28519         * image.c (load_metadata_ptrs): use g_strndup because strndup is
28520         not available on all plattforms
28521
28522 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
28523
28524         * image.h image.c: Store the metadata version string in MonoImage.
28525         * icall.c: New icall to retrieve the image version.
28526         * reflection.c (create_dynamic_image): Fill in the image version field
28527         * reflection.c (build_compressed_metadata): Use the image version
28528         from the image structure.
28529
28530 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28531
28532         * appdomain.c: modified comment.
28533         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
28534         That will be its last iteration when mono_gc_cleanup is called from
28535         mono_runtime_cleanup and before the domain is unloaded.
28536
28537         Fixes bug #45962.
28538
28539 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
28540
28541         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
28542         attributes.
28543
28544 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28545
28546         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
28547         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
28548         Bernie Solomon <bernard@ugsolutions.com>.
28549
28550 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28551
28552         * object.c, object.h: provide mono_object_new_fast() for faster
28553         allocation in some special cases.
28554
28555 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
28556
28557         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
28558         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
28559
28560 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
28561
28562         * threadpool.c: fix leaks.
28563
28564 2003-07-01  Dick Porter  <dick@ximian.com>
28565
28566         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
28567         using MonoGHashTables.  Fixes threadpool bug posted to list.
28568
28569 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
28570
28571         * image.h, image.c: added support to load an assembly from a byte array.
28572         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
28573         assembly bundle support.
28574
28575 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
28576
28577         * threadpool.c (mono_thread_pool_add): keep a reference to the
28578         AsyncResult to prevent GC
28579
28580 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28581
28582         * class.c: leak fix.
28583
28584 2003-06-25  Dick Porter  <dick@ximian.com>
28585
28586         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
28587         for the async object, the WaitHandle object will close the handle.
28588         Fixes bug 45321.
28589
28590 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28591
28592         * class.c: in mono_array_class_get (), lookup from the hash with the
28593         same type we insert: this works around a bug in
28594         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
28595         lluis. The real fix will have to wait for after the release.
28596
28597 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28598
28599         * icall.c: fix memory leak when getting type members.
28600
28601 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28602
28603         * reflection.c: added more pubtoken special cases.
28604
28605 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
28606
28607         * class.c: handle field offset correctly when class size
28608         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
28609
28610 2003-06-20  Martin Baulig  <martin@ximian.com>
28611
28612         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
28613         *image' field.
28614
28615 2003-06-20  Martin Baulig  <martin@ximian.com>
28616
28617         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
28618
28619 2003-06-20  Martin Baulig  <martin@ximian.com>
28620
28621         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
28622         just distinguish between variables in registers and variables at
28623         an offset relative to a register.
28624
28625 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28626
28627         * icall.c: #ifdef out latest changes until mcs is fixed.
28628
28629 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28630
28631         * icall.c: return members in metadata order.
28632
28633 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28634
28635         * icall.c: avoid infinite loop in GetTimeZoneData.
28636
28637 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
28638
28639         * icall.c: added Marshal.Prelink/All icalls.
28640
28641 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28642
28643         * object.c, object.h: fix warnings and do some overflow checking
28644         when creating arrays.
28645
28646 2003-06-17  Dick Porter  <dick@ximian.com>
28647
28648         * file-io.h:
28649         * file-io.c: File attributes need to be tweaked slightly when
28650         passed from the managed to the w32 world.
28651
28652 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
28653         * profiler.h profiler-private.h profiler.c: Rework last patch
28654         based on suggestion by Paolo.
28655         
28656 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
28657
28658         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
28659         instruction level coverage data collection.
28660         * profiler.h profiler.c (: Added new callback function which can be
28661         used by the profiler to limit which functions should have coverage
28662         instrumentation.
28663         * profiler.c (mono_profiler_load): Call g_module_build_path to
28664         generate the file name of the profiler library.
28665
28666 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28667
28668         * profiler.c, profiler.h, profiler-private.h: added basic block 
28669         coverage profiling API.
28670
28671 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
28672
28673         * reflection.c (mono_reflection_create_runtime_class): Add support
28674         for events in dynamically generated code.
28675
28676         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
28677         not allocated.
28678
28679 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28680
28681         * icall.c: when getting timezone info, return reasonable values if we
28682         can't get the actual data.
28683
28684 2003-06-14  Dick Porter  <dick@ximian.com>
28685
28686         * threads.c (start_wrapper): Remove the reference to the thread
28687         object in the TLS data, so the thread object can be finalized.
28688         This won't be reached if the thread threw an uncaught exception,
28689         so those thread handles will stay referenced :-( (This is due to
28690         missing support for scanning thread-specific data in the Boehm GC
28691         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
28692
28693 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
28694
28695         * reflection.c: ensure streams and tables are first allocated with
28696         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
28697
28698 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28699
28700         * icall.c: fixed GetElementType for byrefs (bug# 44792).
28701
28702 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
28703
28704         * reflection.c (mono_reflection_create_runtime_class): Add support for
28705         properties to dynamically created classes.
28706         * reflection.c: Fix a few places where non-MonoObjects were inserted
28707         into the tokens hashtable.
28708
28709 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28710
28711         * object.c: some support to handle out of memory exceptions.
28712
28713 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
28714
28715         * marshal.c (mono_marshal_get_native_wrapper): support reference
28716         return types
28717
28718 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28719
28720         * object.h, object.c: more portability stuff from Bernie Solomon.
28721         Unexport mono_object_allocate(). Added mono_object_unbox ().
28722         Set exitcode when an unhandled exception is thrown.
28723
28724 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
28725
28726         * marshal.c (mono_marshal_get_native_wrapper): use custom
28727         marshaler for return types.
28728
28729 2003-06-10  Dick Porter  <dick@ximian.com>
28730
28731         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
28732         ip_mreq is available
28733
28734 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
28735
28736         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
28737         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
28738         by Bernie Solomon <bernard@ugsolutions.com>.
28739
28740 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
28741
28742         * gc.c (mono_gc_init): Avoid error message on shutdown when
28743         GC_DONT_GC=1 is used.
28744
28745         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
28746         New icall to return the GUID of a module.
28747
28748 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28749
28750         * class.c: ensure instance size always includes the parent's size
28751         even whem class size is set explicitly (fixes bug#44294).
28752
28753 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28754
28755         * profiler.h, profiler.c: made the simple profiler thread-safe,
28756         get more accurate timing info. Allow the loading of an
28757         externally-developed profiler module.
28758
28759 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
28760
28761         * marshal.c (mono_marshal_get_native_wrapper): improved
28762         class/byref arguments.
28763         (mono_marshal_get_native_wrapper): better string marshaling support.
28764
28765 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
28766
28767         * class.c: ensure .pack and .size are handled correctly and
28768         simplified layout of static fields.
28769
28770 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
28771
28772         * appdomain.c
28773         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
28774
28775         * loader.c (mono_lookup_pinvoke_call): look for modules in the
28776         current directory (fix bug 44008)
28777
28778 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
28779
28780         * marshal.c (mono_marshal_get_native_wrapper): started support for
28781         custom marshalers.
28782         (mono_delegate_to_ftnptr): consider marshalling specifications
28783
28784 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
28785
28786         * reflection.c, reflection.h: emit custom marshal info.
28787
28788 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28789
28790         * object.c: free the GError.
28791         * icall.c: added CloseEvent_internal.
28792         * threads.[ch]:
28793         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
28794         call.
28795
28796 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
28797
28798         * loader.c (mono_method_get_signature): Add support for dynamic
28799         assemblies.
28800
28801 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
28802
28803         * reflection.c: fixed bug #43905.
28804
28805 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28806
28807         * class.c, domain.c, icall.c, metadata.h, object.h: support for
28808         handling TypedReference and ArgIterator.
28809         * loader.c, loader.h: added function to get signature at call site.
28810
28811 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28812
28813         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
28814         data readonly. Buglets and warning fixes. Some MethodSpec support.
28815
28816 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28817
28818         * class.h, class.c, object.c: remove relative numbering support.
28819
28820 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
28821
28822         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
28823         free the string, until we get a chance to fix Gtk#
28824
28825 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28826
28827         * marshal.c: revert last patch.
28828
28829 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
28830
28831         * icall.c: updates for new mono_class_vtable() not calling
28832         the type constructor anymore.
28833
28834 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28835
28836         * object.h, object.c: separate vtable creation from type
28837         initialization. Make running the .cctor thread safe.
28838
28839 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
28840
28841         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
28842
28843 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
28844
28845         * loader.c (mono_get_method): consider calling convention
28846
28847 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
28848
28849         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
28850         to return the invisible global type for a module.
28851
28852         * reflection.c (mono_image_build_metadata): Emit global fields too.
28853
28854 2003-05-20  Peter Williams  <peterw@ximian.com>
28855
28856         * loader.c (mono_lookup_internal_call): Add a few newlines.
28857
28858 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
28859
28860         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
28861         literal strings.
28862
28863         * appdomain.c (set_domain_search_path): Recalculate search path when
28864         AppDomainSetup.PrivateBinPath changes.
28865
28866         * object.c (mono_class_compute_gc_descriptor): It turns out some
28867         parts of the class libs (like System.Thread) holds pointers to
28868         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
28869         to treat native int a pointer type here.
28870         
28871 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
28872
28873         * appdomain.h, domain.c: add hashtable for jump target resolution.
28874
28875 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
28876
28877         * reflection.h reflection.c icall.c: Added new icalls 
28878         GetManifestResourceInfoInternal, GetModulesInternal and support
28879         infrastructure.
28880
28881 2003-05-16  Dick Porter  <dick@ximian.com>
28882
28883         * icall.c:
28884         * file-io.h:
28885         * file-io.c: Implement System.IO.MonoIO::GetTempPath
28886
28887 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
28888
28889         * object.c: mono_store_remote_field: little fix to previous patch.
28890
28891 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28892
28893         * class.c: add constructors to array classes.
28894         * icall.c: special case array construction for InternalInvoke (),
28895
28896 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
28897
28898         * class.h class.c reflection.c object.c: Added support for field
28899         defaults in dynamically generated classes.
28900
28901 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
28902
28903         * reflection.c: properly encode charset for ddlimport.
28904
28905 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28906
28907         * threads.c: allow compiling without GC.
28908
28909 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28910
28911         * appdomain.h, object.c, object.h, threads.c, threads.h: added
28912         handling of thread static data.
28913
28914 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28915
28916         * reflection.h, reflection.c: added mono_custom_attrs_free ().
28917
28918 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
28919
28920         * class.c (mono_array_class_get): always set the serializable flags
28921         (mono_array_class_get): always set the SEALED attribute for array types
28922
28923 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
28924
28925         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28926         attributes (fix for bug 42021).
28927
28928 2003-05-12  Dick Porter  <dick@ximian.com>
28929
28930         * gc.c: Don't run finalizers when the finalizer thread is
28931         finishing up, because the default domain has already been
28932         destroyed.
28933
28934 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
28935
28936         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28937         value is null, we should throw an exception.   This is slightly
28938         different than the other conventions used for the constructor.
28939
28940 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28941
28942         * socket-io.c: fixed windows build.
28943
28944 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28945
28946         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28947
28948 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
28949
28950         * object.c (mono_string_new_wrapper): Compatibility fix for MS
28951         compilers.
28952
28953 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
28954
28955         * class.c (mono_class_layout_fields): Add experimental GC aware
28956         auto layout facility. Requires class library changes to work correctly.
28957
28958         (mono_class_setup_vtable): Avoid overriding explicit interface
28959         method implementations. Fixes iface3.exe test.
28960
28961         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28962         object reference.
28963         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28964         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28965
28966         * metadata.h: Add new type classification macro which determines
28967         whenever the type holds an object reference.
28968
28969 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
28970
28971         * marshal.c (mono_marshal_get_native_wrapper): cleanups
28972
28973 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
28974
28975         * gc.c (finalizer_thread): Work around a GC bug.
28976
28977 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
28978
28979         * marshal.c (emit_struct_conv): allow unions
28980
28981         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28982
28983 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
28984
28985         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28986
28987 2003-05-06  Martin Baulig  <martin@ximian.com>
28988
28989         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28990
28991 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28992
28993         * socket-io.c:
28994         (Select_internal): allow NULLs, don't create arrays if not needed.
28995         Coupled with Socket.cs changes.
28996
28997         * threadpool.c:
28998         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28999         register a finalizer for it that will close the semaphore handle. This
29000         fixes the leak and make Lupus' test run with > 4080 loops.
29001
29002 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
29003
29004         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
29005         Jerome Laban (bug #42287)
29006
29007 2003-05-02  Martin Baulig  <martin@ximian.com>
29008
29009         * debug-mono-symfile.h
29010         (MonoSymbolFile): Moved declaration into mono-debug.h.
29011         (MonoDebugMethodJitInfo): Likewise.
29012         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
29013         argument.
29014         (_mono_debug_address_from_il_offset): Take a
29015         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
29016
29017         * mono-debug.h
29018         (MonoDebugDomainData): New struct.
29019         (mono_debug_get_domain_data): New function.
29020         (mono_debug_add_method): Take an additional `MonoDomain *'
29021         argument.
29022         (mono_debug_source_location_from_address): Likewise.
29023         (mono_debug_il_offset_from_address): Likewise.
29024         (mono_debug_address_from_il_offset): Likewise.
29025
29026 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
29027
29028         * reflection.c: one more check for null type in custom attrs.
29029
29030 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29031
29032         * reflection.c: avoid warning (comparison is always false due to limited
29033         range of data type).
29034
29035 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29036
29037         * icall.c: throw an exception in Type.GetField if the argument 'name'
29038         is NULL.
29039
29040 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
29041
29042         * reflection.c: fixed handling of enums in named arguments to custom
29043         attributes (bug #42123).
29044
29045 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
29046
29047         * reflection.c: use the right array element type and handle
29048         a null for a Type argument, too.
29049
29050 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
29051
29052         * reflection.c: handle arrays as arguments to custom attributes.
29053
29054 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
29055
29056         * reflection.c: handle a string value in a custom attr
29057         ctor that takes an object.
29058
29059 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
29060
29061         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
29062         (fix bug #42063)
29063
29064 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
29065
29066         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
29067
29068 2003-04-27  Martin Baulig  <martin@ximian.com>
29069
29070         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
29071         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
29072         MONO_DEBUGGER_EVENT_BREAKPOINT.
29073         (mono_breakpoint_trampoline_code): Removed.
29074         (mono_debugger_event_handler): The last argument is now a
29075         `guint32'.
29076         (mono_debugger_insert_breakpoint_full): Removed the
29077         `use_trampoline' argument.
29078         (mono_debugger_method_has_breakpoint): Likewise.
29079         (mono_debugger_trampoline_breakpoint_callback): Renamed to
29080         mono_debugger_breakpoint_callback(); take the method and
29081         breakpoint number as arguments.
29082
29083 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
29084
29085         * metadata.c: fix off by one when loading parameters attributes.
29086
29087 2003-04-24  Martin Baulig  <martin@ximian.com>
29088
29089         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
29090
29091 2003-04-24  Martin Baulig  <martin@ximian.com>
29092
29093         * mono-debug-debugger.c: Moved all code which interacts with the
29094         Mono Debugger here.
29095
29096         * debug-mono-symfile.c: This code now just deals with the symbol
29097         file itself, the debugger code is now in mono-debug-debugger.c.
29098
29099 2003-04-23  Martin Baulig  <martin@ximian.com>
29100
29101         * mono-debug.c (mono_debug_source_location_from_il_offset):
29102         New method; like mono_debug_source_location_from_address(), but
29103         takes an IL offset instead of a machine address.
29104
29105 2003-04-23  Martin Baulig  <martin@ximian.com>
29106
29107         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
29108         `line' field; this is now computed by the debugger.
29109
29110 2003-04-23  Martin Baulig  <martin@ximian.com>
29111
29112         * mono-debug.[ch]: New files.  This is the new debugging interface.
29113
29114         * mono-debug-debugger.[ch]: New files.  Moved all code which
29115         interacts with the Mono Debugger here.
29116
29117 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
29118
29119         * domain.c (mono_init): initialize mono_defaults.monitor_class
29120
29121 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
29122
29123         * reflection.c (method_encode_code): Add a spicy exception to help
29124         future compiler authors.
29125
29126 2003-04-21  Martin Baulig  <martin@ximian.com>
29127
29128         * icall.c
29129         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29130         Make this work with relative pathnames; g_filename_to_uri() needs
29131         an absolute filename.
29132
29133 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
29134
29135         * icall.c: Track name changes in Object and ValueType.
29136
29137 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
29138
29139         * metadata.c (mono_type_stack_size): size should be a multiple of
29140         sizeof (gpointer)
29141
29142 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29143
29144         * gc.c:
29145         (internal_domain_finalize): moved into mono_domain_finalize. No need
29146         to create another thread because the finalizers will be run in the
29147         finalizer thread.
29148         
29149         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
29150         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
29151         to be run (MS does this too).
29152
29153 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
29154
29155         * object.c (mono_class_compute_gc_descriptor): Update comment.
29156
29157         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
29158
29159         * image.h: Add synchronized wrapper cache.
29160
29161         * image.c (do_mono_image_open): Initialize cache.
29162
29163         * reflection.c (create_dynamic_mono_image): Initialize cache.
29164
29165 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29166
29167         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
29168         ves_icall_System_Buffer_ByteLengthInternal.
29169
29170 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
29171
29172         * reflection.c: setup klass->nested_in earlier. Allow
29173         a dash in the assembly name.
29174
29175 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
29176
29177         * metadata.c (mono_type_to_unmanaged): dont access
29178         type->data.klass for MONO_TYPE_OBJECT
29179         (mono_type_to_unmanaged): consider System.Delegate class
29180
29181 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
29182
29183         * class.c: just setup supertypes in the proper place instead of
29184         initializing the full element class for arrays.
29185
29186 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
29187
29188         * class.c: ensure the element class of arrays is initialized.
29189         Setup the supertype info for array classes, too.
29190
29191 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
29192
29193         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
29194
29195 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29196
29197         * Makefile.am: re-added -m option when running cygpath. This way,
29198         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
29199         separator.
29200         * mono-config.c: same codepath for locating mono config file for WIN32
29201         and the rest.
29202         * assembly.c: if mono_assembly_setrootdir is called, don't override
29203         the value set.
29204
29205 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29206
29207         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
29208         MONO_ASSEMBLIES variable.
29209
29210 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
29211
29212         * icall.c: added Assembly::GetNamespaces() icall.
29213
29214 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29215
29216         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
29217
29218 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
29219
29220         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
29221         * object.c: fixed bug in the construction of vtable for proxies
29222
29223 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
29224
29225         * object.c (mono_array_new): Mark mono_array_new as an icall.
29226
29227 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29228
29229         * class.c: fixed test for public method when overriding interfaces.
29230         Closes bug #40970.
29231
29232 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
29233
29234         * appdomain.h, domain.c: added mono_domain_foreach() to
29235         be able to access the currently loaded appdomains.
29236         * object.c: make string interning work across sppdomains.
29237         Mark some functions for use as icalls.
29238
29239 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
29240
29241         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
29242
29243         * reflection.h reflection.c: Allocate long living data using 
29244         GC_MALLOC_ATOMIC so the collector does not need to scan it.
29245
29246         * reflection.c: Double the allocation size in streams instead of
29247         increasing it, to prevent unneccesary copying on large assemblies.
29248         
29249         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
29250         creation if the assembly does not have the Run flag set.
29251
29252 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
29253
29254         * class.h: avoid the C++ keywords in header files (Jerome Laban
29255         spotted and fixed this).
29256
29257 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29258
29259         * object.c:
29260         (mono_unhandled_exception): fill in the arguments for the
29261         UnhandledException event. Only trigger that event for the default
29262         domain (as MS does).
29263
29264 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
29265
29266         * object.c: Improve typed allocation stuff based on suggestions from
29267         Paolo. Also turn it on if the GC library supports it.
29268
29269 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
29270
29271         * object.c object.h class.h: Added experimental typed allocation
29272         facility using the interfaces in gc_gcj.h.
29273
29274         * os/gc_wrapper.h: Added new include files.
29275         
29276 2003-04-03  Martin Baulig  <martin@ximian.com>
29277
29278         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
29279         which is not yet enabled by default.
29280
29281         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
29282         functions.
29283         (mono_gc_lock, mono_gc_unlock): New static functions.
29284
29285         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
29286         functions; stop/start the world for the garbage collector.  This
29287         is using the windows API; we need to complete the SuspendThread()/
29288         ResumeThread() implementation in the io-layer to make this work on Unix.
29289         (mono_gc_push_all_stacks): New public function; tells the garbage
29290         collector about the stack pointers from all managed threads.
29291
29292 2003-04-03  Martin Baulig  <martin@ximian.com>
29293
29294         * object.h (MonoThread): Added `gpointer stack_ptr'.
29295
29296         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
29297
29298 2003-04-03  Martin Baulig  <martin@ximian.com>
29299
29300         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
29301
29302 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
29303
29304         * reflection.c (typebuilder_setup_fields): Initialize field.first and
29305         field.last.
29306
29307 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
29308
29309         * loader.c (mono_lookup_internal_call): Report the corlib that is
29310         out of sync.
29311
29312 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
29313
29314         * icall.c (ves_icall_type_GetTypeCode): fixed check for
29315         System.DBNull (it's class not valuetype).
29316
29317 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
29318
29319         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
29320         if the array method was already assigned a token (fixes bug#40646).
29321
29322 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
29323
29324         * reflection.c (mono_reflection_get_type): Attempt type resolve even
29325         if no assembly is given.
29326
29327 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
29328
29329         * metadata.h: Added the new tables.
29330
29331         * row-indexes.h: Added definitions for new tables.
29332
29333         * metadata.c: Add schemas for new tables, and add support for
29334         computing the sizes of them.
29335
29336         * class.c: Update for handling the new type cases.
29337
29338 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
29339
29340         * metadata.h (MONO_TYPE_IS_VOID): new macro
29341
29342 2003-03-31  Martin Baulig  <martin@ximian.com>
29343
29344         * threads.h (MonoThreadCallbacks): Added `thread_created'.
29345
29346         * threads.c (mono_thread_new_init): Call `thread_created' in the
29347         mono_thread_callbacks.
29348
29349 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
29350
29351         * loader.h: added marshalbyrefobject_class to mono_defaults
29352         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
29353         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
29354           generation of output parameters.
29355           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
29356         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
29357           contextbound and the target object belongs to the context of the caller.
29358         * object.h: added context and unwrapped_server variables in MonoRealProxy.
29359         * object.c: Implemented support for interfaces and abstract classes
29360           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
29361           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
29362
29363 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
29364
29365         * class.h class.c (mono_class_is_subclass_of): New function.
29366         
29367         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
29368         routines for most common case (calls from ArrayList::ToArray).
29369
29370         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
29371         routine so programs which call Environment::Exit() can be profiled.
29372
29373         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
29374         Added MONO_ARCH_SAVE_REGS.
29375
29376         * icall.c (ves_icall_type_is_subtype_of): Use new function.
29377
29378 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
29379
29380         * blob.h: Add a couple of new MonoType types definitions.
29381
29382         * tabledefs.h: Add a couple of new call convs.
29383
29384 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
29385
29386         * reflection.h (MonoReflectionDynamicAssembly): track changes in
29387         the layout of the class.
29388
29389         * reflection.c (alloc_table): double the size on overflow to avoid
29390         unnecessary copying.
29391
29392         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
29393         avoid filling out metadata tables and blobs. Also set mb->ilgen to
29394         null so it can be garbage collected.
29395         
29396 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
29397
29398         * reflection.c (mono_reflection_get_type): Return the resolved type
29399         only if it is in the assembly we searched.
29400
29401         * reflection.c (ensure_runtime_vtable): Initialize method slots.
29402
29403         * class.c (mono_class_setup_vtable): Set the slot of the overriding
29404         method.
29405
29406 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29407
29408         * appdomain.c:
29409         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
29410         the right one is 'file:///blah', but MS allows it.
29411         * assembly.c:
29412         (mono_assembly_open): allow 'file://blah'
29413
29414         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
29415
29416 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
29417
29418         * socket-io.c: fixes bug #40310.
29419
29420 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
29421
29422         * reflection.c (mono_reflection_parse_type): handle deeply nested
29423         types correctly.
29424
29425         * reflection.c (mono_image_create_token): Use unique token values
29426         since they will be put into a hash table.
29427
29428         * class.c (mono_class_setup_vtable): If a method occurs in more than
29429         one place in the vtable, and it gets overriden, then change the
29430         other occurances too.
29431
29432         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
29433         object as return type.
29434
29435 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
29436
29437         * icall.c: Deleted "ToString" implementation for double and float
29438         because they are full implemented in managed code.
29439
29440 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29441
29442         * reflection.c, reflection.h: implemented and exported functions
29443         to retrieve info about custom attributes.
29444
29445 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29446
29447         * appdomain.c: moved Uri handling to assembly.c
29448         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
29449         work when using a file Uri in *nix and windows.
29450
29451         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
29452         GetReferencedAssemblies.
29453
29454 2003-03-18  Dick Porter  <dick@ximian.com>
29455
29456         * icall.c: Rename a couple of internal calls
29457
29458         * threads.c: Set the thread state to Stopped when a thread exits.
29459         Fixes bug 39377.
29460
29461 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
29462
29463         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29464         New icall.
29465
29466         * object.c (mono_class_vtable): fix warning.
29467
29468 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
29469
29470         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
29471
29472         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
29473         memory.
29474         (method_encode_clauses): Create exception info structures in the right
29475         order.
29476         (mono_reflection_setup_internal_class): Initialize supertypes field.
29477
29478         * class.c object.c: Handle interfaces which implement other interfaces 
29479         correctly.
29480
29481         * class.h class.c: Move the supertypes array initialization code into 
29482         a separate function so it can be used for dynamic types too. Also call
29483         it earlier, in mono_class_init(), since it can be used before the
29484         type is initialized.
29485
29486 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29487
29488         * Makefile.am:
29489         * assembly.c:
29490         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
29491
29492         * appdomain.c:
29493         * appdomain.h:
29494         * marshal.c:
29495         * object.c: remove warnings.
29496
29497 2003-03-13  Martin Baulig  <martin@ximian.com>
29498
29499         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
29500         (MonoDebugLexicalBlockEntry): New types.
29501
29502         * debug-mono-symfile.c
29503         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
29504
29505 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29506
29507         * process.c: ret can be any non-zero value accroding to MS doc.
29508
29509 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
29510
29511         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
29512         fixing a warning for a miss-used prototype, would have cause
29513         random memory corruption.
29514
29515 2003-03-07  Martin Baulig  <martin@ximian.com>
29516
29517         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
29518         getting really annoying ....
29519
29520 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
29521
29522         * reflection.c (fixup_method): added support for array methods.
29523
29524 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
29525
29526         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
29527         (pointed out by Michael Adams).
29528
29529 2003-03-04  Dick Porter  <dick@ximian.com>
29530
29531         * icall.c: Temporarily reverted the Double and Single ToString()
29532         change, because it broke nunit.
29533
29534 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
29535
29536         * object.h, threads.h: make include files compatible with C++
29537         (patch by Jerome Laban <jlaban@wanadoo.fr>).
29538
29539 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
29540
29541         * icall.c: Erased ToString helper functions for Double and Single.
29542         Now, that implementations ar all in managed code (Double and Single
29543         Formatters).
29544
29545 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
29546
29547         * appdomain.c: Added method for initializing the default context of
29548         a domain. Added internal call for getting the default context.
29549         * appdomain.h: Added context variable in MonoDomain struct.
29550         * domain.c: mono_domain_set also sets the default context of the domain
29551         * icall.c: Mapped internal method InternalGetDefaultContext.
29552         * object.c: mono_object_get_virtual_method returns always a remoting
29553         wrapper if the object is a transparent proxy.
29554         mono_runtime_invoke_array: when creating an object by calling the
29555         constructor, if the created object is a proxy, then the constructor should
29556         be called using the a remoting wrapper.
29557
29558 2003-03-03  Dick Porter  <dick@ximian.com>
29559
29560         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
29561         variable so it compiles on solaris.  Problem spotted by
29562         Christopher Taylor <ct@cs.clemson.edu>
29563
29564 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29565
29566         * appdomain.c:
29567         (get_info_from_assembly_name): don't leak value.
29568
29569         * icall.c:
29570         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
29571         result.
29572
29573 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
29574
29575         * assembly.c: export mono_image_load_references ().
29576         * class.c: handle function pointers. mono_class_from_name() now
29577         supports nested type names directly.
29578
29579 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
29580
29581         * reflection.h reflection.c: Encode already created dynamic methods 
29582         and fields correctly as a DEF instead of a REF.
29583
29584         * reflection.c: Get rid of the force_ref argument to 
29585         mono_image_typedef_or_ref since it was wrong in the first place.
29586
29587         * string-icalls.c: add error checking to string constructors according
29588         to the MSDN docs.
29589
29590         * reflection.c: Emit types in the order their TypeBuilders were 
29591         created. Previously, a new table index was assigned to each type before
29592         the tables were emitted. This was wrong because the signature blob
29593         might already refer to a type by its original table index.
29594
29595 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
29596
29597         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
29598         change.
29599         
29600 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29601
29602         * Makefile.am: make assemblies dir have \ instead of / on windows.
29603
29604 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
29605
29606         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
29607         iterate over the NESTEDCLASS table using a linear search since the
29608         table is not guaranteed to be sorted by the secondary key.
29609
29610         * class.c (mono_class_create_from_typedef): fixed up call to
29611         mono_metadata_nesting_typedef.
29612         
29613 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
29614
29615         * marshal.c (mono_string_to_byvalstr): clear the memory as
29616         suggested by Jerome Laban <jlaban@wanadoo.fr>
29617
29618 2003-02-26  Dick Porter  <dick@ximian.com>
29619
29620         * process.c: Cope with padding in .rsrc blocks
29621
29622 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
29623
29624         * metadata.h: reverted the filter_len change, it breaks reflection
29625         
29626 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
29627
29628         * metadata.h: added a new field to store the filter_len
29629         
29630
29631 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
29632
29633         * reflection.c: handle custom attributes for types and members
29634         created with Reflection.Emit (bug#38422).
29635
29636 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
29637
29638         * reflection.c: define RTSpecialName automatically for constructors for
29639         compatibility with MS.NET.
29640
29641         * reflection.c (mono_reflection_create_runtime_class): initialize
29642         nested_in field of dynamically created classes.
29643
29644 2003-02-22  Martin Baulig  <martin@ximian.com>
29645
29646         * debug-mono-symfile.h: Incremented version number.
29647
29648 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
29649
29650         * object.h icall.c process.c: fix warnings.
29651
29652 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
29653
29654         * appdomain.h appdomain.c:
29655         (mono_domain_try_type_resolve): split the 
29656         name_or_tb argument into a name and a tb argument.
29657         (mono_domain_has_type_resolve): new function to check whenever the
29658         application has registered a TypeResolve event handler.
29659         
29660         * icall.c reflection.h reflection.c: move the type resolve logic into
29661         mono_reflection_get_type () so it will be invoked when 
29662         Assembly::GetType () is called.
29663
29664         * reflection.c:
29665         (mono_reflection_get_type): renamed to get_type_internal.
29666         (mono_reflection_get_type): fixed type name generation so it works 
29667         for nested types too.
29668         (mono_reflection_get_type): call has_type_resolve () to avoid the 
29669         costly type name generation if there is no resolve event handler.
29670
29671 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29672
29673         * class.c, image.c: load exported types from file references.
29674
29675 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
29676
29677         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
29678           used to cache the managed methods used to create proxies and make 
29679           remote invocation of methods.
29680         * class.h: Added in MonoVTable a flag to indicate that a class needs 
29681           to be remotely created.
29682         * object.c: Modified the method mono_class_vtable(). It now initializes 
29683           the remote flag of the vtable. Modified mono_object_new_specific(), 
29684           so now it checks the remote flag.
29685         * icall.c: Added a couple of internal methods, one for enabling instance 
29686           creation interception for a type, and one for creating objects bypassing
29687           the remote check.
29688
29689 2003-02-18  Martin Baulig  <martin@ximian.com>
29690
29691         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
29692         New interncall to get a method's metadata token.
29693
29694         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
29695         New interncall for the debugger.
29696
29697 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
29698
29699         * class.c (mono_class_setup_vtable): allocate supertype array
29700
29701 2003-02-18  Martin Baulig  <martin@ximian.com>
29702
29703         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
29704
29705 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29706
29707         * reflection.c:
29708         (assembly_name_to_aname): jump over unknown properties (i've found
29709         something like: 'type, assembly, version=xxx, custom=null, public...',
29710         so now will ignore custom=null and still get the rest of the values).
29711
29712 2003-02-17  Dick Porter  <dick@ximian.com>
29713
29714         * threads.c: Have Thread.Start() wait for a semaphore to signal
29715         that the thread has set up all its local data.  This fixes bug
29716         34323, where Abort() raced the new thread's TLS data.
29717
29718         Also removes the handle_store() call from start_wrapper, because
29719         threads are now always created suspended and there is no longer a
29720         race between the parent and child threads to store the info.
29721
29722 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
29723
29724         * image.c: explain the #- heap issue in a message, hopefully
29725         avoiding FAQs on mono-list.
29726
29727 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29728
29729         * icall.c:
29730         (GetEntryAssembly): if the domain has not invoked
29731         AppDomain.ExecuteAssembly yet, return the assembly of the default
29732         AppDomain.
29733
29734 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
29735
29736         * class.c (mono_ldtoken): make it work in dynamic assemblies.
29737
29738 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
29739
29740         * metadata.c, reflection.c: simple speedup to type hash
29741         and equals code.
29742
29743 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
29744
29745         * image.c, image.h, class.c, assembly.c: move module loading
29746         to MonoImage. When loading metadata, consider alignemnet from
29747         the start of metadata, not from the metadata address in memory.
29748
29749 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
29750
29751         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
29752         AssemblyBuilder objects. Factored out custom attribute creation into
29753         a separate function.
29754         (create_custom_attr): new function to create custom attributes.
29755
29756 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
29757
29758         * Makefile.am: Got tired of typing the full pathname to pedump.
29759         Until there is another option, am installing this.
29760
29761 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
29762
29763         * class.c (class_compute_field_layout): always set field->parent 
29764         (mono_ldtoken): use mono_defaults.fieldhandle_class;
29765
29766 2003-02-11  Dick Porter  <dick@ximian.com>
29767
29768         * threads-types.h:
29769         * monitor.c: Rewrote Monitor, making lock much faster and
29770         Pulse/Wait work as specified.  Also uses much fewer handles, and only
29771         creates them as needed.
29772
29773         * exception.c: Added SynchronizationLockException
29774
29775         * threads.c: Deleted old Monitor implementation.  The new one is
29776         in a new file.
29777
29778 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
29779
29780         * class.c: handled TypedReference type code. Set the correct size for
29781         class data. Setup interface_offsets for interface classes, too.
29782
29783 2003-02-09  Martin Baulig  <martin@ximian.com>
29784
29785         * debug-mono-symfile.h: Reflect latest symbol writer changes.
29786
29787 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
29788
29789         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
29790         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
29791         * object.c: fixed mono_object_get_virtual_method () for interfaces.
29792         * verify.c: check for code that runs after the end of the method.
29793
29794 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
29795
29796         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
29797         "System.Math::Round2".
29798         * sysmath.h: Added Floor, Round and Round2 definitions.
29799         * sysmath.c: Modified certain functions that were not 100% compliant
29800         with MS.NET (math precision) and added the implementation of Floor,
29801         Round and Round2.
29802
29803 2003-02-07  Martin Baulig  <martin@ximian.com>
29804
29805         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
29806
29807 2003-02-07  Martin Baulig  <martin@ximian.com>
29808
29809         * debug-mono-symfile.c: Reflected latest symwriter changes.
29810         (mono_debug_create_mono_symbol_file): Removed.
29811         (mono_debug_open_mono_symbol_file): Take an argument which
29812         specifies whether to create a dynamic symbol file.
29813
29814 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
29815
29816         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
29817
29818 2003-02-05  Martin Baulig  <martin@ximian.com>
29819
29820         * reflection.c (mono_image_build_metadata): Make this public,
29821         protect it against being called multiple times, don't create
29822         resources and don't build the compressed metadata here.
29823         (mono_image_create_pefile): Do this here.
29824
29825         * icall.c
29826         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
29827
29828 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29829
29830         * socket-io.c: fixed bug #36322.
29831
29832 2003-02-06  Piers Haken <piersh@friskit.com>
29833
29834         * appdomain.[ch]:
29835         * class.h:
29836         * debug-mono-symfile.c:
29837         * icall.c:
29838         * loader.c:
29839         * mono-config.c:
29840         * monosn.c:
29841         * reflection.c:
29842         * socket-io.c: warning cleanups
29843
29844 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
29845
29846         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
29847         function. works like remoting invoke, but does a check for the Proxy first.
29848
29849 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
29850
29851         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
29852
29853 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
29854
29855         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
29856         array of pointers.
29857         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
29858         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
29859
29860         * object.c (mono_store_remote_field_new): used by the new jit
29861         instead of mono_store_remote_field
29862         (mono_load_remote_field_new): used by the new jit
29863         instead of mono_load_remote_field
29864
29865 2003-02-05  Patrik Torstensson
29866
29867         * appdomain.c: changed unload to take the domain id instead
29868         of domain
29869         
29870         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
29871
29872
29873 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29874
29875         * appdomain.c: don't look for assemblies in ApplicationBase if
29876         PrivateBinPathProbe is set.
29877
29878 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29879
29880         * object.c: make the first argument in main_args contain the absolute
29881         path to the assembly. Fixes bug #37511.
29882
29883 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29884
29885         * icall.c: get correct UTC offset for countries not using daylight
29886         time saving. Fixes bug #30030.
29887
29888 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29889
29890         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
29891         and 1 are the family).
29892
29893 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
29894
29895         * icall.c (ves_icall_InternalExecute): removed wrong assertion
29896
29897         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
29898
29899 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
29900
29901         * reflection.c: added support for SignatureHelper tokens, which is
29902         needed by the Calli opcode.
29903
29904         * reflection.h: track changes to SignatureHelper class.
29905
29906         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29907
29908 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29909
29910         * appdomain.c: fixed loading assemblies from PrivateBinPath.
29911
29912 2003-02-03  Patrik Torstensson
29913         * appdomain.[c|h], domain.c : 
29914          - Added support for getting a domain via domain id
29915          - Support for setting and getting domain from System.AppDomain 
29916            (used in cross appdomain channel)
29917          - Added support for get/set for a MonoAppContext on a thread 
29918            (Context class in System.Runtime.Remoting.Contexts),
29919          - Removed hack in Get/SetData and ExecuteAssembly.
29920         
29921         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29922         the managed world to get control when a proxy is created.
29923
29924         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29925         
29926 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
29927
29928         * icall.c
29929         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29930         Populate the codebase field as well.
29931
29932 2003-02-02  Martin Baulig  <martin@ximian.com>
29933
29934         * debug-mono-symfile.c
29935         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29936         (mono_debug_symfile_add_method): Allow interncalls.
29937
29938 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29939
29940         * icall.c: throw parse exception if strtod fails or the string is empty.
29941
29942 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29943
29944         * marshal.c: handle object type separately from defined
29945         class types.
29946
29947 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29948
29949         * marshal.c: handle NATIVE_LPSTR for strings when it's
29950         explicitly specified.
29951
29952 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29953
29954         * reflection.c, reflection.h, icall.c: setup the reflection
29955         handle cache for ModuleBuilders and AssemblyBuilders.
29956
29957 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
29958
29959         * reflection.c (reflection_methodbuilder_to_mono_method): set
29960         pinvoke flag
29961
29962 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29963
29964         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29965
29966 2003-01-29  Dick Porter  <dick@ximian.com>
29967
29968         * threads.c: No need for the fake_thread kludge now that Thread
29969         doesn't run a class constructor
29970         
29971 2003-01-29  Dick Porter  <dick@ximian.com>
29972
29973         * threads.c: Use g_direct_hash instead of the rather bogus
29974         g_int_hash
29975
29976 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
29977
29978         * marshal.c (mono_marshal_get_native_wrapper): add check for null
29979         (fix pinvoke12.exe)
29980         (mono_marshal_get_struct_to_ptr): generate valid IL code
29981         (mono_marshal_get_ptr_to_struct): generate valid IL code
29982         (*): correctly set sig->pinvoke, we need to memdup the signature
29983         to do that
29984
29985 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29986
29987         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29988         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29989
29990 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29991
29992         * profiler.c: provide more callers information.
29993
29994 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
29995
29996         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29997
29998         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29999
30000         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
30001
30002 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
30003
30004         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
30005         exception instead of going into an infinite loop on dates which it 
30006         can't yet handle.
30007
30008         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
30009         out-of-range exception if needed.
30010
30011         * class.c (mono_class_setup_vtable): allow a virtual method to provide
30012         an implementation for an interface method and to override an inherited
30013         method at the same time. 
30014         Imagine a scenario when a virtual method is used to override a
30015         virtual abstract method in a parent class, and this same method 
30016         provides an implementation for an method inherited from an interface. 
30017         In this case, the interface resolution code will set im->slot, which 
30018         means that the virtual method override pass will skip this method 
30019         which means a pointer to the abstract method inherited from the parent
30020         will remain in the vtable of this non-abstract class.
30021
30022         * class.c: (mono_class_setup_vtable): continue search for a real 
30023         method if only an abstract method is found.     
30024
30025 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
30026
30027         * reflection.c: add size to encoding for ByValStr and ByValArray
30028         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
30029
30030 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
30031
30032         * class.c (mono_class_setup_vtable): pass the override info as an
30033         argument.
30034
30035         * class.c (mono_class_setup_vtable): set the slot of overriding methods
30036         correctly.
30037         
30038         * reflection.c (ensure_runtime_vtable); add support for method 
30039         overrides.
30040         
30041 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
30042
30043         * reflection.c (resolution_scope_from_image): Hack to work to work with
30044         dynamic assemblies.
30045
30046         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
30047         added a 'force_ref' argument to force this function to allways return 
30048         a TypeRef. This is needed by mono_image_get_memberref_token ().
30049         
30050 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
30051
30052         * reflection.c (mono_image_get_type_info): interfaces really don't have
30053         a parent.
30054
30055         * reflection.c (mono_image_basic_init): fill out missing fields of
30056         image structure.
30057
30058         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
30059         dynamic assemblies. This is required so dynamic assemblies show up in
30060         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
30061         Type::GetType() etc. This is consistent with MS behaviour.
30062
30063         * image.c image.h reflection.c: add newly created classes to the name 
30064         cache so mono_class_get () will find them.      
30065
30066 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
30067
30068         First part of changes to get IKVM.NET running under mono.
30069         
30070         * appdomain.h, appdomain.c: added new function 
30071         mono_domain_try_type_resolve() which will emit TypeResolve events. 
30072         This function will call AppDomain::DoTypeResolve to do the actual work.
30073
30074         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
30075         moved existing code dealing with dynamic tokens to a new function 
30076         called mono_reflection_lookup_dynamic_token (). This function will 
30077         raise TypeResolve events when appropriate. Since reflection.c is not 
30078         part of libmetadata, a new hook function called 
30079         mono_lookup_dynamic_token() is added to class.c which will call this.
30080
30081         * assembly.h assembly.c: make the invoke_load_hook function public,
30082         so it can be called for dynamic assemblies.
30083
30084         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
30085
30086         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
30087         type isn't found.
30088
30089         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
30090         MonoGHashTable, since it contains pointers to objects which the GC 
30091         needs to track.
30092
30093         * assembly.c (search_loaded): remove unused variable.
30094         
30095 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
30096
30097         * object.c: fixed issue exposed by gcc-generated IL programs
30098         that use RVA data for pointers.
30099
30100 2003-01-25  Martin Baulig  <martin@ximian.com>
30101
30102         * threads.c (start_wrapper): Moved the initialization of
30103         `start_func' above the mono_new_thread_init() call to which we
30104         pass it as argument.
30105
30106 2003-01-24  Martin Baulig  <martin@ximian.com>
30107
30108         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
30109         the MonoThread pointer.
30110
30111 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
30112
30113         * icall.c: Rename `PowImpl' to Pow.
30114
30115 2003-01-23  Dick Porter  <dick@ximian.com>
30116
30117         * threads.c (start_wrapper): Create a Thread object if needed, so
30118         the Main() thread can do the class initialisation in a subthread
30119         that has been set up to allow managed code execution.
30120
30121         Pass the thread ID instead of the MonoThread pointer to the thread
30122         start and attach callbacks.  This change is required, because the
30123         jit thread start callback must be called _before_ the Thread
30124         object can be created.
30125         
30126         (mono_thread_init): Removed much object creation code that is no
30127         longer needed.  No managed code is called from here now.
30128
30129         * object.c (mono_runtime_exec_managed_code): Create a subthread
30130         for Main, and call back to the runtime to use it.
30131         Set the exit code when Main exits.
30132
30133         * gc.c: Make sure domain finalisation happens in a subthread.
30134         Re-enable threaded GC, fixing bug 31333 (again).
30135
30136         * environment.c: System.Environment internall calls (so far just
30137         ExitCode is here, the others are still in icall.c)
30138
30139         * appdomain.c (mono_runtime_cleanup): All threads running managed
30140         code should have finished before mono_runtime_cleanup() is
30141         reached, so no need to clean up threads.
30142
30143 2003-01-22  Martin Baulig  <martin@ximian.com>
30144
30145         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
30146         `gpointer func' arguments.      
30147         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
30148         but added `MonoThread *thread' argument.
30149         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
30150
30151         * threads.c (mono_new_thread_init): Added `gpointer func' argument
30152         and pass it to the mono_thread_start_cb callback.
30153         (mono_install_thread_callbacks): New public function to install a
30154         set of callbacks which are set by the debugger.
30155         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
30156
30157 2003-01-22  Martin Baulig  <martin@ximian.com>
30158
30159         * Makefile.am: Install debug-mono-symfile.h.
30160
30161 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
30162
30163         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
30164
30165 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
30166
30167         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
30168         * class.c (mono_ptr_class_get): correctly set access levels of pointers
30169         (mono_array_class_get): correctly set access levels of arrays
30170
30171 2003-01-20      Patrik Torstensson
30172         * image.h (MonoAssemblyName): changed major, minor, build, revision
30173         from signed to unsigned.
30174
30175 2003-01-20  sean kasun <skasun@azstarnet.com>
30176
30177         * reflection.c (load_cattr_value): Now this handles
30178         MONO_TYPE_SZARRAY.  Fixes bug #35629
30179
30180 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
30181
30182         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
30183         integer value
30184
30185 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30186
30187         * decimal.c: fixed bug #26056.
30188
30189 2003-01-17  Martin Baulig  <martin@ximian.com>
30190
30191         * gc.c: Raise an ExecutionEngineException instead of using g_error().
30192
30193 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30194
30195         * exception.[ch]:
30196         (mono_get_exception_type_initialization): new function.
30197
30198         * object.c: throw a TypeInitializationException when an exception is
30199         thrown invoking the class constructor.
30200
30201 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30202
30203         * reflection.c: fixed attribute reading.
30204
30205 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30206
30207         * icall.c:
30208         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
30209         provided, look for the type in the calling assembly and then in
30210         mscorlib; if the assembly name is provided, only try that one.
30211
30212 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
30213
30214         * object.c: register the vtable before there is a chance it's
30215         queried again recursively.
30216
30217 2003-01-13  Duncan Mak  <duncan@ximian.com>
30218
30219         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
30220         gc-internal.h. 
30221         
30222 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
30223
30224         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
30225
30226 2003-01-11  Martin Baulig  <martin@ximian.com>
30227
30228         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
30229         this to 20 for the release.
30230
30231 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
30232
30233         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
30234
30235         * loader.c (mono_method_get_marshal_info): bug fix
30236
30237         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
30238         structures with explicit layout
30239
30240 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30241
30242         * profiler.c: made the output more readable (and sorted). 
30243         Added caller information for the allocation profiler.
30244
30245 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
30246
30247         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
30248
30249 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30250
30251         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
30252         to get value types.
30253         
30254 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
30255
30256         * object.c, profiler.h, profiler.c, profiler-private.h:
30257         Added object allocation profiler.
30258
30259 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
30260
30261         * reflection.h, reflection.c: handle global methods.
30262         Compress blob entries.
30263
30264 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
30265
30266         * marshal.c: fix compilation.
30267
30268 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
30269
30270         * loader.c (mono_method_get_marshal_info): impl.
30271
30272         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
30273
30274 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30275
30276         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
30277         for reference types.
30278
30279 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
30280
30281         * loader.c: fixed off by one error in loaded parameter names.
30282
30283 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
30284
30285         * marshal.c (mono_marshal_get_icall_wrapper): like
30286         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
30287         instead of a MonoMethod.
30288
30289 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30290
30291         * decimal.c: fixed bug #36537.
30292
30293 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
30294
30295         * marshal.c: throw a missing method exception if a
30296         P/Invoke method is not found.
30297
30298 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30299
30300         * icall.c: allow a null this for constructors.
30301
30302 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
30303
30304         * icall.c: raise the proper exceptions if the arguments to the
30305         internal Invoke are incorrect.
30306
30307 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
30308
30309         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
30310
30311 2003-01-03  Martin Baulig  <martin@ximian.com>
30312
30313         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30314
30315 2002-12-31  Martin Baulig  <martin@ximian.com>
30316
30317         * debug-mono-symfile.c: Completely rewrote the type section.
30318         Instead of using individual malloc()ed fields, we use one big
30319         continuous memory area and offsets into this area.
30320         See the comments in the source code for details.
30321
30322 2002-12-30  Martin Baulig  <martin@ximian.com>
30323
30324         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
30325
30326 2002-12-30  Martin Baulig  <martin@ximian.com>
30327
30328         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
30329         line number table in this data blob instead of using an external
30330         pointer.
30331
30332 2002-12-28  Martin Baulig  <martin@ximian.com>
30333
30334         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30335
30336 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
30337
30338         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
30339         as a boxed return type.
30340
30341 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
30342
30343         * appdomain.c
30344         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
30345         g_build_filename to properly get separators on the filename created.
30346
30347         * object.h: Small change, introduce MonoMarshalByRefObject to
30348         track the layout of that structure in the C# universe as we make
30349         changes there.
30350
30351 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
30352
30353         * object.c: removed assert to allow static fields on interfaces.
30354         * loader.c: a TypeSpec may be used for any type, not just arrays.
30355
30356 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30357
30358         * class.c, class.h: added mono_class_array_element_size ().
30359         Ignore static methods in interfaces.
30360
30361 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30362
30363         * threads.c: fixed the build under cygwin.
30364
30365 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
30366
30367         * reflection.c: handle nullref constants. Allocate keys for
30368         reflection handles with the GC.
30369
30370 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30371
30372         * threads.c, threads.h: added mono_thread_get_abort_signal()
30373         to get a suitable signal for thread abort.
30374
30375 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30376
30377         * metadata.c: fix handling of ExportedType table.
30378
30379 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30380
30381         * icall.c: added WriteWindowsDebugString internal call.
30382
30383 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30384
30385         * reflection.h: added fields to match C# implementation.
30386
30387 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30388
30389         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
30390
30391 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
30392
30393         * gc.h, gc-internal.h: Rename header for GC internal calls to
30394         gc-internal.h from gc.h as to not clash with Boehm GC having its
30395         header installed as <gc.h> in outside include paths.
30396         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
30397         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
30398
30399 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30400
30401         * icall.c: assign minor, build and revision in FillName.
30402
30403 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
30404
30405         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
30406         Added support for running code generated by Reflection.Emit.
30407
30408 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30409
30410         * appdomain.c: check for NULL argument in LoadFrom.
30411
30412 2002-12-10  Dick Porter  <dick@ximian.com>
30413
30414         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
30415
30416 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30417
30418         * appdomain.c: fix buglet when building exe file name.  Handle full
30419         assembly name (needed after latest changes to AssemblyName).
30420         * image.c:
30421         (mono_image_close): free some hashtables.
30422
30423 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
30424
30425         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
30426         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
30427         on some systems (redhat 7.3) 
30428
30429 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
30430
30431         * threads.c: delete the critical section of a sync block,
30432         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
30433
30434 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
30435
30436         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
30437
30438 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30439
30440         * appdomain.[ch]: handle the assembly preload event to try loading the
30441         assemblies using the paths we have in the current domain.
30442
30443         * assembly.[ch]: created an assembly preload hook that is called to try
30444         loading the assembly by other means that the ones provided here.
30445
30446         * domain.c: initialize the domain search path.
30447
30448         From now on, assemblies (TODO: except corlib and System) are loaded
30449         according to these rules when using mono_assembly_load ():
30450
30451                 1. It tries to load the assembly from the ApplicationBase
30452                 of the current domain appending .dll and .exe (TODO: have to
30453                 try loading from name/name.dll and name/name.exe).
30454
30455                 2. It tries the search path specified in PrivateBinPath for the
30456                 current domain (if any).
30457
30458                 3. Previous behavior.
30459
30460 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
30461
30462         * icall.c: implemented GetInterfaceMap() related icall.
30463         * domain.c, loader.h: load MethodInfo in mono_defaults.
30464
30465 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
30466
30467         * gc.c: disable the finalizer thread for now, untill all the issues
30468         with it are resolved.
30469
30470 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30471
30472         * string-icalls.c: handle embedded nulls in string ctor when the
30473         length is specified.
30474
30475 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30476
30477         * class.c: look for explicit interface implementation in parent
30478         classes, too.
30479
30480 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
30481
30482         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
30483
30484 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
30485
30486         * gc.c: protect handles with a critical section.
30487
30488 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30489
30490         * icall.c:
30491         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
30492         parameters. If no assembly specified, try getting the type from all
30493         the assemblies in the current domain, else, load the assembly and get
30494         the type from it.
30495
30496 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30497
30498         * marshal.c: applied patch from Aleksey Demakov that fixes
30499         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
30500
30501 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30502
30503         * icall.c: fixed get_location.
30504
30505 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
30506
30507         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
30508         declarations to make it work with older gcc. 
30509
30510         * loader.c (mono_get_method): set signature->pinvoke for native calls
30511
30512 2002-11-20  Dick Porter  <dick@ximian.com>
30513
30514         * threads.c (mono_thread_init): Set the main thread's handle
30515
30516 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
30517
30518         * gc.c: allow compilation without GC support. Changed to match the
30519         mono coding style.
30520
30521 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30522
30523         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
30524
30525 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
30526
30527         * reflection.c: set a public key token on the core assemblies.
30528
30529 2002-11-18  Dick Porter  <dick@ximian.com>
30530
30531         * threads.c: Split out some thread initialisation so that other
30532         files can set the start callback function.
30533
30534         * gc.c: Run finalisers in a separate thread, to avoid stack
30535         overflow.  Fixes bug 31333.
30536
30537         * appdomain.c: Set up GC finalisation thread.
30538
30539         * reflection.c: 
30540         * object.c: 
30541         * domain.c: Use gc.h macros for GC_malloc
30542         
30543 2002-11-15  Dick Porter  <dick@ximian.com>
30544
30545         * threadpool.c: 
30546         * threads.c:
30547         * appdomain.c: Removed mono_runtime_init_with_attach(),
30548         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
30549         merging the extra parameter with the existing function.  Removed
30550         unneeded code in mono_thread_attach().
30551
30552 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
30553
30554         * image.c (mono_image_loaded_by_guid): a method to get loaded
30555         images by guid. 
30556         (load_metadata_ptrs): we store the guid as string.
30557
30558 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
30559
30560         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
30561
30562         * metadata.c (mono_guid_to_string): imported method form Zoltan
30563         Varga (slightly modified)
30564
30565         * assembly.c (mono_assembly_open): load precompiled code
30566
30567         * loader.h (MonoMethod): we store the method token for use in the
30568         aot compiler. 
30569
30570 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30571
30572         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
30573         the hook function called when an assembly is loaded.
30574         
30575         * domain.c: Modified file.
30576         (mono_domain_assembly_load): removed hash table insertion of assemblies.
30577
30578         Fixes bug #33196.
30579
30580 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
30581
30582         * reflection.c: Map PEFileKind to the value expected by the WinNT
30583         image loader. 
30584
30585 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30586
30587         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
30588         Read until the buffer is filled completely.
30589
30590 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30591
30592         * icall.c: implemented MonoType.InternalGetEvent ().
30593
30594 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30595
30596         * appdomain.c: implemented InitAppDomainSetup. Delayed
30597         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
30598         the entry_assembly.
30599
30600         * assembly.c: base_dir is now an absolute path ending with
30601         G_DIR_SEPARATOR.
30602
30603         * icall.c: modified get_location according to the above changes.
30604
30605         * object.c: init AppDomain.SetupInformation for the default domain after
30606         we have the entry assembly.
30607
30608         * domain.c: when unloading a domain, setup = NULL.
30609
30610 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
30611
30612         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
30613
30614 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
30615
30616         * object.h, object.c: introduced mono_object_get_virtual_method ()
30617         to lookup the method invoked on an object when a callvirt is done on
30618         a method.
30619         * icall.c: make MethodInfo::Invoke() always do a virtual call.
30620
30621 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30622
30623         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
30624         current domain when loaded an assembly and failed to load it.
30625
30626         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
30627
30628 2002-10-31  Dick Porter  <dick@ximian.com>
30629
30630         * icall.c: 
30631         * file-io.h: 
30632         * file-io.c: Return the error status in a parameter, as the
30633         GetLastError() value has long since been blown away if we try and
30634         look it up in a subsequent internal call invocation.  Delete the
30635         GetLastError() internal call, because it's useless.
30636
30637 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
30638
30639         * class.[ch]: added cast_class to fix bug 29517
30640
30641 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
30642
30643         * marshal.c: create valid IL code in the filter clause:
30644         the new JIT is less forgiving:-)
30645
30646 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30647
30648         * icall.c: removed get_property internal call.
30649
30650 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
30651
30652         * appdomain.h domain.c: Added an ID to appdomains.
30653         
30654         * threads.c threads.h icall.c: Implement icall
30655         Thread:GetDomainID(), and remove unused icall 
30656         CurrentThreadDomain_internal.
30657
30658 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30659
30660         * icall.c: Don't recurse through the base types in GetConstructor.
30661         Fixes bug #32063. 
30662
30663 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30664
30665         * mempool.h, mempool.c: added mono_mempool_empty() and
30666         mono_mempool_stats().
30667
30668 2002-10-23  Dick Porter  <dick@ximian.com>
30669
30670         * file-io.c: 
30671         * file-io.h: 
30672         * icall.c: Added MonoIO.GetFileType internal call
30673
30674 2002-10-17  Dick Porter  <dick@ximian.com>
30675
30676         * appdomain.c (mono_runtime_cleanup): Don't signal the async
30677         delegate semaphore before waiting for all threads to finish,
30678         because new threads can also call async delegates.  Fixes bug
30679         32004.
30680
30681         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
30682         of 3 seconds, in case another async job is queued.  (This part is
30683         needed because the bug fix reintroduced the 3s exit lag.)  This
30684         makes the mono_runtime_shutdown flag superfluous.
30685
30686 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
30687
30688         * reflection.c: include ehader size in method section headers.
30689         Really check for suplicated modules entries.
30690
30691 2002-10-17  Martin Baulig  <martin@gnome.org>
30692
30693         * debug-mono-symfile.c: Added back support for locals.
30694
30695 2002-10-14  Martin Baulig  <martin@gnome.org>
30696
30697         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
30698         MONO_TYPE_VOID.
30699
30700 2002-10-14  Martin Baulig  <martin@gnome.org>
30701
30702         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
30703         mono_class_get() instead of looking in the class cache. 
30704
30705 2002-10-13  Martin Baulig  <martin@gnome.org>
30706
30707         * debug-mono-symfile.c: Set version number to 28, include the
30708         signature in method names.
30709
30710 2002-10-13  Martin Baulig  <martin@gnome.org>
30711
30712         * debug-mono-symfile.h: Set version number to 27.
30713
30714 2002-10-11  Martin Baulig  <martin@gnome.org>
30715
30716         * gc.c: Don't register/unregister NULL pointers as disappearing links.
30717
30718 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30719
30720         * metadata.c, metadata.h: added helper function to allocate signatures.
30721
30722 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30723
30724         * icall.c: added internal call to get the location of machine.config.
30725
30726 2002-10-08  Martin Baulig  <martin@gnome.org>
30727
30728         * debug-mono-symfile.c: Ignore classes with a pending init for the
30729         moment.
30730
30731 2002-10-03  Dick Porter  <dick@ximian.com>
30732
30733         * threads.c: Freebsd pthread_t is a pointer
30734
30735 2002-10-03  Dick Porter  <dick@ximian.com>
30736
30737         * socket-io.c: Implemented GetHostName_internal
30738
30739 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30740
30741         * mono-config.c:
30742         (mono_config_parse_file): don't leak the text.
30743
30744 2002-10-02  Martin Baulig  <martin@gnome.org>
30745
30746         * debug-mono-symfile.c: Added support for methods.
30747
30748 2002-10-01  Martin Baulig  <martin@gnome.org>
30749
30750         * debug-mono-symfile.c: Don't emit methods and line numbers for
30751         the dynamic symbol file, just write the type table.  We can easily
30752         have an external helper program which creates a symbol file for an
30753         IL file.        
30754
30755 2002-10-01  Dick Porter  <dick@ximian.com>
30756
30757         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
30758         Only add the handle to the cleanup array when we're about to
30759         launch the thread.  Bug 31425 deadlocked when the test was run on
30760         mono under w32.
30761
30762 2002-10-01  Martin Baulig  <martin@gnome.org>
30763
30764         * debug-mono-symfile.c: Added support for properties.
30765
30766 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30767
30768         * reflection.c: unaligned store fix from Mark Crichton
30769         <crichton@gimp.org>.
30770
30771 2002-09-27  Martin Baulig  <martin@gnome.org>
30772
30773         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
30774         New interncall.
30775
30776 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
30777
30778         * assembly.h, assembly.c: use a sane API to hook into the assembly
30779         loading process instead of a useless special-purpouse hack
30780         (ngen needs a hook, too, for example).
30781
30782 2002-09-27  Dick Porter  <dick@ximian.com>
30783
30784         * threads.c (mono_thread_init): Call GetCurrentProcess() so
30785         io-layer can set up some process handle info.  Not needed on w32,
30786         but doesn't hurt either.
30787
30788         * process.c: Pass the program name in the second parameter to
30789         CreateProcess, so the path is searched.  Include the working
30790         directory. Implemented process name, process enumeration, and some
30791         process detail internal calls.
30792         
30793         * icall.c: Added internal calls for process lookup, and some
30794         process details
30795
30796 2002-09-26  Martin Baulig  <martin@gnome.org>
30797
30798         * assembly.c (mono_install_open_assembly_hook): New global
30799         function to install a function to be invoked each time a new
30800         assembly is loaded.
30801         (mono_assembly_open): Run this callback function if set.
30802
30803         * debug-mono-symfile.c: Put back line numbers for the dynamic
30804         symbol file and also record the .il file as source file.  This
30805         allows us to install the temporary symbol file as `file.dbg' just
30806         like a compiler-generated one.
30807
30808 2002-09-26  Nick Zigarovich <nick@chemlab.org>
30809
30810         * Corrected typo in gc.c (BOHEM vs BOEHM).
30811
30812 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30813
30814         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
30815         GetProperties. Also avoid calling g_slist_length in GetProperties and
30816         GetMethods.
30817
30818 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30819
30820         * reflection.c: avoid unaligned stores (bug spotted by
30821         Mark Crichton  <crichton@gimp.org>).
30822
30823 2002-09-25  Martin Baulig  <martin@gnome.org>
30824
30825         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
30826         instead of guint64 for addresses and added prologue/epilogue info.
30827
30828 2002-09-25  Martin Baulig  <martin@gnome.org>
30829
30830         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
30831         store line number info.  For the dynamic symbol file, we only need
30832         to provide the JIT generated dynamic line number info for the dynamic
30833         symbol file.
30834
30835 2002-09-25  Martin Baulig  <martin@gnome.org>
30836
30837         * debug-mono-symfile.h: Incremented version number.
30838
30839 2002-09-24  Martin Baulig  <martin@gnome.org>
30840
30841         * class.c (mono_debugger_class_init_func): New global function
30842         pointer variable.
30843         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
30844         call it.
30845
30846         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
30847         function.  This is called via the mono_debugger_class_init_func
30848         hook to add all types to the dynamic type table.
30849         (ves_icall_MonoDebugger_GetType): New interncall to get a class
30850         from its metadata token.
30851
30852         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
30853         New interncall for the debugger.
30854
30855 2002-09-24  Nick Drochak <ndrochak@gol.com>
30856
30857         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
30858         before using it in case it is null.
30859         
30860 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30861
30862         * metadata.c: allow custom modifiers in local var signatures
30863         (bug spotted by Zoltan Varga).
30864
30865 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
30866
30867         * class.c: deal with the <Module> class that may have a NULL vtable.
30868         Eliminate warnings.
30869
30870 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30871
30872         * image.c, image.h: more strong name helpers.
30873         * monosn.c: more work: convert pem keys to cryptoapi format.
30874
30875 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30876
30877         * string-icalls.c: speedup IndexOf.
30878
30879 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30880
30881         * icall.c: updates from Zoltan.2.Varga@nokia.com.
30882
30883 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30884
30885         * icall.c: cleanup: use mono_object_domain ().
30886
30887 2002-09-23  Martin Baulig  <martin@gnome.org>
30888
30889         * debug-mono-symfile.c: Improved type support.
30890
30891 2002-09-22  Martin Baulig  <martin@gnome.org>
30892
30893         * debug-mono-symfile.c: Added support for reference types and strings.
30894
30895 2002-09-22  Martin Baulig  <martin@gnome.org>
30896
30897         * debug-mono-symfile.c: Started to work on the type table.
30898
30899 2002-09-21  Martin Baulig  <martin@gnome.org>
30900
30901         * debug-mono-symfile.c: Largely reworked the symbol table format.
30902         The symbol table is now incrementally updated each time a new
30903         method is added.  We're now also using our own magic and version
30904         so that you don't need to recompile all your classes if the
30905         dynamic table changes.
30906         (mono_debug_update_mono_symbol_file): Removed.
30907         (mono_debug_symfile_add_method): New function to add a method.
30908
30909 2002-09-21  Martin Baulig  <martin@gnome.org>
30910
30911         * icall.c
30912         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30913         New interncall.
30914
30915         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30916         New interncall to get a method from its metadata token.
30917
30918 2002-09-21  Martin Baulig  <martin@gnome.org>
30919
30920         * debug-mono-symfile.c: Create type table.
30921
30922 2002-09-20  Martin Baulig  <martin@gnome.org>
30923
30924         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30925
30926 2002-09-20  Martin Baulig  <martin@gnome.org>
30927
30928         * debug-mono-symfile.c: Provide information about params and locals.
30929
30930 2002-09-20  Martin Baulig  <martin@gnome.org>
30931
30932         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30933         New interncall.
30934
30935         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30936         interncall to get a method from its metadata token.
30937
30938 2002-09-20  Martin Baulig  <martin@gnome.org>
30939
30940         * debug-mono-symfile.c: Added a few checks for method->header
30941         being non-NULL.  This should never happen, but for the moment
30942         let's use a g_warning() rather than a g_assert().
30943
30944 2002-09-19  Mark Crichton  <crichton@gimp.org>
30945
30946         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30947         even if support for it isn't present.  Added an #ifdef to fix this.
30948
30949         * socket-io.c: Added checks back for Solaris support.
30950
30951 2002-09-19  Martin Baulig  <martin@gnome.org>
30952
30953         * debug-mono-symfile.c (read_string, write_string): Reflect latest
30954         changes in the symbol file format.
30955
30956 2002-09-18  Martin Baulig  <martin@gnome.org>
30957
30958         * debug-mono-symfile.c: Set version number to 21.
30959
30960 2002-09-18  Dick Porter  <dick@ximian.com>
30961
30962         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30963         on netbsd.  Fixes bug 30051.
30964
30965 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30966
30967         * reflection.c:
30968         (set_version_from_string): little fix.
30969
30970 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30971
30972         * monosn.c, Makefile.am: added strong name utility.
30973         * reflection.h, reflection.c: implemented delayed signing,
30974         locale, version and hash id assembly attributes.
30975
30976 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30977
30978         * loader.c, metadata.c: load param attributes in signatures.
30979
30980 2002-09-16  Martin Baulig  <martin@gnome.org>
30981
30982         * debug-mono-symfile.c: Added string table with all method names.
30983
30984 2002-09-14  Martin Baulig  <martin@gnome.org>
30985
30986         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30987         fast method lookup.
30988
30989 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30990
30991         * reflection.c: record the public key token of referenced assemblies.
30992
30993 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30994
30995         * image.c, image.h: added functions to get the strong name and the
30996         public key of an assembly.
30997         * pedump.c: use them.
30998
30999 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
31000
31001         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
31002
31003 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
31004
31005         * marshal.c (mono_marshal_get_managed_wrapper): Added
31006         MONO_TYPE_BOOLEAN 
31007
31008 2002-09-11  Martin Baulig  <martin@gnome.org>
31009
31010         * gc.c: Call GC_unregister_disappearing_link() on all links when
31011         finalizing them, this is necessary to aviod a crash in boehm's
31012         finalize handler.
31013
31014 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31015
31016         * gc.c: handle GetTarget for finalized objects spotted and fixed by
31017         nick@chemlab.org.
31018
31019 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31020
31021         * icall.c: implemented MonoType::Module.
31022         * reflection.c, reflection.h: mono_module_get_object () from
31023         Tomi Pakarinen <tomi.pakarinen@welho.com>.
31024
31025 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31026
31027         * icall.c: ignore overridden methods in GetMethods ().
31028         Fix for FieldInfo::SetValue().
31029         * object.c: handle float/double in runtime invoke.
31030
31031 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31032
31033         * object.c: allow a constructor to be called again on an object.
31034
31035 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31036
31037         * class.h, class.c: move field layout code to it's own function and
31038         export it. Get an interface id earlier. Move fields in MonoClass
31039         so they are more cache friendly and align the bitfields.
31040         * loader.c: temporary handle get_param_names() for a runtime method.
31041         * reflection.c, reflection.h: more code to handle runtime creation of
31042         types.
31043
31044 2002-09-09  Martin Baulig  <martin@gnome.org>
31045
31046         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
31047         signature with the pinvoke field being set for the actual call.
31048
31049 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31050
31051         * icall.c: removed some unused icalls. Start of map of glib charsets
31052         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
31053
31054 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31055
31056         * debug-helpers.c: break infinite loop (found and fixed by
31057         Holger Arnold <harnold@gmx.de>).
31058
31059 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31060
31061         * icall.c: target may be null in create_delegate.
31062
31063 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31064
31065         * marshal.c: handle a boolean return type.
31066
31067 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31068
31069         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
31070
31071 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31072
31073         * gc.c: fix weakreferences.
31074
31075 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31076
31077         * icall.c: added icall to get default codepage.
31078
31079 2002-09-03  Dick Porter  <dick@ximian.com>
31080
31081         * threads.h: 
31082         * threads.c: Use MonoThread instead of MonoObject where
31083         apropriate.
31084
31085         Store running thread objects in a hash table, so that we have all
31086         the info to hand when waiting for them to finish
31087         (means we don't need OpenThread() any more, so mingw builds should
31088         be fully functional again.)
31089
31090         * verify.c:
31091         * object.h: Added thread ID to MonoThread
31092
31093 2002-09-03  Martin Baulig  <martin@gnome.org>
31094
31095         * icall.c (System.Reflection.Assembly::get_location): New interncall.
31096
31097 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31098
31099         * icall.c: fixed leak in get_temp_path. Thanks lupus.
31100
31101 2002-09-03  Martin Baulig  <martin@gnome.org>
31102
31103         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
31104         argument to store the end address of the disassembled instruction.
31105
31106         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
31107         here from debug-symfile.h.
31108         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
31109         JIT into this struct.
31110         (MonoSymbolFile): Added `char *image_file' field.
31111         (MonoDebugGetMethodFunc): Removed.
31112         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
31113         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
31114         (mono_debug_find_method): New method.
31115
31116         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
31117         create a full symbol file.
31118         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
31119         and static symbol files.
31120         (mono_debug_find_method): The symbol file keeps an internal method hash,
31121         call this to get a MonoDebugMethodInfo from a MonoMethod.
31122
31123         * debug-symfile.[ch]: Removed.
31124
31125 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
31126
31127         * image.c (do_mono_image_open): Remove linker version check.
31128
31129 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
31130
31131         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
31132         wrappers for instance methods.
31133         
31134 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31135
31136         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
31137
31138 2002-08-28  Dick Porter  <dick@ximian.com>
31139
31140         * Makefile.am: Export HOST_CC for w32 builds
31141
31142 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31143
31144         * file-io.c process.c: MonoString are null terminated, no
31145         need for mono_string_to_utf16() anymore.
31146
31147 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31148
31149         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
31150
31151 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
31152
31153         * icall.c, reflection.h: speedup System.MonoType.
31154
31155 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31156
31157         * reflection.c: allow null as the value of a string argument in
31158         custom attributes constructors.
31159
31160 2002-08-27  Martin Baulig  <martin@gnome.org>
31161
31162         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
31163         `trampoline_address' field.
31164
31165 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
31166
31167         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
31168         check (fixes bug #29486) 
31169
31170 2002-08-27  Martin Baulig  <martin@gnome.org>
31171
31172         * debug-mono-symfile.c: Changed the file format in a way that allows us
31173         open it read-only and to use a specially malloced area for all the
31174         dynamic data.  We can now also generate a symbol file on-the-fly if we're
31175         debugging IL code and there is no MCS generated symbol file for it.
31176
31177 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31178
31179         * object.c: added a define for a good string and array
31180         creation speedup (not enabled by default because we need to deal with
31181         the synch stuff).
31182
31183 2002-08-26  Martin Baulig  <martin@gnome.org>
31184
31185         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
31186         function to create a dynamic symbol file.  This is used by the
31187         debugger to create a symbol file for IL code on-the-fly.
31188
31189 2002-08-26  Martin Baulig  <martin@gnome.org>
31190
31191         * loader.c (mono_lookup_pinvoke_call): Include the error message
31192         from g_module_error() in the error message.
31193
31194 2002-08-24  Martin Baulig  <martin@gnome.org>
31195
31196         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
31197         function to update the symbol file.  The symbol file is mmap()ed
31198         writable, but private.  This allows us to install the symbol file
31199         together with the assembly.
31200
31201 2002-08-24  Martin Baulig  <martin@gnome.org>
31202
31203         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
31204         but they can read the new symbol file format which mcs is now creating.
31205
31206         * debug-symfile.c (mono_debug_find_source_location): Moved to
31207         debug-mono-symfile.c; this is now operating on the new symbol file.
31208
31209 2002-08-23  Martin Baulig  <martin@gnome.org>
31210
31211         * debug-helpers.c (mono_method_desc_from_method): New function to get
31212         a MonoMethodDesc from a MonoMethod.
31213
31214 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31215
31216         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
31217         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
31218
31219 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31220
31221         * string-icalls.[ch]: make helper methods static.
31222
31223 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31224
31225         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
31226         types to it and to SetValueInternal.
31227
31228         * object.c: Moved handle_enum label to its proper place. This was the
31229         f... bug! ;-)
31230
31231         This time i compiled mcs and gtk-sharp and they both work.
31232
31233 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31234
31235         * icall.c: reverted partially my previous patch until 
31236         object.c:set_value handles enums correcly.
31237
31238 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31239
31240         * icall.c:
31241         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
31242         (ves_icall_System_Environment_get_MachineName): removed warning when
31243         compiling under cygwin.
31244
31245 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31246
31247         * object.c: fixed field_get_value() for reference types.
31248
31249 2002-08-22  Dick Porter  <dick@ximian.com>
31250
31251         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
31252         Don't free a buffer while it's still needed.  Patch from Jonathan
31253         Liger <Jonathan.liger@wanadoo.fr>
31254
31255 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
31256
31257         * icall.c (ves_icall_System_Environment_get_Platform): Add new
31258         internal call.
31259
31260 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
31261
31262         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
31263         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
31264
31265         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
31266         we call unmanaged code which throws exceptions.
31267
31268 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31269
31270         * appdomain.h: added per-domain entry_assembly.
31271         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
31272         arguments.
31273         * icall.c: Assembly::GetEntryAssembly icall.
31274         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
31275         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
31276
31277 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31278
31279         * appdomain.h, gc.c: added mono_domain_finalize ().
31280
31281 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31282
31283         * object.c:
31284         (mono_print_unhandled_exception): changed g_warning by g_printerr
31285         because g_log has a 1024 characters limit (yeah, i got a big stack
31286         trace). Don't print exception name, that should be in ToString 
31287         returned string.
31288
31289 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31290
31291         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
31292         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
31293
31294 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31295
31296         * object.c:
31297         (mono_print_unhandled_exception): after previous commit, i realized
31298         that MS calls ToString on the exception. I changed this function to
31299         do that. This way we get stack_trace for free.
31300
31301 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31302
31303         * object.c:
31304         (mono_print_unhandled_exception): invoke Message property instead of
31305         getting 'message' field from Exception. Don't allocate memory for
31306         'trace' and 'message' if not needed.
31307
31308 2002-08-18  Dick Porter  <dick@ximian.com>
31309
31310         * unicode.c: Fix asserts to match Encoder.cs checks
31311
31312 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31313
31314         * marshal.c: fix unaligned store issue and a few wrong
31315         opcode argument types.
31316
31317 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31318
31319         * icall.c: added GetUninitializedObjectInternal internal call.
31320
31321 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
31322
31323         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
31324         to the right domain.
31325
31326 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
31327
31328         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
31329
31330         * class.c (class_compute_field_layout): set blittable to false for Strings
31331
31332         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
31333
31334 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31335
31336         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
31337         first chunk of code to create types at runtime. Code to
31338         handle ReflectedType/DeclaringType. Make reflection handles
31339         domain specific.
31340
31341 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31342
31343         * class.c: set correct name in arrays.
31344
31345 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
31346
31347         * appdomain.c (mono_domain_transfer_object): make it work with
31348         valuetypes. bug fixes.
31349
31350 2002-08-12  Dick Porter  <dick@ximian.com>
31351
31352         * object.h: Rename some parameters to avoid c++ keywords (Patch
31353         from Joseph Wenninger <kde@jowenn.at>)
31354
31355 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
31356
31357         * icall.c: added icall to implement Assembly.GetFile*.
31358
31359 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31360
31361         * reflection.h, reflection.c: code to embed managed resources.
31362
31363 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31364
31365         * class.c: move all the type size stuff into
31366         class_compute_field_layout().
31367
31368 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31369
31370         * class.c: ensure enums have always the correct instance size.
31371         * unicode.c: remove wrong assert.
31372
31373 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31374
31375         * assembly.c: fix mem corruption issue.
31376         * image.h, image.c: added mono_image_get_resource () to access
31377         managed resources.
31378         * icall.c: implemented Assembly.EntryPoint property and some
31379         Managed Resources related internalcalls.
31380
31381
31382 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31383
31384         * image.c, image.h: impemented mono_image_get_entry_point ().
31385         * appdomain.c: use mono_image_get_entry_point.
31386
31387 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31388
31389         * reflection.c: support the object type argument when loading
31390         custom attributes.
31391
31392 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
31393
31394         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
31395         String as return type.
31396
31397 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
31398
31399         * reflection.c: fix encoding of named args for custom attrs to match
31400         the ms implementation. Read them back when instantiating custom
31401         attributes.
31402
31403 2002-08-02  Radek Doulik  <rodo@ximian.com>
31404
31405         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
31406         by Dietmar as quick fix
31407         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
31408         16 as stack size, used on more places as quick fix before Dietmar
31409         will fix it properly
31410
31411 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31412
31413         * object.h, object.c: added accessors for fields and properties.
31414
31415 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31416
31417         * class.c, class.h: made mono_class_get_field_from_name ()
31418         loop on parent types.
31419         Added mono_class_get_property_from_name ().
31420
31421 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31422
31423         * class.c, class.h: move the code to setup the type vtable in its own
31424         function so that it can be reused also for types created at runtime.
31425         Eliminate the "class" identifier from the header file.
31426         * reflection.c: setup the vtable for enums so that we can create
31427         objects for use in SetConstant ().
31428
31429 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
31430
31431         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
31432         instead of the delegate itself as this pointer (bug #28383)
31433
31434 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
31435
31436         * marshal.c (mono_marshal_get_managed_wrapper): added return type
31437         conversions.
31438
31439 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31440
31441         * loader.c: don't set the pinvoke bit on icalls.
31442
31443 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
31444
31445         * debug-helpers.c (mono_method_full_name): only print a number to
31446         indicate wrapper type (so that the output is more readable in traces).
31447
31448 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
31449
31450         * class.c (mono_class_init): include method override patch from Paolo
31451
31452 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
31453
31454         * icall.c: fixed GetTypeCode().
31455
31456 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
31457
31458         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
31459         use real delegate invoke function to make it work with multicast
31460         delegates (fix bug# 28291).
31461
31462 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31463
31464         * object.c: load constant strings.
31465
31466 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31467
31468         * reflection.c: no magic numbers.
31469         * tabledefs.h: security action enum.
31470
31471 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31472
31473         * assembly.c: fix possible memory corruption.
31474
31475 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31476
31477         * reflection.h, reflection.c: added support for linking resources.
31478         * verify.c: check we have an updated corlib.
31479
31480 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
31481
31482         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
31483         string arrays.
31484         (mono_marshal_string_array): null terminate unmanaged string arrays.
31485         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
31486
31487 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31488
31489         * icall.c: Type.GetType () can now return also types from the
31490         calling assembly.
31491
31492 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31493
31494         * loader.h, loader.c: stack walking support.
31495         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
31496         GetCallingAssembly.
31497
31498 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
31499
31500         * marshal.c: added optimisations for blittable types 
31501
31502         * class.c (mono_array_class_get): do not set blittable attribute on arrays
31503         (mono_class_setup_mono_type): set blittable attribute for single
31504         and double.
31505
31506         * marshal.c (mono_string_utf8_to_builder): impl.
31507         (mono_string_builder_to_utf8): impl.
31508         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
31509
31510 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
31511
31512         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
31513         (mono_marshal_get_managed_wrapper): impl. byref types
31514
31515 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31516
31517         * icall.c:
31518         (search_method): don't display debug message. 
31519
31520 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
31521
31522         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
31523
31524 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31525
31526         * appdomain.c: set the missing filename when throwing exception.
31527
31528 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
31529
31530         * metadata.c (mono_type_size): code cleanup
31531         (mono_type_stack_size): removed some test code
31532
31533 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
31534
31535         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
31536         mono_get_exception_file_not_found now.
31537
31538         * exception.c (mono_exception_from_name_two_strings): New version
31539         that will call a constructor with two string arguments. 
31540         (mono_get_exception_file_not_found): New helper routine, used to
31541         report file-not-found errors.
31542
31543 2002-07-20  Dick Porter  <dick@ximian.com>
31544
31545         * process.h:
31546         * process.c: Pass file handles to CreateProcess
31547         
31548         * icall.c:
31549         * file-io.h:
31550         * file-io.c: Implemented CreatePipe
31551
31552 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
31553
31554         * metadata.c (mono_get_param_info): set alignment for value types
31555
31556 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31557
31558         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
31559         Constify mono_domain_assembly_open().
31560         * loader.c: handle null namespace in icalls.
31561
31562 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
31563
31564         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
31565         (emit_str_to_ptr_conv): marshal object as structs
31566
31567         * metadata.c (mono_type_to_unmanaged): marshal object as structs
31568
31569         * marshal.c (mono_marshal_get_runtime_invoke): support value types
31570
31571 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
31572
31573         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
31574         (mono_marshal_get_native_wrapper): we an now return value types
31575
31576 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31577
31578         * verify.c: more checks implemented.
31579
31580 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
31581
31582         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
31583         (fix bug #27695)
31584         (mono_marshal_get_native_wrapper): allow byref arguments
31585         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
31586         impl. PtrToStringXXX methods
31587         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
31588         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
31589         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
31590         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
31591         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
31592
31593 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31594
31595         * reflection.c: fix buglet in parsing an assembly name.
31596
31597 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
31598
31599         * marshal.c (emit_ptr_to_str_conv): first impl.
31600
31601 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31602
31603         * object.c, class.h: cache the vtable in the class as suggested by
31604         vargaz@freemail.hu (Zoltan Varga).
31605
31606 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31607
31608         * class.h, loader.c: added mono_field_from_token().
31609         * verify.c: first cut of type checking code.
31610
31611 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
31612
31613         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
31614
31615 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
31616
31617         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
31618         (fix bug #27782)
31619         (mono_marshal_get_remoting_invoke): impl.
31620         (mono_delegate_begin_invoke): impl.
31621         (mono_mb_emit_save_args): impl.
31622         (mono_delegate_end_invoke): impl.
31623         (mono_marshal_get_delegate_begin_invoke):
31624         (mono_marshal_get_delegate_end_invoke):
31625         (mono_marshal_get_delegate_invoke): generate a special name for
31626         those methods (including the signature) and associate them whith
31627         the delegate class. 
31628
31629 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
31630
31631         * reflection.[ch]: 
31632         (mono_reflection_type_from_name): now it has a MonoImage parameter
31633         which is used as the default image to search the type in. If the image
31634         is NULL or getting the type from it fails, it defaults to corlib.
31635
31636         * icall.c: changed 1 call to mono_reflection_type_from_name to match
31637         new parameter.
31638
31639 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31640
31641         * reflection.c: update the parameter table index.
31642
31643 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31644
31645         * domain.c: don't include the mark byte in the string hash.
31646
31647 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31648
31649         * icall.cs: icall for Type.GetTypeCode ().
31650         * verify: a couple of fixes and disabled local initialization checks.
31651
31652 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
31653
31654         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
31655
31656         * debug-helpers.c (mono_method_full_name): print the type of the
31657         runtime wrapper
31658
31659         * metadata.c (mono_signature_hash): a hash function for signatures
31660         (mono_signature_hash): better hash algorithm
31661
31662         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
31663
31664         * debug-helpers.c (mono_method_full_name): this can now generate
31665         method names with signatures
31666
31667         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
31668         method dont have this pointers.
31669
31670 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31671
31672         * reflection.c: fixup typebuilder tokens.
31673         * image.c: fix buglet.
31674         * marshal.h: remove whitespace.
31675         * metadata.h, metadata.c: reinstate code that was removed.
31676         * verify.c: handle catch directives and fix another couple of bugs.
31677
31678 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
31679
31680         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
31681         (mono_marshal_get_native_wrapper): make it comp. with the old code
31682         (mono_marshal_get_native_wrapper): support boolean
31683         (mono_marshal_get_managed_wrapper): support more types
31684
31685 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
31686
31687         * class.c (class_compute_field_layout): compute class->blittable attribute.
31688
31689 2002-07-09  Dick Porter  <dick@ximian.com>
31690
31691         * threads.c: Make the thread cleaning up cope with threads that
31692         call ExitThread()
31693
31694 2002-07-08  Radek Doulik  <rodo@ximian.com>
31695
31696         * reflection.c (method_encode_code): use non-translated values to
31697         compute finally_start, this fixes exception handling on ppc, yay!
31698
31699         * decimal.h (struct signscale): fix endianess
31700
31701 2002-07-07  Radek Doulik  <rodo@ximian.com>
31702
31703         * reflection.c: swap box_val and not val
31704
31705 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31706
31707         * reflection.c, reflection.h: handle full assembly info in type name.
31708         Handle Type arguments when loading custom attributes.
31709         * icall.c: updated to use new mono_reflection_type_from_name () method.
31710
31711 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31712
31713         * loader.c:
31714         (method_from_memberref): also print assembly name when method not found.
31715
31716 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31717
31718         * icall.c:
31719         (ves_icall_TypeGetProperties): fixed bug #27473. 
31720
31721 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31722
31723         * reflection.c: display image name and token when cannot find the
31724         .ctor for an attribute.
31725
31726 2002-07-05  Martin Baulig  <martin@gnome.org>
31727
31728         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31729
31730 2002-07-04  Dick Porter  <dick@ximian.com>
31731
31732         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
31733         compile on mingw.  This will cause mingw builds to not wait for
31734         subthreads to terminate after the main thread does.  I've lodged a
31735         bug with the mingw developers for them to wrap OpenThread().
31736
31737 2002-07-03  Dick Porter  <dick@ximian.com>
31738
31739         * threads.c: Store thread IDs instead of handles, because
31740         GetCurrentThread() returns a pseudohandle and therefore stores
31741         useless values.  mono_thread_cleanup() continues checking the
31742         array of threads until it is empty, to cope with subthreads
31743         spawning new threads after the main thread has finished.
31744
31745         * profiler.h:
31746         * profiler.c:
31747         * profiler-private.h: Pass the thread ID to thread profiler
31748         functions, instead of a handle
31749
31750 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31751
31752         * verify.c: fixes to make it more usable.
31753         * pedump.c: added --verify code to verify IL code in an assembly.
31754
31755 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31756
31757         * reflection.c: turn errors into warnings to allow compiling corlib.
31758
31759 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31760
31761         * reflection.c: add special cases to compile corlib.
31762
31763 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31764
31765         * reflection.c: handle properties with only a set method.
31766
31767 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31768
31769         * opcodes.h: add enum with opcodes in opval order.
31770
31771 2002-07-01  Dick Porter  <dick@ximian.com>
31772         
31773         * object.h:
31774         * object.c (mono_runtime_run_main): Removed unneeded argument
31775
31776 2002-06-28  Martin Baulig  <martin@gnome.org>
31777
31778         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31779
31780 2002-06-27  Dick Porter  <dick@ximian.com>
31781
31782         * threads.c: Store the handle in both the parent thread and in the
31783         subthread, to minimise the time between starting a new thread and
31784         storing its ID.
31785
31786 2002-06-26  Dick Porter  <dick@ximian.com>
31787
31788         * appdomain.c (mono_runtime_cleanup): Close the socket library
31789         after all the threads have finished, not before
31790
31791 2002-06-26  Martin Baulig  <martin@gnome.org>
31792
31793         * debug-symfile.c (mono_debug_find_source_location): Added
31794         `guint32 *line_number' argument.  If it's not NULL, store the line number
31795         there and return the file name without the line number.
31796
31797 2002-06-25  Dick Porter  <dick@ximian.com>
31798
31799         * icall.c:
31800         * process.h:
31801         * process.c: Process forking and other support functions
31802
31803 2002-06-25  Dick Porter  <dick@ximian.com>
31804
31805         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
31806         things dont happen when the image is closed.
31807         (mono_image_lookup_resource): Walk the resource section looking
31808         for a particular entry
31809
31810         * cil-coff.h: PE resource section decoding
31811
31812 2002-06-25  Dick Porter  <dick@ximian.com>
31813         
31814         * assembly.h:
31815         * assembly.c: 
31816         (mono_assembly_foreach): Accessor functions to walk the list of
31817         loaded assemblies
31818         (mono_assembly_set_main):
31819         (mono_assembly_get_main): Process methods need to know which
31820         assembly is the "main" one
31821
31822         * object.c (mono_runtime_run_main): Record the main assembly
31823
31824         * debug-helpers.c: Fix typo
31825
31826 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
31827
31828         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
31829         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
31830
31831 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31832
31833         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
31834
31835 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
31836
31837         * image.c (do_mono_image_open): Initialize reference count,
31838         otherwise we leak the MonoImage.
31839
31840 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31841
31842         * reflection.c: small tweak to handle self-hosting.
31843
31844 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31845
31846         * reflection.c: fix type name parse code.
31847
31848 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31849
31850         * reflection.c: break out of the loop.
31851         * image.c: special case corlib.
31852
31853 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31854
31855         * reflection.c: add all the custom attrs at the end to ensure the
31856         ctors have been properly initialized when the attributes are defined
31857         in the current assembly.
31858
31859 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31860
31861         * reflection.c: handle correctly multiple-nested types.
31862
31863 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
31864
31865         * row-indexes.h: fix typos.
31866         * reflection.c: adjust for typos and fix method_def_or_ref
31867         encoding in MethodImpl table.
31868
31869 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31870
31871         * reflection.c: fix entry point patching (thanks Serge!).
31872
31873 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
31874
31875         * verify.c: add check for System.Exception
31876
31877 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31878
31879         * image.c, class.c: minifix for code just c&p'ed.
31880         * reflection.c: warning fix.
31881         * object.h, loader.h, domain.c: load also StringBuilder.
31882
31883 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31884
31885         * marshal.h, marshal.c: some support code to handle complex marshaling.
31886
31887 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31888
31889         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
31890         Better signatures with vtable error dump.
31891
31892 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
31893
31894         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
31895
31896 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
31897
31898         * icall.c (ves_icall_Type_GetField): impl.
31899
31900 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31901
31902         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
31903         to retrieve a marshal description blob for a field or param.
31904
31905 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31906
31907         * reflection.h, reflection.c: change order of nested type emission
31908         to avoid table corruption. The NestedTypes table is sorted.
31909         * icall.c: change order of GetConstructor results to workaround mcs bug.
31910
31911 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31912
31913         * reflection.h, reflection.c: handle field and param marshal
31914         information.
31915
31916 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31917
31918         * icall.c, marshal.c marshal.h: more Marshal class implementation.
31919
31920 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31921
31922         * reflection.c: fix call convention.
31923
31924 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31925
31926         * reflection.h, reflection.c: mono_image_get_memberref_token()
31927         takes a type instead of a class, now. Added
31928         mono_image_get_array_token() to create tokens for the special
31929         multi-dim array methods.
31930
31931 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31932
31933         * assembly.c: handle modules (no assembly table). Split
31934         loading references in its own function.
31935         * class.c: handle moduleref resolution scope.
31936         * image.c, image.h: cache module name in image.
31937
31938 2002-06-07  Martin Baulig  <martin@gnome.org>
31939
31940         * reflection.c (mono_image_get_type_info): Only add a class layout entry
31941         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31942
31943 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31944
31945         * icall.c: more signature fixes that used uint instead of int.
31946
31947 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31948
31949         * reflection.c: fixed signature of field refs.
31950
31951 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31952
31953         * class.c, reflection.c: handle typerefs of nested types
31954         (both on read and when writing files).
31955
31956 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31957
31958         * icall.c: fix method signatures that tried to workaround the previous
31959         typo, d'oh!
31960
31961 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31962
31963         * debug-helpers.c: fix typo.
31964
31965 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31966
31967         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31968         rewrote the PE/COFF writing code (our programs are understood by the
31969         ms runtime, now).
31970
31971 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31972
31973         * gc.c, gc.h, icall.c: weakreference support.
31974
31975 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31976
31977         * Makefile.am, mono-config.c: use $(sysconfdir).
31978
31979 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31980
31981         * icall.c: changed default precision of Double.ToString() to 15.
31982         Fixed memory leak. Unified with Single.ToString.
31983
31984 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31985
31986         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31987
31988 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31989
31990         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31991         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31992         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31993         and myself.
31994
31995 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31996
31997         * debug-symfile.c, sysmath.c: yet more compilation fixes.
31998
31999 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32000
32001         * reflection.c, socket-io.c: more compilation fixes.
32002
32003 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32004
32005         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
32006         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
32007         unicode.c: warning and compiler compatibility fixes.
32008
32009 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32010
32011         * class.h, metadata.c: fixed warnings/compilation errors.
32012
32013 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
32014
32015         * Makefile.am, mono-config.c, mono-config.h: configuration file
32016         support routines.
32017         * loader.c, loader.h: make Dll mapping configurable at runtime in the
32018         config file. Export methods to insert and lookup mappings.
32019
32020 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
32021
32022         * reflection.c: handle types and boxed objects in custom attr
32023         constructors.
32024
32025 2002-05-30  Martin Baulig  <martin@gnome.org>
32026
32027         * debug-symfile.c
32028         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
32029
32030 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
32031
32032         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
32033         to lookup the implmap row for a P/Invoke method.
32034         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
32035         P/Invoke method from the runtime on an as needed basis.
32036
32037 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
32038
32039         * metadata.c (mono_metadata_parse_signature): impl.
32040
32041 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32042
32043         * class.c: handle .pack directive.
32044
32045 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
32046
32047         * object.c: initialize static fields with RVA data.
32048
32049 2002-05-25  Martin Baulig  <martin@gnome.org>
32050
32051         * debug-symfile.c
32052         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
32053
32054 2002-05-24  Martin Baulig  <martin@gnome.org>
32055
32056         * debug-symfile.c
32057         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
32058         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
32059         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
32060
32061 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32062
32063         * object.c: special case string ctros in invoke.
32064         * gc.c: silly whitespace changes.
32065
32066 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
32067
32068         * threadpool.[ch]: impl. a threadpool that can
32069         be used by mint and mono.
32070
32071 2002-05-22  Martin Baulig  <martin@gnome.org>
32072
32073         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
32074         The first argument is now a `MonoReflectionModuleBuilder *', the return
32075         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
32076         `methods' field to get the method builder.  The `token' argument is the
32077         unfixed token.
32078
32079         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
32080         invalid characters instead of g_assert_not_reached()ing.  This seems
32081         to be the behaviour of mscorlib.
32082
32083 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
32084
32085         * object.c (mono_runtime_invoke_array): applied patch from Rachel
32086         Hestilow to fix bug #25104
32087
32088 2002-05-21  Martin Baulig  <martin@gnome.org>
32089
32090         * debug-symfile.c (mono_debug_find_source_location): New function.
32091         Looks up an IL offset in the line number table and returns the source
32092         location as a string.
32093
32094 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32095
32096         * icall.c:
32097         (mono_double_ToStringImpl): changed %f by %g until we have something
32098         better.
32099
32100 2002-05-21  Nick Drochak  <ndrochak@gol.com>
32101
32102         * icall.c : Use different name for Math.Pow's icall.  Needed to check
32103         parameters first in C#.
32104
32105 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32106
32107         * icall.c, reflection.h: added icall to get info about an event.
32108
32109 2002-05-20  Radek Doulik  <rodo@ximian.com>
32110
32111         * object.c (mono_value_box): don't use memcpy for boxing on BIG
32112         endian
32113         (mono_value_box): don't use memcpy for small sizes on
32114         architectures with unaligned access
32115
32116 2002-05-20  Martin Baulig  <martin@gnome.org>
32117
32118         * reflection.c (mono_reflection_setup_internal_class): Don't crash
32119         if `tb->parent == NULL'.
32120         (mono_reflection_create_internal_class): New function.  This is
32121         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
32122         for enum types.
32123
32124         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
32125         New interncall.
32126
32127 2002-05-19  Martin Baulig  <martin@gnome.org>
32128
32129         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
32130         argument to get the length, don't default to the array length.
32131
32132 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
32133
32134         * assembly.c (mono_assembly_setrootdir): New function used to
32135         override the MONO_ASSEMBLIES directory.
32136
32137 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32138
32139         * icall.c: ValueType_GetHashCode() initialize local var.
32140
32141 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32142
32143         * reflection.c: sort custom attributes table.
32144
32145 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32146
32147         * reflection.c: support named args in custom attributes (write support).
32148
32149 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
32150
32151         * reflection.c: fix finally position calculation.
32152
32153 2002-05-15  Radek Doulik  <rodo@ximian.com>
32154
32155         * reflection.c: fixed endianess at many places
32156
32157         * icall.c (ves_icall_InitializeArray): comment out debug msg
32158
32159 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
32160
32161         * object.c (mono_unhandled_exception): new function to handle
32162         unhandled exceptions.
32163         (mono_unhandled_exception): call the UnhandledException event.
32164         (mono_runtime_delegate_invoke): impl.
32165
32166 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
32167
32168         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
32169         returns the RVA, not the direct pointer to the data. Handle the case
32170         when the class size is fixed.
32171
32172 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
32173
32174         * reflection.c: fix some endianess issues.
32175
32176 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
32177
32178         * object.c (mono_runtime_invoke): is now able to catch exceptions.
32179
32180         * threads.c (mono_thread_init): added a callback which is invoked
32181         at thread start.
32182
32183 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
32184         
32185         * icall.c: make GetHashCode return non-negative values.
32186
32187 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
32188
32189         * object.c, icall.c, gc.c: revert to address-based hashcode.
32190
32191 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
32192
32193         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
32194
32195 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32196
32197         * icall.c, class.c: special case <Module>.
32198
32199 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
32200
32201         * icall.c: fix bug in GetNow().
32202
32203 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
32204
32205         * object.c (mono_runtime_class_init): make sure that we call all
32206         static class constructors.
32207
32208 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
32209
32210         * reflection.c: sort methodsemantics table.
32211
32212 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
32213
32214         * reflection.h, reflection.c: honour init locals setting.
32215
32216 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
32217
32218         * icall.c: copied Double ToStringImpl for Single ToStringImpl
32219
32220 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32221
32222         * reflection.c: support ContructorBuilders in attribute blob creation.
32223
32224 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32225
32226         * reflection.c: some changes to build a binary that can be run
32227         directly in windows.
32228
32229 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32230
32231         * loader.c: print a big message when an icall can't be found.
32232
32233 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32234
32235         * string-icalls.c: fix bug 24248.
32236
32237 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
32238
32239         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
32240         icall.c, reflection.h: separate assembly loading by pathname and by
32241         assembly name. Use the MONO_PATH env var to search for assemblies.
32242
32243 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32244
32245         * assembly.c, image.h: add some support for assemblies
32246         with multiple modules.
32247         * class.c, class.h: export mono_class_from_typeref().
32248         * loader.c: remove duplicated code and use mono_class_from_typeref(),
32249         instead.
32250
32251 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32252
32253         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
32254         documentation says (the ECMA one is correct).
32255
32256 2002-05-02  Dick Porter  <dick@ximian.com>
32257
32258         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
32259         Don't name the synchronisation mutex.
32260
32261 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
32262
32263         * rand.c
32264         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
32265         Make the prototypes match.
32266         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
32267         Same.
32268
32269         * icall.c
32270         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
32271         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
32272         all systems have tm.tm_zone, so use strftime() with %Z to print
32273         the timezone abreviation into a temp string.
32274
32275         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
32276         rather than mono_array_addr() on a MonoString on Big Endian
32277         machines.
32278
32279 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
32280
32281         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
32282         fix bug 24041
32283
32284 2002-04-30  Dick Porter  <dick@ximian.com>
32285
32286         * socket-io.c: Cope with SOCKET being an integer rather than a
32287         pointer now.
32288
32289         * threads.c: Added Thread_free_internal, to deal with thread
32290         handle cleanup.  Moved calls to handle_store() and handle_remove()
32291         to start_wrapper(), so each can only be called once.  Allocate
32292         synchronisation blocks with GC_malloc(), and use GC finalisation
32293         to close the handles.
32294
32295         * icall.c: added System.Threading.Thread::Thread_free_internal
32296
32297 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32298
32299         * icall.c: support Environment.Exit, CommandLineArgs().
32300
32301 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
32302
32303         * object.c, object.h: added mono_runtime_run_main () and
32304         mono_runtime_get_main_args () for use in System.Environment.
32305
32306 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32307
32308         * gc.c: fix thinko, enable actual finalization since the jit is now
32309         fixed.
32310
32311 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32312
32313         * gc.c, object.c: take into account that an object may be offset wrt the address
32314         returned by GC_malloc().
32315
32316 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
32317
32318         * image.c: handle files without entries in the assembly table (modules).
32319
32320 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
32321
32322         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
32323         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
32324         allowed to be null when it's System.Object class setup.
32325
32326 2002-04-27  Martin Baulig  <martin@gnome.org>
32327
32328         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
32329         if `tb->parent == NULL' rather than crashing.
32330
32331 2002-04-28  Nick Drochak  <ndrochak@gol.com>
32332
32333         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
32334         calling acos() where asin() should have been called.
32335
32336 2002-04-26  Martin Baulig  <martin@gnome.org>
32337
32338         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
32339         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
32340         there's a subdirectory called `System', but we don't want to read that
32341         subdirectory as an assembly.
32342
32343 2002-04-25  Martin Baulig  <martin@gnome.org>
32344
32345         * debug-symfile.c: Reflect latest MonoString changes.
32346
32347 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32348
32349         * rand.c, rand.h: instance method icalls need to have an explicit
32350         this pointer as first argument in the C implementation.
32351
32352 2002-04-25  Nick Drochak <ndrochak@gol.com>
32353
32354         * icall.c: Fix typo in map for GetNonZeroBytes
32355
32356 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
32357
32358         * string-icalls.c : String does now passes unit tests without any 
32359         errors, the following changes has been made:
32360         
32361         Implemented replace methods.
32362         Renaming of methods to (try) follow the standard.
32363         Fixed compare ordinal
32364         Made all memory allocated directly to function instead of via icall function.
32365         Small performance fix in is_in_array function
32366                         
32367  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
32368
32369         c (mono_string_Internal_ctor_charp_int_int):
32370         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
32371         sindex < 0, throw ArgumentOutOfRangeException instead of
32372         ArgumentNullException.
32373
32374         Added new check for length == 0, however
32375         I need to make it return String.Empty from the C code.
32376         
32377         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
32378         that calculate the length for us here.
32379         
32380         (mono_string_Internal_ctor_sbytep_int_int): Replaced
32381         mono_string_new_utf16 with mono_string_new, since value is utf8.
32382
32383 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32384
32385         * object.c: register the object for finalization if needed.
32386         Allocate one more char in the string for the terminating 0 char.
32387
32388 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32389
32390         * class.c, class.h, image.c: check if a type implemenst a destructor.
32391         Use the proper key for array class lookups.
32392         * icall.c: register the icalls in the System.GC class.
32393         * gc.c, gc.h: GC-related functions and icalls.
32394
32395 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32396
32397         * icall.c:
32398         * socket-io.c:
32399         * unicode.c: free some strings gotten from mono_string_to_utf8 and
32400         changed a couple of free () by g_free ().
32401
32402         * decimal.c: one-liner in the comments for decimal2string ().
32403
32404 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
32405
32406         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
32407
32408 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
32409
32410         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
32411         * object.c (mono_runtime_invoke_array) : handle null in params
32412
32413 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
32414
32415         * string-icalls.c: fixed bug in split (one off bug)
32416
32417 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
32418
32419         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
32420         * icalls.c: added String::Equals as internal method
32421
32422 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
32423
32424         * threads.c: fixed bug in the double interlocked functions
32425
32426 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
32427
32428         * threads.c: implemented all of the new interlocked icalls.
32429         * string-icalls.c: fix a bug in insert.
32430         * icalls.c: added the icalls for interlocked, removed old string functions.
32431         
32432 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32433
32434         * loader.c: fix off-by-one error when reading argument names.
32435
32436 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32437
32438         * profiler.c: win32 counter implementation (untested).
32439         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
32440         (the latter needs testing and more complete impl. from win32 folks).
32441
32442 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
32443
32444         * object.c: mono_array_new_full workaround mono_array_class_get
32445         problem.
32446
32447 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
32448
32449         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
32450         * object.h (mono_string_chars): Changed casting type.
32451
32452 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
32453
32454         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
32455                            method signatures to use gunichar2 instead of gint16.
32456
32457 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
32458
32459         * object.h, object.c: domain-specific versions of mono_object_new and
32460         mono_array_new.
32461
32462 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
32463
32464         * object.c: changed String layout
32465
32466         * string-icalls.c (mono_string_Internal_ctor_chara): added
32467         internal string constructors.
32468
32469 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
32470
32471         * threads.c: pass 'this' to the thread start routine.
32472
32473 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32474
32475         * string-icalls.c: fix IndexOf and LastIndexOf. Now
32476         InternalCompareStr don't call twice mono_string_cmp_char for the last
32477         character. Improved performance in mono_string_cmp_char.
32478
32479 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32480
32481         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
32482         code into its own library: libmonoruntime.
32483
32484 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
32485
32486         * object.h, object.c: changed array format so that szarrays do not
32487         require a bounds structure.
32488         * icall.c, appdomain.c: support for new szarray format.
32489
32490 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32491
32492         * metadata.c: compare also the retuns type when comparing signatures:
32493         we didn't do this as an optimization since really overloaded methods
32494         must differ also in the arguments, but this doesn't work with
32495         low-level IL code (or when using explicit conversion operators: see
32496         bug#23498 for an example).
32497
32498 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32499
32500         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
32501
32502 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
32503
32504         * icall.c: make MonoType::GetElementType its own icall.
32505
32506 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32507
32508         * icall.c: remove MonoMethod_get_Name().
32509         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
32510         object.
32511
32512 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
32513
32514         * string-icalls.c: optimized a few methods.
32515
32516 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
32517
32518         * icall.c: added all new string internal calls
32519         * string-icalls.c: added, new string internal call implementation.
32520         * object.c: added mono_string_new_size for allocating a string a size
32521
32522 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
32523
32524         * object.c (mono_object_isinst): use the same code as in the
32525         optimized x86 version.
32526
32527 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32528
32529         * profiler.c: TSC-based timer code (faster and more accurate).
32530         Not hooked up in configure, yet (set USE_X86TSC to 1).
32531
32532 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
32533
32534         * profiler.c, profiler.h: track time spent compiling methods.
32535         * threads.c: track thread creation/destruction.
32536
32537 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
32538
32539         * profiler.c, profiler.h, profiler-private.h: profiling interface
32540         and sample implementation. Moved here so that it can be used also by
32541         the jit.
32542
32543 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
32544
32545         * reflection.c, reflection.h: keep types and other handles separate in
32546         the hash tables for referred tokens. Add guid for modules.
32547
32548 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
32549
32550         * assembly.c: fix bugs found with valgrind.
32551         * metadata.h, metadata.c: added mono_metadata_guid_heap().
32552
32553 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
32554
32555         * threads: added icall support for getting current domain for
32556                    the thread.
32557  
32558 2002-04-13  Martin Baulig  <martin@gnome.org>
32559
32560         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
32561         (MonoDebugVarInfo): Added `index' field for register based addresses.
32562         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
32563         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
32564         `MonoDebugVarInfo *params' and `guint32 this_offset' with
32565         `MonoDebugVarInfo *this_var'.
32566
32567         * debug-symfile.c (relocate_variable): New static function to write
32568         a location description for a local variable or method parameter.
32569
32570 2002-04-12  Martin Baulig  <martin@gnome.org>
32571
32572         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
32573         stack offset and begin/end scope address of a local variable.
32574         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
32575         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
32576         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
32577
32578         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
32579         Added new relocation types for start/end scope of a local variable.
32580
32581 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32582
32583         * object.h: add mono_object_domain() macro.
32584         * reflection.c: handle typespecs.
32585         * icall.c: MonoMethod::get_Name() implementation.
32586
32587 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32588
32589         * icall.c: String::GetHashCode() icall implementation.
32590
32591 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32592
32593         * icall.c: String::IndexOfAny icall.
32594         * object.c, object.h: make array->max_length more useful.
32595         Intrduced mono_object_class() and mono_string_length() macros.
32596
32597 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32598
32599         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
32600         instead of g_unichar_isdigit.
32601
32602 2002-04-11  Nick Drochak  <ndrochak@gol.com>
32603
32604         * icall.c: Implement a simple Double.ToString().
32605
32606 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32607
32608         * appdomain.h: only io-layer.h is supposed to be included.
32609         * icall.c: explicitly import environ. Fix warning.
32610
32611 2002-04-10  Nick Drochak  <ndrochak@gol.com>
32612
32613         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
32614                 return true even if it's not Daylight Savings time.
32615                 Only return false for the case where the function isn't
32616                 implemented for a plaform (read Windows).
32617
32618 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32619
32620         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
32621         data with a mutex.
32622
32623 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
32624
32625         * mempool.c (mono_mempool_alloc): only use g_malloc when
32626         absolutely necessary.
32627
32628 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
32629
32630         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
32631
32632         * class.c (mono_class_vtable): use domain mempool to allocate vtable
32633         (mono_class_proxy_vtable): use domain mempool
32634
32635 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
32636
32637         * appdomain.h, appdomain.c: split initialization that requires the
32638         execution engine support into mono_runtime_init().
32639
32640 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
32641
32642         * class.c (mono_class_init): don't include vtable inside MonoClass
32643         to save some memory, gather some statistics.
32644         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
32645
32646 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32647
32648         * icall.c: internalcall implementation for ValueType.Equals().
32649
32650 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
32651
32652         * object.c (mono_message_init): moved 
32653         (mono_runtime_exec_main): new arch. independent impl.
32654         (mono_runtime_invoke_array): new method - like
32655         mono_runtime_invoke, but you can pass an array of objects.
32656         (mono_remoting_invoke): new arch. independent impl.
32657         (mono_message_invoke): new arch. independent impl.
32658         (mono_runtime_class_init): new arch. independent impl.
32659         (mono_runtime_object_init): new arch. independent impl.
32660
32661 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32662
32663         * metadata.c, object.c, reflection.c: documented the exported
32664         functions.
32665
32666 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
32667
32668         * icall.c: simpler code to pass the assembly builder data to corlib.
32669         Implement GetNestedTypes() internalcall.
32670
32671 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32672
32673         * class.c: warn if a type can't be loaded.
32674
32675 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
32676
32677         * image.h: typedef MonoImageOpenStatus
32678         * types.h: removed unused file
32679         
32680 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
32681
32682         * icall.c: Enum_ToObject accepts enum value arguments.
32683
32684 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32685
32686         * class.c: move initialization of properties, events and nested
32687         classes, so that they happen for interfaces, too.
32688
32689 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
32690
32691         * icall.c: cleanup some ugly casts in Array_SetValue*.
32692
32693 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32694
32695         * icall.c: the values array fro enums is of the correct type, now.
32696         Implement (correctly) getFullName instead of assQualifiedName for
32697         MonoType.
32698         * reflection.h, reflection.c: added mono_type_get_name ().
32699
32700 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32701
32702         * assembly.c, image.h: for each MonoImage, record from wich assembly
32703         it was loaded.
32704         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
32705         Make Type.Assembly work.
32706
32707 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
32708
32709         * debug-symfile.h: use char* instead of gpointer to avoid
32710         unnecessary casts.
32711
32712         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
32713
32714         * icall.c (ves_icall_InternalExecute): impl. FielSetter
32715         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
32716
32717 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
32718
32719         * icall.c (mono_message_init): impl. (code cleanup)
32720         (ves_icall_InternalExecute): impl. FieldGetter
32721
32722         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
32723         defined we call all (non-static)methods through the vtable. 
32724
32725 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
32726
32727         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
32728         finalizer even though the memory is still referenced (and the chunk of
32729         memory is not freed).
32730
32731 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32732
32733         * assembly.c: fix brokeness.
32734
32735 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
32736
32737         * class.c: kill some warnings. Check explicit interface method
32738         implementation also without considering the namespace.
32739         Load also literal strings in static class data.
32740
32741 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
32742
32743         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
32744         (default_assembly_name_resolver): Make the resolver take the
32745         "base" directory where the assembly was originally defined, so we
32746         can load DLLs that are in the same directory as the assembly that
32747         is being referenced.
32748
32749 2002-03-28  Dick Porter  <dick@ximian.com>
32750
32751         * file-io.h: 
32752         * file-io.c:
32753         * socket-io.c: 
32754         * unicode.h: 
32755         * unicode.c: Warning cleanups
32756
32757 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
32758
32759         * object.h, reflection.h: use the correct type instead of MonoObject.
32760
32761 2002-03-28  Martin Baulig  <martin@gnome.org>
32762
32763         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
32764         (mono_debug_update_symbol_file): Initialize classes if necessary.
32765
32766 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32767
32768         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
32769         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
32770
32771 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
32772
32773         * assembly.h: fix function prototype.
32774         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
32775         * mono-endian.h: use const cast.
32776
32777 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
32778
32779         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
32780
32781 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32782
32783         * loader.c: don't assert when a typeref can't be loaded, give
32784         a chance to the runtime to trow an exception instead.
32785         * loader.h: fix warning.
32786
32787 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
32788
32789         * class.c (mono_class_proxy_vtable): added proxy support
32790
32791 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
32792
32793         * icall.c: removed last of PAL calls, added System.Environment
32794         * file-io.h, file-io.c: MonoIO implementation
32795         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
32796
32797 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32798
32799         * appdomain.c: do not use the byte marker in ldstr table lookup.
32800         * debug-helpers.c: allow two ':' to separate class and method name.
32801         * object.c: allocate arrays bounds with the GC, too.
32802         * verify: add a few more checks.
32803
32804 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
32805
32806         * reflection.c: output also literal strings. Allocate parameter data
32807         with GC_malloc() (thanks, Martin, for catching this!).
32808
32809 2002-03-26  Martin Baulig  <martin@gnome.org>
32810
32811         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
32812         include the `this' offset in the `param_offsets'.
32813
32814 2002-03-25  Martin Baulig  <martin@gnome.org>
32815
32816         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
32817         mono_debug_get_class() function to get the classes. Added new
32818         relocation types for arrays and strings.
32819         (mono_debug_get_class): New static function to search in all
32820         referenced assemblies for a metadata token.
32821
32822         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
32823
32824 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32825
32826         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
32827         hold gc-allocated objects. Make the string heap a stream like the
32828         others. Removed duplicated code when writing stream info.
32829         Added asserts to catch possible buffer overflows. Set the sorted map
32830         for tables that need sorting. Added some documentation.
32831
32832 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
32833
32834         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
32835         for interned strings and vtables.
32836
32837 2002-03-24  Martin Baulig  <martin@gnome.org>
32838
32839         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
32840         it in the array since it was created with g_slist_prepend().
32841
32842 2002-03-24  Martin Baulig  <martin@gnome.org>
32843
32844         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
32845         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
32846         (mono_debug_method_from_token): Renamed to
32847         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
32848         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
32849
32850         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
32851         relocation types.
32852
32853         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
32854
32855 2002-03-24  Martin Baulig  <martin@gnome.org>
32856
32857         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
32858         (mono_debug_method_from_token): New func.
32859
32860         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
32861         New interncall, calls mono_debug_local_type_from_signature().
32862         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
32863         calls mono_debug_method_from_token().
32864
32865 2002-03-23  Martin Baulig  <martin@gnome.org>
32866
32867         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
32868         specifies the number of bytes to be converted, not the array size.
32869         Return the number of chars, not the number of bytes.
32870         (ves_icall_iconv_get_chars): The `byteCount' argument
32871         specifies the number of bytes to be converted, not the array size.
32872
32873 2002-03-23  Martin Baulig  <martin@gnome.org>
32874
32875         * reflection.h (MonoReflectionSigHelper): New type.
32876
32877         * reflection.c (mono_reflection_sighelper_get_signature_local),
32878         (mono_reflection_sighelper_get_signature_local): New functions.
32879
32880         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
32881         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
32882         interncalls.
32883
32884 2002-03-23  Martin Baulig  <martin@gnome.org>
32885
32886         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
32887         is_writeable is set.
32888         (mono_raw_buffer_update): New function to write the modified map
32889         back to disk.
32890
32891         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
32892
32893         * debug-symfile.c (mono_debug_update_symbol_file): Call
32894         mono_raw_buffer_update() when done writing.
32895
32896 2002-03-23  Martin Baulig  <martin@gnome.org>
32897
32898         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
32899
32900         * debug-symfile.c: Added support for arguments and local variables.
32901
32902 2002-03-23  Dick Porter  <dick@ximian.com>
32903
32904         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
32905         protected by ifdefs, hence breaking the w32 build.
32906
32907 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32908
32909         * object.c: implement is_interned() the right way.
32910
32911 2002-03-21  Martin Baulig  <martin@gnome.org>
32912
32913         * debug-symfile.[ch]: New files to handle debugging information
32914         files. There's also support to dynamically update these symbol
32915         files to include machine dependent information.
32916
32917 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
32918
32919         * threads.c (mono_thread_create): new function to create thread
32920         from C
32921
32922 2002-03-20  Martin Baulig  <martin@gnome.org>
32923
32924         * icall.c (ves_icall_InternalInvoke): Create a new object if the
32925         method is a constructor.
32926         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32927         points to ves_icall_InternalInvoke().
32928
32929 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
32930
32931         * file-io.c: Flush shouldn't throw exceptions.
32932
32933 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
32934
32935         * file-io.c: FileStream flush support; FileSetLength now
32936         restores file pointer.
32937
32938 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32939
32940         * class.c: set image for pointer classes.
32941
32942 2002/03/19  Nick Drochak <ndrochak@gol.com>
32943
32944         * sysmath.c: Forgot one.
32945
32946 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
32947
32948         * sysmath.c: Avoid redefining existing names.
32949
32950 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
32951
32952         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32953         handled by runtime as icall rather than dllimport from libm.so
32954         * file-io.c, file-io.h: fixed handle argument type.
32955
32956 2002-03-18  Dick Porter  <dick@ximian.com>
32957
32958         * reflection.c (mono_image_get_type_info): rename interface to
32959         iface, because of "#define interface struct" on windows.
32960
32961 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32962
32963         * class.c, class.h: rename and export mono_ptr_class_get().
32964         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32965         * reflection.c, reflection.h, icall.c: better/saner type name
32966         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32967         method signatures.
32968
32969 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
32970
32971         * class.c (mono_class_init): removed hardcoded GHC_SLOT
32972
32973         * icall.c (ves_icall_InternalInvoke): impl.
32974
32975 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32976
32977         * reflection.c: output the interface map table, too.
32978
32979 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
32980
32981         * class.c (class_compute_field_layout): separate computation of 
32982         static field layout
32983
32984 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
32985
32986         * icall.c: added System.Buffer support.
32987         * file-io.c: moved file icalls from PAL to FileStream.
32988
32989 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
32990
32991         * icall.c (ves_icall_System_Object_GetHashCode): impl.
32992
32993 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
32994
32995         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32996
32997 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32998
32999         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
33000
33001 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
33002
33003         * debug-helpers.{c,h}: moved here from monograph some useful functions
33004         to locate a method by name/signature in a class or image. Included
33005         also a small and flexible IL disassembler.
33006
33007 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33008
33009         * reflection.c: fixup tokens in methods with small header size, too.
33010
33011 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
33012
33013         * object.c (mono_string_to_utf8): remove assert(!error), instead
33014         print a warning. 
33015
33016 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
33017
33018         * icall.c: update to the new mono_Array_class_get interface.
33019
33020 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
33021
33022         * appdomain.c, object.c: Boehm-GC enable.
33023         * icall.c: make get_data_chunk() support split data requests.
33024         Ensure a class is initialized in more cases. Return only the first
33025         property found in GetProperties() or the compiler gets confused. 
33026         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
33027         * reflection.h, reflection.c: add fixup mechanism for field and method
33028         tokens. Initialize assembly->typeref in a single place. Output
33029         properties after events. Support custom attributes for events, too.
33030         Typo fix for paramter custom attrs.
33031
33032 2002-03-07  Martin Baulig  <martin@gnome.org>
33033
33034         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
33035
33036 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
33037
33038         * class.c (mono_array_class_get): fix. for multi. dim. arrays
33039
33040 2002-03-06  Martin Baulig  <martin@gnome.org>
33041
33042         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
33043         non-zero lower bounds. See testcases #F10-#F13.
33044
33045 2002-03-05  Martin Baulig  <martin@gnome.org>
33046
33047         * exception.c (mono_get_exception_argument_out_of_range): New exception.
33048
33049         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
33050         ves_icall_System_Array_GetValue(), only calculate the absolute array position
33051         here.
33052         (ves_icall_System_Array_SetValue): Likewise.
33053         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
33054         as argument and does the actual work. This function is used when copying a
33055         multi-dimensional array.
33056         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
33057         now do all the widening conversions of value types.
33058         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
33059
33060 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33061
33062         * class.c: remove some magic numbers and use the smbolic names,
33063         instead. Added init_events() to load event info at class init time.
33064         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
33065         and mono_metadata_methods_from_event().
33066         * reflection.h, reflection.c: added support for writing out the evnets
33067         related information.
33068
33069 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
33070
33071         * reflection.h, icall.c: use a different method (GetInterfaces)
33072         to gather interface info and add isbyref, isprimitive and
33073         ispointer to the ves_icall_get_type_info() return value.
33074
33075 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
33076
33077         * class.h: stared adding support for events.
33078         * icall.c: split find_members implementation. Added debug icall to get
33079         the address of an object.
33080         * reflection.c: handle TypeBuilders in mono_type_get_object().
33081
33082 2002-03-01  Martin Baulig  <martin@gnome.org>
33083
33084         * icall.c (ves_icall_System_Array_GetLength): This must throw an
33085         ArgumentOutOfRangeException(), not an ArgumentException().
33086         (ves_icall_System_Array_GetLowerBound): Likewise.
33087         (ves_icall_System_Array_GetValue): Improved argument checking.
33088         (ves_icall_System_Array_SetValue): Improved argument checking.
33089
33090 2002-03-01  Martin Baulig  <martin@gnome.org>
33091
33092         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
33093         called with invalid arguments rather than just dying with g_assert().
33094         (ves_icall_System_Array_SetValue): Likewise.
33095         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
33096         raise a NotImplementedException instead.
33097         (ves_icall_System_Array_GetLength): Added argument checking.
33098         (ves_icall_System_Array_GetLowerBound): Added argument checking.
33099
33100 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
33101
33102         * object.h (mono_assert): new macros mono_assert and
33103         mono_assert_not_reached
33104
33105 2002-02-28  Martin Baulig  <martin@gnome.org>
33106
33107         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
33108         and "System::String::IsInterned" to "System::String::_IsInterned".
33109
33110 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
33111
33112         * icall.c: remove hacks for typebuilder. Added icall to create a
33113         modified type from a tybebuilder.
33114         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
33115         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
33116         to create a backing MonoClass for a TypeBuilder.
33117
33118 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33119
33120         * class.c, class.h: more refactoring of class init.
33121         Export mono_class_setup_mono_type() and mono_class_setup_parent().
33122
33123 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
33124
33125         * marshal.c, marshal.h: start of marshaling interface.
33126
33127 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33128
33129         * icall.c: fix order in assembly qualified name icall.
33130
33131 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33132
33133         * class.c: do not free str, since we store it in the hash table.
33134         * reflection.h: add label field to MonoILExceptionInfo.
33135         * reflection.c: handle references to more than one assembly. Handle
33136         case when there isn't a module created in the assembly.
33137
33138 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
33139
33140         * class.c: Fix typo. Start refactoring of class init code.
33141
33142 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
33143
33144         * appdomain.c: exit with 1 on error.
33145         * class.c: we already have the name in MonoClassField.
33146         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
33147         MonoStreamHeader instead of an offset of image->raw_metadata.
33148
33149 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
33150
33151         * appdomain.c (mono_init): Be even more descriptive about the error.
33152
33153 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
33154
33155         * appdomain.c: give the user an informative message when corlib can't
33156         be loaded.
33157
33158 2002-02-26  Martin Baulig  <martin@gnome.org>
33159
33160         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
33161         New icall to get the time zone data.
33162
33163 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33164
33165         * reflection.c: set virtual and raw size of section correctly.
33166         * threads.c: transfer domain information to newly created threads.
33167
33168 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33169
33170         * class.c: when instancing a class in a domain, load the default
33171         vaules for static fields from the constant table. Fix System.Enum to
33172         not be an enum.
33173         * icall.c: implement Object::GetType() internalcall. Implemented
33174         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
33175         Fixed checking of binding flags in find_members().
33176         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
33177         * reflection.c: handle enumerations when writing to the constant
33178         table. Use a different object cache for types.
33179
33180
33181 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
33182
33183         * object.c (mono_object_isinst): fix for arrays
33184
33185         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
33186
33187 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33188
33189         * object.c: don't use mprotect ()  and fix intern pool hash table
33190         lookup for big endian systems.
33191
33192 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33193
33194         * icall.c: change type_is_subtype_of () signature.
33195
33196 2002-02-21  Mark Crichton  <crichton@gimp.org>
33197
33198         * rand.c, rand.h: Added random number generator for
33199         System.Security.Cryptography classes.
33200
33201         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
33202
33203         * icall.c: Added System.Security.Cryptography calls.
33204
33205 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
33206
33207         * class.c, icall.c, metadata.c: better support for pointer types.
33208         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
33209         * reflection.c: Add support for getting custom attrs for properties
33210         and simplify some code.
33211
33212 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33213
33214         * icall.c: change getToken () and add custom attribute GetBlob()helper
33215         method.
33216         * reflection.h: add custom attrs array to the reflection builder structures.
33217         * reflection.c: encode and emit custom attributes for all the relevant
33218         reflection objects. Cache fieldref and methodref tokens. Change
33219         mono_image_create_token() interface to take a MonoDynamicAssembly.
33220         More complete custom attributes decoder. Load custom attributes for
33221         Assembly, Field, Method and Constructor objects, too. Make the
33222         returned array an Attribute[] one, not object[]. Added
33223         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
33224         custom attribute constructor.
33225
33226 2002-02-20  Dick Porter  <dick@ximian.com>
33227
33228         * icall.c:
33229         * rawbuffer.c:
33230         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
33231         problem code out for now).
33232
33233 2002-02-19  Radek Doulik  <rodo@ximian.com>
33234
33235         * object.c (mono_ldstr): use hash table to avoid multiple swapping
33236
33237 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
33238
33239         * icall.c: register the GetCustomAttributes method.
33240         * object.c, object.h: add mono_string_new_len ().
33241         * reflection.h, reflection.c: added mono_runtime_invoke(),
33242         mono_install_runtime_invoke(). Added
33243         mono_reflection_get_custom_attrs () to load custom attributes and
33244         create the attribute objects.
33245
33246 2002-02-19  Dick Porter  <dick@ximian.com>
33247         * threads-dummy-types.c:
33248         * threads-dummy-types.h:
33249         * threads-dummy.c:
33250         * threads-dummy.h:
33251         * threads-pthread-types.c:
33252         * threads-pthread-types.h:
33253         * threads-pthread.c:
33254         * threads-pthread.h:  Deleted obsolete files
33255
33256 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
33257
33258         * class.c (mono_class_vtable): runtime init the class when we
33259         allocate static class data.
33260
33261         * icall.c (ves_icall_System_Array_SetValue): check for null values.
33262
33263         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
33264         and String - but we will need generic marshalling support in the
33265         future. 
33266         (mono_init): set the domain name in a ms compatible way
33267
33268         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
33269         String[].
33270
33271 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
33272
33273         * object.c (mono_array_clone): use alloca() instead of g_malloc  
33274         for sizes
33275
33276         * appdomain.c (mono_domain_unload): impl.
33277
33278 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33279
33280         * appdomain.c, object.c: fix intern pool implementation.
33281         * class.c: fix alignment code.
33282
33283 2002-02-16  Radek Doulik  <rodo@ximian.com>
33284
33285         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
33286         and s2 > s1, just copy lower bytes to be compatible with little
33287         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
33288         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
33289
33290         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
33291         force big_endian to be 1 for big endian machines 
33292         (ves_icall_iconv_new_decoder): ditto
33293
33294 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
33295
33296         * socket-io.c (convert_sockopt_level_and_name): If the system
33297         doesn't define SOL_IP or SOL_TCP, get them by hand using
33298         getprotobyname() and caching the values (because this could be a
33299         slow operation).
33300         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
33301         Use the appropriate struct when the system does support it. Ie,
33302         not all systems have struct ip_mreqn so use struct ip_mreq when
33303         appropriate.
33304
33305 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
33306
33307         * reflection.c: handle finally clauses.
33308
33309 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
33310
33311         * socket-io.c: use g_snprintf() instead of snprintf.
33312
33313 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
33314
33315         * reflection.c (mono_param_get_objects): Cast second argument to
33316         mono_method_get_param_names to a const char** to silence the
33317         compiler warning.
33318
33319         * appdomain.c (mono_domain_assembly_open): Put parens around the
33320         truth statement in the for-loop.
33321
33322         * unicode.c (iconv_convert): Got rid of a compiler warning about
33323         int i being unused when the system has a new iconv.
33324         (iconv_get_length): Same.
33325
33326         * image.c (load_class_names): Cast the second argument to
33327         g_hash_table_insert() to char* to hush compiler warnings about the
33328         arg being a const.
33329         (mono_image_open): Same here.
33330
33331         * socket-io.c: Don't conditionally include sys/filio.h or
33332         sys/sockio.h here anymore since we now get them from
33333         io-layer/io-layer.h
33334         (inet_pton): If the system doesn't support inet_aton, implement
33335         using inet_addr and also #define INADDR_NONE if it isn't defined
33336         by the system.
33337
33338 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
33339
33340         * metadata.c, metadata.h: added function to get packing and size info
33341         of a typedef.
33342         * reflection.h, reflection.c: handle field RVA data. Save info about
33343         the table layout if needed. Assign typedef indexes to all the types
33344         before dumping the info about them to avoid forward reference problems.
33345
33346 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
33347
33348         * socket-io.c (convert_sockopt_level_and_name): ifdef
33349         SO_ACCEPTCONN because it is not defined on my system (old debian)
33350
33351 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
33352
33353         * opcode.c: use stddef.h to get NULL.
33354
33355 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
33356
33357         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
33358         for FIONBIO, FIONREAD and SIOCATMARK.
33359         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
33360         define INADDR_NONE and besides, inet_addr() is deprecated and
33361         should not be used. Use inet_pton() instead - it also has the
33362         added bonus that it can easily handle IPv6 addresses as well.
33363         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
33364
33365 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
33366
33367         * decimal.c: remove _MSC_VER conditional.
33368
33369 2002-02-13  Dick Porter  <dick@ximian.com>
33370
33371         * socket-io.c: 
33372         * icall.c: Internal calls for Blocking, Select, Shutdown,
33373         GetSocketOption and SetSocketOption
33374
33375 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33376
33377         * assembly.cs: better resolver: use it instead of some kludgy
33378         code.
33379
33380 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
33381
33382         * reflection.c: the best way to speed-up the compiler is to avoid
33383         infinite loops.
33384
33385 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
33386
33387         * class.c (mono_class_vtable): changed the object layout
33388         (obj->vtable->class). 
33389         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
33390
33391 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33392
33393         * assembly.c: look for assemblies in the assembly dir, too.
33394
33395 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33396
33397         * class.c: fix thinko in mono_class_from_type().
33398
33399 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33400
33401         * exception.h, exception.c: added TypeLoadException.
33402         * object.h, object.c: added mono_array_clone ().
33403         * icall.c: handle throwOnError in AssemblyGetType().
33404         Added Array.Clone().
33405         * opcode.h, opcode.c: use a single value for the opcode val.
33406         Compile fix for non-gcc compilers.
33407
33408 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
33409
33410         * opcodes.c, opcodes.h: export interesting info about opcodes.
33411
33412 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
33413
33414         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
33415         icalls. 
33416
33417         * class.c (class_compute_field_layout): set element_class for enums
33418         (mono_class_create_from_typedef): set element_class for normal classes
33419
33420         * icall.c (ves_icall_System_Enum_get_value): impl.
33421
33422         * class.c (mono_class_create_from_typedef): do not set valuetype
33423         flag for System.ValueType and System.Enum
33424
33425 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
33426
33427         * unicode.c (iconv_convert): fix big endian problem.
33428
33429 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33430
33431         * class.c: add asserts if we are ever going to scribble over memory.
33432         * socket-io.c: not all systems have AF_IRDA defined.
33433
33434 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
33435
33436         * class.c (class_compute_field_layout): do not consider static
33437         fields to compute alignment
33438
33439 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
33440
33441         * appdomain.c (mono_appdomain_get): impl.
33442         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
33443
33444 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
33445
33446         * icall.c: ignore "file://" prefix when loading an assembly.
33447
33448 2002-01-23  Dick Porter  <dick@ximian.com>
33449
33450         * socket-io.c:
33451         * icall.c:
33452         * Makefile.am: Added socket support
33453
33454 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
33455
33456         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
33457         code back.  This should return the assemblies that are loaded by
33458         the runtime on behalf of an application domain. 
33459
33460         The current implementation is still broken, it just returns every
33461         assembly loaded, but until we get real applications domain this
33462         will do.
33463
33464 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
33465
33466         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
33467         AppDomain object.
33468
33469 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
33470
33471         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
33472         the mono_class_from_name lookup.
33473         (ves_icall_get_parameter_info): ditto.
33474         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
33475         method.
33476         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
33477
33478 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
33479
33480         * class.c: load also nested classes on class init.
33481         System.ValueType instance methods gets passed boxed
33482         values, unless methods in derived classed that get a pointer to the
33483         data.
33484         * icall.c: use better name parsing code in GetType().
33485         * image.c, image.h: add mono_image_loaded ().
33486         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
33487         * reflection.c, reflection.h: added mono_reflection_parse_type().
33488
33489 2002-01-22  Veronica De Santis <veron78@interfree.it>
33490
33491         * icall.c : Added mapping of internal calls for Manual and Auto reset events
33492         * threads.c : Added the implementation of internal calls for events
33493         * threads.h : Added prototypes of internal calls for events
33494         
33495 2002-01-21  Radek Doulik  <rodo@ximian.com>
33496
33497         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
33498
33499 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
33500
33501         * class.c (mono_class_init): set min_align to 1 (instead of 0)
33502         (mono_class_value_size): use min_align
33503
33504 2002-01-20  Dick Porter  <dick@ximian.com>
33505
33506         * threads.h:
33507         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
33508         so it compiles on w32.
33509
33510 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
33511
33512         * metadata.c (mono_type_stack_size): impl.
33513
33514         * class.c (mono_class_get_field): impl. memberref token
33515
33516 2002-01-16 Veronica De Santis <veron78@@interfree.it>
33517
33518         * icall.h : Added the internal calls mapping for CreateMutex_internal
33519                     and ReleaseMutex_internal.
33520         * threads.h : Added the prototype of mutexes internal calls.
33521         * threads.c : Added the implementations of mutexes internal calls.
33522
33523 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33524
33525         * metaparse.h: removed unused file.
33526         * reflection.c, reflection.h: added stream_data_align () function 
33527         to align data in streams and keep stream aligned. Add support for
33528         exception support in method headers.
33529
33530 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
33531
33532         * unicode.c: make iconv_convert () return the number of bytess written
33533         in the output buffer.
33534
33535 2002-01-15  Dick Porter  <dick@ximian.com>
33536         * threads.c: Make the runtime's idea of infinite timeouts coincide
33537         with the class library's
33538
33539         Fix a particularly egregious bug in mono_thread_cleanup(). That
33540         code was so utterly bogus it must have been written on a Monday.
33541
33542 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33543
33544         * reflection.h: add subtypes field to TypeBuilder.
33545         * reflection.c: encode constants for literal fields.
33546         Handle subtypes. Fix user string token (and add a zero byte)
33547         at the end.
33548         
33549 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
33550
33551         * class.c (mono_class_init): bug fix: assign slot numbers for
33552         abstract methods.
33553
33554 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33555
33556         * reflection.c: don't try to output a code RVA for abstract methods.
33557         Small fixes for method header format. Output parameter info to the
33558         ParamDef table. Save method overriding info to MethodImpl table.
33559         Fix property support. Allow typedef.extends to be a type in the
33560         building assembly.
33561         * verify.c: fix off-by-one error.
33562
33563 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
33564
33565         * class.c: fix mono_class_from_mono_type () for szarray types.
33566         Remove unused cache check in mono_class_from_type_spec().
33567         * icall.c: *type_from_name () functions handle simple arrays and byref.
33568         * reflection.c: handle byref and szarray types. Handle methods without
33569         body (gets P/Invoke compilation working). Handle types and fields in
33570         get_token ().
33571         * reflection.h: add rank to MonoTypeInfo.
33572
33573 2002-01-10  Dick Porter  <dick@ximian.com>
33574
33575         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
33576         internal calls
33577
33578 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33579
33580         * icall.c: initialize class in type_from_handle ().
33581         Loop also in parent classes for get_method ().
33582         * reflection.c: properly encode class and valuetype types.
33583         Start on encoding TypeBuilder types. Handle fieldrefs.
33584         Use correct length when registering a user string.
33585         Handle ConstructorBuilder and MonoMethod in get_token ().
33586         Make mono_type_get_object () aware of cached types.
33587         * object.c: back out change to mono_string_new ().
33588
33589 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
33590         * object.c: mono_string_new should return a NULL when the string 
33591         passed in is NULL -- not try to deference it.
33592         
33593 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
33594
33595         * icall.c: hack to make IsSubType work for TypeBuilders.
33596         * reflection.c: emit constructors before methods.
33597         Retrieve param names in mono_param_get_objects().
33598
33599 2002/01/05  Nick Drochak  <ndrochak@gol.com>
33600
33601         * Makefile.am: fix list of headers and sources so automake 1.5
33602         doesn't complain. Removed \# at end of list.
33603
33604 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33605
33606         * reflection.c: get token for a method ref. Set return type of
33607         constructor to void.
33608         * loader.c: debug message.
33609         * class.c: typo fix.
33610
33611 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
33612
33613         * icall.c: fix array init with rank > 1. FindMembers
33614         loops in parent class as well.
33615         * image.c: do not insert nested types in name cache.
33616         * reflection.c: warning fix.
33617         * reflection.h: add override method (for interface impl).
33618
33619 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
33620
33621         * metadata.c: fix customattr decoding.
33622
33623 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
33624
33625         * rawbuffer.cs: Added native Win32 implementation, avoids using
33626         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
33627
33628 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
33629
33630         * class.c: make the low-level routines handle the cache.
33631
33632 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
33633
33634         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
33635
33636 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
33637
33638         * class.c: fix mono_array_element_size() for objects.
33639         * class.h, class.c: add properties to MonoClass and load them
33640         at init time.
33641         * icall.c: check with isinst() when assigning a value to an array
33642         instead of requiring the classes to match exactly.
33643         Implemented icall for System.Type::GetType().
33644         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
33645         enums. Handle bindingflags when looking for methods and fields.
33646         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
33647         and mono_metadata_methods_from_property().
33648         * reflection.h, reflection.c: added structures for propreties,
33649         parameters and enums. Implemented mono_property_get_object() and
33650         mono_param_get_objects().
33651
33652 2001-12-18  Dick Porter  <dick@ximian.com>
33653
33654         * file-io.c: Use mono_string_to_utf16() instead of
33655         mono_string_chars()
33656
33657         * object.c: Added mono_string_to_utf16(), which copies the non
33658         NULL-terminated MonoString into a new double-null-terminated
33659         buffer.
33660
33661 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
33662
33663         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
33664
33665 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
33666
33667         * file-io.c: raise exceptions if handle is invalid.
33668
33669 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
33670
33671         * assembly.c: yet another check for mscorlib.
33672         * class.c, class.h: load nesting info for classes.
33673         * icall.c: many new functions to support the Reflection classes.
33674         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
33675         * reflection.h, reflection.c: mono_image_create_token(),
33676         mono_assembly_get_object(), mono_type_get_object(),
33677         mono_method_get_object(), mono_field_get_object(): methods to return
33678         objects that parallel the C representation of assemblies, types,
33679         methods, fields.
33680
33681 2001-12-11  Dick Porter  <dick@ximian.com>
33682
33683         * icall.c:
33684         * file-io.c: Internal calls for file IO.
33685
33686 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
33687
33688         * tabledefs.h: missing FileAttributes.
33689         * verify.h, verify.c: use is_valid_string () to simplify and check for
33690         valid strings more correctly. Fix warnings and speeling.
33691         Check more tables: Filed, File, ModuleRef, StandAloneSig.
33692         Check code: branches, maxstack, method calls.
33693
33694 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
33695
33696         * object.c (mono_object_allocate): removed static, so that the jit
33697         can allocate value types.
33698
33699         * icall.c (ves_icall_System_DateTime_GetNow): impl.
33700
33701 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33702
33703         * class.c: init enum types right away and register the
33704         token->MonoClass map in mono_class_create_from_typedef ().
33705         * verify.h, verify.c: first cut of the verifier.
33706         * pedump.c: add --verify switch to verify metadata tables.
33707         * tabledefs.h: add some missing enums.
33708
33709 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
33710
33711         * class.c (mono_install_runtime_class_init): impl.
33712         (mono_class_init): renamed mono_class_metadata_init to
33713         mono_class_init, also removed the metadata_inited flag
33714
33715         * object.c (mono_object_isinst): use faster algorithm
33716
33717 2001-11-30  Radek Doulik  <rodo@ximian.com>
33718
33719         * mono-endian.h: reverted last change
33720         added function prototypes
33721
33722         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
33723         add mono-endian.c back
33724
33725         * mono-endian.c: returned back, as Paolo pointed out, it's needed
33726         for unaligned access, I've mistaked it with endianess. I am
33727         sorry.
33728         (mono_read16): fix reverted endianess
33729         (mono_read64): ditto
33730         (mono_read32): ditto
33731
33732 2001-11-30  Dick Porter  <dick@ximian.com>
33733
33734         * exception.c: Implement mono_exception_from_name()
33735
33736 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33737
33738         * metadata.h, metadata.c: remove params_size and locals_size and their
33739         calculation from the metadata code: they are only usefult to the
33740         interp.
33741
33742 2001-11-29  Radek Doulik  <rodo@ximian.com>
33743
33744         * object.c (mono_ldstr): swap bytes here, it's probably not the
33745         best place, but works for me now, I'll redo it once I know mono
33746         better, also note that I add PROT_WRITE and don't reset back, also
33747         note that it's only affects big endians, so x86 should be OK
33748
33749         * mono-endian.h (read16): use just glib macros for both endians
33750
33751         * mono-endian.c: removed as glib macros are used in in
33752         mono-endian.h so we don't need to care about endianess for read
33753         macros as glib does that for us already
33754
33755 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
33756
33757         * class.h, class.h: take minimum alignment into consideration so
33758         that the fields of a class remain aligned also when in an array.
33759
33760 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33761
33762         * loader.h, loader.c: add mono_method_get_param_names().
33763         * class.c: 0-init class fields.
33764
33765 2001-11-26  Dick Porter  <dick@ximian.com>
33766
33767         * icall.c:
33768         * threads-types.h:
33769         * threads.c: New file that handles System.Threading on all platforms
33770
33771         * object.c: 
33772         * object.h: Remove the synchronisation struct from MonoObject,
33773         replace it with a pointer that gets initialised on demand
33774
33775         * Makefile.am: Replace all the system-specific threading code with
33776         a single file that uses the new wrapper library
33777
33778 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
33779
33780         * class.c, class.h: add mono_install_trampoline() so that the runtime
33781         can register a function to create a trampoline: removes the ugly
33782         requirement that a runtime needed to export arch_create_jit_trampoline.
33783         * object.h, object.c: added mono_install_handler() so that the runtime
33784         can install an handler for exceptions generated in C code (with
33785         mono_raise_exception()). Added C struct for System.Delegate.
33786         * pedump.c: removed arch_create_jit_trampoline.
33787         * reflection.c: some cleanups to allow registering user strings and
33788         later getting a token for methodrefs and fieldrefs before the assembly
33789         is built.
33790         * row-indexes.h: updates and fixes from the new ECMA specs.
33791
33792 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
33793
33794         * class.h, class.c: add enum_basetype field to MonoClass.
33795         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
33796         to get index in the constant table reated to a field, param or
33797         property.
33798         * reflection.h, reflection.c: handle constructors. Set public-key and
33799         version number of the built assembly to 0.
33800         * row-indexes.h: update from new ECMA spec.
33801
33802 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33803
33804         * class.h, class.c: add a max_interface_id to MonoClass.
33805         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
33806         since it's used to do that. Added mono_type_type_from_obj().
33807         Make GetType() return NULL instead of segfaulting if the type was not
33808         found. Handle simple arrays in assQualifiedName.
33809         * object.h: add a struct to represent an Exception.
33810         * reflection.c: output call convention in method signature.
33811         Add code to support P/Invoke methods and fixed offsets for fields.
33812
33813 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
33814
33815         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
33816         the value.
33817         * icall.c: use mono_array_addr instead of array->vector: fixes the
33818         reflection image writing.
33819         * reflection.c: init call convention byte to 0 in method signature.
33820         Encode the property signature. Don't output property-related methods
33821         twice. Really process the properties for a type (don't cast a field to
33822         a property, my mom always told me that).
33823         Fix 64 bit issues in pointer alignment in a different and more
33824         readable way.
33825
33826 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
33827
33828         * loader.h: Removed type class from MonoDefaults, added monotype
33829
33830         * loader.c: Loaded MonoType, removed loading of Type
33831
33832         * icall.c (my_mono_new_object): Now returns a System.MonoType,
33833         and fills in System.Type._impl with a RuntimeTypeHandle rather
33834         than the actual MonoClass *
33835
33836         (ves_icall_type_from_handle): change from type_class to
33837         monotype_class
33838
33839         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
33840         implemented
33841
33842         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
33843         implemented
33844
33845         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
33846
33847         (ves_icall_System_Reflection_Assembly_GetType): implemented
33848
33849         (ves_icall_System_MonoType_assQualifiedName): implemented
33850
33851         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
33852
33853 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
33854
33855         * assembly.c (mono_assembly_open): Implement a cache for the
33856         assemblies. 
33857
33858         (mono_assembly_close): only destroy the assembly when the last
33859         reference is gone.
33860         
33861 2001-11-09  Dick Porter  <dick@ximian.com>
33862
33863         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
33864
33865 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
33866
33867         * class.c (mono_class_metadata_init): bug fix: compute the right slot
33868
33869 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33870
33871         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
33872         from Martin Weindel.
33873         * object.h: add mono_string_chars ().
33874
33875 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
33876
33877         * reflection.c (build_compressed_metadata): Eliminates warnings
33878         and uses 64-bit clean code.
33879
33880         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
33881         (mono_type_equal): Change signature to eliminate warnings.
33882
33883 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33884
33885         * icall.c, loader.c: remove the internalcall array constructors.
33886         Changes to match the new MonoArray structure.
33887         * object.h, object.c: an array object doesn't allocate an extra
33888         vector. Add mono_array_new_full () to create jagged arrays easily.
33889
33890 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33891
33892         * metadata.h, metadata.c: add mono_metadata_field_info () to
33893         retreive all the info about a field from vairous tables.
33894         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
33895         * class.h, class.c: augment MonoClassField with more info.
33896         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
33897         policy and load a field's RVA if needed.
33898
33899 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
33900
33901         * class.c (mono_class_metadata_init): create a trampoline for all
33902         virtual functions instead of actually compiling them.
33903
33904 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
33905
33906         * class.h, class.c: include name in MonoClassField.
33907         * class.c: fix fundamental type of System.Object and System.String.
33908         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33909         tokens in ldtoken.
33910         * icall.c: remove internalcalls for the Reflection stuff that is now
33911         done in C# code.
33912         * loader.c: mono_field_from_memberref () implementation.
33913         * mono-endian.c: thinko (s/struct/union/g).
33914         * object.c, object.h: make the mono_string_* prototypes actually use
33915         MonoString instead of MonoObject.
33916         * reflection.c, reflection.h: updates for changes in the reflection
33917         code in corlib: we use C structures that map to the actual C# classes.
33918         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33919         fat method header if needed and use the info from the ILGenerator for
33920         methods. Handle fields in types. Misc fixes.
33921
33922 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
33923
33924         * class.c (mono_class_metadata_init): bug fix: always allocate
33925         space for static class data
33926
33927 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
33928
33929         * class.c (mono_compute_relative_numbering): use relative
33930         numbering to support fast runtime type checks.
33931
33932 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
33933
33934         * class.c (mono_class_create_from_typeref): added debugging output
33935         to print class name when MonoDummy is returned instead of real class
33936
33937 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
33938
33939         * class.c (mono_class_metadata_init): interface offset table now
33940         contains pointers into the vtable - this is more efficient for the jit
33941
33942 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
33943
33944         * class.c (mono_class_metadata_init): use a temporary vtable (the
33945         old algorithm only worked for the interpreter, but not for the jit)
33946
33947 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
33948
33949         * loader.c (method_from_memberref): use mono_class_get to get the
33950         class of an array instead of using System.Array directly.
33951         (mono_get_method): also add MEMBERREF methods to the method cache
33952         which usefull for arrays.
33953
33954 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
33955
33956         * pedump.c (arch_compile_method): added to compute vtable entry
33957
33958         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33959         number of interfaces.
33960         
33961         * class.h: merged MonoArrayClass into MonoClass
33962
33963         * class.c (mono_class_create_from_typedef): compute the vtable size and
33964         allocate space to include the vtable inside MonoClass
33965         (mono_class_metadata_init): initialize the vtable
33966
33967 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33968
33969         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33970         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33971         * image.c: endian fixes by Laurent Rioux.
33972         * object.h, object.c: rename MonoStringObject to MonoString and
33973         MonoArrayObject to MonoArray. Change some function names to conform to
33974         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33975         guint16* as first argument, so don't use char*.
33976         Provide macros to do the interesting things on arrays in a portable way.
33977         * threads-pthread.c: updates for the API changes and #include <sched.h>
33978         (required for sched_yield()).
33979         * icall.c: updates for the API changes above.
33980         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33981         platforms that need them.
33982
33983 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33984
33985         * class.c: set the correct type for all the fundamental
33986         type when loading the class.
33987
33988 2001-10-05  Dick Porter  <dick@ximian.com>
33989
33990         * threads-pthread.c (pthread_mutex_timedlock): Simple
33991         compatibility version for C libraries that lack this call.
33992
33993 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33994
33995         * class.c: MonoTypes stored in MonoClass are stored as
33996         fundamental MonoTypes when the class represents a
33997         fundamental type (System.Int32, ...).
33998         The TypeHandle return by ldtoken is a MonoType*.
33999         * icall.c: ves_icall_get_data_chunk () write out all the
34000         PE/COFF stuff. Implement ves_icall_define_method (),
34001         ves_icall_set_method_body (), ves_icall_type_from_handle ().
34002         * image.c: properly skip unknown streams.
34003         * loader.h, loader.c: add type_class to mono_defaults.
34004         * metadata.c, metadata.h: export compute_size () as
34005         mono_metadata_compute_size () with a better interface.
34006         Typo and C&P fixes.
34007         * pedump.c: don't try to print the entry point RVA if there is no entry point.
34008         * reflection.c, reflection.h: many cleanups, fixes, output method
34009         signatures and headers, typedef and typeref info, compress the metadata
34010         tables, output all the heap streams, cli header etc.
34011         * row-indexes.h: typo fixes.
34012
34013 2001-10-04  Dick Porter  <dick@ximian.com>
34014
34015         * object.h: Add a synchronisation mutex struct to MonoObject
34016
34017         * object.c (mono_new_object): Initialise the object
34018         synchronisation mutexes
34019
34020         * icall.c: System.Threading.Monitor internal calls
34021         
34022         * threads-pthread.h:
34023         * threads-pthread.c: System.Threading.Monitor internal calls
34024
34025         * threads-types.h: New file, includes the system-specific thread
34026         structures
34027         
34028         * threads-pthread-types.h:
34029         * threads-pthread-types.c: New files, handle pthread-specific
34030         synchronisation types
34031
34032         * threads-dummy-types.h: 
34033         * threads-dummy-types.c: New files of dummy support for
34034         thread-specific types
34035
34036         * metadata.c:
34037         * image.c:
34038         * pedump.c: include mono-endian.h not endian.h
34039         
34040         * Makefile.am: More threads files.
34041         Name mono-endian.h not endian.h
34042
34043 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
34044
34045         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
34046         stuff and implement a few more bits.
34047         * icall.c: a field needs to be dereferenced twice. Do not use the same
34048         name for two variables in the same scope.
34049         * image.c, image.h: cleanups.
34050
34051 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
34052
34053         * class.c (mono_class_metadata_init): bug fix: compute the right size
34054
34055 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
34056
34057         * icall.c: implemented some of the Reflection internalcalls.
34058         * image.c, image.h: start writing out the PE/COFF image.
34059         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
34060         that does the reverse than decode_blob_size ().
34061         * object.c: use mono_metadata_encode_value (). Move here
34062         temporary implementation of mono_string_to_utf8 ().
34063         * rawbuffer.c: make malloc_map static.
34064
34065 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34066
34067         * metadata.c: fix type comparison for arrays.
34068         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
34069         Added a couple of new classes to monodefaults.
34070         * icall.c: added a couple of Reflection-related internalcalls.
34071         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
34072         Added a byval_arg MonoType to MonoClass.
34073
34074 2001-09-28  Dick Porter  <dick@ximian.com>
34075
34076         * icall.c:
34077         * threads-pthread.h: 
34078         * threads-pthread.c: Implemented internal calls for
34079         LocalDataStoreSlot operations.  Applied mutexes around all shared
34080         data.  Reworked the thread creation and Start() operations to
34081         avoid a race condition.
34082         
34083         * threads-dummy.h:
34084         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
34085
34086 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
34087
34088         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
34089
34090 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
34091
34092         * class.c, loader.c: warn and return NULL instead of erroring out.
34093         * icall.c: added System.AppDomain::getCurDomain().
34094         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
34095
34096 2001-09-25  Dick Porter  <dick@ximian.com>
34097
34098         * threads-pthread.h:
34099         * threads-pthread.c: Implemented timed thread joining and added
34100         System.Threading.Thread::Join_internal internal call
34101
34102         * icall.c: Added System.Threading.Thread::Join_internal internal call
34103
34104         * threads-dummy.h:
34105         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
34106
34107 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
34108
34109         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
34110         mono_string_intern () to implement the semantics of the ldstr opcode
34111         and the interning of System.Strings.
34112         * icall.c: provide hooks to make String::IsIntern and String::Intern
34113         internalcalls.
34114
34115 2001-09-23  Dick Porter  <dick@ximian.com>
34116
34117         * threads-dummy.c: 
34118         * threads-dummy.h: New files of dummy threading routines
34119
34120         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
34121         support code based on system specifics
34122
34123         Rename PTHREAD_LIBS to THREAD_LIBS
34124         
34125 2001-09-23  Dick Porter  <dick@ximian.com>
34126
34127         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
34128         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
34129         internal calls.
34130         (mono_thread_init): Set up a Thread object instance to return when
34131         the main thread calls Thread.CurrentThread
34132         (mono_thread_cleanup): Wait for all subthreads to exit
34133
34134         * icall.c: New internal calls for System.Threading.Thread::Sleep
34135         (including Schedule) and CurrentThread
34136
34137         * threads.h: New file, to insulate thread-specific stuff from the
34138         rest of the code
34139
34140 2001-09-21  Dick Porter  <dick@ximian.com>
34141
34142         * threads-pthread.h: 
34143         * threads-pthread.c: New file, for handling pthreads-style
34144         threading support.  Start() now starts a new thread and executes
34145         the ThreadStart delegate instance.
34146
34147         * icall.c: Added the internalcall for
34148         System.Threading.Thread::Start_internal
34149
34150         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
34151
34152 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
34153
34154         * loader.c: work around the different signatures for delegates
34155         constructors csc generates in compiled code vs the ones compiled in mscorlib.
34156
34157 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34158
34159         * class.h, class.c: add mono_class_get_field_from_name ().
34160         * *: Fix C comments and other ANSI C issues.
34161
34162 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
34163
34164         * endian.h, assembly.c: fix some endianness issues.
34165
34166 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
34167
34168         * loader.h, load.c: add delegate_class to mono_defaults.
34169         Handle runtime provided methods in mono_get_method ().
34170
34171 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
34172
34173         * loader.c (mono_get_method): use pinvoke for internal call
34174
34175         * icall.c: use pinvoke for internal call
34176
34177         * loader.c (method_from_memberref): set the method name
34178
34179 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
34180
34181         * metadata.c: help the compiler generate better code for
34182         mono_class_from_mono_type ().
34183
34184 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
34185
34186         * class.c (mono_class_metadata_init): delayed computing of the
34187         class size to mono_class_metadata_init ()
34188
34189 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
34190
34191         * class.c, class.h: add an interfaces member to MonoClass.
34192         * image.c, image.h: add assembly_name field to MonoImage
34193         from the assembly table.
34194         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
34195
34196 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34197
34198         * class.c: Handle Array in mono_class_from_mono_type ().
34199         * metadata.c, pedump.c: some endian fixes.
34200
34201 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
34202
34203         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
34204         * metadata.c: fix small problem introduced with the latest commit.
34205
34206 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
34207
34208         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
34209         We don't need a MonoMetadata pointer anymore to compare signatures in
34210         mono_metadata_signature_equal (), update callers.
34211         Reduced memory usage an number of allocations for MonoMethodHeader and
34212         MonoMethodSignature.
34213
34214 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
34215
34216         * metadata.c: added compare for szarray.
34217
34218 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
34219
34220         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
34221         and add a couple more types to it and mono_defaults. Give an hint on
34222         classes that need implementing in our corlib and are referenced
34223         in mscorlib.
34224
34225 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
34226
34227         * class.h, class.c: keep track if a class is also an Enum.
34228         * loader.c: Implement a couple more types for use in libffi
34229         marshalling. Gives better diagnostics when failing to dlopen
34230         a library. Set method->klass for P/Invoke methods, too.
34231
34232 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
34233
34234         * class.c, class.h: add a MonoType this_arg to MonoClass that
34235         represents a pointer to an object of the class' type that
34236         can be used by the interpreter and later the type cache.
34237         Add best guess alignment info for valuetype objects.
34238
34239 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
34240
34241         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
34242         into MonoType: one less level of indirection and allocation and
34243         simplifies quite a bit of code. Added cache for MonoTypes that are
34244         used frequently, so that we don't need to allocate them all the time.
34245
34246 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
34247
34248         * class.c (mono_class_create_from_typedef): System.Enum is also a
34249         value type, although it does not derive from System.ValueType
34250         (maybe a bug in the ms compiler?)
34251
34252         * metadata.c (mono_type_size): return the right size for value types
34253
34254         * loader.c (mono_get_method): only initialize method header if not abstract
34255
34256         * class.c (mono_class_from_mono_type): use mono_default values. 
34257
34258 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
34259
34260         * *: use MonoClass pointers instead of <type_tokens>
34261         
34262         * class.h: new flag: metadata_inited.
34263
34264         * class.c (mono_class_metadata_init): impl.
34265         (mono_class_instance_size): impl.
34266         (mono_class_data_size): impl.
34267
34268 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34269
34270         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
34271         MonoClass now has the name and name_space fields. 
34272         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
34273         mono_get_method () takes and optional MonoClass as argument.
34274         Removed mono_typedef_from_name() and added mono_class_token_from_name()
34275         instead that takes advantage of a map from class names to typedef
34276         tokens in MonoImage.
34277
34278 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
34279
34280         * metadata.c: zero is not a valid alignment boundary.
34281         Merge MONO_TYPE_VOID in default decoding code.
34282
34283 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
34284
34285         * image.h: merged MonoMetadata into MonoImage
34286
34287         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
34288         identify the type of elements.
34289
34290 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
34291
34292         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
34293         * cil-coff.h: split MonoMSDOSHeader and add size info.
34294         * image.c: add some consistency checks.
34295         * metadata.c: fix row size computation: one programmer
34296         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
34297         add explanation for the locator routine.
34298         Fix decoding of size in method header.
34299         
34300 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
34301
34302         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
34303         (g_concat_dir_and_file): Bring g_concat_dir_and_file
34304         function from gnome-libs.  This uses the right path separator
34305         based on the OS, and also works around a bug in some systems where
34306         a double slash is not allowed. 
34307         (default_assembly_name_resolver): Use g_concat_dir_and_file
34308         (mono_assembly_open): ditto.
34309
34310 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
34311
34312         * metadata.c (mono_metadata_signature_equal): impl.
34313
34314         * *: void is now a realy MonoType (instead of using NULL)
34315         
34316         * metadata.c (do_mono_metadata_parse_type): use
34317         mono_metadata_parse_type to parse void value.
34318
34319 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
34320
34321         * metadata.c, metadata.h: in the signature and method header store
34322         only the space required for holding the loca vars and incoming arguments.
34323
34324 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
34325
34326         * metadata.c (do_mono_metadata_parse_type): treat void like any
34327         other type (instead of assigning NULL);
34328
34329 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
34330
34331         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
34332
34333 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
34334
34335         * image.c (do_mono_image_open): added a cache for arrays.
34336
34337 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34338
34339         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
34340         decode a single column from a row in a metadata table and changes
34341         to take advantage of it in the typedef locator (gives a nice speed up).
34342         Store offset info for function params.
34343
34344 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
34345
34346         * image.h (MONO_IMAGE_IS_CORLIB): removed 
34347
34348 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
34349
34350         * assembly.c: how could mono_assembly_close () had ever worked?
34351         * metadata.c, metadata.h: provide offset info for local vars.
34352         Implement mono_type_size () to take care of alignment as well
34353         as size (it was mono_field_type_size in cli/class.c before).
34354
34355 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
34356
34357         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
34358
34359         * assembly.h (CORLIB_NAME): set to corlib.dll
34360
34361         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
34362
34363 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34364
34365         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
34366         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
34367         tokentype.h: massive namespace cleanup.
34368
34369 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34370
34371         * metadata.h, metadata.c: decode exception clauses when parsing method header.
34372
34373 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
34374
34375         * metadata.c (mono_metadata_free_type): added check for type !=
34376         NULL (void) before calling mono_metadata_free_type()
34377
34378 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
34379
34380         * metadata.h, row_indexes.h: added header with enumerations to use
34381         to index in the columns from tables in metadata and to decode coded
34382         tokens: we should start using this instead of embedding magic numbers
34383         all over the code.
34384
34385 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
34386
34387         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
34388         Move metadata_t info from cli_image_info_t to MonoImage, where
34389         it's easily accessible. Changed all the uses accordingly.
34390         Added the method and class caches to MonoImage.
34391         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
34392         and mono_metadata_decode_value () signature to be more consistent
34393         with the other parse functions (and simplify code). Taken advantage
34394         of zero-length array allocation with GCC. Removed reduntant (and
34395         wrong) MonoFieldType struct and use MonoParam instead. Changed
34396         mono_metadata_parse_field_type () to use common code for parsing.
34397         Added mono_metadata_typedef_from_field () and
34398         mono_metadata_typedef_from_method () to lookup a typedef index from a
34399         field or method token.
34400         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
34401
34402 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
34403
34404         * metadata.c (mono_metadata_parse_field_type): Implement. 
34405         (do_mono_metadata_parse_type): Split engine from
34406         mono_metadata_parse_type, so that we can create smaller structures
34407         for things that just have one pointer to the MonoType (look at
34408         the MonoFieldType)
34409
34410 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
34411
34412         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
34413         as Jan Gray found out, it is incorrect. 
34414
34415 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
34416
34417         * assembly.c: Implement asssembly loading.  This loads an image
34418         and loads all the referenced assemblies.  Come to think of it, we
34419         could always do lazy loading of the assemblies. 
34420
34421         * image.c (mono_image_open): Keep loaded images in a hashtable.
34422
34423         * image.h (MonoImage): Add reference count.
34424
34425 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
34426
34427         * assembly.c (mono_assembly_open): Keep track of the file name in
34428         case the assembly has no ASSEMBLY table.
34429
34430         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
34431         from get.c here.
34432
34433 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
34434
34435         * metadata.c, metadata.h: decode local vars in method header
34436         parse function. Change callers accordingly.
34437
34438 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
34439
34440         * metadata.h, cil-coff.h: protect against multiple inclusion.
34441         Added some new structures to hold information decoded from metadata:
34442         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
34443         and relevant decoding/free functions.
34444         * metadata.c: implement decoding functions. Add warning for out of bounds
34445         index in mono_metadata_locate(). Implement mono_get_method () to retreive
34446         all the info about a method signature and invocation. Remove check on
34447         uninitialized local var in parse_mh() and fix memory leak.
34448
34449 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
34450
34451         * metadata.h: More macros.
34452
34453         * tokentype.h: New file.
34454
34455 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
34456
34457         * assembly.c: added a consistency check and initialize
34458         some structures with g_new0().
34459         * metadata.c: fixed a couple more bugs in table size computation
34460         and add other checks for out-of bound access to metadata.
34461
34462 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
34463
34464         * metatada.c: fix bugs computing table sizes. Spew a
34465         warning when index in string heap is out of bounds.
34466
34467 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
34468
34469         * metadata.h: Add a couple of macros to manipulate tokens. 
34470
34471 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34472
34473         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
34474         cli_section_tables).
34475
34476 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
34477
34478         * metadata.c (mono_metadata_user_string): New function, provides
34479         access to the UserString heap. 
34480
34481 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
34482
34483         * metadata.c: Add inline documentation.
34484
34485 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
34486
34487         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
34488         files. 
34489
34490 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
34491
34492         * typeattr.h: New file, TypeAttribute flags. 
34493
34494 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
34495
34496         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
34497         mono_assembly_ensure_section): Section loading code.
34498         (load_section_tables): Load the sections.
34499
34500         * mono/metadata/metadata.c (mono_metadata_locate_token,
34501         mono_metadata_locate): Functions to locate the information
34502         definition given a token or a table and an index.
34503         (mono_metadata_compute_table_bases): New.
34504         (compute_size): New function to compute the sizes of the various
34505         tables.
34506
34507         * mono/metadata/metadata.h: Finish listing the different index
34508         types. 
34509
34510         * mono/metadata/pedump.c: Improve to dump new information.
34511
34512 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
34513
34514         * mono/metadata/metadata.c: Entered all the tables matching
34515         Beta2. 
34516
34517         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
34518
34519
34520
34521