2008-06-11 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
2
3         * assembly.c (mono_assembly_load_from_full): Call 
4         mono_assembly_load_friends () outside the assemblies lock, since it can
5         acquire the loader lock. Fixes #323696.
6
7         * reflection.c (resolve_object): Inflate the inst with the context for
8         FieldOnTypeBuilderInst. Fixes #399010.
9
10 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
11
12         * reflection.c (mono_image_get_field_on_inst_token): Don't
13         inflate the field to encode it's signature. If it's a
14         VAR or MVAR it should stay that way in the signature.
15         Fixes #399047.
16
17 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
18
19         * reflection.c (resolve_object): Release memory of inflated types.
20
21 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
22
23         * loader.c (mono_method_get_signature_full): Remove assert about
24         loading a methodspec to a generic method. We have such methods, such as
25         System.Threading.Interlocked::CompareExchange<T>.
26         This assert was removed since it crashes the verifier when it checks
27         methods calling CompareExchange<T>.
28
29 2008-06-10  Marek Safar  <marek.safar@gmail.com>
30
31         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
32         of Type array and not MonoType.
33
34 2008-06-10  Marek Habersack  <mhabersack@novell.com>
35
36         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
37         <lupus@ximian.com>
38
39 2008-06-10  Martin Baulig  <martin@ximian.com>
40
41         * debug-mono-symfile.h
42         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
43         changes to the file format, but we were generating incorrect
44         source file indices in the line number table due to a bug, which
45         made backtraces report an incorrect source file.
46
47 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
48
49         * mono-debug.c: Moved mono_debug_free_method_jit_info from
50         mini/debug-mini.c to here.
51
52         * mono-debug.c (il_offset_from_address): Free memory from find_method.
53
54         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
55         use it to release structs returned by mono_debug_find_method.
56
57 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
58
59         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
60         since it needs to set method->slot for all interface methods.
61
62 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
63
64         * class-internals.h: Forgot to add.
65
66 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
67
68         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
69
70         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
71         Lookup the custom attributes from property_hash.
72
73         * reflection.c (mono_save_custom_attrs): Save the custom attributes
74         in property_hash. Allocate all data using the image mempool.
75
76         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
77         for dynamic_custom_attrs to checks if the image is dynamic.
78
79 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
80
81         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
82         assemblies array.
83         
84         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
85         runtime functions while holding the domain assemblies lock.
86
87 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
88
89         * verify.c: Reapplied the last bit of the reverted changes.
90
91 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
92
93         * verify.c: Reapplied more of the reverted changes.
94
95 2008-06-09  Martin Baulig  <martin@ximian.com>
96
97         * debug-mono-symfile.c (load_symfile): Check the major version
98         first; if it's wrong, don't print the minor version in the error message.
99
100 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
101
102         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
103         lock instead of the domain lock to avoid deadlocks, since the thread might
104         already hold the loader lock.
105
106         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
107         (mono_thread_attach): Ditto.
108
109         * monitor.c: Use a TLS variable for holding the current thread id instead
110         of calling pthread_self ().
111         (mono_monitor_init_tls): New internal function to initialize the TLS
112         variable.
113         (mono_monitor_try_enter_internal): Put the owner == id check after the
114         owner == 0 check.
115
116         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
117         missed optimizations when using gcc-4.3.
118
119 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
120
121         * reflection.c (mono_dynamic_image_free): Free the memory
122         used by MonoGenericParam in MonoDynamicImage::gen_param.
123
124         * reflection.c (mono_reflection_setup_generic_class): Allocate
125         container from mempool.
126
127         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
128         container from mempool.
129
130 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
131
132         * threads.c (mono_set_pending_exception): New internal function to set the
133         pending exception of the current thread.
134         (mono_thread_get_and_clear_pending_exception): Check for 
135         thread->pending_exception as well.
136
137         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
138
139         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
140         it can trigger a collection.
141
142 2008-06-06  Martin Baulig  <martin@ximian.com>
143
144         Merged the `debugger-kahalo' branch.
145
146         * mono-debug.h
147         (MONO_DEBUGGER_VERSION): Bumped to 72.
148
149         * debug-mono-symfile.h
150         (MonoSymbolFileMethodIndexEntry): Removed.
151         (MonoSymbolFileMethodEntry): New public typedef.
152         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
153         (MonoSymbolFileSourceEntry): Remove everything except `index' and
154         `data_offset'.
155         (MonoSymbolFileMethodEntry): Removed.
156         (MonoSymbolFileLexicalBlockEntry): Removed.
157         (MonoSymbolFileLineNumberEntry): Removed.
158         (MonoDebugLexicalBlockEntry): Removed.
159         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
160         removed `num_il_offsets' and `il_offsets'.
161         (MonoSymbolFile): Replace `version' with `major_version' and
162         `minor_version'.
163         (MONO_SYMBOL_FILE_VERSION): Replace with
164         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
165         `MONO_SYMBOL_FILE_MINOR_VERSION'.
166
167         * debug-mono-symfile.c
168         (mono_debug_symfile_lookup_location): Add support for the new line
169         number table format.
170
171 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
172
173         * metadata.c (free_generic_class): Release the inflated
174         MonoClass of dynamic generic classes if it's not a generic
175         type definition.
176
177 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
178
179         * verify.c: Reapplied more of the reverted changes.
180
181 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
182
183         * reflection.c (lookup_custom_attr): Clean the cached flag or
184         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
185         for SRE types.
186
187 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
188
189         * verify.c: Reapplied a small part of the reverted changes.
190
191 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
192
193         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
194
195         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
196         previously in managed code.
197         (mono_monitor_exit): Ditto.
198         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
199
200         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
201         the managed definition.
202
203 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
204
205         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
206
207 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
208
209         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
210         
211         * monitor.c: Add some micro optimizations.
212
213         * icall.c (type_from_typename): Handle 'bool'.
214
215 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
216
217         * verify.c: Implement constructor verification per P III 1.8.1.4.
218         Fixes #396716.
219
220 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
221
222         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
223         holding the assemblies lock here too.
224
225 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
226
227         * verify.c: Kill stack_top function.
228
229 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
230
231         * verify.c: Kill stack_get function.
232
233 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
234
235         * verify.c (mono_method_verify): Last change broke the build. Fixed.
236
237 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
238
239         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
240         more reliable.
241
242         * verify.c (mono_method_verify): Inflate params and locals to avoid
243         mismatch when checking for compatibility.
244
245 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
246
247         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
248         Length prefix should be size in bytes. Fix bug #339530.
249         
250         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
251         Length prefix should be size in bytes. Fix bug #339530.
252
253         Code is contributed under MIT/X11 license.
254
255 2008-06-05  Bill Holmes <billholmes54@gmail.com>
256
257         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
258
259         Contributed under MIT/X11 license.
260
261 2008-06-05  Martin Baulig  <martin@ximian.com>
262
263         * mono-debug-debugger.c
264         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
265
266 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
267
268         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
269         while holding the assemblies lock to prevent deadlocks. Handle the case
270         where the search hook returns NULL but the assembly was still loaded.
271         Fixes #323696.
272
273         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
274         modify domain state.
275
276 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
277
278         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
279         * Makefile.am (pedump_LDADD): Post-process object files and
280         add dtrace-generated object file, if necessary.
281
282         Code is contributed under MIT/X11 license.
283
284 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
285
286         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
287
288 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
289
290         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
291
292 2008-06-04  Mark Probst  <mark.probst@gmail.com>
293
294         * threads.c: Try to free everything from the delayed free table
295         when shutting down threads, and set the variable to NULL after the
296         table is freed so that calling
297         mono_thread_hazardous_try_free_all() when shutting down the root
298         domain doesn't crash.
299
300 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
301
302         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
303         the caller if resulting type was inflated.
304
305         * class.c (mono_class_create_from_typespec): Free the MonoType if it
306         was inflated.
307
308         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
309
310
311 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
312
313         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
314         class library tests.
315
316         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
317         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
318         #396989.
319
320 2008-06-04  Mark Probst  <mark.probst@gmail.com>
321
322         * domain.c, domain-internals.h: The JIT infos are now freed by the
323         JIT info table code.  They are freed immediately if there only a
324         single JIT info table in circulation.  If there is more, the free
325         is delayed via a queue.
326
327         * threads.c, threads-types.h: New hazard pointer function for
328         freeing all freeable delayed items in one sitting.
329
330 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
331
332         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
333
334         * reflection.c (typebuilder_setup_properties): Same.
335
336         * reflection.c (typebuilder_setup_events): Same.
337
338 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
339
340         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
341         and use it for allocating memory.
342
343         * reflection.c (mono_marshal_spec_from_builder): Same.
344
345         * reflection.c: Change code to use new signatures.
346
347         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
348
349 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
350
351         * decimal.c (rescale128): Put back one line which was accidently commented
352         out.
353         
354         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
355         to cause crashes.
356
357 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
358
359         * reflection.c (mono_reflection_generic_class_initialize): Name must
360         be always malloc'ed so we can free it later on. Do this for field, property
361         and event.
362
363         * metadata.c (free_generic_class): Free field, property and event names.
364
365 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
366
367         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
368         instead of g_memdup.
369
370         * reflection.c (typebuilder_setup_fields): Same.
371
372 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
373
374         * decimal.c (rescale128): Optimize this function a bit more.
375
376 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
377
378         * metadata.c (free_generic_class): Release some memory from
379         SRE generic classes.
380
381 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
382
383         * reflection.c (mono_image_get_generic_field_token): No reference
384         to name is kept, free it.
385
386         * reflection.c (mono_reflection_generic_class_initialize): Free
387         more memory of the inflated field.
388
389 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
390
391         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
392         code.
393
394 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
395
396         * reflection.c (mono_dynamic_image_free): Release memory used by
397         MonoDynamicImage::array_methods elements.
398
399         * reflection.c (assembly_add_win32_resources): Release memory after
400         encoding.
401
402 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
403
404         * decimal.c (log2_32): Use an optimized version for this function too.
405         
406         * decimal.c (log2_64): Fix this on 32 bit machines.
407
408 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
409
410         * class.c (mono_dup_array_type): Implement allocation using a mempool.
411
412         * class.c (mono_metadata_signature_deep_dup): Same.
413
414         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
415         a mempool.
416
417         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
418
419         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
420
421         * metadata-internals.h: Added mono_metadata_signature_dup_full.
422
423         * class-internals.h: Update signatures to take a MonoMemPool.
424
425 2008-06-02  Dick Porter  <dick@ximian.com>
426
427         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
428         * icall-def.h: Add
429         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
430         FormatMessage API to get the error text.  Fixes bug 321827.
431
432 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
433
434         * decimal.c: Add some micro optimizations to make decimal operations faster.
435
436 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
437
438         * reflection.c (method_encode_clauses): Take a mempool
439         as parameter and use it to allocate the clause array.
440
441         * reflection.c (mono_image_get_field_on_inst_token): Free
442         the inflated type after encoding it.
443
444         * reflection.c (mono_dynamic_image_free): Free each element
445         of MonoDynamicImage::gen_params.
446
447         * reflection.c (reflection_methodbuilder_to_mono_method):
448         Allocate the generic param array from the mempool.
449         Allocate signature params from the mempool.
450
451         * reflection.c (mono_reflection_generic_class_initialize):
452         Free inflated fields after been used.
453
454 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
455
456         * icall.c: Reapply the memory leak fixes as they no
457         longer make mono crash.
458
459 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
460
461         * reflection.c (mono_type_get_object): Don't store the suplied
462         MonoType with type_hash. A caller which pass a type that
463         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
464         might end with a pointer to freed memory.
465         The solution is to use byval_arg or this_arg from the associated
466         MonoClass of the supplied type.
467
468 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
469
470         * icall.c: Revert the rest of the last change as it breaks the build too.
471
472 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
473
474         * icall.c: Revert a leak fix as it's breaking the build.
475
476 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
477
478         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
479
480 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
481
482         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
483
484 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
485
486         * icall.c: Fix some memory leaks.
487
488 2008-05-29  Dick Porter  <dick@ximian.com>
489
490         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
491         async socket operations from the pending list when a socket
492         closes.  Leaving it until the threadpool services the event
493         exposes a race condition when a socket descriptor is reused.
494         Fixes bug 377589.
495
496 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
497
498         * object.c: Fix negative index check for array alocation.
499
500 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
501
502         * icall.c, marshal.c: Delegate wrappers should skip visibility.
503         This check is performed by the verifier for IL created delegates
504         and by Delegate::CreateDelegate for programatically created ones.
505         Fixes #372406.
506
507 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
508
509         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
510         Fix code to use mono_array_size_t instead of int.
511
512         Based on patch by Luis F. Ortiz.
513         Contributed under X11 license.
514         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
515
516 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
517
518         * icall.c: Added ves_icall_System_Array_GetLongLength and
519         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
520         arrays.
521
522         * icall.h: Export both new functions.
523
524         Based on patch by Luis F. Ortiz.
525         Contributed under X11 license.
526         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
527
528 2008-05-28  Martin Baulig  <martin@ximian.com>
529
530         The debugger now requires exactly r103463.
531
532         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
533         This version is not supported by the debugger, wait for 72.
534
535 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
536
537         * object.h: Changed array related functions to use
538         mono_array_size_t instead of guint32. Forgot to commit this file.
539
540         Patch by Luis F. Ortiz.
541         Contributed under X11 license.
542         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
543
544
545 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
546
547         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
548         don't define it. Use the number literal instead.
549
550 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
551
552         * icall.c: Changed array related functions to use
553         mono_array_size_t instead of guint32.
554
555         * icall.c (ves_icall_System_Array_GetLength): Check for length
556         overflow under MONO_BIG_ARRAYS.
557
558         Based on patch by Luis F. Ortiz.
559         Contributed under X11 license.
560         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
561
562 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
563
564         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
565
566         Based on patch by Luis F. Ortiz.
567         Contributed under X11 license.
568         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
569
570 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
571
572         * object.c, object.h: Changed array related functions to use
573         mono_array_size_t instead of guint32.
574
575         Patch by Luis F. Ortiz.
576         Contributed under X11 license.
577         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
578
579 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
580
581         * object.h: Introduced mono_array_size_t typedef. This must be used
582         in all places an array length is expected. This is 64bits wide if
583         MONO_BIG_ARRAYS is enabled.
584
585         Patch by Luis F. Ortiz.
586         Contributed under X11 license.
587         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
588
589 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
590
591         * security-manager.c class.c: Set the class exception info by calling
592         mono_class_set_failure ().
593
594         * class.c (mono_class_get_exception_data): New accessor function.
595         (mono_class_set_failure): Store exception_data in the property hash.
596
597         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
598         the struct as a property.
599
600         * loader.c (mono_get_method_full): Store the lookup result for method
601         tokens in method_cache, the others in methodref_cache to decrease the memory
602         usage of hash tables.
603
604         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
605         (mono_image_init): method_cache is lazy inited now.
606
607         * metadata-internals.h (struct _MonoImage): Change method_cache to
608         a MonoValueHashTable, add a separate methodref_cache.
609
610 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
611
612         * number-formatter.h: Fix tables to avoid arithemtic overflow in
613           Double.ToString as exposed by Bug #383531.
614
615 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
616
617         * number-formatter.h: Make some tables static.
618
619         * class.c (mono_method_set_generic_container): New accessor function.
620         (mono_method_get_generic_container): Ditto.
621
622         * class-internals.h (struct _MonoMethod): Remove rarely used 
623         'generic_container' field, store it in the property hash instead. Add 
624         'is_generic' boolean field instead.
625
626         * image.c (mono_image_init): Initialize property_hash.
627         (mono_image_close): Destroy property_hash.
628
629         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
630         hold rarely used fields of runtime structures belonging to this image.
631
632         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
633         to get/set method->generic_container.
634
635         * loader.c (mono_get_method_from_token): Avoid loading the method header for
636         generic methods.
637
638 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
639
640         * class.c (mono_class_inflate_generic_method_full): Don't increase
641         mono_stats.inflated_method_count for methods found in the cache.
642
643         * threads.c (mono_thread_request_interruption): Add a comment about 
644         QueueUserAPC ().
645
646 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
647
648         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
649         interface_offsets_packed table.
650         
651         * class.c (mono_class_init): Remove some dead code.
652
653         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
654         mono_class_setup_vtable () when CAS is active to detect security problems.
655
656 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
657
658         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
659
660         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
661         parameters as it's irrelevant for delegate checking.
662
663 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
664
665         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
666
667         * class.c (mono_class_init): Control the creation of a generic vtable using
668         a global which is true by default, but set to false by the runtime startup code.
669         
670         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
671         Disabled for now since it breaks the embedding API.
672         Move the setup of class->methods for arrays to mono_class_setup_methods ().
673         (mono_class_setup_methods): Add a memory barrier.
674
675         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
676         when mono_class_init () doesn't compute the generic vtable.
677         
678 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
679         * profiler.c: Added mono_profiler_install_statistical_call_chain,
680         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
681         to support call chains (backtrace) in the stat profiler.
682         * profiler.c, profiler-private.h: Likewise.
683
684 2008-05-22  Mark Probst  <mark.probst@gmail.com>
685
686         * generic-sharing.c: Init generic class when a method of it is
687         requested via a runtime generic context.
688
689 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
690
691         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
692
693         * reflection.c (mono_type_get_object): Add a FIXME.
694
695         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
696
697         * class.c (mono_class_get_method_by_index): New helper function, returning an
698         entry in the class->methods array.
699
700 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
701
702         * class.c (mono_class_init): Only do the array optimization for szarrays. 
703         Avoid creating a generic vtable for generic instances as well.
704         (mono_class_get_method_from_name_flags): Don't search in the metadata for
705         generic instances.
706
707 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
708
709         * loader.c (mono_get_method_constrained): Inflate the signature
710         with class context. Fix #325283.
711
712 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
713
714         * object.c (mono_class_create_runtime_vtable): Add a comment.
715
716         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
717         where needed.
718         (setup_interface_offsets): Handle the case when this is called twice for arrays.
719         (mono_class_setup_vtable_general): Add an assert.
720         (mono_class_init): Avoid creating a generic vtable for arrays.
721
722         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
723         here, let mono_class_init () do that.
724
725         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
726         interfaces in mscorlib.
727
728         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
729         interfaces. Add some comments.
730         (mono_class_init): Call mono_class_setup_methods () here since it is no
731         longer called by mono_class_setup_vtable ().
732
733         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
734         not set in class->vtable.
735         (mono_class_create_runtime_vtable): Reenable the disabled code.
736
737         * object.c (mono_class_create_runtime_vtable): Disable the last change for
738         now as it causes some test failures.
739
740         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
741         if using the vtable trampoline. Also remove some strange code which put the
742         generic methods themselves into the vtable slots. Remove the AOT init_vtable
743         stuff as it is no longer needed.
744
745 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
746
747         * pedump.c: Give make --verify all option check code as well.
748         Using --verify code won't check for metadata now.
749
750 2008-05-19  Martin Baulig  <martin@ximian.com>
751
752         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
753
754         * mono-debug.c
755         (_mono_debug_using_mono_debugger): New global variable; it's set
756         directly by the debugger, so mono_debug_using_mono_debugger() also
757         works after attaching.
758
759 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
760
761         * object.c (mono_class_create_runtime_vtable): Use memory barriers
762         as we do double checked locking on MonoClass::runtime_info and
763         MonoClassRuntimeInfo::domain_vtables.
764
765 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
766
767         * debug-helpers.c (print_field_value): Fix a warning.
768
769 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
770
771         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
772         set in the AOT case.
773
774 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
775
776         * class.c (mono_class_setup_vtable_general): Use memory barriers
777         as we do double checked locking on MonoClass::vtable.
778
779 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
780
781         * reflection.c (resolve_object): Inflate only if the generic context
782         is not null. Fixes #389886.
783
784 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
785
786         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
787         instead of g_free.
788
789         Code is contributed under MIT/X11 license.
790
791 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
792
793         * class.c: Revert unrelated change.
794
795 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
796
797         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
798         a generic instantiation, use mono_class_from_mono_type instead of playing
799         with MonoType directly.
800
801 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
802
803         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
804         checks must ignore generic instantiations, so mono_class_has_parent is not
805         suitable. Fixes #390128.
806
807 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
808
809         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
810         it to avoid registering tokens during metadata generation. Fixes #390023.
811
812 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
813
814         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
815         consistent.
816
817         Contributed under MIT/X11 license.
818
819 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
820
821         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
822         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
823         to fixup the EXE image.
824         (mono_cleanup): Use mono_close_exe_image.
825         (mono_close_exe_image): New function.
826         * image.c: Include "marshal.h".
827         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
828         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
829         counting when the image is loaded outside of mono_image_open_full. Set status
830         based on GetLastError.
831         * coree.c: Include required headers. Add init_from_coree.
832         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
833         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
834         (_CorExeMain): Set init_from_coree.
835         (CorExitProcess): Only call ExitProcess for now.
836         (CorBindToRuntimeEx): New stub implementation.
837         (CorBindToRuntime): New function.
838         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
839         (MonoFixupExe): ILONLY executables require no fixups.
840         (mono_set_act_ctx): New function to set activation context.
841         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
842         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
843         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
844         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
845         as MONO_INTERNAL.
846         * domain-internals.h: Add mono_close_exe_image.
847
848         Contributed under MIT/X11 license.
849
850 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
851
852         * metadata.c (mono_metadata_compute_size): Correctly calculate field
853         size for generic param and event tables. Fixes #388977.
854
855 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
856
857         * loader.c (mono_method_signature): Use memory barriers because of the double
858         checked locking pattern.
859
860         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
861         aborting or aborted as well. Fixes #376391.
862         
863         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
864         existing runtime state in the Suspend handler during shutdown.
865
866 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
867
868         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
869
870         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
871         which are starting up or shutting down.
872
873         * threads.c (mono_threads_set_shutting_down): Don't return a value since
874         this function never returns if the runtime is already shutting down.
875
876         * icall.c (ves_icall_System_Environment_Exit): Update after 
877         mono_threads_set_shutting_down () signature change.
878         
879 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
880
881         * class.c: Added can_access_instantiation to verify if the instantiation
882         is visible. Fix access check for nested types as they returned TRUE
883         before doing type and generic instantiation visibility checks.
884
885 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
886
887         * reflection.c (mono_reflection_create_generic_class): The created type
888         must have a different container from its TypeBuilder. Otherwise they
889         will end sharing generic arguments, which is wrong.
890
891         Due to the sharing, making a generic instance of the created type using
892         the TypeBuider generic arguments resulted in the generic type definition
893         been returned, which is wrong as well.
894
895         As a bonus the code was leaking the type_params array. This memory should
896         be allocated from the image mempool.
897
898         This fixes bug #354047.
899
900 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
901
902         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
903         to here         as they are now used in assembly.c new code.
904         Added a skipverification flag to MonoAssembly.
905         New internal function mono_assembly_has_skip_verification.
906
907         * assembly.c: New function mono_assembly_has_skip_verification. It checks
908         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
909         part of #387274.
910
911 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
912
913         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
914         needed. Fixes #387034.
915
916         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
917
918 2008-05-06  Miguel de Icaza  <miguel@novell.com>
919
920         * assembly.c (mono_assembly_load_reference): Prevent crash while
921         disassembling Silverlight 2.0 executables while we still do not
922         have GACed libraries.
923
924 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
925
926         * reflection.c: Special case generic type definitions as well. Fixes #383444.
927
928 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
929
930         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
931         of the dynamic case. Fixes #387404.
932
933 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
934
935         *verify.c (mono_verifier_is_class_full_trust): If under
936         verify_all and the verifier mode was not set, only
937         gac and corlib types are fulltrust. This makes --verify-all
938         usable to detect unverifiable code, which is the expected
939         use case.
940
941 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
942
943         * verify.h: Ops, commited the header with debug
944         enabled.
945
946 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
947
948         * verify.c (merge_stack): Use the new value on unverifiable
949         stack merges.
950
951         * verify.c (verify_type_compatibility_full): Comparison
952         of nullable types can't use mono_class_is_assignable_from.
953
954         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
955         that makes all verification errors be reported.
956
957         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
958         mono_method_verify.
959
960 2008-05-05  Robert Jordan  <robertj@gmx.net>
961
962         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
963         support for value types. See #386415.
964
965         * object.c: comments.
966
967         Code is contributed under MIT/X11 license.
968
969 2008-05-05  Martin Baulig  <martin@ximian.com>
970
971         * debug-mono-symfile.h
972         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
973         for old pre-terrania symbol files.
974
975 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
976
977         * mono-config.c: Add ppc64 architecture.
978
979         Code is contributed under MIT/X11 license.
980
981 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
982
983         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
984           PPC64 uses function descriptors as well.
985
986         Code is contributed under MIT/X11 license.
987
988 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
989
990         * object.c (compute_class_bitmap): Ignore literal static fields.
991
992         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
993         var has an invalid format.
994         (describe_ptr): Add some sanity checks for the vtable.
995         (add_nursery_frag): Clear unused nursery fragments.
996         (major_collection): Clear all remaining nursery fragments.
997
998 2008-05-03  Robert Jordan  <robertj@gmx.net>
999
1000         * image.c, metadata-internals.h: add thunk_invoke_cache.
1001
1002         * marshal.c, marshal.h: implement
1003         mono_marshal_get_thunk_invoke_wrapper ().
1004
1005         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
1006
1007         Code is contributed under MIT/X11 license.
1008
1009 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
1010
1011         * verify.c (do_leave): Empty the stack.
1012
1013 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
1014
1015         * class.c (mono_class_is_assignable_from): Variance
1016         doesn't work between reference and value types. For example,
1017         given type C<T+>, C<int32> is not assignable to C<object>.
1018         Break the argument checking loop on first error. 
1019
1020 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
1021
1022         * icall.c : base64_to_byte_array() needs some more strict
1023           check for sequence of '=' characters. Patch by Santa
1024           Marta (http://deee.g.hatena.ne.jp/santamarta).
1025
1026           Contributed under MIT/X11 license.
1027           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
1028
1029 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
1030
1031         * domain.c: Disable LoadLibrary support to fix Win32 build.
1032
1033         Code is contributed under MIT/X11 license.
1034
1035 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
1036
1037         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
1038         to help with cache behaviour.
1039
1040 2008-05-01  Miguel de Icaza  <miguel@novell.com>
1041
1042         * appdomain.c (mono_domain_from_appdomain): Add new accessor
1043         method. 
1044
1045 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
1046
1047         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
1048
1049 2008-05-01  Dick Porter  <dick@ximian.com>
1050
1051         * process.c (process_get_fileversion): Only pass 16 bits of
1052         language ID to VerLanguageName.  Fixes bug 381204.
1053
1054 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1055
1056         * verify.c (mono_method_verify): Fix the comparison
1057         operator for code bounds check.
1058
1059 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1060
1061         * verify.c (mono_method_verify): Check the bounds of
1062         all access of the code array.
1063
1064 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
1065
1066         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
1067
1068 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
1069
1070         * image.c (mono_image_strong_name_position): Fix return value when the rva is
1071         not valid.
1072
1073 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
1074
1075         * loader.c (mono_get_method_from_token, mono_method_signature): Add
1076         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
1077         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
1078         fixup main EXE images when using mono.exe for mixed-mode assembly support.
1079         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
1080         mono_runtime_load.
1081         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
1082         runtime initialization from metadata.
1083         * assembly.c: Remove obsolete ceGetModuleFileNameA.
1084         (mono_set_rootdir): Use mono_get_module_file_name.
1085         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
1086         handles.
1087         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
1088         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
1089         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
1090         MonoCLIImageInfo. Add support for module handles.
1091         (load_cli_header): Update mono_cli_rva_image_map signature.
1092         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
1093         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
1094         (mono_image_rva_map): Add support for module handles.
1095         (mono_image_ensure_section_idx): Add support for module handles.
1096         (mono_image_close): Add support for module handles.
1097         (do_load_header): Add support for module handles.
1098         (mono_image_open_from_module_handle): New function for internal use.
1099         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
1100         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
1101         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
1102         handles.
1103         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
1104         * image.h: Add mono_image_fixup_vtable.
1105         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
1106         support.
1107         * coree.h: New file.
1108         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
1109         unsupported native code.
1110         (mono_marshal_set_callconv_from_modopt): New function splitted from
1111         mono_marshal_get_managed_wrapper.
1112         (mono_marshal_get_managed_wrapper): Use
1113         mono_marshal_set_callconv_from_modopt.
1114         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
1115         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
1116         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
1117         that results in a deadlock when the runtime is loaded in _CorDllMain.
1118         * Makefile.am: Add coree.c and coree.h.
1119
1120         Contributed under MIT/X11 license.
1121
1122 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1123
1124         * generic-sharing.c: Search for type arguments in array element
1125         types as well.
1126
1127 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1128
1129         * class-internals.h, generic-sharing.c: New, small runtime generic context.
1130
1131         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
1132
1133         * object.c: Don't setup the RGCTX when the vtable is created,
1134         because we're setting it up lazily now.
1135
1136 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
1137
1138         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
1139         64 bit support.
1140
1141 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
1142
1143         * verify.c (verify_class_for_overlapping_reference_fields): 
1144         If class is under fulltrust allow reference types to overllap
1145         if they have the same RVA.
1146
1147 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
1148
1149         * pedump.c: Added new flag valid-only, that makes the verifier
1150         behaves just like --security=validil. It won't fail type load
1151         due to unverifiable restrictions.
1152
1153 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
1154
1155         * class-internals.h (struct MonoMethod): Added a verification_success
1156         field to cache verifier executions. Reduced MonoMethod:slot size by
1157         one bit.
1158
1159 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
1160
1161         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
1162         instead of a 'vt' argument to save an indirection and to allow these to be used
1163         for valuetypes.
1164         (scan_vtype): New helper function to scan an area using a gc descriptor.
1165         (mono_gc_wbarrier_value_copy): Implement this.
1166         (handle_remset): Add support for REMSET_VTYPE.
1167         (find_in_remset_loc): Ditto.
1168         (mono_gc_base_init): Allow some debugging options to be controlled through the
1169         use of the MONO_GC_DEBUG env variable.
1170         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
1171         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
1172
1173 2008-04-23  Martin Baulig  <martin@ximian.com>
1174
1175         * domain.c (mono_domain_create): Move the call to
1176         mono_debug_domain_create() down, after allocating the domain id.
1177
1178 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
1179
1180         verify.c (verify_class_for_overlapping_reference_fields): Skip
1181         static fields while verifying for overlapping fields as they
1182         don't matter at all.
1183
1184 2008-04-23  Marek Habersack  <mhabersack@novell.com>
1185
1186         * domain-internals.h: added a declaration of
1187         mono_make_shadow_copy.
1188
1189         * assembly.c (mono_assembly_open_full): shadow copying of
1190         assemblies moved to here, so that all the assemblies within the
1191         application domain's private binary directories can be
1192         processed. Fixes bug #380546
1193
1194         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
1195         mono_make_shadow_copy and made non-static. The decision whether
1196         to shadow-copy an assembly is made based on its location - it's
1197         copied if it's in one of the private application domain binary
1198         directories and its different to the target file in the shadow
1199         directory. Fixes bug #380546
1200
1201 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
1202
1203         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
1204
1205         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
1206         types.
1207
1208         * reflection.c (mono_image_create_token): Handle 
1209         Method/ConstructorOnTypeBuilderInst.
1210         (resolve_object): Ditto.
1211         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
1212         so it can be called from resolve_object. Also handle the case when the inflated
1213         class already has its methods setup.
1214
1215 2008-04-21  Martin Baulig  <martin@ximian.com>
1216
1217         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
1218
1219 2008-04-20  Geoff Norton  <gnorton@novell.com>
1220
1221         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
1222         pointer dereference.
1223
1224 2008-04-15  Marek Habersack  <mhabersack@novell.com>
1225
1226         * appdomain.c (try_load_from): if IOMAP is in effect, call the
1227         portability API to look up the assembly file. Fixes behavior in
1228         situations when the application has a bin/ directory, but the
1229         assembly search patch refers to Bin/ (and thus the requested file
1230         name is Bin/SomeLibrary.dll). Fixes bug #379888
1231
1232 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
1233
1234         verify.c (mono_type_is_generic_argument): Extracted this check
1235         from a dozen places to here.
1236
1237         verify.c: Fixed all issues related to boxing generic arguments
1238         and their constraints.
1239
1240 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
1241
1242         verify.c (mono_class_interface_implements_interface): Fix win32 build.
1243
1244 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
1245
1246         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
1247         isn't finished yet. Fixes #363447.
1248
1249 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
1250
1251         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
1252         Fixes #346419.
1253
1254 2008-04-13  Jb Evain  <jbevain@novell.com>
1255
1256         * domain.c: update the 2.1 profile versions.
1257         Merged from the Moonlight 2 branch.
1258
1259 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
1260
1261         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
1262         mscorlibs for the non-refonly case as well.
1263
1264         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
1265         in mono_assembly_load_from_full (). Fixes #378924.
1266
1267 2008-04-11  Geoff Norton  <gnorton@novell.com>
1268
1269         * icall.c: The global extern environ doesn't exist on Mac.  We
1270         need to call NSGetEnviron instead.
1271
1272 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
1273
1274         verify.c: Add generic method constraint verification.
1275
1276 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
1277
1278         class.c (mono_class_inflate_generic_method_full): Add a long
1279         explanation to the is_mb_open hack. Remove the FIXME.
1280
1281 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
1282
1283         * verify.c (mono_method_verify): Mark all unknown opcodes
1284         as invalid. Mark jmp as unverifiable.
1285
1286 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
1287
1288         * verify.c: Add code to do type constraint verification on class instances.
1289
1290         * verify.c (mono_verifier_verify_class): Use the type constraint 
1291         verification code.
1292
1293 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
1294
1295         * class.c (mono_class_get_field_default_value): Don't pass cindex
1296         as hint to mono_metadata_get_constant_index. The local is not initialized
1297         and should contain garbage most of the time. This could only work
1298         with a lot of luck.
1299
1300 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
1301
1302         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
1303
1304 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
1305
1306         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
1307
1308         * class.c (mono_class_from_generic_parameter): Save the token of the
1309         generic param in MonoClass::sizes.generic_param_token.
1310
1311         * reflection.c (mono_custom_attrs_from_class): If the class type is
1312         VAR or MVAR retrieve the attributes of the generic param.
1313
1314 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
1315
1316         * class.c (mono_class_init): Do class verification if the verifier
1317         is enabled.
1318
1319 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
1320
1321         * verify-internal.h: Added mono_verifier_verify_class.
1322
1323         * verify.c: Added mono_verifier_verify_class. It checks for
1324         classes with explicit layout that have overlapping reference fields.
1325
1326         * pedump.c: Init the verifier state prior to verification. Fixed
1327         command line arguments.
1328
1329 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
1330
1331         * Makefile.am: Added verify-internals.h, hopefully fix the build.
1332
1333 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1334
1335         * verify-internals.h: Fix a warning.
1336
1337 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
1338
1339         * verify-internals.h: New header with the verifier configuration
1340         extracted from mini.c.
1341
1342         * verify.c: Implemented the new functions exported by verify-internals.h.
1343
1344 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
1345
1346         * verify.c: Add proper verification of ckfinite.
1347
1348 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
1349
1350         * verify.c (do_conversion): Improved error message to something
1351         more meanfull.
1352
1353         * verify.c (check_is_valid_type_for_field_ops): Fix to work
1354         with primitive types.
1355
1356 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
1357
1358         * verify.c: Added tail prefix checking. Marked icall
1359         as unverifible.
1360
1361 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
1362
1363         * verify.c: Fix the detection of branches to the middle
1364         of an instruction.
1365
1366 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
1367
1368         * verify.c: Implemented verification of volatile. and
1369         unaligned. prefix. Check if a type is valid after retrieving it.
1370
1371 2008-04-01  Dick Porter  <dick@ximian.com>
1372
1373         * process.c (process_get_fileversion): If there's no string block,
1374         set the file language to en_US.  Fixes the other new part of bug
1375         374600.
1376
1377 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
1378
1379         * class.c: New functions mono_method_can_access_field_full and
1380         mono_method_can_access_method_full. They perform type visibility
1381         and type site check.
1382
1383         * class-internal.h: Added exported functions.
1384
1385         * verify.c: Use new functions to implement proper visibility checks.
1386
1387 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
1388
1389         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
1390
1391 2008-03-28  Dick Porter  <dick@ximian.com>
1392
1393         * process.c (process_get_fileversion): Use the first language ID
1394         we see, rather than insisting on an invariant language.  Fixes bug
1395         374600.
1396
1397 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
1398
1399         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
1400         the streams to fix reading of invalid memory later.
1401
1402         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
1403         to ease debugging.
1404
1405 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
1406
1407         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
1408         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
1409
1410 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
1411         * threads.h: Added MonoThreadManageCallback type and
1412         mono_thread_set_manage_callback prototype
1413         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
1414         (used to store the mono_thread_manage callback).
1415         * threads.c: Added mono_thread_set_manage_callback, and handle
1416         "MonoThread->manage_callback" in build_wait_tids.
1417
1418 2008-03-26  Dick Porter  <dick@ximian.com>
1419
1420         * process.c (process_get_fileversion): Set FileVersionInfo strings
1421         to Empty when the resource doesn't have the particular info.
1422         Fixes bug 355717.
1423
1424 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
1425
1426         * verify.c (mono_method_verify): Proper prefix validation.
1427
1428 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
1431         itself in a separate argument instead of throwing them. Fixes #373448.
1432
1433         * appdomain.c: Bump corlib version.
1434
1435 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
1436
1437         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
1438
1439 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
1440
1441         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
1442         version macros.
1443
1444 2008-03-20  Mark Probst  <mark.probst@gmail.com>
1445
1446         * generic-sharing.c, class-internals.h: Code for putting
1447         reflection types into the runtime generic context.
1448
1449 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
1450
1451         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
1452         Fixes #340662. 
1453
1454
1455 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
1456
1457         * verify.c (VerifyContext): Added instruction prefix data to the struct.
1458
1459         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
1460
1461         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
1462
1463         * verify.c (do_cast): Let the result value keep the boxed status.
1464
1465         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
1466
1467 2008-03-17  Jb Evain  <jbevain@novell.com>
1468
1469         * reflection.c: when running on a 2.0 runtime, emit
1470         unconditionally the #~ header version as 2.0, and the
1471         CLI header version as 2.5, for symmetry's sake with csc.
1472
1473 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
1474
1475         * class.c: Remove the unused cache_interface_offsets stuff.
1476
1477         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
1478         profiler.c: Fix warnings.
1479
1480 2008-03-16  Mark Probst  <mark.probst@gmail.com>
1481
1482         * generic-sharing.c, class-internals.h: Support for putting
1483         methods into the runtime generic context.
1484
1485 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
1486
1487         * class.c (mono_class_setup_fields): Ignore calls made to this function for
1488         classes which are generic instances of not-yet finished typebuilders. Fixes
1489         #351172.
1490
1491         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
1492
1493 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
1494
1495         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
1496
1497         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
1498         field, replace it with a hash table in MonoDynamicImage.
1499
1500         * reflection.c (inflate_mono_method): Access the generic definition object from
1501         image->generic_def_objects instead of imethod->reflection_info.
1502
1503         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
1504
1505         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
1506         
1507         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
1508         function in reflection.c so it is easier to keep in sync with the dynamic image
1509         creation code.
1510
1511         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
1512         mono_image_close ().
1513
1514 2008-03-15  Mark Probst  <mark.probst@gmail.com>
1515
1516         * class.c (mono_class_generic_sharing_enabled): Disable generic
1517         sharing for all architectures except AMD64 and x86 to fix build.
1518
1519 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
1520
1521         * verify.c: Use the generic definition MonoGenericContext when available.
1522         Remove code for checking generics instance compatibility in favor of
1523         mono_class_is_assignable_from.
1524
1525 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1526
1527         * marshal.c, marshal.h, metadata-internals.h, image.c,
1528         wrapper-types.h: New wrapper for invoking a shared static method
1529         without having to pass the runtime generic context argument.
1530
1531 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
1532
1533         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
1534
1535 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1536
1537         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
1538         
1539         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
1540         create a token from a FieldOnTypeBuilderInst.
1541         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
1542         (resolve_object): Ditto.
1543
1544         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
1545         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
1546
1547 2008-03-14  Martin Baulig  <martin@ximian.com>
1548
1549         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
1550
1551         * debug-mono-symfile.h
1552         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
1553         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
1554
1555 2008-03-10  Martin Baulig  <martin@ximian.com>
1556
1557         * debug-mono-symfile.h
1558         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
1559         `lexical_block_table_offset'.
1560         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
1561         `lexical_blocks'.
1562         (MonoSymbolFile): Added `version'.
1563
1564         * mono-debug.h
1565         (MonoDebugLexicalBlockEntry): Removed.
1566         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
1567         `lexical_blocks'.
1568
1569         * mono-debug.c (mono_debug_add_method): Don't compute lexical
1570         blocks here; the debugger now does this internally.
1571
1572 2008-02-27  Martin Baulig  <martin@ximian.com>
1573
1574         * object.c (mono_runtime_exec_main): Call
1575         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
1576         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
1577
1578 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
1579
1580         * verify.c (verify_type_compatibility_full): Allow native int to be converted
1581         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
1582
1583 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
1584
1585         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
1586         ldftn with a virtual method.
1587
1588 2008-03-13  Geoff Norton  <gnorton@novell.com>
1589
1590         * decimal.c:  Only include memory.h if the platform has it.
1591
1592 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
1593
1594         * assembly.c, class.c, metadata-internals.h: make sure public key
1595         tokesns are compared in a case-insensitive way. Also, all
1596         the lookups in the GAC use a lowercase public key token
1597         (gaacutil already does the lowercasing on install). Fixes
1598         bug #369541.
1599
1600 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
1601
1602         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
1603         and return value.
1604
1605 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
1606
1607         * image.c: when someone loads a mscorlib from a file, return the
1608         currently loaded mscorlib (fixes bug #369253).
1609
1610 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
1611
1612         * class.c: handle types with no parents by forcing them to have
1613         System.Object as a parent and marking them as broken (this currently
1614         allows the first part of bug #369173 to work as well, likely because
1615         we don't check for typeload exceptions everywhere yet).
1616
1617 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
1618
1619         * class.c: more complete check that types belong to corlib
1620         (fixes second part of bug #369173).
1621
1622 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
1623
1624         * generic-sharing.c:  Including glib.h for the MSVC builds to define
1625           "inline" to "__inline" before including mono-membar.h.
1626           
1627         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
1628           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
1629           MSVC builds.
1630
1631         Contributed under MIT/X11 license.
1632
1633 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
1634
1635         * verify.c (do_invoke_method): Remove return type validation.
1636
1637         * verify.c (do_ret): Do return type validation at return site instead of
1638         call site.
1639
1640 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
1641
1642         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
1643
1644         * verify.c: Some todos cleaned and improved a few error messages.
1645
1646 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
1647
1648         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
1649
1650 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
1653         system types correctly.
1654
1655         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
1656         function.
1657
1658 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1659
1660         * assembly.c (build_assembly_name): Fix a warning.
1661
1662 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1663
1664         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
1665         the called function takes an object type argument. Fixes storing or
1666         valuetypes across remoting as well as reducing memory usage.
1667         * image.c, metadata-internals.h: remove now unused ldfld_remote and
1668         stfld_remote wrapper caches.
1669
1670 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1671
1672         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
1673         is not found.
1674
1675         * reflection.c (mono_image_register_token): New helper function to save
1676         a token->object mapping.        
1677
1678         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
1679         managed code.
1680
1681         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
1682         one dimension arrays. Fixes #367670.
1683         (mono_reflection_get_type_internal): Ditto.
1684
1685 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1686
1687         * marshal.c: mono_load_remote_field_new() always returns object.
1688         so use the proper signature (fixes bug #366445).
1689
1690 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1691         
1692         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
1693         add an 'inline_failure' flag instead.
1694
1695 2008-03-04  Mark Probst  <mark.probst@gmail.com>
1696
1697         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
1698         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
1699         contains the location of "this", used for exception handling.
1700
1701 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1702
1703         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
1704         their size on all platforms for perf reasons.
1705
1706 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
1707
1708         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
1709         object-internal.h
1710
1711         * object-internal.h: Same.
1712
1713 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
1714
1715         * reflection.h: Fix the build I just broke.
1716
1717 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
1718
1719         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
1720         Test if a token is valid, this remove explicit usage of 
1721         MonoDynamicImage::tokens from the verifier code.
1722
1723         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
1724
1725         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
1726         instead of direct access to MonoDynamicImage::tokens.
1727
1728 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
1729
1730         * verify.c (token_bounds_check): Fix the build I just broke.
1731
1732 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
1733
1734         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
1735
1736         * verify.c (verifier_load_method): Fixed the errors message.
1737
1738         * verify.c (mono_method_verify): Fixed a debug message.
1739
1740 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
1741
1742         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
1743         mono-perfcounters.h, class-internals.h: support for predefined
1744         writable counters, query of categories and counters, bugfixes.
1745
1746 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
1747
1748         * verify.c (do_refanytype): Verify the refanytype opcode.
1749
1750         * verify.c (mono_method_verify): Use do_refanytype.
1751
1752 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
1753
1754         * verify.c (do_mkrefany): Verify the mkrefany opcode.
1755
1756         * verify.c (mono_method_verify): Use do_mkrefany.
1757
1758 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
1759
1760         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
1761         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
1762         implementation.
1763
1764 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1765
1766         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
1767         the type load exception.
1768
1769 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
1770
1771         * verify.c: Added a few FIXME for method signatures
1772
1773         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
1774         of mono_method_get_signature and get vararg call working. Removed unused
1775         checks for return value.
1776
1777         * verify.c (do_refanyval): Verify the refanyval opcode.
1778
1779         * verify.c (mono_method_verify): Implemented verification of arglist and
1780         use do_refanyval.
1781
1782 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1783
1784         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
1785         vtypes to marshal.c.
1786
1787         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
1788         it works for AOT as well.
1789
1790 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
1791
1792         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
1793         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
1794         the system time is adjusted.
1795
1796 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
1797
1798         * icall.c, icall-def.h: use the new time functions (fixes the
1799         non-monotonic behaviour of TickCount).
1800
1801 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
1804         it breaks the build.
1805         
1806         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
1807         cattr is not finished yet.
1808
1809 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
1810
1811         * verify.c: Proper token validation for field, method and type.
1812
1813 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
1814
1815         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
1816
1817         * loader.c (method_from_memberref): Generate type load error instead of method missing
1818         if the type is not found.
1819
1820 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1821
1822         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
1823         some of the conversions caused the generation of a marshal directive exception.
1824
1825 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
1826
1827         verify.c: Report which exception should be thrown by the JIT.
1828         Added a lot of FIXME notes.
1829
1830 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1831
1832         * generic-sharing.c: Runtime generic context slots are not
1833         instantiated on init anymore.  Instead, provide function to do the
1834         instantiating on demand.
1835
1836         * class-internals.h: Added vtable to runtime generic context.
1837         Macros for encoding direct and indirect slot offsets in one
1838         guint32.
1839
1840 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1841
1842         * object.c, generic-sharing.c: Moved some generic sharing code
1843         from object.c to generic-sharing.c.
1844
1845         * generic-sharing.c: Added support for extensible runtime generic
1846         context.
1847
1848         * metadata-internals.h: Two new hash tables in MonoImage for
1849         extensible runtime generic context support.
1850
1851         * domain.c: Unregister generic vtables upon domain unloading.
1852
1853         * image.c: Destroy new hash tables upon image unloading.
1854
1855         * metadata.c: Unregister generic subclasses upon image unloading.
1856
1857         * class-internals.h: New data structure for runtime generic
1858         context template.  New fields in the runtime generic context for
1859         extensible part.
1860
1861         * Makefile.am: Added generic-sharing.c.
1862
1863 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
1864
1865         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
1866         there is a pending loader exception, raise it.
1867
1868         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
1869         same.
1870
1871         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
1872         same.
1873
1874         Fixes #363450.
1875
1876 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1877
1878         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
1879
1880         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
1881         
1882         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
1883         ref-only requests for compatibility with MS.
1884
1885 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
1886
1887         * reflection.c (mono_custom_attrs_from_method): Don't silently
1888         return an empty list for generic method instances.
1889         (mono_custom_attrs_from_param): Likewise.
1890
1891 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
1892             Raja R Harinath  <harinath@hurrynot.org>
1893
1894         Fix #354757
1895         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
1896         * class.c (mono_class_inflate_generic_method_full): Initialize it
1897         when a fully-open method is instantiated.
1898         * metadata.c (inflated_method_equal, inflated_method_hash): Update
1899         to new field.
1900         * reflection.c (inflate_mono_method): Don't create a temporary context.
1901
1902 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
1903
1904         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
1905         Compute correct value, to prepare for imethod->reflection_info going away.
1906
1907 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1908
1909         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
1910
1911 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
1912
1913         * verify.c: Implement skip visibility flag.
1914
1915 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
1916
1917         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
1918         which contains an extra field to tell the kind of exception that should be thrown.
1919
1920         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
1921
1922 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
1923
1924         * loader.c (mono_method_get_param_names): Initialize 'klass' after
1925         'method' is updated.
1926
1927 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
1928
1929         * class.c (mono_class_layout_fields): Set class->min_align for classes using
1930         explicit layout as well. Fixes #360375.
1931
1932 2008-02-11  Geoff Norton  <gnorton@novell.com>
1933
1934         * loader.c: Guard and dereference against inflated generic methods
1935
1936 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
1937
1938         * class.c: Include Retargetable spec in assembly name.
1939         * assembly.c: Always include PublicKeyToken spec in assembly name
1940         (with value "null" if assembly is not signed), and include
1941         Retargetable spec.
1942         * icall-def.h: Added icall for Assembly.get_fullname.
1943         * icall.c: Added icall returning the fullname of an assembly.
1944
1945 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1946
1947         * class.c (mono_class_setup_vtable_general): Add a missing call to
1948         mono_class_setup_methods () which is needed in the AOT case.
1949
1950 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
1951
1952         * verify.c (mono_type_get_stack_name): Added. Return the name for the
1953         stack type of the given MonoType.
1954
1955         * verify.c (verify_type_compatibility_full): Handle the void type.
1956
1957         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
1958         way stack merging works.
1959
1960         * verify.c (store_local): Improved verification message.
1961
1962         * verify.c (do_branch_op): If the merging is invalid, the method
1963         is unverifiable and not invalid. Improved error message.
1964
1965         * verify.c (merge_stacks): Properly merge a boxed valuetype and
1966         a reference type diferent than System.Object. Improved error
1967         message.
1968
1969 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
1970
1971         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
1972
1973         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
1974         type of an enum even if the argument is byref.
1975
1976         * verify.c: Replace all explicit uses of enumtype and enum_basetype
1977         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
1978
1979         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
1980
1981         *verify.c (verify_type_compatibility_full): Make enum types
1982         compatible with their base types.
1983
1984         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
1985         types are compatible for the special case of a boxed valuetype and
1986         System.Object.
1987
1988         * verify.c (verify_stack_type_compatibility): The function
1989         is_compatible_boxed_valuetype was extracted from here.
1990
1991         * verify.c (push_arg): Only set ctx->has_this_store if the method
1992         is not static.
1993
1994         * verify.c (do_ldelem): Fixed a typo in an error message and added
1995         strict check for mixing int32 and native int as the array type
1996         and ldelem type.
1997
1998         * verify.c (merge_stacks): Consider boxed valuetypes in the
1999         compatibility checks.
2000
2001 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
2002         * profiler.h: (MonoGCEvent): Added start-stop the world events.
2003
2004 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
2005         *class.c: use_new_interface_vtable_code: renamed the env var to have
2006         a "MONO_" prefix, and fix the logic to enable it by default.
2007
2008 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
2009         *class.c:
2010         mono_class_setup_vtable_general: rewrote the way in which interface
2011         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
2012         makes the code more maintainable.
2013         For now the old code is still there, and can be activated setting
2014         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
2015
2016 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
2017
2018         * verify.c: guarded some debug functions around and #ifdef.
2019
2020         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
2021
2022 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2023
2024         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
2025         changes for now since they seem to break too many things.
2026
2027 2008-02-05  Mark Probst  <mark.probst@gmail.com>
2028
2029         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
2030         mono_marshal_find_nonzero_bit_offset): Added macro and function
2031         for finding the byte- and bit-offset of a bitfield within a
2032         struct.
2033
2034 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
2035
2036         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
2037         (mono_marshal_get_struct_to_ptr): Ditto.
2038
2039         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
2040         cctor_signature.
2041
2042 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
2043
2044         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
2045         between methods for non-corlib types.
2046
2047 2008-02-02  Geoff Norton  <gnorton@novell.com>
2048
2049         * loader.c (mono_method_get_param_names): Populate the parameter name for 
2050         generic parameters as well. (Fixes #342536)
2051
2052 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
2053
2054         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
2055
2056         * verify.c (do_invoke_method): Fix for calling with byref structs.
2057
2058         * verify.c (do_cast): push a boxed value type based on the type token and not
2059         the type of stack.
2060
2061 2008-01-31  William Holmes  <billholmes54@gmail.com>
2062
2063         * process.c (process_module_string_read): Check the size returned form 
2064           VerQueryValue to avoid out of memory exception. 
2065
2066 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
2069         Handle properly modules which are not in the moduleref table. Fixes
2070         #356938.
2071
2072 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
2073
2074         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
2075         the dynamic case which is now in managed code.
2076         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
2077
2078         * marshal.c (mono_string_to_bstr): Fix a warning.
2079         (init_com_provider_ms): Ditto.
2080
2081         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
2082
2083         * exception.c (mono_get_exception_out_of_memory): New helper function.
2084
2085 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
2086
2087         * marshal.c: Add support for BSTR marshalling
2088         using other COM systems.
2089
2090         Code is contributed under MIT/X11 license.
2091
2092 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
2093
2094         * object.c (mono_runtime_invoke_array): reverted previous
2095         commit as it breaks the build.
2096
2097 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
2098
2099         * object.c (mono_runtime_invoke_array): Verify arguments for
2100         invalid types. Fixes #348522.
2101
2102 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
2103
2104         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
2105         non-final virtual calls using call. 
2106
2107         * verify.c (do_invoke): fixed some TODOs.
2108
2109         * verify.c (push_arg): set has_this_store for "ldarga 0".
2110
2111 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
2112
2113         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
2114         which belong to an inflated class. Fixes #356531.
2115
2116 2008-01-26  Robert Jordan  <robertj@gmx.net>
2117
2118         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
2119         which resort to FindFirstFile when a certain error condition
2120         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
2121         Code is contributed under MIT/X11 license.
2122
2123 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
2124
2125         * marshal.c (emit_marshal_string): Fix out string marshalling
2126         to use specified encoding. Fixes #323900.
2127
2128         Code is contributed under MIT/X11 license.
2129
2130 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
2131
2132         * class.c (mono_class_inflate_generic_method_full): Don't modify
2133         iresult->context after cache check.
2134
2135 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
2136
2137         * class.c (mono_class_inflate_generic_method_full): Change the
2138         struct assignments to memcpy for better visibility and add some comments.
2139
2140 2008-01-23  Dick Porter  <dick@ximian.com>
2141
2142         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
2143         procedure, and make it work on windows.
2144
2145 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
2146
2147         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
2148         a MonoReflectionTypeBuilder since it is always of that type.
2149
2150         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
2151
2152         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
2153
2154         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
2155         
2156         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
2157
2158         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
2159
2160         * reflection.c (mono_reflection_create_runtime_class): Remove already created
2161         instantiations from the type cache.
2162
2163 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
2164
2165         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
2166
2167         * verify.c (do_unbox_value): push a controled mutability managed pointer.
2168
2169 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
2170
2171         * verify.c (do_ldstr): added, verifies if the #US token is valid.
2172
2173         * verify.c (mono_method_verify): removed old TODO
2174
2175 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
2176
2177         * verify.c (do_newobj): add visibility check.
2178
2179 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
2180
2181         * verify.c (do_load_function_ptr): add visibility check.
2182
2183 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
2184         *class.c:
2185         mono_generic_class_get_class: hook profiler events.
2186         mono_field_get_offset: added to support heap-shot in the new profiler.
2187         *class.h: exported mono_field_get_offset.
2188         * reflection.c:
2189         mono_reflection_setup_internal_class: hook profiler events.
2190
2191 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
2192
2193         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
2194         argument here too and use it to avoid checking for pending exceptions if 
2195         possible.
2196
2197 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
2198
2199         * assembly.c (build_assembly_name): add arg for passing the assembly
2200         flags. Do not consider a PublicKey with value "null" valid.
2201         (mono_assembly_name_parse_full): added boolean argument that will be
2202         set if the assembly name contains a PublicKeyToken spec. Added support
2203         for the Retargetable spec for which only Yes or No are allowed as valid
2204         value. Consider assembly name invalid if Retargetable spec is set, but
2205         either version, culture or public key (token) are not specified.
2206         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
2207         with implementation in assembly.c.
2208         * icall.c (fill_reflection_assembly_name): also copy assembly flags
2209         from MonoAssemblyName.
2210         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
2211         introduced argument for mono_assembly_name_parse_full to know if the
2212         assembly name has a PublicKeyToken spec, and if it has instruct
2213         fill_reflection_assembly_name to use default value for keyToken (if
2214         PublicKeyToken is null).
2215
2216 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
2217
2218         * verify.c (mono_method_verify): fixed ovf ops with
2219         float values. They are unverifiable now.
2220
2221 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
2222
2223         * class.c (set_failure_from_loader_error): add BadImageException to the
2224         list of exceptions that can cause a type to fail to load.
2225
2226         * class.c (mono_class_get_exception_for_failure): same.
2227
2228 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
2229
2230         * verify.c (in_any_exception_block): added, check if offset
2231         is part of any exception handling clause.
2232
2233         * verify.c (get_stack_type): added VAR and MVAR types.
2234
2235         * verify.c (do_stobj): better error messages.
2236
2237         * verify.c (do_cpobj): added, check cpobj.
2238
2239         * verify.c (do_initobj): added, check initobj.
2240
2241         * verify.c (do_sizeof): added, check sizeof.
2242
2243         * verify.c (do_localloc): added, check localloc.
2244
2245         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
2246
2247 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
2248
2249         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
2250         save_lmf/restore_lmf opcodes.
2251
2252         * threads.c (mono_threads_install_notify_pending_exc): New function to
2253         install a callback notifying the JIT there is a pending exception on a thread.
2254         (mono_thread_request_interruption): Call the new callback.
2255         (mono_thread_get_and_clear_pending_exception): New function to return the
2256         exception pending on a thread.
2257
2258         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
2259         to turn off checking for pending exceptions.
2260         (mono_marshal_get_native_wrapper): Ditto.
2261
2262 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
2263
2264         * threads-types.h: Get rid of the unnecessary extern declarations.
2265
2266 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
2267
2268         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
2269         return field from parent class if not private.
2270         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
2271         returns fields from parent class if they are not private.
2272         (method_nonpublic): added function to determine if a given method
2273         should be considered non-public. Returns false for private methods
2274         on parent class, and internal methods from parent on the 1.0 profile.
2275         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
2276         use method_nonpublic function to determine whether method should be
2277         returned.
2278         (property_accessor_public): use newly introduced method_nonpublic
2279         function to determine whether accessor is non-public. 
2280         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
2281         event from parent class if not private. Only return static event if
2282         Static flag is set, and only return static event from parent class if
2283         FlattenHierarchy flag is set.
2284         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
2285         include non-private events from parent class.
2286
2287 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
2288
2289         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
2290         warning.
2291
2292 2008-01-16  Wade Berrier <wberrier@novell.com>
2293
2294         * security.c: Add assembly.h header to appease some warnings
2295
2296 2008-01-16  Dick Porter  <dick@ximian.com>
2297
2298         * process.c (process_module_string_read): Remove trailing null
2299         when saving string.
2300
2301 2008-01-16  Mark Probst  <mark.probst@gmail.com>
2302
2303         * class-internals.h: A new data structure describing the layout of
2304         a runtime generic context (MonoRuntimeGenericContextTemplate).
2305
2306         * metadata-internals.h: Added a hash table to MonoDomain that maps
2307         from open generic classes to their runtime generic context
2308         templates.
2309
2310         * object.c: Building of the runtime generic context, including
2311         proper handling of generic type arguments of superclasses.
2312         Building of the runtime generic context according to the template.
2313
2314 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
2315
2316         * class.c (mono_class_setup_fields): Set field.count for generic instances.
2317         Fixes #350856.
2318
2319         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
2320         mono_portability_find_file (). Fixes #325466.
2321         (mono_image_get_public_key): Fix a warning.
2322
2323 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
2324
2325         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
2326         Fixes #353550.
2327         (mono_class_from_name_case): Ditto.
2328
2329 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
2330
2331         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
2332           common storage for the tables used in the System/NumberFormatter class.
2333
2334 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
2335
2336         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
2337
2338 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
2339
2340         * verify.c (get_boxable_mono_type): check if the token is valid.
2341
2342         * verify.c (set_stack_value): changed to add an error if an
2343         invalid type is set on stack. Changed all callers due to signature change.
2344
2345         * verify.c (do_stobj): implement stobj validation.
2346
2347 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
2348
2349         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
2350         set container->is_method, it was set earlier.
2351
2352         * metadata.c (type_in_image): Handle MVARs which belong to not finished
2353         generic methods.
2354
2355         * reflection.c (mono_reflection_initialize_generic_parameter): Set
2356         is_method of the generic container to TRUE for methods.
2357
2358 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
2359
2360         * metadata.c (type_in_image): Handle type parameters properly.
2361
2362         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
2363         memory ownership of this structure.
2364
2365 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
2366
2367         * verify.c (get_boxable_mono_type): make typedref types been just
2368         unverifiable. check for void type.
2369
2370         * verify.c (do_unbox_any): added, verify opcode unbox.any.
2371
2372         * verify.c (do_load_function_ptr): accept method spec tokens.
2373
2374 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
2375
2376         * marshal.c (mono_class_native_size): Always set *align even if this is called
2377         recursively.
2378
2379 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
2380
2381         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
2382         out-of-date.
2383
2384 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
2385
2386         * verify.c: removed some old unused tables. A huge bunch of small fixes
2387         to things found while testing the verifier with mono basic.
2388
2389         * verify.c (dump_stack_value): dump null literal flag to.
2390
2391         * verify.c (verify_type_compatibility_full): fix comparison
2392         for types that have a generic super type.
2393
2394         * verify.c (verify_stack_type_compatibility): fix compatibility
2395         between null literals and reference types. fix compatibility between
2396         boxed valuetypes and object. fix corner case test for enums.
2397
2398         * verify.c (do_cmp_op): proper verification of cgt.un in case
2399         of reference types.
2400
2401         * verify.c (do_invoke_method): fix error message.
2402
2403         * verify.c (do_store_indirect
2404
2405         * verify.c (check_is_valid_type_for_field_ops): proper verification
2406         of managed pointers to valuetypes and boxed valuetypes. proper verification
2407         of null literals.
2408
2409         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
2410         allow token to be a reference type.
2411
2412         * verify.c (do_cast): proper handling of boxes valuetypes.
2413
2414         * verify.c (do_stelem): proper handling of storing a boxed valuetype
2415         in object[].
2416
2417         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
2418         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
2419         fixed the decoding of unbox_any
2420
2421 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
2422
2423         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
2424
2425 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
2426
2427         * verify.c (do_newobj): do delegate verification.
2428
2429         * verify.c (verify_delegate_compatibility): perform delegate
2430         verification.
2431
2432         * verify.c (verify_ldftn_delegate): perform tests related to
2433         ldftn delegates.
2434
2435         * verify.c (mono_delegate_signature_equal): perform the
2436         slightly diferent signature comparison required by delegates.
2437
2438         * metadata.c (mono_metadata_type_equal_full): added and exported
2439         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
2440         allows signature only comparison.
2441
2442         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
2443         as MONO_INTERNAL.
2444
2445 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2446
2447         * verify.c: added a bunch of stack_slot_* functions to
2448         make access to stack slot type easier. This is required to
2449         allow optional flags, like null literal, boxed value and
2450         this pointer.
2451         All access paths to IlStackDesc::stype have been changed 
2452         to use these new funcions.
2453         Removed a bunch of unused functions and cleared all warnings.
2454         This patch introduces the usage of the this pointer and 
2455         boxed value flags.
2456
2457 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
2458
2459         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
2460
2461 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
2462
2463         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
2464         match managed version.
2465
2466         * appdomain.c: Bump corlib version.
2467         
2468         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
2469         argument.
2470
2471 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
2472
2473         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
2474         Set public key token to zero-length byte array if assembly is not
2475         strongnamed.
2476
2477 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
2478
2479         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
2480         writing a vtype array elem.
2481
2482 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
2483
2484         * assembly.c (build_assembly_name): return FALSE if length of token is
2485         not 16 (if not "null").
2486         (mono_assembly_name_parse_full): return FALSE if value of version,
2487         culture, token or key is 0.
2488         * icall.c (fill_reflection_assembly_name): add boolean arguments to
2489         specify whether public key and public key token must be set to default
2490         value (zero-length byte array) if not available. Set versioncompat to
2491         SameMachine. If public key is available or the default is set, then
2492         set PublicKey flag.
2493         (ves_icall_System_Reflection_Assembly_FillName): if no public key
2494         is available, use empty byte array as default value. On the 2.0
2495         profile, use default value for public key token if not set.
2496         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
2497         profile, use default value for public key if not set. On the 2.0
2498         profile, use default value for public key token if not set.
2499         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
2500         default values for public key and public key token.
2501
2502 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
2503
2504         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
2505         field to keep it in synch with the managed object.
2506
2507         * marshal.c (emit_marshal_object): Add support for byref marshalling of
2508         delegates. Fixes #351520.
2509
2510         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
2511         contains defined memory.
2512         
2513         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
2514
2515         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
2516         
2517         * sgen-gc.c (check_consistency): New helper function to do a consistency check
2518         of the GC data structures.
2519
2520         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
2521
2522         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
2523         
2524         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
2525         barrier.
2526         (mono_array_clone_in_domain): Ditto.
2527         (mono_array_clone_in_domain): Ditto.
2528
2529         * threads.c (start_wrapper): Register the thread start argument as a GC root.
2530         (cache_culture): Use a write barrier.
2531
2532         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
2533         (ves_icall_get_property_info): Ditto.
2534
2535         * object.h (MONO_STRUCT_SETREF): New macro.
2536
2537         * class-internals.h (MonoStats): Add some GC statistics.
2538
2539         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
2540
2541 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
2542
2543         * exception.c (mono_exception_from_name_two_strings):
2544         Break from loop after method is found.
2545
2546 2008-01-04  Dick Porter  <dick@ximian.com>
2547
2548         * process.c (process_module_string_read): Rename variable to
2549         reflect correct usage, after fixing bug 345972.
2550
2551 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
2552
2553         * verify.c (mono_type_create_fnptr_from_mono_method): 
2554         created a MonoType function pointer instance to be used during
2555         verification. The verifier releases this memory at end.
2556
2557         * verify.c (mono_method_is_constructor): extracted repeated
2558         checks for constructor into a single class.
2559
2560         * verify.c (do_push_field): use new extracted method
2561         for constructor check.
2562
2563         * verify.c (do_newobj): same.
2564
2565         * verify.c (do_ldftn): renamed to do_load_function_ptr
2566         and make it verify ldvirtftn too.
2567
2568         * verify.c (mono_method_verify: proper verification
2569         of ldvirtftn. release created MonoMethod instances.
2570
2571 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
2572
2573         * verify.c (token_bounds_check): added.
2574
2575         * verify.c (do_ldftn): added.
2576
2577         * verify.c (mono_method_verify): proper verificartion of ldftn.
2578
2579 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
2580
2581         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
2582         than the table row count. It's the resposibility of the caller to
2583         make the bounds check and raise the correct error.
2584
2585         * metadata.c (mono_metadata_decode_row_col): Same.
2586
2587         * loader.c (mono_get_method_from_token): perform bounds check
2588         on token for methoddef table.
2589
2590 2007-12-29  Miguel de Icaza  <miguel@novell.com>
2591
2592         * icall.c
2593         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
2594         assert into a negative result, the managed code already coped with
2595         that.
2596
2597         Some folks on Windows reported this error. 
2598
2599 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
2600
2601         * appdomain.c: Bump corlib version.
2602         * icall.c:
2603         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
2604         CultureInfo.CreateCulture to create CultureInfo for name.
2605         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
2606         create CultureInfo for name. Fixes bug #347174.
2607
2608 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
2609
2610         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
2611         flags.
2612
2613         * verify.c (is_valid_branch_instruction): allow branching to the
2614         first instruction of the protected block.
2615
2616         * verify.c (is_valid_cmp_branch_instruction): same.
2617
2618         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
2619         avoid double initialization.
2620
2621         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
2622         detect which cases the eval stack should just be copied.
2623
2624         * verify.c (mono_method_verify): check if the eval stack
2625         is empty when entering a protected block.
2626
2627 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
2628
2629         * verify.c: added is_clause_in_range, is_clause_inside_range,
2630         is_clause_nested and verify_clause_relationship. They perform
2631         the verifications stated in P1 12.4.2.7.
2632
2633         * verify.c (mono_method_verify): remove some unused variables,
2634         add the new exception clause checks, add instruction border
2635         checks for protected block start/end, improved some error 
2636         messages and fixed a bug in the way invalid instruction access
2637         is detected.
2638
2639 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
2640
2641         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
2642         from GC 7.0 if available.
2643
2644         * object.c: Remove an unused define.
2645         
2646         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
2647
2648         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
2649
2650         * null-gc.c (mono_gc_make_descr_for_array): Implement.
2651
2652         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
2653
2654         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
2655         to take the same arguments as the other make_descr functions.
2656
2657         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
2658
2659         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
2660         directly.
2661
2662         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
2663         mini.c.
2664
2665         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
2666         call to boehm-gc.c.
2667
2668         * boehm-gc.c (mono_gc_register_root): Fix a warning.
2669
2670         * null-gc.c (mono_gc_register_root): Fix a warning.
2671
2672         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
2673
2674         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
2675         (mono_gc_base_init): Call GC_init ().
2676
2677         * null-gc.c: Define mono_gc_register_root () as a no-op.
2678
2679         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2680
2681 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
2682
2683         * verify.c: add prototype for merge_stacks at top
2684
2685         * verify.c (do_switch): added.
2686
2687         * verify.c (merge_stacks): on some cases the stack merging
2688         was not happening properly. Unequal stack sizes at merge
2689         points should be invalid.
2690
2691         * verify.c (mono_method_verify): added more debug info on stack state.
2692         verify switch properly.
2693
2694 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
2695
2696         * method-builder.h: New file, moved the mono_mb_ declarations here from 
2697         marshal.h.
2698
2699         * boehm-gc.c marshal.c: Include method-builder.h.
2700
2701         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
2702
2703         * marshal.c: Remove some code which is now in method-builder.c.
2704
2705 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
2706
2707         * method-builder.c: New file, extraction of the method builder functionality 
2708         from marshal.c.
2709
2710         * marshal.c: Move the mb functions into method-builder.c.
2711
2712         * marshal.h marshal.c: Export some mono_mb_... functions.
2713
2714         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
2715
2716         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
2717         the caller.
2718
2719         * class.c (mono_class_get_full): Check the token type in the dynamic case.
2720
2721         * loader.c (mono_field_from_token): Ditto.      
2722
2723         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
2724         type as well.
2725         
2726         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
2727         Fixes #342565.
2728
2729         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
2730         a helper function for setting it.
2731
2732         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
2733
2734         
2735         * assembly.c: Significally simplify code now that referenced assemblies are 
2736         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
2737
2738         * threads.h: Don't include  the internal threads-types.h header file. Fixes
2739         #349952.
2740
2741 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
2742
2743         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
2744         instructions that were target of branches or are at protected block boundaries.
2745
2746         * verify.c (in_same_block): handle filter clauses.
2747
2748         * verify.c (is_valid_branch_instruction): added. checks the target of
2749         instructions br or brtrue/false.
2750
2751         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
2752         binary branch instructions such as beq and bge.
2753
2754         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
2755         and made it pin the instruction as been part of the exception block.
2756
2757         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
2758         of in_same_block.
2759
2760         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
2761         of in_same_block.
2762
2763         * verify.c (do_ret): ret from a protected block is unverifiable and
2764         not invalid.
2765
2766         * verify.c (do_static_branch): verify br and br.s instructions.
2767
2768         * verify.c (merge_stacks): add extra param to support detection
2769         of branches in the middle of instructions.
2770         
2771         * verify.c (mono_method_verify): verify branches and exception blocks
2772         that target the middle of instructions. Proper verification of br and br.s.
2773
2774 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
2775
2776         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
2777         skip_visibility field.
2778         (reflection_methodbuilder_from_dynamic_method): Ditto.
2779
2780         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
2781         registrations. Fixes #348193.
2782
2783         * threads.h: Move the internal mono_thread_get_pending_exception () to
2784         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
2785
2786 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
2787
2788         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
2789         icall registration. Fixes #348193.
2790
2791         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
2792         for corlib classes into object. Fixes #349621.
2793
2794 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
2795
2796         * icall.c (property_accessor_nonpublic): new function to determine
2797         whether an accessor allows a property to be considered non-public.
2798         Returns false for private accessor(s) from parent class, and internal
2799         accessor(s) from parent on 2.0 profile (and higher).
2800         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
2801         to determine whether property should be included if NonPublic flag
2802         is set. Fixes bug #349078.
2803
2804 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
2805
2806         * verify.c (init_stack_with_value): added.
2807
2808         * verify.c (mono_method_verify): extracted common
2809         code for exception initialization into init_stack_with_value.
2810
2811         * verify.c (mono_method_verify): initialize the exception
2812         for handler clauses as well.
2813
2814         * verify.c (mono_method_verify): fix the exception clause
2815         ordering rules, it should use handler end offset and not
2816         start offset.
2817
2818 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
2819
2820         * rawbuffer.c: remove useless warning.
2821
2822 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
2823
2824         * threads.h, threads-types.h: move functions to the correct header
2825         (fixes bug#349952).
2826
2827 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
2828
2829         * verify.c (mono_method_verify): proper verification
2830         of exception handling clauses ranges and fallthru in
2831         and out of protected blocks.
2832
2833 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
2834
2835         * verify.c (mono_method_verify): fixed compilation issue.
2836
2837 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
2838
2839         * verify.c (mono_method_verify): a printf slipped in, changed
2840         to use verifier debug macro.
2841
2842 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
2843
2844         * verify.c (is_correct_leave): check for filter clauses.
2845
2846         * verify.c (do_filter): added.
2847
2848         * verify.c (mono_method_verify): property verification of leave.
2849
2850
2851 2007-12-18  Mark Probst  <mark.probst@gmail.com>
2852
2853         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
2854         Win32 build, until we figure out how to do the proper thing on
2855         Win32.
2856
2857 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
2858
2859         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
2860         by the previous patch.
2861         
2862         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
2863         the assembly resolve handler for refonly assemblies.
2864
2865 2007-12-17  Mark Probst  <mark.probst@gmail.com>
2866
2867         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
2868         Make sure only one thread is allowed to commence shutdown, and
2869         don't allow new threads to be started once shutdown is in
2870         progress.
2871
2872 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
2873
2874         * verify.c (is_correct_endfilter): added.
2875
2876         * verify.c (is_unverifiable_endfilter): added.
2877
2878         * verify.c (do_endfilter): added.
2879
2880         * verify.c (mono_method_verify): property verification of endfilter
2881         and fixed a corner case or endfinally.
2882
2883 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
2884
2885         * verify.h: new flags to support fail fast of unverifiable code and
2886         do non-strict verification. Non-strict verification is required to
2887         have MS runtime compatibility. There are a huge amount of unverifiable
2888         code that it accepts as verifiable. The strict mode verifies the code
2889         as the specs says.
2890         Non-strict mode will be required in cases where code needs to be
2891         accepted as verifiable but fails under strict mode.
2892
2893         * pedump.c: added support to fail fast and non-strict verification.
2894
2895         * verify.c: added support for both fail fast and non-strict verification.
2896
2897 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
2898
2899         * verify.c (is_correct_endfinally): added.
2900
2901         * verify.c (mono_method_verify): property verification of endfinally.
2902
2903 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2904
2905         * verify.c (in_any_block): check for filter clauses.
2906
2907         * verify.c (is_correct_rethrow): added.
2908
2909         * verify.c (mono_method_verify): property verification of rethrow.
2910
2911         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
2912
2913 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2914
2915         * verify.c (do_throw): added.
2916
2917         * verify.c (mono_method_verify): property verification of throw
2918
2919 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
2920
2921         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
2922         assemblies. Fixes #346425.
2923
2924 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
2925
2926         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
2927         FieldBuilders.
2928
2929         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
2930
2931         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
2932         prevent asserts when this is called with a token which might not be valid.
2933
2934         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
2935         lookup_dynamic_token_class with valid_token == FALSE.
2936
2937         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
2938
2939         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
2940
2941         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2942         
2943 2007-12-10  Mark Probst  <mark.probst@gmail.com>
2944
2945         * gc.c: Don't delay threadpool thread finalization unless Mono is
2946         shutting down.
2947
2948 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2949
2950         * threads.c: turn an assert into a non-fatal warning.
2951
2952 2007-12-09  Robert Jordan  <robertj@gmx.net>
2953
2954         * icall.c (GetVirtualMethod): Add missing argument validation.
2955
2956 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
2957
2958         * verify.c (do_cast): added.
2959
2960         * verify.c (mono_method_verify): property verification of castclass and isinst.
2961
2962
2963 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
2964
2965         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
2966
2967         * verify.c (do_stelem): added.
2968
2969         * verify.c (mono_method_verify): property verification of stelem.X.
2970
2971 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2972
2973         * class.c, class-internals.h: Introduce an environment variable
2974         (MONO_GENERIC_SHARING) through which the extent of generic code
2975         sharing can be controlled (share all classes, share only corlib
2976         classes, or share nothing).
2977
2978         * object.c: Only create runtime generic context for classes for
2979         which sharing is enabled.
2980
2981 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
2982
2983         * verify.c (do_ldelem): refactor it to work with ldelem.any.
2984
2985         * verify.c (mono_method_verify): property verification of ldelem.any.
2986
2987 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
2988
2989         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
2990         added ldelem.X opcodes.
2991
2992         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
2993
2994         * verify.c: proper verification of ldelem.X 
2995
2996 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2997
2998         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
2999
3000 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
3001
3002         * verify.c (mono_method_verify): null literal requires special handling,
3003         the value pushed on stack need to be flagged as so.
3004
3005         * verify.c (do_ldelema): Verify ldelema properly.
3006
3007 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
3008
3009         * verify.c: Verify ldlen properly.
3010
3011 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
3012
3013         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
3014         to the target object's type. Fixes #346160.
3015
3016 2007-12-05  Dick Porter  <dick@ximian.com>
3017
3018         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
3019         Solaris needs the same workaround as BSD-derived systems.  Fixes
3020         bug 323524, patch by Burkhard Linke
3021         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
3022
3023 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
3024
3025         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
3026         handle to use when error dialog is shown; otherwise, update mask
3027         to show no error dialog when an error occurs.
3028
3029 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
3030
3031         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
3032
3033         * class.c (mono_class_get_field_default_value): New helper function to initialize
3034         field->def_type and field->data.
3035
3036 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3037
3038         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
3039         the general one.
3040
3041         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
3042
3043         * marshal.c: Avoid depending on delegate->method_info being set.
3044
3045         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
3046         
3047         * object.c (mono_delegate_ctor): Set delegate->method.
3048
3049         * object-internals.h (struct _MonoDelegate): Add 'method' field.
3050
3051         * appdomain.c: Bump corlib version.
3052
3053 2007-11-27  Raja R Harinath  <harinath@gmail.com>
3054
3055         * metadata.c (mono_generic_inst_equal_full): Short-circuit
3056         equality check if we're comparing canonicalized MonoGenericInsts.
3057
3058 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3059
3060         * class.c (generic_array_methods): Call mono_class_setup_methods () before
3061         accessing class->methods.
3062
3063 2007-11-22  Dick Porter  <dick@ximian.com>
3064
3065         * threads.c: Ensure that the synch_cs is set before trying to use
3066         it.
3067
3068 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
3069
3070         * profiler.c: r89126 broke the statistial profiler, unbreak.
3071
3072 2007-11-22  Martin Baulig  <martin@ximian.com>
3073
3074         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
3075
3076         * mono-debug.c
3077         (mono_debug_debugger_version): Bump to 3.
3078         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
3079         -> mono_debugger_class_initialized().
3080
3081         * mono-debug-debugger.c
3082         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
3083
3084         * class.c
3085         (mono_debugger_start_class_init_func): Removed.
3086         (mono_debugger_class_loaded_methods_func): Added.
3087         (mono_class_setup_methods): Call it here.
3088
3089 2007-11-22  Martin Baulig  <martin@ximian.com>
3090
3091         * mono-debug.c
3092         (mono_debug_add_delegate_trampoline): New public method.
3093         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
3094
3095         * mono-debug.h
3096         (MonoSymbolTable): Added `global_data_table'.
3097         (MonoDebuggerTypeKind): Removed.
3098
3099 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
3100
3101         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
3102         these methods.
3103
3104         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3105         
3106 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3107
3108         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
3109
3110 2007-11-20  Martin Baulig  <martin@ximian.com>
3111
3112         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
3113
3114         * mono-debug-debugger.c
3115         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
3116         (mono_debugger_remove_breakpoint): Likewise.
3117         (mono_debugger_check_breakpoints): Likewise.
3118         (mono_debugger_register_class_init_callback): New public method.
3119         (mono_debugger_remove_class_init_callback): Likewise.
3120         (mono_debugger_add_type): Likewise.
3121
3122         * mono-debug-debugger.h
3123         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
3124
3125 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
3126
3127         * class.c: more interface implementations needed for the
3128         array enumerator (fixes bug #341112).
3129
3130 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
3131
3132         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
3133         fix ParamName of ArgumentNullExceptions.
3134
3135 2007-11-17  Miguel de Icaza  <miguel@novell.com>
3136
3137         * reflection.c (mono_reflection_encode_sighelper): Generate the
3138         modopts and modreqs.   I have a useless test that crashes monodis,
3139         but that shows the code working.
3140
3141 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
3142
3143         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
3144         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
3145
3146 2007-11-15  Dick Porter  <dick@ximian.com>
3147
3148         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
3149         When joining a thread, it's the thread that's calling Join that
3150         gets WaitSleepJoin state not the target.  Fixes the standalone
3151         test case in bug 334740, and hopefully the whole bug too.
3152
3153 2007-11-15  Dick Porter  <dick@ximian.com>
3154
3155         * process.c: Read file version info from the files pointed at by
3156         process modules, not the current process.  Fixes bug 315969.
3157
3158         Use windows typedef names in some places to fix warnings on the
3159         windows build.
3160
3161 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3162
3163         * image.c, metadata-internals.h: Added a generic_class_cache hash
3164         to MonoImage for looking up generic classes when sharing generics.
3165
3166 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3167
3168         * sgen-gc.c: warning cleanups.
3169
3170 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
3171
3172         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
3173         inherited properties.
3174
3175 2007-11-14  Mark Probst  <mark.probst@gmail.com>
3176
3177         * object.c, class-internals.h: Added more information to the
3178         runtime generic context.
3179
3180 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3181
3182         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
3183         instead of just the target method. Generalize the abstract method handling to
3184         handle any non-static method.
3185
3186         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
3187         mono_marshal_get_delegate_invoke () signature change.
3188
3189 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3190
3191         * class.c, class-internals.h: Made
3192         mono_type_get_basic_type_from_generic () public.  Fixed member
3193         access check for shared generics.
3194
3195         * loader.c: Don't insert field into field cache if it's part of a
3196         non-inflated generic class.
3197
3198         * domain.c, domain-internals.h: The generic sharing context is now
3199         part of the jit info data structure.  Added two accessor
3200         functions.
3201
3202 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
3203
3204         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
3205         the array Get/Set/Address methods, since the JIT inlines them.
3206
3207         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
3208
3209         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
3210         (mono_image_init): Initialize runtime_invoke_direct_cache.      
3211
3212         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
3213         mono_marshal_get_delegate_invoke signature change.
3214
3215         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
3216         an additional argument. Add support for invoking abstract methods.
3217
3218         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
3219
3220         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
3221
3222 2007-11-09  Mark Probst  <mark.probst@gmail.com>
3223
3224         * class.c: Do field layout for open generic classes as well.
3225
3226 2007-11-09  Mark Probst  <mark.probst@gmail.com>
3227
3228         * gc.c, gc-internal.h: Don't finalize threadpool threads with
3229         other objects, because the threadpool is still around.  Put them
3230         in a list instead and after finalizing all other objects in the
3231         root domain shut down the thread pool and then finalize the
3232         threads.  Fixes bug #337383.
3233
3234         * threads.c, thread-types.h: New mono_thread_create_internal()
3235         function for marking a thread with the threadpool flag before it
3236         started.  Set synch_cs to NULL after freeing it.
3237
3238         * threadpool.c: Mark threadpool threads before they start.
3239
3240 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3241
3242         * reflection.h, reflection.c: don't export random functions
3243         and lazy load dbnull and missing objects.
3244
3245 2007-11-07  Jonathan Chambers <joncham@gmail.com>
3246
3247         * class.c: Initialize COM types if COM interfaces
3248         are present (not just COM classes).
3249         
3250         Code is contributed under MIT/X11 license.
3251
3252 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3253         * reflection.c:
3254         create_dynamic_mono_image: hook module profiler events (dynamic case).
3255         mono_image_basic_init: hook assembly profiler events (dynamic case).
3256
3257 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3258         * profiler.c:
3259         simple_appdomain_unload: completely terminate the profiler
3260         instead of only processing the statistical samples.
3261         simple_shutdown: make sure this is really called exactly once,
3262         even in multithreaded applications, and always listen to
3263         appdomain events.
3264         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
3265         here, the "[un]load" functions will do it.
3266         Fixes bugs #333791 and #325261.
3267
3268 2007-11-07  Geoff Norton  <gnorton@novell.com>
3269
3270         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
3271         rather than depend on __APPLE__.
3272
3273 2007-11-07  Mark Probst  <mark.probst@gmail.com>
3274
3275         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
3276
3277 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
3278
3279         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
3280         UTF16 MonoString. Fix the crash from bug #335488
3281
3282 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
3283
3284         * marshal.c: Correct (for non-Win32 OS) length != size in 
3285         mono_string_from_bstr. Fix #339530.
3286
3287 2007-11-06  Geoff Norton  <gnorton@novell.com>
3288
3289         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
3290         to succeed
3291
3292 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
3293
3294         * process.c: Added run-time GetProcessId API detection for Windows.
3295
3296 2007-11-04  Miguel de Icaza  <miguel@novell.com>
3297
3298         * reflection.c  (mono_param_get_objects): If a parameter has the
3299         attribute [System.Runtime.InteropServices.Optional] we should
3300         set the DefaultValue of the ParameterInfo to be
3301         System.Reflection.Missing instead of DBNull.
3302
3303         See bug #339013.
3304
3305         (mono_get_reflection_missing_object): New method,
3306         returns the System.Reflection.Missing.Value singleton instance.
3307
3308 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
3309
3310         * culture-info-table.h : regenerated.
3311
3312 2007-11-02  Jonathan Chambers <joncham@gmail.com>
3313
3314         * icall.c: Use GetEnvironmentStrings on windows
3315         so we are using the same environment block as 
3316         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
3317         #333740.
3318         
3319         Code is contributed under MIT/X11 license.
3320
3321 2007-10-31  Martin Baulig  <martin@ximian.com>
3322
3323         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
3324
3325         * mono-debug-debugger.h
3326         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
3327
3328 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
3329
3330         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
3331         classes.
3332
3333 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
3334
3335         * culture-info-table.h : regenerated.
3336
3337 2007-10-30  Robert Jordan  <robertj@gmx.net>
3338
3339         * icall-def.h, icall.c:
3340         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
3341
3342         Code is contributed under MIT/X11 license.
3343
3344 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
3345
3346         * class.c (mono_class_setup_vtable): Find the inflated methods in the
3347         inflated class instead of inflating them again.
3348         
3349         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
3350         dynamic case.
3351
3352         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
3353         Call setup_supertypes () after klass->parent is set.
3354         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
3355
3356         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
3357         for inflated instances of not yet created dynamic generic classes.
3358         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
3359         times from inflated_method.
3360         (methodbuilder_to_mono_method): Ditto.
3361
3362 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3363
3364         * gc.c: code cleanup and removed old untested option of not creating the
3365         finalizer thread.
3366
3367 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
3368
3369         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
3370         creating a jump trampoline for dynamic methods.
3371
3372 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3373
3374         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
3375         generic TypeBuilders when called from another method of the same type (bug #335131).
3376
3377
3378 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
3379
3380         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
3381         doesn't seem to work perfectly.
3382         
3383         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
3384         called multiple times.
3385         (methodbuilder_to_mono_method): Ditto.
3386         (resolve_object): Inflate FieldBuilder's.
3387
3388 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3389
3390         * string-icalls.c, string-icalls.h, appdomain.c: patch from
3391         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
3392         RemoveEmptyEntries in the string.Split implementation (bug #322375).
3393
3394 2007-10-26  Dick Porter  <dick@ximian.com>
3395
3396         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
3397         Thread initialisation changes
3398
3399 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
3400
3401         * verify.c: fix compatibility check between arrays and System.Array
3402
3403 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
3404
3405         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
3406         too. Fixes #336999.
3407
3408 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
3409
3410         * object.c (mono_value_box): Use typed allocation here.
3411
3412 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
3413
3414         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
3415         trampoline instead of compiling the method right away.
3416
3417         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
3418
3419 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
3422         related fields for dynamic classes. Fixes #334493.
3423
3424 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
3425
3426         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
3427         
3428         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
3429
3430         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
3431         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
3432
3433         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
3434
3435         * reflection.c (create_generic_typespec): Initialize klass->generic_container
3436         if needed.
3437         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
3438
3439 2007-10-18  Jonathan Chambers <joncham@gmail.com>
3440
3441         * marshal.c: Use correct key when removing item
3442         from ccw_hash.
3443         
3444         Code is contributed under MIT/X11 license.
3445
3446 2007-10-17  William Holmes  <billholmes54@gmail.com>
3447
3448         *marshal.c: Adding a case to marshal booleans to U1
3449
3450         Code is contributed under MIT/X11 license.
3451
3452 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
3453
3454         * class.c (mono_class_from_name): Search the modules compromising dynamic
3455         assemblies. Fixes #331601.
3456
3457 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
3458
3459         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
3460         exception if the type name contains an assembly component. Fixes #334203.
3461
3462         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
3463         modules inside dynamic assemblies. Fixes #334200.
3464         
3465         * reflection.c: Set image->public_key and image->public_key_length;
3466
3467         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
3468         fields.
3469
3470         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
3471         
3472 2007-10-16  Mark Probst  <mark.probst@gmail.com>
3473
3474         * metadata.c: Implemented correct comparing of generic classes.
3475         An inflated generic class can be equal to a non-inflated one if it
3476         is inflated with generic type variables as type arguments.  Fixes
3477         bug #333798.
3478
3479 2007-10-15  Dick Porter  <dick@ximian.com>
3480
3481         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
3482         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
3483         81646.
3484
3485         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
3486         instead of a monitor lock.  This means that monitor_try_enter and
3487         co can set the thread state safely.
3488         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
3489         thread_interrupt_requested, so interrupt actually works.
3490
3491         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
3492         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
3493         state accessor function
3494
3495 2007-10-15  Martin Baulig  <martin@ximian.com>
3496
3497         * mono-debug.h
3498         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
3499         the debugger with the current runtime.
3500
3501 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3502
3503         * object.c, object-internals.h: added the ability to set a single
3504         trampoline for all the slots in a vtable.
3505
3506 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3507
3508         * marshal.c: deal with a possible race condition during multicast
3509         delegate invocation.
3510
3511 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3512
3513         * class.c: ensure value type methods don't have the synchronized
3514         flag set.
3515
3516 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3517
3518         * string-icalls.c, string-icalls.h: reverted unapproved patch that
3519         breaks the build.
3520
3521 2007-10-11  Joel Reed  <joelwreed@comcast.com>
3522
3523         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
3524         to take an options parameter so that empty entries can be removed during
3525         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
3526
3527 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3528
3529         * marshal.c: make sure we don't store the signature from a dynamic
3530         method into the runtime invoke cache (bug #327189).
3531
3532 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
3533
3534         * marshal.c: make sure the wrapper methods are properly initialized.
3535
3536 2007-10-11  Mark Probst  <mark.probst@gmail.com>
3537
3538         * metadata.c, metadata-internals.h: Generalized
3539         mono_type_stack_size() to mono_type_stack_size_internal() which
3540         takes an additional argument specifying whether it allows open
3541         types.
3542
3543 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3544
3545         * verify.c (do_invoke_method): handle typedbyref params
3546         correctly and check for unverifiable return values.
3547
3548         * verify.c (do_newobj): fix a warning.
3549
3550 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
3551
3552         * verify.c: don't tread typedbyref as allways unverifable,
3553         so uses, like (ld/st)loc.0 are valid. verify for the cases
3554         that it matters, like boxing related operations.
3555
3556 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
3557
3558         * verify.c: add verification of the newobj opcode. verification
3559         of delegate instantation still missing due ldftn and virldftn not
3560         pushing the function type on stack
3561
3562 2007-10-08  Mark Probst  <mark.probst@gmail.com>
3563
3564         * class-internals.h: Runtime generic context data structure
3565         definition.
3566
3567         * object.c: Initialization of runtime generic context at runtime
3568         vtable creation time.
3569
3570 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
3571         * class.c (mono_class_create_from_typedef,
3572         mono_class_from_generic_parameter, mono_ptr_class_get,
3573         mono_fnptr_class_get, mono_bounded_array_class_get)
3574         * domain.c (mono_domain_create, mono_domain_free)
3575         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
3576         * image.c (do_mono_image_load, mono_image_close):
3577         Hooked up load-unload profiler events.
3578
3579 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3580
3581         * domain.c: track statistics about the actual amount of native code
3582         allocated.
3583
3584 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3585
3586         * class.c: the valuetype enumerators don't have the additional
3587         supertypes interfaces.
3588
3589 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
3590
3591         * class.c: need more interfaces setup for the IEnumerator<T>
3592         object created for arrays (tests/ienumerator-interfaces.2.cs).
3593
3594 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
3595
3596         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
3597
3598 2007-10-05  Alp Toker  <alp@atoker.com>
3599
3600         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3601         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3602         #315863.
3603
3604 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
3605
3606         * verify.c (verify_type_compatibility_full): verification of
3607         compatibility improved, validates correctly non-strict checks between
3608         native int and I4 types different than (unsigned)int32.
3609
3610         * verify.c (do_store_indirect): added, do all verification of
3611         ldind.X opcodes. 
3612
3613         * verify.c (get_load_indirect_mono_type): renamed to
3614         get_indirect_op_mono_type, as it now returns the MonoType for 
3615         ldind.X and stind.X opcodes.
3616
3617 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
3618
3619         * reflection.c: Fix the encoding of generic type definition for
3620         TypeBuilders.
3621
3622         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
3623         mono_image_typedef_or_ref but allows to specify if typespec lookups should
3624         be made. Typespec check is done prior to typeref cache lookup.
3625
3626         * reflection.c (mono_image_typedef_or_ref): now just delegate to
3627         mono_image_typedef_or_ref_full.
3628
3629         * reflection.c (encode_generic_class): encode the generic class
3630         directly instead of calling encode_type.
3631
3632         * reflection.c (encode_type): encode the generic type definition
3633         MonoClass as a generic instantiation.
3634
3635         * reflection.c (create_typespec): cache typespec tokens in
3636         the assembly->typespec cache. Don't create typespec for a generic
3637         instance MonoClass. Create typespec for the generic type defintion.
3638
3639         * reflection.c (create_generic_typespec): encode the generic
3640         class directly instead of calling encode_type.
3641
3642         * reflection.c (mono_image_create_token): encode the generic
3643         type definition not using a typespec for MonoType instances.
3644
3645
3646 2007-10-04  Raja R Harinath  <rharinath@novell.com>
3647
3648         Fix #328812
3649         * class.c (mono_image_init_name_cache): Don't return nested
3650         'protected internal' classes.
3651         (mono_class_from_name_case): Likewise.
3652
3653 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
3654
3655         * icall-def.h, icall.c : get_bundled_machine_config() is now the
3656           common function used by both DefaultConfig in System.dll and
3657           InternalConfigurationHost in System.Configuration.dll.
3658
3659 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3660
3661         * class.c: automatically add to vectors only a few essential explicit
3662         generic interfaces. The rest of the interfaces that arrays should
3663         provide are currently implicitly added (but still not lazily, see the
3664         design in the discussion of bug#325495 for the details of what is
3665         needed for that). Additionally, implicit interfaces are assigned the
3666         same vtable slot as the explicit interfaces (as they are compatible):
3667         this enables huge memory savings since we don't need to instantiate
3668         as many memthods and as large vtables anymore. Also, Since
3669         GetEnumerator<T> returns an instance of a type that is required to
3670         support a similarly large set of interfaces as arrays, we add
3671         implicit interfaces and interface offset sharing support to those
3672         types, too. This change adds all the required interfaces so that
3673         the anonarray.cs test case in the bug report works (we don't add
3674         all the interfaces to arrays of arrays 3-level deep and more because
3675         of the memory requirements explained in the bug and since they are much
3676         less common: the lazy-loading support will enabled them to work, too).
3677
3678 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
3679
3680         * verify.c (merge_stacks): major clean up, all type compatibility
3681         checks are done by verify_type_compatibility. This fix my earlier lack
3682         of understanding of the CLR type system and merge_stacks no longer looks
3683         scary.
3684
3685         * verify.c: fixed some bad spelling.
3686
3687 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
3688
3689         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
3690         a given stack slock.
3691         
3692         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
3693         verify_type_compatibility_full. This removed a near indentical function and fixed
3694         handling of Int32 and IntPtr across all opcodes.
3695
3696 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3697
3698         * class.c: only vectors have the additional generic interfaces.
3699
3700 2007-10-01  Jonathan Chambers <joncham@gmail.com>
3701
3702         * mono-config.c: Use g_strcasecmp instead of
3703         strcasecmp like everywhere else to fix
3704         compilation with MSVC.
3705         
3706         Code is contributed under MIT/X11 license.
3707
3708 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3709
3710         * object.c, object-internals.h: refactored the IMT code to enable
3711         building a single slot at a time and lazily creating the IMT trampolines
3712         and thunks.
3713
3714 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
3715
3716         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
3717
3718         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
3719         Fixes #328501.
3720         
3721 2007-09-29  Raja R Harinath  <harinath@gmail.com>
3722
3723         * loader.c (method_from_methodspec): Rearrange to avoid
3724         un-necessary exposition.  Don't assert out if the method's
3725         declaring type is a generic type definition.
3726
3727 2007-09-28  Martin Baulig  <martin@ximian.com>
3728
3729         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
3730
3731 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3732
3733         * class-internals.h: optimize field layout of MonoClass to
3734         requires less cachelines at runtime and save a few bytes on 64 bit
3735         systems.
3736
3737 2007-09-28  Jb Evain  <jbevain@novell.com>
3738
3739         * reflection.c: when encoding type names in custom attributes,
3740         if the type is a closed generic type, its generic arguments
3741         have to be serialized as AssemblyQualifiedName, so that when
3742         they are deserialized, it's possible to re-create them properly.
3743         Fixes #329450.
3744
3745
3746 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3747
3748         * object.c, class-internals.h: added delegate-creation counter.
3749
3750 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3751
3752         * class.c: cleanup of the code that synthetizes interfaces for
3753         arrays in 2.0: saves quit a bit of corlib mempool memory.
3754         Code to fix bug #325495 ifdeffed out for now until the issues
3755         with memory usage and O(n^2) behaviour are fixed.
3756
3757 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3758
3759         * marshal.c: when possible, do not duplicate the name of the methods
3760         in the method builder and in the generated MonoMethod.
3761
3762 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
3763         * verify.c: added support for type checking ldind_* opcodes.
3764
3765 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
3766
3767         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
3768         which is used to distinguish the fully open instantiation of a TypeBuilder
3769         with the rest. This temporary hack is required to restore the property that
3770         the fully open instantiation is the same type of the generic type definition.
3771
3772         * class-internals.h (mono_generic_class_is_generic_type_definition):
3773         new function as part of the internal API.
3774
3775         * class.c (inflate_generic_type): return NULL when the generic inst is
3776         fully open. The fully open generic type is now the same as the generic type
3777         definition for non TypeBuilder types.
3778
3779         * class.c (mono_generic_class_get_class): removed assert since it is
3780         no longer valid, gklass->cached_class can point to the generic type definition.
3781
3782         * class.c (mono_generic_class_is_generic_type_definition): new.
3783
3784         * metadata.c (mono_generic_class_hash): added is_tb_open field
3785         to the hash calculation.
3786
3787         * metadata.c (free_generic_class): if the generic class is associated
3788         with the generic type definition, its field will come from the mempool and
3789         must not be freed.
3790
3791         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
3792         new, this function identifies the corner case of a TypeBuilder fully open
3793         instantiation.
3794
3795         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
3796         for lookup. Set gclass->cached_class to be the container class in case of
3797         the fully open instantiation of non TypeBuilder types.
3798
3799         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
3800         to compare generic classes.
3801
3802         * reflection.c (method_encode_methodspec): remove assert that
3803         no longer is valid.
3804
3805         * reflection.c (mono_reflection_generic_class_initialize): add
3806         an aditional assert to ensure the proper type is used.
3807
3808 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
3809
3810         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
3811         to enjoy it.
3812
3813 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
3814
3815         * verify.c (push_arg): Fixed support for ldarga
3816         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
3817         MonoType used as first arg in case of instance calls.
3818
3819 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
3820
3821         * verify.c: Support for verifying VAR and MVAR types, 
3822
3823 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
3824
3825         * icall.c (ves_icall_get_property_info): Set the reflected type of the
3826         accessors correctly.
3827
3828 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3829
3830         * threads.c: support OSX and other systems in
3831         mono_thread_get_stack_bounds (bug #328026).
3832
3833 2007-09-25  Martin Baulig  <martin@ximian.com>
3834
3835         * mono-debug.h
3836         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
3837
3838 2007-09-24  Martin Baulig  <martin@ximian.com>
3839
3840         * mono-debug.h
3841         (MonoDebugClassEntry): Moved the definition of this struct into
3842         mono-debug.c to make it private.
3843
3844         * mono-debug.c
3845         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
3846         type table per symbol file, we don't need to store the symfile id
3847         any longer.
3848
3849 2007-09-24  Martin Baulig  <martin@ximian.com>
3850
3851         Create one type table per symbol file, since a `MonoClass *' gets
3852         invalid when its image is unloaded.
3853
3854         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
3855         (MonoDebugHandle): Added `type_table'.
3856
3857 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3858
3859         * mempool.c, mempool.h: added mono_mempool_new_size () API
3860         to be able to specify a smaller initial size for the pool.
3861         Adjusted the code to slowly increase pool size before using
3862         the previous default size.
3863         * image.c: use a small initial size for image mempools.
3864
3865 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
3866
3867         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
3868         Fixes ##320990.
3869
3870         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
3871         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
3872
3873 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
3874
3875         * metadata.c (mono_type_create_from_typespec): Remove an invalid
3876         free. Fixes #327438.
3877
3878 2007-09-21  Raja R Harinath  <harinath@gmail.com>
3879
3880         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
3881         generic instantiations, etc.
3882         <MONO_TYPE_ARRAY>: Likewise.
3883
3884 2007-09-21  Martin Baulig  <martin@ximian.com>
3885
3886         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
3887         these structs were never defined.
3888         (MonoDebugHandle): Removed the `_priv' field, it was never used.
3889
3890 2007-09-21  Martin Baulig  <martin@ximian.com>
3891
3892         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
3893
3894 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
3895
3896         * image.c: removed the guid hash tables: we can get the same info
3897         without the additional memory usage hit (partially fixes also bug #327052).
3898
3899 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
3900
3901         * profiler.h, profiler-private.h, profiler.c: add a new profiler
3902         event to handle unloading methods. After the event is called, the
3903         corresponding MonoMethod* must be considered invalid.
3904         * loader.c (mono_free_method): call the new mono_profiler_method_free
3905         event.
3906
3907 2007-09-20  Mark Probst  <mark.probst@gmail.com>
3908
3909         * domain-internals.h: New flag in MonoJitInfo which marks shared
3910         generic methods.  New hash table (shared_generics_hash) in
3911         MonoDomain to keep track of shared generic methods.  Prototypes
3912         for functions to register and lookup shared generic methods.
3913
3914         * domain.c: Support for registering and looking up shared generic
3915         methods via a hash table (shared_generics_hash) in MonoDomain.
3916
3917         * class-internals.h: New exception to signal failure of shared
3918         compilation of a generic method.  New counters for generics
3919         sharing in MonoStats.
3920
3921 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3922
3923         * image.c, metadata-internals.h: don't keep a file descriptor open
3924         for loaded assemblies (bug#325988).
3925
3926 2007-09-19  Raja R Harinath  <rharinath@novell.com>
3927
3928         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
3929         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
3930         use the corresponding datatypes.
3931         (type_in_image): Update to changes.
3932         (CleanForImageUserData): Simplify.
3933         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
3934         Avoid quadratic behaviour in handling the "stolen" list by
3935         separating the filter predicate out, and by prepending the stolen
3936         items rather than appending them.
3937         (steal_ginst_in_image): Likewise.
3938         (mono_metadata_clean_for_image): Update to changes.
3939
3940 2007-09-19  Martin Baulig  <martin@ximian.com>
3941
3942         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
3943
3944 2007-09-19  Martin Baulig  <martin@ximian.com>
3945
3946         * mono-debug.c (mono_debug_cleanup): Don't call
3947         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
3948
3949 2007-09-19  Raja R Harinath  <harinath@gmail.com>
3950
3951         Fix crash on 'make run-test' in mcs/errors
3952         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
3953         Avoid more potential allocations in mono_class_from_mono_type.
3954         (ginst_in_image): Update to changes.
3955         (gclass_in_image): Rearrange slightly.
3956
3957 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
3958
3959         * class.c (mono_class_init): Move the code that sets up class->methods to 
3960         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
3961
3962         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
3963         canonical instance of an inflated generic signature.
3964         (mono_type_create_from_typespec): Remove an invalid free.
3965
3966         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
3967
3968 2007-09-18  Marek Habersack  <mhabersack@novell.com>
3969
3970         * domain-internals.h: added a declaration of the
3971         mono_assembly_load_full_nosearch internal function.
3972
3973         * assembly.c (mono_assembly_load_with_partial_name): use
3974         mono_try_assembly_resolve return value properly.
3975         (mono_assembly_load_full_nosearch): copied the function body from
3976         mono_assembly_load_full, without the code to invoke assembly
3977         search hooks.
3978         (mono_assembly_load_full): calls the above new function and if the
3979         assembly is not resolved, invokes the search hooks.
3980
3981         * appdomain.c (mono_runtime_init): restore the global postload
3982         assembly search handlers.
3983
3984 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
3985
3986         * class.c (mono_class_init): Make sure class->methods and class->properties
3987         are never NULL in the generics case.
3988
3989         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
3990
3991 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
3992
3993         * metadata.c (free_generic_class): Disable some code to fix the build.
3994
3995         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
3996
3997         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
3998         from the image mempool.
3999
4000         * metadata.c (free_generic_class): Free more data from the inflated class.
4001
4002         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
4003
4004         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
4005         mempool.
4006         (mono_type_create_from_typespec): Ditto.
4007
4008         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
4009         MonoImage to the caller.
4010         (mono_init_internal): Save the opened image in a global variable.
4011         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
4012
4013         * reflection.c (resolve_object): Fix a leak.
4014
4015         * metadata.c: Fix the freeing of data in the generics caches.
4016         
4017         * metadata.c (free_generic_inst): Comment this out to fix the build.
4018         (free_generic_class): Ditto.
4019
4020         * metadata.c: Free cached generic methods, instantinations and classes when
4021         they are removed from the caches.
4022         (mono_metadata_free_type): Free the type itself.
4023
4024         * class.c: Free the result of mono_class_inflate_generic_type () in a few
4025         places.
4026
4027 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4028
4029         * boehm-gc.c: restrict managed allocs to __thread supporting
4030         architectures.
4031
4032 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
4033
4034         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
4035         (mono_generic_class_get_class): Fix a leak.
4036
4037         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
4038         mono_metadata_free_type ().
4039         (mono_metadata_inflate_generic_inst): Fix a leak.
4040
4041 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4042
4043         * mono-debug.c (free_header_data): Fix a leak missed earlier.
4044
4045         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
4046         mempool.
4047
4048         * mono-debug.c (mono_debug_close_image): Fix call to 
4049         g_hash_table_remove ().
4050
4051 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
4052
4053         * icall-def.h: redirect all the string ctor to the managed
4054         CreateString () methods.
4055         * string-icalls.c, string-icalls.h: removed dead code for string
4056         ctors and icalls.
4057
4058 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4059
4060         * mono-debug.c: Fix memory leaks.
4061
4062 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4063
4064         * threads-types.h: Implement mono_hazard_pointer_set and 
4065         mono_hazard_pointer_clear macros using do/while(0) to fix
4066         compilation with MSVC.
4067         
4068         Code is contributed under MIT/X11 license.
4069
4070 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4071
4072         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
4073         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
4074
4075 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4076
4077         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
4078         icalls.
4079
4080 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4081
4082         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
4083         managed-code allocated as well.
4084
4085 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4086
4087         * class.c (mono_class_is_assignable_from): Add support for generic variance.
4088
4089 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
4090
4091         * boehm-gc.c: fixed the build after the AOT changes.
4092
4093 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4094
4095         * wrapper-types.h: Add an ALLOC wrapper type.
4096
4097         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
4098         reference managed allocator methods.
4099
4100 2007-09-12  Marek Safar  <marek.safar@gmail.com>
4101
4102         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
4103         of Type array and not MonoType, a fix suggested by Hari.
4104         
4105 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4106
4107         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
4108         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
4109         
4110         Code is contributed under MIT/X11 license.
4111
4112 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
4113
4114         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
4115
4116 2007-09-12  Marek Habersack  <mhabersack@novell.com>
4117
4118         * image.c (do_mono_image_open): if assembly file fails to open and
4119         MONO_IOMAP is in effect, try to find the path in a
4120         case-insensitive way.
4121
4122         * appdomain.c (mono_runtime_init): do not install postload hooks -
4123         tests show that MS.NET doesn't use anything of that sort to
4124         trigger the AppDomain.AssemblyResolve event.
4125         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
4126         made non-static.
4127         (mono_runtime_init): init portability helpers here.
4128
4129         * assembly.c (mono_assembly_load_with_partial_name): if other   
4130         attempts fail, trigger the AppDomain.AssemblyResolve event handler
4131         to resolve the assembly.
4132
4133         * domain-internals.h: added mono_try_assembly_resolve and marked
4134         it as internal.
4135
4136 2007-09-11  Jb Evain  <jbevain@novell.com>
4137
4138         * object-internals.h (MonoReflectionDynamicMethod): add
4139         a `MonoReflectionType *owner` field. The owner is used
4140         * reflection.c:
4141         (mono_reflection_create_dynamic_method): use the owner of the dynamic
4142         method as the class declaring the dynamic method.
4143         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
4144         dynamic method to the declaring type of the methodbuilder.
4145
4146 2007-09-11  Mark Probst  <mark.probst@gmail.com>
4147
4148         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
4149         rules for calling methods via reflection.
4150
4151 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
4152
4153         * reflection.c (resolve_object): Add support for MonoGenericClass. 
4154         Inflate MonoType's.
4155
4156 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4157
4158         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
4159         provide a managed method that does fast allocations without needing
4160         a managed->unmanaged transition. Boehm GC implementation currently
4161         enabled for ptrfree objects on sane architectures.
4162
4163 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
4164
4165         * marshal.c, marshal.h: exported a couple of useful functions and
4166         added mono_mb_get_label () to easily handle backward branches.
4167
4168 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
4169
4170         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
4171
4172 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
4173
4174         * loader.c (find_method): Fixed the regression introduced while
4175         fixing bug #81466.
4176
4177 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
4178
4179         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
4180         well.
4181         
4182         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
4183         icall.c reflection.c: Pass a MonoGenericContext argument to 
4184         mono_lookup_dynamic_token ().
4185
4186         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
4187         #82744.
4188         
4189 2007-09-09  Robert Jordan  <robertj@gmx.net>
4190
4191         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
4192         for generic methods.
4193
4194         * object.c (mono_object_get_virtual_method): Handle generic methods.
4195         Fixes bug #78882.
4196
4197         Code is contributed under MIT/X11 license.
4198
4199 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
4200
4201         * image.c: fix locking in mono_image_load_file_for_image ().
4202
4203 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
4204
4205         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
4206         used only as a cache: added an icall to fill it.
4207
4208 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
4209
4210         * reflection.h: exposed mono_reflection_free_type_info
4211         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
4212         since mono_reflection_bind_generic_parameters makes a copy of it.
4213         * reflection.c (free_type_info): subinfos should be freed.
4214         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
4215         made non static.
4216         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
4217         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
4218         this fixes #82695 and #81726.
4219    
4220
4221 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
4222
4223         * process.h, process.c:  added support for user profile/info in
4224           ProcessStartInfo. For now only Windows works.
4225
4226 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4227
4228         * metadata.c: consider the generic arguments when comparing
4229         signatures (bug #82614).
4230
4231 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4232
4233         * cil-coff.h, image.c: updated assembly loader to cope with the
4234         PE32+ 64 bit file format.
4235
4236 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4237
4238         * assembly.c, class.c, domain.c, loader.c: remove useless
4239         inclusion of cil-coff.h.
4240
4241 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
4242
4243         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
4244         if interface is marked with CoClassAttribute. 
4245    
4246         Code is contributed under MIT/X11 license.
4247
4248 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4249
4250         * sgen-gc.c: ensure no object from the to space is copied again or finalized
4251         if it's seen twice in major collections.
4252
4253 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4254
4255         * sgen-gc.c: big objects are not copied to the gray area, but they
4256         need to be considered for scanning, too, if they are brought alive
4257         by an object ready for finalizations or a survived one.
4258
4259 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4260
4261         * sgen-gc.c: properly account the number of disappearing links when
4262         they are nullified.
4263
4264 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
4265
4266         * sgen-gc.c: share the code to scan the registered roots between the
4267         different types of collections.
4268
4269 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4270
4271         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
4272
4273 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4274
4275         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
4276         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
4277
4278 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4279
4280         * security-manager.c (mono_security_manager_get_methods):
4281         LinkDemandSecurityException now has 2 arguments instead of 3.
4282
4283 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
4284
4285         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
4286         platforms which need it.
4287
4288 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4289
4290         * sgen-gc.c: unregister thread data structures with a pthread_key_t
4291         dtor.
4292
4293 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
4294
4295         * threads.c: free the thread static data on thread exit.
4296
4297 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
4298
4299         * class.c: walk the hierarchy to find the generic definition for
4300         a class (fixes runtime part of bug #82498).
4301
4302 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
4303
4304         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
4305         ...
4306
4307         * image.c (mono_image_close): Here. Hopefully fixes #82510.
4308
4309 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4310
4311         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
4312
4313 2007-08-24  Robert Jordan  <robertj@gmx.net>
4314
4315         * appdomain.c: don't perform the ':'->';' substitution on Win32.
4316
4317 2007-08-24  Jb Evain  <jbevain@novell.com>
4318
4319         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
4320         for byref types.
4321
4322 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4323
4324         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
4325         #82286.
4326
4327 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
4328
4329         * assembly.c: Fix a warning.
4330         
4331 2007-08-23  Marek Habersack  <mhabersack@novell.com>
4332
4333         * appdomain.c: parse the <runtime> section looking for the probing
4334         element with the 'privatePath' attribute, which sets additional
4335         directories in which the runtime should look for assemblies.
4336
4337 2007-08-23  Robert Jordan  <robertj@gmx.net>
4338
4339         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
4340         Fixes #82499.
4341
4342 2007-08-23  Martin Baulig  <martin@ximian.com>
4343
4344         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
4345         _mono_debug_init_corlib() and remove it from the header file.
4346
4347 2007-08-23  Martin Baulig  <martin@ximian.com>
4348
4349         * mono-debug-debugger.c
4350         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
4351         don't notify the debugger about it.
4352
4353         * mono-debug-debugger.h
4354         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
4355
4356 2007-08-23  Robert Jordan  <robertj@gmx.net>
4357
4358         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
4359         Code is contributed under MIT/X11 license.
4360
4361 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4362
4363         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
4364
4365 2007-08-22  Martin Baulig  <martin@ximian.com>
4366
4367         * mono-debug.c: Store debugging info on a per-domain basis and
4368         free it on domain unload.  Add support for unloading symbol files.
4369
4370         * mono-debug.h
4371         (MonoDebugList): New typedef.
4372         (MonoSymbolTable):
4373         - add `data_tables and `type_table'.
4374         - replace 'symbol_files' and `num_symbol_files' with a
4375           `MonoDebugList *'.
4376         (mono_debug_data_table): Removed.
4377         (mono_debug_list_add): New public function.
4378         (mono_debug_list_remove): New public function.
4379         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
4380         (mono_debug_init_2_memory): Renamed into
4381         mono_debug_open_image_from_memory().
4382         (mono_debug_close_image): New public function.
4383         (mono_debug_domain_create): Likewise.
4384         (mono_debug_domain_unload): Likewise.
4385         (MONO_DEBUGGER_VERSION): Bump to 60.
4386
4387         * mono-debug-debugger.h
4388         (MonoDebuggerEvent):
4389         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
4390         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
4391         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
4392         - rename `THREAD_CREATED' and `THREAD_EXITED' into
4393           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
4394         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
4395           meaning.
4396         (mono_debugger_add_symbol_file): Removed.
4397         (mono_debugger_add_type): Removed.
4398         (mono_debugger_lookup_type): Removed.
4399         (mono_debugger_lookup_assembly): Removed.
4400
4401         * domain.c
4402         (mono_domain_create): Call mono_debug_domain_create().
4403         (mono_init_internal): Call mono_debug_init_corlib().
4404
4405         * assembly.c
4406         (mono_assembly_close): Call mono_debug_close_image().
4407
4408 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4409
4410         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
4411         mmap call.
4412
4413 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
4414
4415         * sgen-gc.c: ensure section->pin_queue_end is initialized
4416         correctly when non pinning objects in the section have been found.
4417
4418 2007-08-22  Marek Habersack  <mhabersack@novell.com>
4419
4420         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
4421         containing a list of directories separated by ':'. MSDN docs say
4422         the directories should be separated with ';'. Part of a bugfix for
4423         bug #81446
4424
4425 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
4426
4427         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
4428         it should MonoType and not MonoClass.
4429
4430 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
4431
4432         * culture-info-table.h : regenerated.
4433
4434 2007-08-20  William Holmes  <billholmes54@gmail.com>
4435
4436         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
4437          to call ReplaceFile Kernel32 on windows or in io-layer.
4438         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
4439         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
4440          as an internal call.
4441
4442         Code is contributed under MIT/X11 license.
4443
4444 2007-08-20  Jb Evain  <jbevain@novell.com>
4445
4446         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
4447         and MONO_EXCEPTION_FIELD_ACCESS.
4448
4449         * debug-helpers.[c|h]: new mono_field_full_name function.
4450
4451 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4452
4453         * class.c: Removed class_security_level() and moved it to
4454         security-core-clr.c.
4455
4456         * security-core-clr.c, security-core-clr.h: class_security_level()
4457         is now public and renamed to mono_security_core_clr_class_level().
4458         It also looks for security attributes in the classes a class is
4459         nested in.
4460
4461 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4462
4463         * security-core-clr.c, security-core-clr.h: CoreCLR security
4464         utility functions.
4465
4466         * Makefile.am: Added security-core-clr.[ch].
4467
4468         * security-manager.c, security-manager.h: Functions and enum for
4469         setting and getting the security mode.
4470
4471         * class.c: CoreCLR security checks.
4472
4473 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4474
4475         * icall-def.h, process.c, process.h: implemented icall to get
4476         user/system processor times.
4477
4478 2007-08-17  Mark Probst  <mark.probst@gmail.com>
4479
4480         * domain.c, threads.c, class-internals.h, domain-internals.h: New
4481         reader-lock-free jit_info_table.
4482
4483 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
4484
4485         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
4486
4487         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
4488
4489         * object-internals.h (MonoException): Add missing _data member.
4490
4491 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
4492
4493         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
4494         checking that only methods with matching qname or fqname are picked
4495         from implemented interfaces.
4496
4497 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
4498
4499         * verify.c (do_newarr):added, do type verification of
4500         newarr ops, push the right value on the eval stack.
4501         * verify.c (mono_method_verify): use do_newarr
4502
4503
4504 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
4505
4506         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
4507         factored the common code into get_boxable_mono_type, which
4508         is now using mono_type_get_full, this fixed byref related tests.
4509
4510 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
4511
4512         * class.c: added mono_type_get_full, this function has the same
4513         behavior of mono_class_get_full but the returned MonoType has
4514         all metadata of the associated token in case of a typespec token.
4515         * class.c: added mono_type_retrieve_from_typespec, used by 
4516         mono_type_get_full to retrieve the token type.
4517         * class.c (mono_class_create_from_typespec): changed to use
4518         mono_type_retrieve_from_typespec.
4519         * class.c (mono_ldtoken): changed to use mono_type_get_full
4520         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
4521         * class-internals.h: exported mono_type_get_full for internal use.
4522
4523 2007-08-16  Jb Evain  <jbevain@novell.com>
4524
4525         * domain.c (supported_runtimes): add entry for
4526         the 'moonlight' runtime version.
4527
4528 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
4529
4530         * verify.c (mono_method_verify): small typo sliped in.  
4531
4532 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
4533
4534         * verify.c (do_unbox_value): added, do type verification of
4535         unboxing ops
4536         * verify.c (mono_method_verify): use do_unbox_value
4537
4538
4539 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
4540
4541         * verify.c (dump_stack_value): fixed typo, was printing string
4542         instead of object on stack.
4543         * verify.c (do_box_value): moved the byref check up as it leads
4544         to invalid code and should be done earlier.
4545         * verify.c: improved error messages for and ldobj
4546
4547 2007-08-15  William Holmes  <billholmes54@gmail.com>
4548
4549         * marshal.c (emit_marshal_custom): Omit the call to 
4550           marshal_native_to_managed when calling native to managed 
4551           and the argument is specified as an out argument.
4552
4553         Code is contributed under MIT/X11 license.
4554
4555 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
4556
4557         * verify.c: fixed the type checks for generics, function pointers and vectors.
4558         Added type verification for ldobj and ldtoken. The verifier
4559         would segfault if header or signature of a method contained references
4560         to non-existant types.
4561
4562 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
4563
4564         * marshal.c (cominterop_get_ccw): Patch from
4565         Bill Holmes to no walk up interface hierarchy. 
4566         All parent methods should be present in the interface for COM.
4567    
4568         Code is contributed under MIT/X11 license.
4569
4570 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
4571
4572         * marshal.c (emit_marshal_com_interface): Patch from
4573         Bill Holmes to handle COM Interfaces as return values
4574         for native->managed calls.
4575    
4576         Code is contributed under MIT/X11 license.
4577
4578 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
4579
4580         * marshal.c (cominterop_get_idispatch_for_object): Implement
4581         for runtime callable wrappers.
4582    
4583         Code is contributed under MIT/X11 license.
4584
4585 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
4586
4587         * pedump.c (main): changed from mono_init to mono_init_from_assembly
4588         so 2.0 types are accessible
4589
4590
4591 2007-08-13  Miguel de Icaza  <miguel@novell.com>
4592
4593         * domain.c (mono_init_internal): Call mono_assembly_load_friends
4594         once we load mscorlib.   Due to the order in which we initialize,
4595         the mono_assembly_load_full routine that loads mscorlib did not
4596         load friends.   We now load it once we load the
4597         mono_defaults.internals_visible_class class. 
4598
4599         * assembly.c: Expose the mono_load_friend_assemblies method.
4600
4601 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
4602
4603         * verify.c: improved the handling of boxing, better
4604         type checking for unary ops and conversion. Fix bug
4605         regarding managed pointer compatibility checking
4606
4607 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
4608
4609         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
4610
4611         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
4612
4613 2007-08-09  Raja R Harinath  <rharinath@novell.com>
4614
4615         * reflection.c (dup_type): Remove.
4616         * class.c (dup_type): Remove.
4617         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
4618         instead of the dodgy 'dup_type'.
4619         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
4620         handle the case where 'dup_type' needed the second argument.
4621
4622 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
4623
4624         * domain.c: Fix a warning.
4625
4626 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
4627
4628         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
4629         checking that methods with the same fqname are not overridden
4630         with a method from an ancestor.
4631
4632 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
4633
4634         * threads.c (free_thread_static_data_helper): Avoid a crash if
4635         thread->static_data is not yet set.
4636
4637 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
4638
4639         * marshal.c: Use correct image when emitting
4640         native wrapper for COM calls.
4641    
4642         Code is contributed under MIT/X11 license.
4643
4644 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
4645
4646         * icall-def.h, security.c, security.h :
4647           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
4648
4649 2007-08-07  Martin Baulig  <martin@ximian.com>
4650
4651         * mono-debug-debugger.h
4652         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
4653
4654         * domain.c (mono_domain_free): Call
4655         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
4656
4657 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4658
4659         * verify.c (check_underflow, check_overflow): error message now returns IL offset
4660         * verify.c (in_same_block): code should test if either offset is inside the clauses
4661         * verify.c (mono_method_verify): push the exception into the eval stack of exception
4662         and filter blocks
4663
4664 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
4665
4666         * image.c (mono_image_close): Fix a leak.
4667
4668         * object.c (mono_runtime_invoke_array): Avoid using alloca.
4669
4670         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
4671
4672 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4673
4674         * domain.c, threads.c, threads-types.h: fix memory retention issue
4675         with thread static variables not being cleared on domain unload.
4676         Reuse thread static slots after domain unload.
4677
4678 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
4679
4680         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
4681         nullable type.
4682
4683         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
4684         now done in mono_runtime_invoke_array.
4685
4686         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
4687         receiver is a nullable type.
4688
4689         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
4690         generic parameter.
4691
4692 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
4693
4694         * marshal.c: Implement COM Objects as return type for 
4695         managed->unmanaged calls. Added Release calls for COM Object
4696         out/return values in managed->unmanaged calls.
4697
4698         Code is contributed under MIT/X11 license.
4699
4700 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4701
4702         * threads.h, threads-type.h: move the hazard pointer declarations
4703         to the private header.
4704
4705 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4706
4707         * file-io.c, appdomain.c: memory leak fixes.
4708
4709 2007-08-02  Dick Porter  <dick@ximian.com>
4710
4711         * socket-io.c
4712         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
4713         SO_REUSEADDR setting into io-layer/sockets.c.
4714
4715 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
4716
4717         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
4718         from Object when called on a generic parameter. Fixes #82211.
4719
4720 2007-08-01  Dick Porter  <dick@ximian.com>
4721
4722         * file-io.c (convert_share): Test FileShare values bit-by-bit.
4723         Fixes bug 79250 yet again.
4724
4725 2007-07-30  Martin Baulig  <martin@ximian.com>
4726
4727         Merged the `debugger-dublin' branch.
4728
4729         * mono-debug.h
4730         (MonoDebugDataTable): New typedef.
4731         (MonoDebugMethodAddressList): New typedef.
4732         (MonoDebugWrapperData): Removed.
4733         (MonoDebugSymbolTable): Removed `current_data_table',
4734         `current_data_table_size', `current_data_table_offset'.
4735         (MonoDebugDataItemType): Moved into mono-debug.c.
4736         (MonoDebugMethodJitInfo): Remove `address'.
4737         (mono_debug_data_table): New global variable.
4738         (mono_debug_lookup_method_addresses): New public function.
4739         (mono_debug_find_method): Take a `MonoMethod *', not a
4740         `MonoDebugMethodInfo *'.
4741
4742         * mono-debug.c: Drop support for the old symbol tables.
4743
4744 2007-06-28  Martin Baulig  <martin@ximian.com>
4745
4746         * mono-debug.c (mono_debug_debugger_version): New public variable.
4747
4748 2007-07-31  William Holmes  <billholmes54@gmail.com>
4749
4750         * metadata.c Changed mono_type_create_from_typespec to not insert
4751           the type into the hash map until after
4752           do_mono_metadata_parse_type has completed.
4753         Fixes Bug #82194
4754         Code is contributed under MIT/X11 license.
4755
4756 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
4757
4758         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
4759         generic parameter. Fixes #82211.
4760
4761 2007-07-27  Jb Evain  <jbevain@novell.com>
4762
4763         * pedump.c (dump_metadata, dump_metadata_header): dump
4764         versions contained in the metadata header.
4765
4766 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4767
4768         * threads.c: register small_id_table with the GC.
4769
4770 2007-07-27  Mark Probst  <mark.probst@gmail.com>
4771
4772         * threads.c, threads.h, class-internals.h, object-internals.h:
4773         Hazard pointers, to be used by lock-free parallel algorithms.
4774
4775 2007-07-26  Dick Porter  <dick@ximian.com>
4776
4777         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
4778         routine on non-windows platforms, as I've not managed to think of
4779         a non-kludgy way of doing this.  Finishes off bug 78739.
4780
4781 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4782
4783         * object.c: properly setup interface_bitmap in proxy vtables.
4784
4785 2007-07-25  Marek Habersack  <mhabersack@novell.com>
4786
4787         * appdomain.c (get_shadow_assembly_location): do not use TickCount
4788         to create unique shadow copy target directories, use the domain's
4789         serial number instead. Each domain gets a unique target directory
4790         that way.
4791
4792         * domain.c (mono_domain_create): added code to increment domain
4793         shadow copy serial number and cache the value in the current
4794         domain structure.
4795
4796         * domain-internals.h (struct _MonoDomain): added a new field -
4797         shadow_serial to hold the serial number used in generation of
4798         shadow-copy directories. This is to make sure that the directory
4799         name is unique for each and every domain created. We avoid a race
4800         condition with overriding assemblies already in use by other app
4801         domains.
4802
4803 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
4804
4805         * class.c (mono_bounded_array_class_get): fixed memory leak when 
4806         binding generic parameters.
4807
4808 2007-07-24  Raja R Harinath  <rharinath@novell.com>
4809
4810         * metadata.c (do_mono_metadata_parse_generic_class): Use
4811         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
4812         error.
4813
4814 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4815
4816         * loader.c, class-internals.h, reflection.c: removed the per-method
4817         generics hashtable: we use the global one through the call of
4818         mono_class_inflate_generic_method ().
4819
4820 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4821
4822         * class.c, metadata.c, class-internals.h: introduce yet another
4823         generics global cache for inflated methods (fixes 98% of the perf
4824         issue in bug #81806).
4825
4826 2007-07-23  Raja R Harinath  <rharinath@novell.com>
4827
4828         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
4829         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
4830         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
4831         return a MonoGenericInst containing (a copy) of those types.
4832         (mono_metadata_inflate_generic_inst): Update to changes.
4833         (mono_metadata_parse_generic_inst): Likewise.
4834         (mono_get_shared_generic_inst): Likewise.
4835         * reflection.c (mono_class_bind_generic_parameters): Likewise.
4836         (mono_reflection_bind_generic_method_parameters): Likewise.
4837         * metadata-internals.h: Likewise.
4838         * icall.c (free_generic_context): Kill.
4839         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
4840
4841         * reflection.c (reflection_methodbuilder_to_mono_method): Use
4842         mono_metadata_type_dup.
4843         * marshal.c (mono_mb_create_method): Likewise.
4844
4845         * metadata.c (mono_metadata_type_dup): Rename from
4846         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
4847         MonoImage.  Handle a few more cases, esp. when no mempool is given.
4848         * marshal.c, metadata-internals.h: Update to changes.
4849
4850 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4851
4852         * class.c: fixed a small leak for array classes and removed warning.
4853
4854 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4855
4856         * loader.c (mono_method_get_param_token): Make this work on generic methods.
4857         Return 0x8000000 for return parameters. Fixes #82161.
4858
4859 2007-07-21  Marek Habersack  <grendello@gmail.com>
4860
4861         * appdomain.c (get_shadow_assembly_location): append the current
4862         ticks value to the path. Avoids overwriting the same assemblies by
4863         several threads at the same time.
4864
4865 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
4866         and Raja R Harinath  <rharinath@novell.com>
4867
4868         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
4869         Simplify slightly.
4870         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
4871         property for testing if a method is a generic method definition.
4872
4873 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
4874
4875         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
4876
4877 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
4878
4879         * verify.c: used function from private branch, reverted to the one in class.h 
4880
4881 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
4882
4883         * verify.c: a typo slipped in and the code wont compile
4884
4885 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
4886
4887         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
4888         disabled box instruction as it is doing the wrong thing
4889         improved stack dump messages, now it is easier to debug type related issues
4890
4891
4892 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
4893
4894         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
4895
4896 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
4897
4898         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
4899         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
4900         grouped with class and valuetype. This change will simply 
4901         the code as it should be handled just like unmanaged pointers.
4902
4903 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4904
4905         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
4906
4907 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
4908
4909         * verify.c: several stack merge issues fixed, reference comparisons now
4910         check the type size. strict type check now works correctly.
4911         added more uses of IS_MANAGED_POINTER macro.
4912         fixed issues pointed by running the test suite against .net.
4913         
4914
4915 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4916
4917         * class.c, loader.c, class-internals.h: Removed the
4918         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
4919         defines.
4920
4921         * icall.c: Better error checking in some internal reflection
4922         methods.
4923
4924 2007-07-18  William Holmes  <billholmes54@gmail.com>
4925
4926         * filewatcher.c : removed unused variable 'filename' in 
4927           ves_icall_System_IO_FSW_SupportsFSW
4928
4929 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4930
4931         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
4932         obsolete, removed.
4933
4934 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4935
4936         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
4937         
4938         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
4939
4940 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
4943         Implement generics support.
4944         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4945
4946         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
4947         type_args and method_args arguments.
4948         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
4949         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4950         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
4951
4952 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
4953
4954         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
4955           It adds a rootimage parameter to mono_reflection_get_type_internal,
4956           adds new function mono_reflection_get_type_with_rootimage and use
4957           the rootimage to resolve the types instead of the current image
4958
4959 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
4960
4961         * culture-info-table.h: Forgot to update after r78304.
4962
4963 2007-07-13  Raja R Harinath  <rharinath@novell.com>
4964
4965         * class.c (mono_class_is_open_constructed_type)
4966         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
4967
4968 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
4969
4970         * class.c (mono_bounded_array_class_get):  method fails if used with
4971         an incomplete TypeBuilder enum (no basetype field), fixed it by 
4972         avoiding calculating the size for such array as it cannot be instantiated.
4973         Fix bug #82015
4974
4975 2007-07-12  Raja R Harinath  <rharinath@novell.com>
4976
4977         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
4978         field.
4979         * metadata.c, reflection.c: Update to changes.
4980
4981 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
4982
4983         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
4984         mono_class_is_valid_enum, they are used to valide a enum when loading.
4985         * reflection.c: used new functions to throw TypeLoadException when and
4986         invalid enum is build with TypeBuilder. Fixes #82018
4987   
4988 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4989
4990         * object.c: forgot commit of mono_class_setup_methods () to access
4991         iface->methods.
4992         * object-internals.h: added a few more handy fields to
4993         MonoIMTCheckItem.
4994
4995 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4996
4997         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
4998         iface->methods.
4999
5000 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
5001
5002         * class-internals.h, object-internals.h, object.c: IMT-based
5003         interface invocation core from Massimiliano Mantione
5004         (massi@ximian.com) with a reworked arch-specific interface,
5005         bsearch implementation and a few bugfixes and memory savings by me.
5006
5007 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
5008
5009         * class.c (mono_class_create_from_typedef): mono would segfault if 
5010         an enum did not have a __value field. It now throws a TypeLoadException
5011         for such cases. Fix bug #82022
5012
5013 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5014
5015         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
5016
5017 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5018
5019         * class.c (mono_class_init): If a class is already inited but has
5020         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
5021
5022 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5023
5024         * class.c: Properly handle the case of an unimplemented interface
5025         method.  Fixes: 81673.
5026
5027 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5028
5029         * class-internals.h, object.c: cleanup patch from massi: use
5030         MonoVTable->interface_bitmap since the vtable interfaces offset array
5031         is going away.
5032
5033 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5034
5035         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
5036         GetMDStreamVersion icall instead.
5037
5038 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5039
5040         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
5041         not use mono_dl_build_path() with a full library name: makes
5042         fallbacks to libgaim and libfam work.
5043
5044 2007-07-06  William Holmes  <billholmes54@gmail.com>
5045
5046         * assembly.c: Added a continue statement in probe_for_partial_name when
5047          parse_assembly_directory_name fails.  Fixes : 82002
5048
5049 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
5050
5051         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
5052         and added a verification  for TYPEDBYREF.
5053         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
5054         make native int interchangeable with int32 and some small cleanup and formating.
5055         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
5056         handle byref of byref.
5057         * verify.c (push_local): handle byref of byref.
5058         * verify.c (do_binop): invalid mix of values is unverifiable
5059         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
5060         added visibility checks
5061         * verify.c (field related method): added visibility checks
5062         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
5063
5064 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
5065
5066         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
5067         string.
5068
5069 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5070
5071         * profiler.c (mono_profiler_load): Fix an off-by-one error.
5072
5073         * marshal.c (emit_marshal_string): When returning a string from managed code,
5074         allways make a copy even for unicode strings. Fixes #81990.
5075
5076 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
5077
5078         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
5079         of byref generic inst types (bug #81997).
5080
5081 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5082
5083         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
5084         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
5085
5086 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
5087
5088         * marshal.c (emit_marshal_string): Add support for unicode strings in
5089         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
5090
5091 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
5092
5093         * verify.c: field load/store are now verified, missing only access checks now
5094
5095 2007-06-28  Martin Baulig  <martin@ximian.com>
5096
5097         * mono-debug.c (mono_debug_debugger_version): New public variable.
5098
5099 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
5100
5101         * locales.c: When constructing DateTimeFormat or NumberFormat for
5102         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
5103         MonoCultureInfo contructed from the current locale is always
5104         read-only and has UseUserOverride set to true. All MonoCultureInfo
5105         instances returned for GetCultures have both IsReadOnly and
5106         UseUserOverride set to true. Fixes part of bug #81930.
5107
5108 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
5109
5110        * icall-def.h: Update System.__ComObject icalls
5111        * marshal.c: Avoid managed transition (and object creation)
5112        when looking up COM interface in RCW.
5113        * marshal.h: Ditto.
5114        
5115        Code is contributed under MIT/X11 license.
5116
5117 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
5118
5119         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
5120         to avoid crashes during assembly unloading.
5121
5122 2007-06-22  Raja R Harinath  <rharinath@novell.com>
5123
5124         Fix MethodInfo.IsGenericMethodDefinition
5125         * reflection.c (mono_reflection_bind_generic_method_parameters):
5126         Rearrange code to ensure we always uses a generic method definition.
5127         * class.c (mono_class_inflate_generic_method_full): Set
5128         'generic_container' field only for generic method definitions.
5129         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
5130         Use presense of 'generic_container' field as indication of being a
5131         generic method definition.
5132
5133 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
5134
5135         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5136
5137         * object-internals.h: Reflect changes in the layout of the managed Delegate
5138         class.
5139         
5140         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
5141         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
5142         runtime memory used by the dynamic method. Fixes #77146.
5143
5144 2007-06-21  Dick Porter  <dick@ximian.com>
5145
5146         * file-io.h: 
5147         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
5148         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
5149         81767.
5150
5151 2007-06-21  Raja R Harinath  <rharinath@novell.com>
5152
5153         * reflection.c (method_encode_methodspec): Add a tripwire.
5154         * class.c (inflate_generic_type): The fully open generic type is
5155         not the same as the generic type definition.
5156
5157 2007-06-21  Martin Baulig  <martin@ximian.com>
5158
5159         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
5160
5161         * mono-debug-debugger.h
5162         (MonoDebuggerBreakpointInfo): Removed.
5163         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
5164         (mono_debugger_remove_breakpoint): Likewise.
5165         (mono_debugger_breakpoint_callback): Likewise.
5166         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
5167
5168 2007-06-21  Raja R Harinath  <rharinath@novell.com>
5169
5170         * metadata.c (mono_metadata_lookup_generic_class): The fully open
5171         generic type is not the same as the generic type definition.
5172         * class.c (mono_generic_class_get_class): Likewise.
5173
5174 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
5175
5176         * icall.c: The second argument to 
5177         System.Reflection.MethodBase.GetMethodFromHandleInternalType
5178         is a MonoType not a MonoClass.
5179
5180 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
5181
5182         * verify.c: support for function pointers in the verifier
5183
5184 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
5185
5186         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
5187
5188 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5189
5190         * assembly.c: removed Mono.Data.SqliteClient from the list of
5191         forward-compatible assemblies as it breaks the ABI (bug #81899).
5192
5193 2007-06-19  Raja R Harinath  <rharinath@novell.com>
5194
5195         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
5196         lookup/update with the loader lock.
5197         * reflection.c (mono_class_bind_generic_parameters): No need to
5198         protect mono_metadata_lookup_* with the loader lock.
5199         * class.c (inflate_generic_type): Likewise.
5200         
5201         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
5202         on a generic instantiated type.
5203
5204 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
5205
5206         *verify.c: produce meanfull error messages on verification error
5207         *verify.c: fixed some cases of verification errors reported as validation errors
5208         *pedump.c: fixed the error name array, now it shows validation errors properly
5209         *verify.h: fixed the contant that should be used for verification errors
5210
5211 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5212
5213         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
5214         for bug #77596, 81858 and 80743 (generics data structures on domain
5215         unload).
5216
5217 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5218
5219         Avoid allocating 'MonoGenericContext' on the heap.
5220         * class-internals (_MonoMethodInflated::context): Make field
5221         inline, not a pointer.
5222         * loader.c (method_from_methodspec): Allocate 'new_context' on the
5223         stack.  Use the context embedded within the inflated method as the
5224         hash key, rather than 'new_context'.
5225         * class.c (inflate_generic_context): Simplify.  Return a struct
5226         rather than allocating on the heap.
5227         (mono_class_inflate_generic_method_full): Update to changes.  Now,
5228         doesn't salt away a copy of the context -- simplifying the
5229         lifetime rules of a 'MonoGenericContext *'.
5230         (mono_method_get_context): Return pointer to embedded context.
5231         (setup_generic_array_ifaces): Allocate temporary context on stack.
5232         * reflection.c (inflate_mono_method): Likewise.
5233         (mono_reflection_bind_generic_method_parameters): Likewise.
5234         Use the context embedded within the inflated method as the hash key.
5235
5236         Avoid a source of allocation of 'MonoGenericContext'.
5237         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
5238         and 'cached_context' fields into embedded 'MonoGenericContext' field.
5239         * class.c: Update to changes.
5240         (mono_generic_class_get_context): Simplify drastically.  Now just
5241         returns a pointer to the field.
5242         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
5243         argument as a const pointer.
5244         (mono_metadata_generic_context_equal): Likewise.
5245         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
5246         Update to changes.
5247
5248 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
5249
5250         * verify.c improved the handling of brtrue/brfalse, factored out common code
5251
5252 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5253
5254         Kill MonoGenericMethod.
5255         * class-internals.h (MonoGenericContext::method_inst): Rename from
5256         'gmethod' and convert to a MonoGenericInst.
5257         (MonoGenericMethod): Remove.
5258         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
5259         * loader.c (method_from_methodspec): Update to changes.  Use a
5260         MonoGenericContext as the key to the hashtable.
5261         * metadata.c (mono_metadata_generic_context_equal): Rename from 
5262         'mono_metadata_generic_method_equal' and take MonoGenericContext.
5263         (mono_metadata_generic_context_hash): Likewise from
5264         'mono_metadata_generic_method_hash'.  Change hash function.
5265         (mono_metadata_load_generic_params): Update to changes.
5266         (mono_get_shared_generic_method): Remove.
5267         * metadata-internals.h (mono_get_shared_generic_method): Remove.
5268         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
5269         (inflate_generic_context): Likewise.
5270         (mono_class_inflate_generic_method_full): Likewise.
5271         (setup_generic_array_ifaces): Likewise.
5272         (mono_class_create_from_typespec): Likewise.
5273         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
5274         (method_encode_methodspec): Update callsite.
5275         (reflection_methodbuilder_to_mono_method): Update to changes.
5276         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
5277         MonoGenericContext as the key to the hashtable.
5278         (inflate_mono_method): Update to changes.
5279
5280         * class-internals.h (MonoGenericMethod::container): Remove.
5281         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
5282
5283 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5284
5285         * profiler-private.h, profiler.c, profiler.h: added API to profile
5286         exception events.
5287
5288 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
5289
5290         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
5291
5292 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
5293
5294         * verify.c: method invocation is now validated, now we verify parameter types on stack.
5295         Fixed overflow and underflow not aborting the verification process.
5296
5297 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5298
5299         * class-internals.h (MonoStats): Added stats entries for dynamic
5300         code allocations.
5301
5302 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
5303
5304         * loader.c (mono_free_method): Free header->locals and header->clauses.
5305
5306         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
5307         dynamic case.
5308
5309         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
5310
5311         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
5312
5313 2007-06-12  Raja R Harinath  <rharinath@novell.com>
5314
5315         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
5316         the tables.
5317
5318 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
5319
5320         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
5321
5322 2007-06-11  Raja R Harinath  <harinath@gmail.com>
5323
5324         MonoGenericMethod on a diet
5325         * class-internals.h (_MonoMethodInflated::reflection_info): Move
5326         here ...
5327         (_MonoGenericMethod::reflection_info): ... from here.
5328         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5329         Update to changes.
5330         * reflection.c (inflate_mono_method): Likewise.
5331         (mono_reflection_bind_generic_method_parameters): Likewise.
5332
5333 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
5334
5335         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
5336         *verify.c: factored long ldarg forms to share code with short forms
5337
5338 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
5339
5340         *verify.c: fixed code formating factored some duplicate code
5341         into a new function
5342
5343         *verify.h: fixed binary incompatibility introduced earlier
5344
5345         *pedump.c: fixed formating
5346
5347 2007-06-11  Raja R Harinath  <harinath@gmail.com>
5348
5349         Fix assertion when disassembling Mono.C5.dll
5350         * loader.c (method_from_methodspec): Avoid inflating a method
5351         twice with the same context.  If the methodref is inflated, use
5352         the declaring method instead.
5353
5354         * class.c (mono_class_from_generic_parameter): Fix case similar to
5355         bug #81830 handled below, but for method containers.
5356
5357 2007-06-10  Raja R Harinath  <harinath@gmail.com>
5358
5359         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
5360         get_shared_generic_class.  Directly inflate the instance.
5361         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
5362         (inflate_generic_class): Delete.
5363         (get_shared_generic_class): Delete.  Move setting of
5364         'cached_class' and 'cached_context' ...
5365         * metadata.c (mono_metadata_lookup_generic_class): ... here.
5366
5367         * metadata.c (mono_metadata_lookup_generic_class): Change
5368         signature to take the components of a MonoGenericClass rather than
5369         an allocated MonoGenericClass.  Change semantics to be intern-like.
5370         * reflection.c (mono_class_bind_generic_parameters): Update to
5371         changes.  Make locking region tighter.
5372         * class.c (inflate_generic_class): Update to changes.
5373         (get_shared_generic_class): Likewise.
5374         * metadata-internals.h: Likewise.
5375
5376         * reflection.c (mono_class_bind_generic_parameters): Take and
5377         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
5378         (mono_reflection_bind_generic_parameters): Use
5379         'mono_class_bind_generic_parameters' rather than duplicate the code.
5380         * class.c (mono_bounded_array_class_get): Update to changes.
5381         * object-internals.h: Likewise.
5382
5383         * reflection.c (mono_class_bind_generic_parameters): Only support
5384         parameterizing generic type definitions.  Remove support for other
5385         open types.
5386
5387 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
5388
5389         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
5390
5391         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
5392         in the dynamic case.
5393
5394 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
5395
5396         * threads.c: When cleaning up thread, reset the Background bit.
5397         Fixes bug #81720.
5398
5399 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
5400
5401        * metadata.c: Move variable declarations to top of scope.
5402        * verify.c: Move variable declarations to top of scope.
5403
5404        Code is contributed under MIT/X11 license.
5405
5406 2007-06-08  Raja R Harinath  <rharinath@novell.com>
5407
5408         * reflection.c (mono_class_bind_generic_parameters): Replace
5409         open-coded loop with mono_metadata_inflate_generic_inst.
5410
5411         * class.c (get_shared_generic_class): Don't call
5412         mono_get_shared_generic_inst.  Use the container's own
5413         'class_inst'.
5414
5415         * metadata.c (mono_metadata_load_generic_params): Move
5416         initialization of 'context' field here from ...
5417         * class.c (mono_class_create_from_typedef): ... here, and ...
5418         * loader.c (mono_get_method_from_token): ... here.
5419
5420         * class.c (get_shared_generic_class): Rename from
5421         mono_get_shared_generic_class and make static.
5422         (mono_get_shared_generic_inst): Move to metadata.c.
5423         * loader.c (mono_get_shared_generic_method): Likewise.
5424         * class-internals.h, metadata-internals.h: Update to changes.
5425
5426         Fix #81830
5427         * class.c (mono_class_from_generic_parameter): Don't assume a
5428         generic container owner exists.  Generic containers from monodis
5429         don't have any.
5430
5431 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
5432
5433         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
5434         * verify.h: new typedefs to returns the non-verifiable status
5435         * verify.c: initial implementation of generics, stack merging and object compatibility check
5436
5437 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5438
5439         * class.c, image.c, class-internals.h (MonoImage): class_cache is
5440         a MonoInternalHashTable again (fixed bug in internal hash table
5441         code).
5442
5443 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5444
5445         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
5446         MonoInternalHashTable again (fixed bug in internal hash table
5447         code).
5448
5449 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5450
5451         * class.c, image.c, class-internals.h, domain.c,
5452         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
5453         changes.  Have to figure out what makes them break the SWF
5454         regression.
5455
5456 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5457
5458         * class.c, image.c, class-internals.h (MonoImage): class_cache is
5459         a MonoInternalHashTable now.
5460
5461 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5462
5463         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
5464         MonoInternalHashTable now.
5465
5466 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5467
5468         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
5469         invoke_impl code.
5470
5471         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
5472
5473         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
5474         dependent trampoline.
5475
5476         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5477
5478         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
5479
5480 2007-05-29  Robert Jordan  <robertj@gmx.net>
5481
5482         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
5483
5484 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
5485
5486         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
5487
5488 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
5489
5490        * marshal.c: Fix interface lookup loops for
5491        cominterop_get_com_slot_for_method and 
5492        cominterop_get_method_interface. Only need to lookup
5493        if type is a class, else use interface type method is on.
5494
5495        Code is contributed under MIT/X11 license.
5496
5497 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
5498
5499         * reflection.c: HasSecurity can be present even if no specially 
5500         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
5501         SecurityAttribute). Fix CAS regression tests on buildbot.
5502
5503 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5504
5505        * appdomain.c: Add configure checks for header files.
5506        * image.c: Add configure checks for header files.
5507        * file-io.c: Add configure checks for header files.
5508        * debug-mono-symfile.c: Add configure checks for header files.
5509        * threadpool.c: Add configure checks for header files.
5510        * console-io.c: Add configure checks for header files.
5511        * profiler.c: Add configure checks for header files.
5512        * rawbuffer.c: Add configure checks for header files.
5513        * icall.c: Add configure checks for header files.
5514        * rand.c: Add configure checks for header files.
5515        * socket-io.c: Add configure checks for header files.
5516
5517        Code is contributed under MIT/X11 license.
5518
5519 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
5520
5521         * reflection.c (mono_custom_attrs_from_builders): Remove the 
5522         assertion as it breaks the build.
5523         
5524         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
5525
5526         * reflection.c (lookup_custom_attr): Make a copy here too.
5527
5528         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
5529         dynamic images.
5530
5531         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
5532         images.
5533
5534         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
5535         info.
5536
5537 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5538
5539         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
5540         (load_cattr_value): Ditto.
5541
5542 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
5543
5544         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
5545
5546 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
5547
5548         * threads.c: In "start_wrapper", set apartment_state to MTA if
5549         apartment_state is Unknown and we're running on 2.0 profile or
5550         higher.
5551         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
5552         to main method, then set apartment_state to Unknown on 1.0 profile,
5553         and MTA on 2.0 profile.
5554
5555 2007-05-16  Jb Evain  <jb@nurv.fr>
5556
5557         * class-internals.h (MonoDefaults): Add an attribute_class and
5558           customattribute_data_class.
5559         * domain.c (mono_init_internal): Populate them.
5560         * reflection.c: Use them to remove duplicates. Make a vew
5561         MonoClass variables `static'.
5562
5563 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5564
5565         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
5566         step in implementing IMT, so that all isinst checks now can go
5567         through the bitmap.
5568         This was needed because vtables for TransparentProxy need to look
5569         like the vtable of the "target" class, so they need to point to
5570         its interface bitmap directly.
5571
5572         * object.c: inside "mono_class_create_runtime_vtable" and
5573         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
5574
5575 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
5576
5577         * object-internals.h
5578           culture-info.h : added territory field in MonoCulture and
5579           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
5580         * locales.c : fill territory field above too.
5581         * culture-info-table.h : regenerated.
5582
5583 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5584
5585         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
5586         Fixes #81599.
5587
5588 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
5589
5590         * object.c: Always initialize apartment, even if 
5591         there is no custom attributes on entry point.
5592         
5593         Code is contributed under MIT/X11 license.
5594
5595 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
5596
5597         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
5598         * metadata.c: If no encoding is set, check for unicode
5599         on class.
5600         
5601         Code is contributed under MIT/X11 license.
5602
5603 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
5604
5605         * threads.c: Handle if mono_thread_current returns NULL 
5606         
5607         Code is contributed under MIT/X11 license.
5608
5609 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
5610
5611         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
5612         in start_wrapper. Added mono_thread_init_apartment_state and
5613         mono_thread_cleanup_apartment_state.
5614         * object.c: Initialize thread apartment state on main thread
5615         by checking for STAThreadAttribute on entry point.
5616         * object-internals.h: Add apartment_state field to MonoThread.
5617         * threads-types.h: Add unmanaged definition of 
5618         System.Threading.ApartmentState, MonoThreadApartmentState.
5619         
5620         Code is contributed under MIT/X11 license.
5621         
5622 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
5623
5624         * class.c: Fix windows build.
5625         * class-internals.h: Fix windows build.
5626         
5627         Code is contributed under MIT/X11 license.
5628
5629 2007-05-08  Robert Jordan  <robertj@gmx.net>
5630
5631         * process.c (CreateProcess_internal):
5632         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
5633         .CreateNoWindow was specified. Fixes #81496.
5634
5635 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5636
5637         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
5638         step in implementing IMT, replaced it with two compact arrays
5639         (interfaces_packed and interface_offsets_packed) and a bitmap that
5640         is used for isinst checks (interface_bitmap).
5641
5642         * class.c: (compare_interface_ids): compare function to pass to
5643         bsearch when looking for an interface with a given id.
5644         (mono_class_interface_offset): reimplemented using bsearch on
5645         interfaces_packed, getting the offset from interface_offsets_packed.
5646         (print_implemented_interfaces): utility debugging function.
5647         (setup_interface_offsets): reworked to initialize interfaces_packed,
5648         interface_offsets_packed and interface_bitmap.
5649
5650         * object.c: replaced all accesses to "MonoClass.interface_offsets"
5651         with uses of interfaces_packed and interface_offsets_packed.
5652
5653 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5654
5655         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
5656         mono_class_interface_offset prototype to wrap all accesses to
5657         "MonoClass.interface_offsets".
5658
5659         * class.c: Implemented mono_class_interface_offset, and wrapped all
5660         accesses to "MonoClass.interface_offsets".
5661
5662         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
5663         "MonoClass.interface_offsets".
5664
5665 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
5666
5667         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
5668         GetMethodFromHandle overloads (bug #78637).
5669
5670 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5671
5672         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
5673         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
5674
5675 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
5676
5677         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
5678         #81498.
5679
5680         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
5681         gracefully.
5682         (mono_custom_attrs_from_index): Ditto.
5683
5684         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
5685         Fixes #81501.
5686
5687 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5688
5689         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
5690         is now allocated from a mempool.
5691
5692 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
5693
5694         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
5695         caller holds threads_lock, leading to deadlocks. Fixes #81476.
5696
5697 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5698
5699         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
5700         mono_loader_clear_error () too late. Fixes #81463.
5701
5702 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
5703
5704         * culture-info-table.h : regenerated.
5705
5706 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5707
5708         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
5709         is missing.
5710
5711 2007-04-25  Dick Porter  <dick@ximian.com>
5712
5713         * Makefile.am: Put the mingw enforced-optimisation back into the
5714         PLATFORM_WIN32 section.
5715
5716 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5717
5718         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
5719         patch.
5720
5721         * image.c (mono_image_load_module): New API function to load a module reference.
5722
5723         * image.c (load_modules): Load modules lazily. Fixes #80812.
5724
5725         * class.c (mono_class_from_typeref): Use mono_image_load_module.
5726         
5727         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
5728
5729         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
5730         to mono_image_load_module_dynamic.
5731
5732 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
5733
5734         * marshal.c: Fix calling convention for CCW on non-windows
5735         platforms. STDCALL on windows, CDECL everywhere else to work 
5736         with XPCOM and MainWin COM.
5737         
5738         Code is contributed under MIT/X11 license.
5739
5740 2007-04-23  Martin Baulig  <martin@ximian.com>
5741
5742         Fix #80969.
5743
5744         * loader.c
5745         (method_from_memberref): Added `gboolean *used_context' argument.
5746         (mono_get_method_from_token): Likewise.
5747         (mono_get_method_full): Don't insert the method in the cache when
5748         `used_context' is true.
5749
5750 2007-04-23  Raja R Harinath  <rharinath@novell.com>
5751
5752         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
5753
5754         * reflection.c (mono_reflection_bind_generic_parameters): Don't
5755         create new MonoTypes for returned types.
5756         * class.c (mono_generic_class_get_class): Export mono-internal.
5757         * class-internals.h: Update to changes.
5758
5759 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
5760
5761         * threadpool.c, threadpool.h, icall-def.h: patch from
5762         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
5763
5764 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
5765
5766         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
5767         
5768         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
5769
5770         * threads.c (mono_thread_get_stack_bounds): New helper function.
5771
5772         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
5773         Correctly compute stack bounds when attaching. Fixes #81394.
5774
5775 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
5776
5777         * reflection.c: fix handling of doubles in custom attributes
5778         for the arm-fpa format (bug #81368).
5779
5780 2007-04-18  Raja R Harinath  <rharinath@novell.com>
5781
5782         * reflection.c (assembly_add_win32_resources): Mildly relax an
5783         bounds check to let the end pointer point just past the end of the
5784         allocated buffer.  (may fix #81384)
5785
5786 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
5787
5788         * culture-info-table.h : regenerated.
5789
5790 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
5791
5792         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
5793         the thread is aborted early.
5794
5795 2007-04-05  Dick Porter  <dick@ximian.com>
5796
5797         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
5798         FindFirstFile()/FindNextFile() to find entries.  This lets the
5799         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
5800         81038.
5801
5802         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
5803         the parameters of
5804         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
5805
5806 2007-04-04  Martin Baulig  <martin@ximian.com>
5807
5808         * debug-helpers.c
5809         (mono_method_desc_full_match): Add support for nested classes.
5810
5811 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
5812
5813         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
5814
5815 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
5816
5817         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
5818         waiting for too many threads.
5819
5820 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
5821
5822         * environment.c: Fix return value check on uname so we can get the 
5823         executing version on Solaris operating systems.
5824
5825 2007-03-28  Jb Evain  <jbevain@gmail.com>
5826
5827         * class.c (mono_type_get_name_recurse): Complete the
5828         fix for the creation of assembly qualified names for
5829         pointer types. Fixes #81208.
5830
5831 2007-03-27  Dick Porter  <dick@ximian.com>
5832
5833         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
5834         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
5835         changed.
5836
5837         * threads.c
5838         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
5839         the value of ReleaseMutex().
5840
5841 2007-03-27  Dick Porter  <dick@ximian.com>
5842
5843         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
5844         in little-endian order, not network endian, so must be converted
5845         to host endian here.  Fixes bug 80593.
5846
5847 2007-03-22  Jb Evain  <jbevain@gmail.com>
5848
5849         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
5850         qualified names for pointer types. Fixes #81208.
5851
5852 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
5853
5854         * marshal.c: Add support for PreserveSigAttribute. 
5855         
5856         Code is contributed under MIT/X11 license.
5857
5858 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
5859
5860         * process.c: Fix endianness issues. Fixes #81126.
5861
5862         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
5863         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
5864
5865         * image.c (mono_image_lookup_resource): Make this work on big-endian
5866         machines.Change API contract so the caller needs to free the return value.
5867         
5868         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
5869         API change.
5870         
5871 2007-03-14  Martin Baulig  <martin@ximian.com>
5872
5873         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
5874         mono_type_get_desc() as well.
5875
5876 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5877
5878         * icall.c:  Fix environ access in VS.  
5879         
5880 2007-03-13  Alp Toker  <alp@atoker.com>
5881
5882         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
5883         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
5884         #63841.
5885
5886 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
5887
5888         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
5889         circular references among dynamic methods. Fixes #81091.
5890
5891         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
5892
5893 2007-03-09  Martin Baulig  <martin@ximian.com>
5894
5895         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
5896
5897 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
5898
5899         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
5900         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
5901         
5902         Code is contributed under MIT/X11 license.
5903         
5904 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
5905
5906         * loader.c: Reapply patch for bug #79424.
5907
5908 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5909
5910         * metadata.c (mono_type_to_unmanaged): Only convert object to
5911         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
5912
5913 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
5914
5915         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
5916         (and incorrectly set) is_reference field from MonoGenericInst.
5917
5918 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
5921         a little earlier.
5922
5923         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
5924
5925         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
5926
5927 2007-03-05  Miguel de Icaza  <miguel@novell.com>
5928
5929         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
5930         FileOptions.1 value to mean "temporary", map that to
5931         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
5932
5933         Fixes 80688
5934
5935 2007-03-03  Marek Habersack  <mhabersack@novell.com>
5936
5937         * appdomain.c: implement MS .Net style shadow copying. Copies of
5938         the assemblies are made in a subdirectory of the dynamic base
5939         directory, the assembly names are preserved.
5940         Copy .mdb and .config files along with the assemblies being shadowed.
5941
5942 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
5943
5944         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
5945         (emit_marshal_handleref): Ditto.
5946
5947         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
5948         on Visual C++. Fixes #80671.
5949
5950 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5951
5952         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
5953         for clone operations.
5954
5955 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
5956
5957         * marshal.c: Fix warnings.
5958
5959 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
5960
5961         * loader.c: allow case-insensitive matching of the dll name
5962         in dllmap handling when prefixed with "i:".
5963
5964 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
5965
5966         * threads.c: Fix #ifdef for dummy_apc function for VS.
5967
5968 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5969
5970         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
5971
5972 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
5973         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
5974         giving precedence to the methods with a fully qualified name
5975         (InterfaceName.MethodName) when building the interface sections
5976         of the vtable.
5977
5978 2007-02-16  Dick Porter  <dick@ximian.com>
5979
5980         * threadpool.c (append_job): Fix fast-path array handling, so it's
5981         less likely the array will grow exponentially when the load is
5982         heavy.
5983
5984 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5985
5986         * metadata-internals.h, loader.c: fix dllmap lookup order
5987         for non-function maps, too, and prepare for fallback code.
5988
5989 2007-02-12  Robert Jordan  <robertj@gmx.net>
5990
5991         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
5992         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
5993         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
5994         GlobalFree. Fixes a part of bug #77075.
5995
5996 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
5997
5998         * loader.c: implemented typedef parent in field memberref.
5999
6000 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
6001
6002         * marshal.c: Fix warnings and remember to call Release on
6003         IUnknown of RCW.
6004         
6005         Code is contributed under MIT/X11 license.
6006
6007 2007-02-10  Miguel de Icaza  <miguel@novell.com>
6008
6009         * class-internals.h: Add MonoHandleRef definition, and
6010         handleref_class to mono_defaults. 
6011
6012         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
6013         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
6014
6015         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
6016         (do nothing on this stage)
6017         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
6018         (emit_marshal_handleref): New method, used for argument handling
6019         of HandleRefs. 
6020
6021 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
6022
6023         * class.c (mono_class_setup_parent): Lazily init com types.
6024         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
6025         init com types.
6026         * object.c (mono_remote_class_vtable): Lazily init com types.
6027         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
6028         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
6029         * domain-internals.h: Expose mono_init_com_types.
6030         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
6031         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
6032         Add support for COM Callable Wrapper marshalling.
6033         * marshal.h: Add icall definitions.
6034         * gc.c: Handle freeing of CCWs in finalizer code.
6035         
6036         Code is contributed under MIT/X11 license.
6037
6038 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
6039
6040         * reflection.c: changed all the signature encoding code to use
6041         a variable-sized buffer.
6042
6043 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6044
6045         * marshal.c: locking fixes: never take the loader lock
6046         or other runtime locks when holding the marshal lock
6047         (fixes bug#80664).
6048
6049 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
6050
6051         * marshal.c: make the delegate function pointer mapping
6052         work for the moving GC.
6053
6054 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
6055
6056         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
6057         for bug #80618.
6058
6059 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6060
6061         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
6062         gmodule.
6063
6064 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6065
6066         * threadpool.c: made the code moving-GC safe.
6067
6068 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6069
6070         * assembly.c, boehm-gc.c, class-internals.h, class.c,
6071         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
6072         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
6073         warning cleanup.
6074         * reflection.c: warning cleanup, some threading and moving GC fixes.
6075
6076 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
6077
6078         * class.c, loader.c: create the needed Set/Get/Address array methods
6079         as well as the .ctors in mono_class_init (), fixes bug #80567.
6080
6081 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6082
6083         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
6084         we doesn't decrease its alignment. Should fix the sparc build.
6085
6086 2007-01-24  Dick Porter  <dick@ximian.com>
6087
6088         * socket-io.c
6089         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6090         Create the returned object if we need to ignore an unsupported
6091         socket option.  Fixes a segfault reported by Atsushi.
6092
6093 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6094
6095         * class.c, object.c: restrict GC-tracked fields to
6096         UIntPtr fields used inside corlib, so we provide better
6097         type info to the GC and also allow broken packing as in
6098         bug #80580.
6099
6100 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
6101
6102         * sgen-gc.c: removed duplicated function.
6103
6104 2007-01-19  Miguel de Icaza  <miguel@novell.com>
6105
6106         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
6107         value that means that the value is not supported, but that we
6108         should not return a failure, but instead report this as a
6109         successful operation.
6110
6111 2007-01-19  Raja R Harinath  <rharinath@novell.com>
6112
6113         Fix tests/bug79956.2.il
6114         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
6115         (mono_generic_class_get_class): If the generic definition in an
6116         enum, copy over other fields related to it.
6117
6118 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6119
6120         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
6121         genericinst enums (bug #79215).
6122
6123 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
6124         * class.c: Fix bug 80307.
6125
6126 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
6127
6128         * image.c: if the file table is not present, try to load
6129         all the modules, since we don't have info about them
6130         having or not metadata (bug #80517).
6131         * assembly.c: allow mono_assembly_load_references () to
6132         work for netmodules.
6133
6134 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6135
6136         * image.c, metadata-internals.h, object.c: execute module
6137         cctors when running on the 2 runtime if present (bug #80487).
6138
6139 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6140
6141         * icall.c: optimized InitializeArray() on bigendian.
6142
6143 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
6144
6145         * icall.c: fix for the broken ARM FPA double format.
6146
6147 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6148
6149         * icall.c: handle endian issues for r4 and r8 types, too, in
6150         the InitializeArray() icall.
6151
6152 2007-01-15  Miguel de Icaza  <miguel@novell.com>
6153
6154         * loader.c (mono_loader_error_prepare_exception): Clear the error
6155         once we have extracted the information from it, do this before we
6156         call into the JIT's class loading mechanisms.
6157
6158         * object.c (mono_class_create_runtime_vtable): Do not clear the
6159         loader error before calling mono_class_get_exception_for_failure
6160         as the loader error is needed inside
6161         mono_class_get_exception_for_failure to throw the error (thinko).
6162
6163         Fixes #80521
6164         
6165 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6166
6167         * reflection.c: align fields rva data so it's faster to load at
6168         runtime.
6169
6170 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6171
6172         Prepare to simplify GenericMethod handling.
6173         * class-internals.h (mono_method_get_context): New accessor function.
6174         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
6175         rather than directly accessing '->context' field.
6176
6177         * class-internals.h (_MonoGenericParam.method): Move ...
6178         (_MonoGenericContainer): ... here.  Add into union with klass field.
6179         * class.c, icall.c, loader.c, metadata.c, reflection.c:
6180         Update to changes.
6181
6182 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
6183
6184         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
6185         the wrapper type enum and reduce relocations.
6186
6187 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6188
6189         * reflection.c (inflate_mono_method): Reuse method instantiation
6190         from the generic method, if available.
6191
6192 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
6193
6194         * marshal.c (emit_marshal_variant): Fix conv_arg
6195         type in last commit, based on whether parameter is byref.
6196         
6197 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
6198
6199         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
6200         marshalling.
6201         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
6202         MONO_TYPE_OBJECT back for VARIANT support.
6203
6204 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
6205
6206         * marshal.c, marshal.h, icall-def.h: Implement 
6207         Marshal.ReAllocCoTaskMem.
6208
6209 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
6210
6211         * marshal.c: memory retention fixes: use the proper
6212         image cache for runtime_invoke method lookups.
6213
6214 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6215
6216         * mempool.c: added code to help debug mempool allocations.
6217
6218 2007-01-11  Dick Porter  <dick@ximian.com>
6219
6220         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
6221         support (experimenting with faking it with IP_MTU_DISCOVER for
6222         systems that don't have IP_DONTFRAGMENT.)
6223         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
6224         icall.
6225
6226         * icall-def.h: new System.Net.Sockets.Disconnect icall.
6227
6228         * socket-io.h: Add new fields to MonoSocketAsyncResult
6229         corresponding to the new ones in Socket.cs.
6230
6231 2007-01-11  Raja R Harinath  <rharinath@novell.com>
6232
6233         Fix IronPython regression mentioned in #80249
6234         * metadata.c (do_mono_metadata_parse_generic_class): Clear
6235         'cached_context' field, since it may have been initialized as a
6236         side-effect of metadata parsing.
6237
6238         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
6239         (_MonoGenericClass.cached_class): Move here and rename from lone
6240         remaining field of ...
6241         (_MonoInflatedGenericClass): ... this.  Remove.
6242         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
6243         to changes.
6244
6245         Fix mcs/tests/test-128.cs regression.
6246         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
6247         2007-01-10 change below.
6248         [MONO_TYPE_OBJECT]: Recurse into array case.
6249
6250 2007-01-11  Raja R Harinath  <harinath@gmail.com>
6251
6252         * class-internals.h (mono_get_inflated_generic_class): Remove.
6253         * class.c (mono_get_inflated_generic_class): Remove.
6254         (mono_generic_class_get_class): Rename from
6255         mono_class_create_generic.
6256         (mono_class_from_mono_type) [GENERICINST]: Use it.
6257         * reflection.c, metadata.c: Update to changes.  Use
6258         'mono_class_from_mono_type'.
6259
6260 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6261
6262         * reflection.c: use passed type when encoding an array element
6263         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
6264
6265 2007-01-09  Robert Jordan  <robertj@gmx.net>
6266
6267         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
6268         result arguments (someDelegate.EndInvoke (unrelatedAres)).
6269         Fixes bug #80392.
6270
6271 2007-01-09  Raja R Harinath  <rharinath@novell.com>
6272
6273         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
6274
6275         * object.c (set_value): Avoid aliasing between type->data.klass
6276         and type->data.generic_class.
6277
6278         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
6279
6280 2007-01-08  Raja R Harinath  <rharinath@novell.com>
6281
6282         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
6283         between type->data.klass and type->data.generic_class.
6284
6285 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
6286
6287         * marshal.c: In MS.NET, StringBuilder objects are not copied by
6288         value in out parameters.
6289
6290 2007-01-08  Raja R Harinath  <rharinath@novell.com>
6291
6292         Simplify invariant for MonoGenericClass::klass field.
6293         * class.c (mono_class_create_generic): Verify 'klass' is null.
6294         * metadata.c (do_mono_metadata_parse_generic_class): Don't
6295         initialize 'klass' field.
6296
6297 2007-01-05  Raja R Harinath  <rharinath@novell.com>
6298
6299         Ongoing work to avoid redundant data and simplify invariants.
6300         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
6301         'generic_class', and change type to a GenericInst.
6302         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
6303         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
6304
6305 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
6306
6307         * class.c : skip io-layer under PLATFORM_WIN32.
6308
6309 2007-01-03  Tor Lillqvist  <tml@novell.com>
6310
6311         Fix #80305: In a bundled executable, look in the bundled exe
6312         assembly to determine the runtime version. Add the possibility to
6313         bundle also the machine.config file.
6314         
6315         * assembly.c (mono_assembly_open_from_bundle): Make
6316         non-static. Allow being called even if we have no bundled
6317         assemblies, and return NULL right away in that case.
6318
6319         * domain-internals.h: Declare mono_assembly_open_from_bundle()
6320         here.
6321
6322         * domain.c (app_config_parse): Take an assembly exe file name as
6323         parameter instead of a config file name. Check for a bundled
6324         config file for that assembly by calling
6325         mono_config_string_for_assembly_file() (see below) before looking
6326         for one in the file system.
6327         (get_runtimes_from_exe): Corrsponding change to call of
6328         app_config_parse().
6329         (get_runtimes_from_exe): Check for bundled assembly exe file first
6330         by calling mono_assembly_open_from_bundle(). If no bundled
6331         assembly exe file is found, call mono_image_open() as before to
6332         look it up in the file system.
6333
6334         * mono-config.c: Add variable bundled_machinec_onfig.
6335         (mono_config_string_for_assembly_file): New function.
6336         (mono_config_for_assembly): Move code snippet that looks for a
6337         bundled assembly .config file into the above new function. Call
6338         it.
6339         (mono_register_machine_config, mono_get_machine_config): New
6340         functions to set and retrieve
6341
6342         * assembly.h: Declare mono_register_machine_config().
6343
6344         * mono-config.h: Declare mono_get_machine_config() and
6345         mono_config_string_for_assembly_file().
6346
6347         * icall.c: No declaration of environ necessary on Win32. It is
6348         declared (as a macro expanding to a function call) in stdlib.h.
6349         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
6350         New internal mono function. Returns the value of
6351         mono_get_machine_config() as a Mono string.
6352
6353         * icall-def.h: Add get_bundled_machine_config().
6354
6355 2007-01-04  Raja R Harinath  <rharinath@novell.com>
6356
6357         Remove redundant field
6358         * class-internals.h (_MonoGenericContext.container): Remove field.
6359         * loader.c (mono_method_get_signature_full): Don't parse a
6360         "container" for a signature parse when the signature is inflated
6361         immediately.
6362         (method_from_methodspec): Likewise, for a generic_inst.
6363         * class.c, metadata.c, reflection.c: Update to changes.
6364
6365 2006-01-04  Raja R Harinath  <rharinath@novell.com>
6366
6367         * class-internals.h (_MonoGenericClass): Rename 'context' field to
6368         'cached_context', and change semantics -- it starts off NULL, and
6369         is initialized on demand.
6370         * class.c (mono_generic_class_get_context): New accessor to
6371         replace 'context' field accesses.
6372         (mono_class_get_context): New helper.
6373         (*): Update to changes.
6374         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
6375
6376 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6377
6378         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
6379         before the memcpy.   Fixes Marshal2 regression.
6380
6381 2007-01-02  Jb Evain  <jbevain@gmail.com>
6382
6383         * blob.h: add a MONO_TYPE_ENUM definition
6384         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
6385         fix the encoding of arrays of enums in custom attributes.
6386
6387         Fixes #79666.
6388
6389 2007-01-01  Miguel de Icaza  <miguel@novell.com>
6390
6391         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
6392         string is null terminated, but only cut the string short if it
6393         overflows the buffer.   
6394         
6395         (mono_string_to_byvalstr): Also fix this routine.   The code here
6396         was not properly terminating a string (it was only terminated
6397         because of the previous catch-all memset). 
6398
6399         I left the memset, because I do not know if applications expect
6400         the runtime to clear this region. 
6401
6402         Fixes #79944.
6403
6404         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6405         Clear the error before returning to unmanaged code to prevent the
6406         runtime from being confused later on (fixes  80420).
6407         (ves_icall_type_from_name): Always call mono_loader_clear_error
6408         after parsing a type that could have failed.
6409         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
6410
6411         * loader.c (mono_loader_clear_error): Fix indentation.
6412
6413 2006-12-28  Martin Baulig  <martin@ximian.com>
6414
6415         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
6416
6417 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6418
6419         * reflection.c: patch from Rolf Bjarne Kvinge to fix
6420         getting a token for an EnumBuilder.
6421
6422 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6423
6424         * reflection.c: be more careful in case resource generation
6425         fails to create the data array.
6426
6427 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6428
6429         * sgen-gc.c: write barrier for clone and fix unregister handles.
6430
6431 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6432
6433         * reflection.c: some fixes needed in the generics code for the moving GC.
6434
6435 2006-12-22  Robert Jordan  <robertj@gmx.net>
6436
6437         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
6438         account. Fixes bug #80299.
6439
6440 2006-12-21  Raja R Harinath  <rharinath@novell.com>
6441
6442         Fix WaitHandle usage in delegates.
6443         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
6444         * object.c (mono_wait_handle_new): Use the property set method to
6445         initialize the handle.
6446         (mono_wait_handle_get_handle): New.
6447         * threadpool.c (mono_async_invoke): Use it.
6448         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
6449         Likewise.
6450         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
6451
6452 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
6453
6454         * marshal.c (emit_marshal): Call emit_marshal_variant and
6455         emit_marshal_com_interface when applicable.
6456         (emit_marshal_variant, emit_marshal_com_interface): Add
6457         methods for this case and remove if's from emit_marshal_object.
6458         
6459 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
6460
6461         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
6462
6463 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
6464
6465         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
6466         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
6467         and GlobalFree on Windows. Remove FIXME.
6468
6469 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6470
6471         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
6472         implementation for managed objects.
6473
6474 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6475
6476         * object.c: implemented code to be used for checking
6477         that no reference field overlaps with non-references.
6478
6479 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6480
6481         * threadpool.c: fix queue code to be compatible with the
6482         moving GC.
6483
6484 2006-12-18  Miguel de Icaza  <miguel@novell.com>
6485
6486         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
6487         in structures by throwing ArgumentNullException.
6488
6489         (emit_marshal_safehandle): Also when they are null parameters.
6490
6491         (emit_marshal_safehandle): Add support for ref
6492         SafeHandles parameters
6493
6494 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6495
6496         * profiler.c: updated to use the mono-dl API instead of
6497         gmodule.
6498
6499 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6500
6501         * profiler.c: updated to use the mono-dl dynamic loading
6502         API instead of gmodule.
6503
6504 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6505
6506         * profiler.c: use readlink, older versions of glib don't have
6507         g_file_read_link ().
6508
6509 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6510
6511         * profiler.c: try to detect the path to mono if libc fails to provide
6512         a useful name (bug #80286).
6513
6514 2006-12-16  Raja R Harinath  <rharinath@novell.com>
6515
6516         Fix #80242
6517         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
6518         instance, use the generic type definition instead.
6519         (ves_icall_Type_GetNestedTypes): Likewise.
6520         * class.c (mono_class_create_generic): Always set the
6521         nested_classes of a generic instance to NULL, even if the generic
6522         type definition has nested types.
6523
6524 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
6525
6526         * marshal.c (mono_string_from_bstr): Revert previous Windows change
6527         and fix on Linux.
6528         
6529 2006-12-15  Miguel de Icaza  <miguel@novell.com>
6530
6531         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
6532         my arguments were in the wrong order.   I also fixed the Windows
6533         version which seems to have had the same issue.
6534
6535         (mono_free_bstr): On Unix, this is g_free.
6536         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
6537         conversions (for the tests in corlib to pass).
6538
6539 2006-12-14  Miguel de Icaza  <miguel@novell.com>
6540
6541         * marshal.c (emit_ptr_to_object_conv): For now, ignore
6542         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
6543         exception if a ref SafeHandle in a struct has changed).
6544         
6545         (emit_struct_conv): Do not perform layout checks for classes
6546         derived from SafeHandle, as those are specially handled. 
6547
6548         (emit_object_to_ptr_conv): Add support for
6549         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
6550
6551         (emit_marshal_safehandle): Implement conversion of return values
6552         of safehandles (MARSHAL_ACTION_CONV_RESULT).
6553         
6554         * threads.c: WaitHandle now is compiled with two different handles
6555         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
6556         for 2.0.
6557         
6558         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
6559         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
6560         these routines to cope with both kinds of fields.
6561
6562 2006-12-12  Miguel de Icaza  <miguel@novell.com>
6563
6564         * metadata.c (mono_type_to_unmanaged): Handle the case where
6565         type->data.klass is a SafeHandle, and in that case, return the
6566         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
6567         MONO_MARSHAL_CONV_SAFEHANDLE. 
6568
6569 2006-12-11  Miguel de Icaza  <miguel@novell.com>
6570
6571         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
6572         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
6573         calling emit_marshal_object.
6574
6575         (emit_marshal_safehandle): Implement marshalling of
6576         SafeHandle parameters (no ref support yet).
6577
6578         (MarshalAction): Document the defines as I implement
6579         them for SafeHandle.
6580
6581         (emit_marshal_object): indentation police.
6582
6583         * class-internals.h: Define MonoSafeHandle.
6584         Add safehandle_class to MonoDefaults type.
6585
6586         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
6587         list of classes to check for fields. 
6588
6589         * domain.c (mono_init_internal): Add SafeHandle to the list of
6590         mono_defaults loaded.
6591
6592 2006-12-15  Raja R Harinath  <rharinath@novell.com>
6593
6594         Fix #80253
6595         * reflection.c (mono_reflection_bind_generic_parameters): If the
6596         generic type definition is a type builder, ensure that it is fully
6597         initialized before instantiating it.  Kill some dead code.
6598
6599 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6600
6601         * object.c: clear the loader_error () before loading
6602         more metadata stuff (bug #80258).
6603
6604 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
6605
6606         * icall.c, icall-defs.h: type modifiers icalls for
6607         parameters and properties.
6608
6609 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6610
6611         * object.c, icall.c: fixed warnings.
6612
6613 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6614
6615         * marshal.c: fixed a couple of leaks and coding style in a few places.
6616
6617 2006-12-08  Dick Porter  <dick@ximian.com>
6618
6619         * process.c: Cope with NULL ProcessStartInfo arguments on windows
6620         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
6621         80173.
6622
6623 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6624
6625         * process.c: ProcessStartInfo may have only filename set and
6626         arguments can be NULL.
6627
6628 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6629
6630         * icall.c: fix leak found by Robert Jordan.
6631
6632 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6633
6634         * marshal.c, marshal.h: generate managed method to access an element
6635         of a multi-dimensional array.
6636
6637 2006-11-30  Paolo Molaro (lupus@ximian.com)
6638
6639         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
6640
6641 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6642
6643         * icall.c: back out GetFields () fix until the serialization code is
6644         fixed to not depend on the incorrect behaviour.
6645
6646 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6647
6648         * profiler.c: provide defaults if none are set.
6649
6650 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6651
6652         * Makefile.am, attrdefs.h: new public header file with
6653         constants for attributes for use by embedders.
6654
6655 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6656
6657         * icall.c: GetFields () fix for bug #80064.
6658
6659 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
6660
6661         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
6662         removed long unused icalls.
6663
6664 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
6665   
6666         * marshal.c: 
6667                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
6668                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
6669                 can be generated without a delegate class.
6670                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
6671         
6672         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
6673
6674 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6675
6676         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
6677         #80069.
6678
6679 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6680
6681         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
6682         icall-def.h: added icalls needed by System.GC.
6683
6684 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
6685
6686         * loader.c: ensure the class in catch clauses is handled
6687         correctly for generics methods (fixes bug#79980).
6688
6689 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6690
6691         * monitor.h, monitor.c: added mono_locks_dump () function
6692         to help debug deadlocks involving managed locks.
6693
6694 2006-11-13  Dick Porter  <dick@ximian.com>
6695
6696         * file-io.c (get_file_attributes): If the file is a symlink try
6697         and get the stat data for the target, but also add the
6698         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
6699         the specs for the windows symlink support, but will probably have
6700         to be reworked when I have test data from a vista machine.  Fixes
6701         bug 79887.
6702
6703 2006-11-13  Dick Porter  <dick@ximian.com>
6704
6705         * gc.c (mono_domain_finalize): 
6706         * marshal.c (mono_delegate_begin_invoke): 
6707         * threadpool.c (socket_io_init, mono_thread_pool_init)
6708         (mono_thread_pool_finish): 
6709         * monitor.c (mono_monitor_try_enter_internal): 
6710         * threads.c (mono_thread_resume, mono_thread_init)
6711         (mono_thread_suspend_all_other_threads)
6712         (mono_thread_execute_interruption): 
6713         * appdomain.c (mono_domain_unload): Check for NULL error returns
6714         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
6715         75733.
6716
6717 2006-11-11  Miguel de Icaza  <miguel@novell.com>
6718
6719         * process.c
6720         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
6721         Only close the handle if the value of the handle is not
6722         INVALID_HANDLE_VALUE.  This just makes the process a bit more
6723         robust.
6724
6725         Improvement for #75733, so that we do not run into this problem. 
6726
6727         
6728         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
6729         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
6730         internal variables.  Fixes #79462 
6731         
6732
6733 2006-11-09  Dick Porter  <dick@ximian.com>
6734
6735         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
6736         Use poll() not select().  Fixes bug 79397.
6737
6738 2006-11-09  Raja R Harinath  <rharinath@novell.com>
6739
6740         Fix #79872
6741         * assembly.c (mono_assembly_load_from_full): Check that the given
6742         image has an assembly manifest.
6743
6744 2006-11-09  Ankit Jain  <jankit@novell.com>
6745
6746         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
6747         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
6748         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
6749
6750 2006-11-07  Dick Porter  <dick@ximian.com>
6751
6752         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
6753         Put the old resolver behaviour back for pre-2.0 profiles.
6754
6755 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6756
6757         * threadpool.c: precise GC and locking fixes.
6758
6759 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6760
6761         * class.c: don't load types that have an explicit unaligned
6762         managed reference. Provide better info in the TypeLoad exception.
6763         Part of the fix for bug #79744.
6764         * object.c: use the correct check for class type load issues.
6765
6766 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6767
6768         * class.c: enforce alignment of fields with managed references
6769         even when Pack=1 is forced by the user (bug #77788).
6770
6771 2006-11-03  Dick Porter  <dick@ximian.com>
6772
6773         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
6774         If the address reverse lookup fails, return it as the hostname
6775         anyway.  Fixes bug 79721.
6776
6777 2006-11-03  Dick Porter  <dick@ximian.com>
6778
6779         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
6780         Fix build on Windows.
6781
6782 2006-11-02  Dick Porter  <dick@ximian.com>
6783
6784         * icall-def.h: 
6785         * object-internals.h: 
6786         * exception.c (mono_get_exception_thread_interrupted): 
6787         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
6788         Fixes bug 74525.
6789
6790         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
6791         Check for pending Thread.Interrupt.
6792
6793 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
6794         * loader.c: Fixed bug 79684.
6795
6796 2006-10-27  Dick Porter  <dick@ximian.com>
6797
6798         * file-io.c (get_file_attributes): Force symlinks to directories
6799         to be returned as a regular file.  Fixes bug 79733.
6800 2006-10-26  Dick Porter  <dick@ximian.com>
6801
6802         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
6803         CreateFile to open a directory then we need to set the
6804         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
6805
6806 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6807
6808         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
6809         friends.
6810
6811 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
6812
6813         * sgengc.c: small cleanup of timer code.
6814
6815 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6816
6817         * sgen-gc.c: fix some warnings and start adding support for
6818         complete object removal on domain unload.
6819
6820 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
6821
6822         * assembly.c: build_assembly_name should not consider a version
6823         number without build or revision number invalid. Fixes bug #79715.
6824
6825 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
6826
6827         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
6828         call kernel32 function OutputDebugString directly.
6829         
6830         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
6831         
6832 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
6833
6834         * reflection.c: small cleanup, using a function to insert a MonoString
6835         in the string heap.
6836
6837 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
6838
6839         * reflection.c: moving GC fixes.
6840
6841 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6842
6843         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
6844         all the objects with finalizers belonging to an unloading appdomain.
6845
6846 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6847
6848         * sgen-gc.c: added ability to allocate even when the nursery is fully
6849         pinned and fixed a couple of bugs.
6850
6851 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6852
6853         * threads.h: Revert the last change for now.
6854
6855         * threads.h (mono_thread_get_pending_exception): Rename this to
6856         mono_thread_get_undeniable_exception ().
6857
6858 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
6859
6860         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
6861         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
6862         when fname does not refer to valid assembly. This result in a more
6863         meaningful error message.
6864         * exception.c: added mono_get_exception_bad_image_format2 which 
6865         constructs a BadImageFormatException using the ctor taking a custom
6866         message and the file name. Passing in a NULL msg results in a default
6867         message.
6868         * exception.h: define mono_get_exception_bad_image_format2 function.
6869         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
6870         when file name pointed to an invalid IL image. Use 
6871         mono_get_exception_file_not_found2 to construct FileNotFoundException,
6872         as this results in a more meaningful error message.
6873
6874 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6875
6876         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
6877         #79465.
6878
6879 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6880
6881         * metadata.c (mono_type_size): Change the align parameter to guint32 for
6882         consistency with the other _size functions.
6883         (mono_type_stack_size): Ditto.
6884
6885         * class.c object.c icall.c: Fix warnings caused by the above change.
6886
6887         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
6888
6889         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
6890
6891         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
6892
6893 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6894
6895         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
6896         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
6897         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
6898         threadpool.h, threads-types.h: mark more internal functions.
6899
6900 2006-10-11  Dick Porter  <dick@ximian.com>
6901
6902         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
6903         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
6904         reproduce the bug even before applying the fix.)
6905
6906 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
6907
6908         * reflection.c: allow retrieving attributes for arguments in generic
6909         methods (bug #79241).
6910
6911 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
6912
6913         * debug-mono-symfile.c: properly check fopen () result (found by
6914         coverity).
6915
6916 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
6917
6918         * reflection.c: make error message clearer and fixed two
6919         issuelets found by Coverity.
6920
6921 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
6922
6923         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
6924
6925 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
6926
6927         * object-internals.h, gc-internal.h, profiler-private.h:
6928         mark internal functions.
6929
6930 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6931
6932         * reflection.c: put data in the text section.
6933         * icall.c: recognize more types in type_from_typename ().
6934         * process.c, marshal.c: added some GC FIXMEs.
6935
6936 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6937
6938         * loader.c: check for NULL before initializing.
6939
6940 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
6941
6942         * gc.c (finalizer_thread): Use a non-alertable wait here.
6943
6944         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
6945         until the correct solution is found.
6946
6947 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
6948
6949         * reflection.c (mono_module_get_object): Avoid an assert when operating on
6950         modules with no metadata. Fixes #79596.
6951
6952         * image.c (load_metadata_ptrs): Put back the error message when
6953         the #- heap is encountered since the support is not complete yet.
6954
6955 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6956
6957         * gc.c: do not allow the user to SuppressFinalize () a
6958         delegate because it would leak the trampoline if present.
6959
6960 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
6961
6962         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
6963         PropertyPtr table.
6964
6965 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6966
6967         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
6968
6969         * metadata.c (mono_metadata_get_param_attrs): Ditto.
6970
6971         * row-indexes.h: Add definitions for *Ptr tables.
6972
6973         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
6974
6975         * metadata.c (mono_metadata_translate_token_index): New helper function to
6976         translate table indexes used in uncompressed metadata.
6977         (mono_metadata_decode_table_row): Ditto.
6978         (mono_metadata_decode_table_row_col): Ditto.
6979
6980         * metadata.c: Add table schema for *Ptr tables.
6981
6982         * class.c loader.c: Use the new helper function to access the affected metadata
6983         tables.
6984         
6985         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
6986         #38532.
6987         
6988 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
6989
6990         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
6991         sequences which can be unbounded in size. Fixes #79583.
6992
6993 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6994
6995         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
6996         static initialization.
6997
6998         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
6999
7000         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
7001
7002         * domain.c (mono_domain_free): Free up type_init_exception_hash.
7003
7004         * object.c (mono_runtime_class_init): Implement correct semantics when a static
7005         ctor fails, i.e. throw the same exception on subsequent accesses.
7006         
7007 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
7008
7009         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
7010         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
7011         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
7012         Handle marshalling of interfaces and VARIANTs contained in structs.
7013         
7014         Code is contributed under MIT/X11 license.
7015         
7016 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7017
7018         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
7019         
7020         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
7021         mempool.
7022
7023 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7024
7025         * console-io.c: ignore previous SIGINT handler.
7026
7027 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7028
7029         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
7030         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
7031         #79460, #79461, #79485.
7032
7033         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
7034
7035         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
7036         #79217.
7037
7038 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7039
7040         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
7041         could be generated from it.
7042
7043 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
7044
7045         * rand.c: fix read loop to correctly handle EINTR.
7046
7047 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
7048
7049         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
7050         internal calls are defined to keep methods closer to the declaring
7051         type and allow a significant reduction in runtime relocations and
7052         memory usage.
7053
7054 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
7055
7056         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
7057         exception message to have FileNotFoundException use the default
7058         assembly load error message. Fixes bug #79426.
7059         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
7060
7061 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7062
7063         * threadpool.c: (start_thread_or_queue) use the root domain when
7064         creating the thread instead of the async object one.
7065
7066 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
7067
7068         * class.c, object.c, class-internals.h, reflection.c:
7069         for arrays, store element_size inside MonoClass (speedup
7070         for array object creation).
7071
7072 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
7073
7074         * icall.c: fixed CodeBase to use the file name and not the module
7075         name (bug #79365).
7076
7077 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
7078
7079         * mono-debug.c, mono-debug.h: export find_method as
7080         mono_debug_find_method ().
7081
7082 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
7083
7084         * debug-helpers.c, class-internals.h: added a few functions useful
7085         when debugging under gdb.
7086
7087 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7088
7089         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
7090         characters that need special handling.
7091
7092 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7093
7094         * mono-config.c: make the os/cpu specification more flexible,
7095         allowing lists and negation.
7096
7097 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
7098
7099         * marshal.c: COM Interop fixes. Handle case where method->klass.
7100         is interface. Handle BSTR/MonoString when null. Use CDECL as 
7101         calling convention on non-windows platforms. This is for
7102         compatibility with XPCOM and MainWin COM.
7103         
7104         Code is contributed under MIT/X11 license.
7105         
7106
7107 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
7108
7109         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
7110         correctly. Fixes #79217.
7111
7112         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
7113
7114 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
7115
7116         * mono-config.c: allow both an os and cpu attribute for dllmap
7117         and dllentry elemnets to enable a single config file to be used
7118         for multiple architectures.
7119
7120 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
7121
7122         * loader.c: MonoLoaderError was cleared too soon on load failure.
7123         Fixes bug #79424.
7124
7125 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
7126
7127         * icall.c: use the defining class vtable when accessing a
7128         static field, not a pobblibly derived class.
7129
7130 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7131
7132         * icall.c string-icalls.c: Remove references to unicode.h.
7133
7134         * unicode.h unicode.c Makefile.am: Remove these unused source files.
7135
7136         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
7137
7138         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
7139         indicating the image where custom marshaller types should be looked up.
7140         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
7141         custom marshallers, instead of corlib. Fixes #79425.
7142
7143 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
7144
7145         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
7146
7147 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
7148
7149         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
7150         Implement Environment.ProcessorCount.
7151         
7152         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
7153         Implement Environment.ProcessorCount.
7154         
7155         * icall.c: 
7156         Add Environment.ProcessorCount icall.
7157         
7158         Patch by Jason McFall.
7159
7160 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7161
7162         * assembly.c: don't append .exe/.dll when the filename already contains
7163         one of those extensions.
7164
7165 2006-09-12  Martin Baulig  <martin@ximian.com>
7166
7167         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
7168         to array interfaces.
7169
7170 2006-09-11  Martin Baulig  <martin@ximian.com>
7171
7172         * reflection.c (mono_image_build_metadata): Create the
7173         MethodImpl's after emitting all types and methods, so we don't
7174         need another fixup pass for them.
7175
7176 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7177
7178         * class.c (mono_class_from_name_case): Fix regression introduced by the last
7179         change.
7180
7181 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
7182
7183         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
7184         unload.
7185
7186 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
7187
7188         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
7189         args is not set. Fixes #78926.
7190
7191 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7192
7193         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
7194
7195         * image.c (load_class_names): Move this to class.c, and rename it to 
7196         'mono_image_init_name_cache'.
7197         (load_modules): Fix a warning.
7198
7199         * class.c icall.c image.c: Initialize image->name_cache lazily.
7200
7201         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
7202         on its name using information in the AOT file.
7203
7204         * class.c (mono_class_from_name): Use the new hook function.
7205
7206 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
7207
7208         * reflection.c (mono_param_get_objects): Handle enum default parameter values
7209         correctly.
7210
7211         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
7212         Fixes #79289.
7213         
7214 2006-09-06  Martin Baulig  <martin@ximian.com>
7215
7216         * icall.c (mono_lookup_internal_call): Small fix.
7217
7218 2006-09-05  Raja R Harinath  <rharinath@novell.com>
7219
7220         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
7221         double g_free.
7222
7223 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
7224
7225         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
7226         when --debug is specified.
7227
7228 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7229
7230         * class.c (setup_generic_array_ifaces): Fix a warning.
7231
7232 2006-09-04  Miguel de Icaza  <miguel@novell.com>
7233
7234         * Temporarily remove the patch to assemly.c that checks the
7235         assembly versions as it breaks our gacutil.
7236
7237 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7238
7239         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
7240
7241         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
7242         a net 1.0 runtime.
7243
7244         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
7245         created using the default ctor. Fixes #79152.
7246         (mono_string_builder_to_utf16): Ditto.
7247
7248 2006-09-01  Martin Baulig  <martin@ximian.com>
7249
7250         Fix handling of the generic array interfaces.
7251
7252         * class-internals.h
7253         (MonoDefaults): Removed `generic_array_class' and added
7254         `generic_ilist' class.
7255
7256         * class.c
7257         (mono_bounded_array_class_get): Add the new generic array interfaces.
7258         (setup_generic_array_ifaces): New static method; create vtable
7259         entries for each method in the generic array interfaces.
7260
7261         * metadata.c
7262         (select_container): Allow "parent-less" generic methods.
7263
7264         * marshal.c
7265         (mono_marshal_get_generic_array_helper): New public method.
7266
7267         * icall.c
7268         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
7269         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
7270         moved the interncall into System.Array.
7271
7272 2006-09-01  Raja R Harinath  <rharinath@novell.com>
7273
7274         A few more cases of avoiding work on types with ->byref set.
7275         Has the real fix for #79238
7276         * icall.c (is_generic_parameter): New helper.
7277         (ves_icall_Type_GetGenericParameterPosition): Use it.
7278         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
7279         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7280         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7281         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
7282         reference types.
7283         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
7284         reference types.
7285         (ves_icall_Type_get_IsGenericInstance): Likewise.
7286         (ves_icall_Type_get_IsGenericType): Likewise.
7287
7288 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7289
7290         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
7291         class if possible.
7292
7293         * mempool.h (mono_mempool_get_allocated): New helper function.
7294
7295         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
7296         change.
7297
7298         * mempool.c: Fix warnings and the calculation of stats.
7299
7300         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
7301
7302         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
7303
7304         * loader.c (mono_get_method_from_token): Update method_count stat.
7305
7306         * class-internals.h (MonoStats): Add some stats.
7307
7308 2006-08-31 Robert Jordan  <robertj@gmx.net>
7309
7310         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
7311         with managed variants.
7312         All code is contributed under the MIT/X11 license.
7313         
7314 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7315
7316         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
7317         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
7318
7319         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
7320
7321         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
7322         with cycles in classes.
7323
7324         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
7325
7326         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
7327         missing a [MarshalAs] directive. Fixes #79203.
7328
7329         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
7330         klass->marshal_info. Fixes #79217.
7331
7332 2006-08-30  Martin Baulig  <martin@ximian.com>
7333
7334         Committing a patch from Joachim Ante <joe@otee.dk>:
7335         Add support for binary data symbol stores.
7336
7337         * debug-mono-symfile.c
7338         (mono_debug_open_mono_symbol_file): Renamed into
7339         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
7340         arguments.
7341
7342         * mono-debug.c
7343         (mono_debug_open_image): Added `raw_contents' and `size' args.
7344         (mono_debug_init_2_memory): New public function.
7345
7346 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
7347
7348         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
7349
7350 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7351
7352         * appdomain.c: implement support for ShadowCopyFiles.
7353
7354 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
7355
7356         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
7357         when value is NULL (and should remove CID #51).
7358
7359 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7360
7361         * image.c: moved 2 functions to ../utils.
7362
7363 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7364
7365         * gc.c: cope with the target object of a GC handle being NULL
7366         (bug #78877).
7367
7368 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7369
7370         * class.c: recursively check parent's explicit implementations
7371         of interface methods (fixes bug #79125).
7372
7373 2006-08-19  Miguel de Icaza  <miguel@novell.com>
7374
7375         * filewatcher.c: Avoid warnings when building, do not redefine
7376         constants that are defined.
7377
7378         Remove warnings.
7379
7380 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7381
7382         * image.c: don't fail when the link points to an absolute path.
7383
7384 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
7385
7386         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
7387         Fix CID #3.
7388
7389 2006-08-17  Miguel de Icaza  <miguel@novell.com>
7390
7391         * image.c (full_path): A new method used to obtain the actual path
7392         of an assembly even in the presence of symbolic links.  
7393
7394         This is necessary for the case where we are running a binary that
7395         has been GACed, but we are using the "published" path name
7396         ($prefix/mono/1.0/blah.exe) which happens to point to the real
7397         file in the GAC.
7398
7399         This was the source of the failure for the `xsp' command with the
7400         recent AppDomain changes, as far as the runtime was concerned,
7401         there were two different assemblies: $prefix/mono/1.0/blah.exe and
7402         $prefix/mono/gac/blah/version/blah.exe.
7403
7404         (do_mono_image_open): use full path
7405
7406 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7407
7408         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
7409
7410 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
7411
7412         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
7413         domain_id is supplied. Fix CID #241 and corlib's unit tests.
7414
7415 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7416
7417         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
7418         small structures. Fixes #78990.
7419
7420 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7421
7422         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
7423
7424         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
7425
7426 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7427
7428         * appdomain.c:
7429         * marshal.c: don't load all the assemblies from a domain into newly
7430         created ones. The new domains might have different rules and load
7431         assemblies from different locations. Fixes bug #76757.
7432
7433         Patch by Lluis. Conflicts resolved by Brian Crowell.
7434
7435 2006-08-16  Alp Toker  <alp@atoker.com>
7436
7437         * socket-io.c: First half of the fix for #79084.
7438         Set sa_size to the length of the content, not that of the struct.
7439         Don't add NULL suffix to the content, this should be done in
7440         managed code if needed.
7441
7442 2006-08-14  Raja R Harinath  <rharinath@novell.com>
7443
7444         Fix part of #79012
7445         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
7446         mono_metadata_parse_type returns NULL.
7447
7448 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
7449
7450         * normalization-tables.h : new file for string normalization data.
7451         * locales.c, locales.h, icall.c :
7452           added load_normalization_resource() for string normalization,
7453           and icall as well.
7454         * Makefile.am : added normalization-tables.h to the sources.
7455
7456 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
7457
7458         * marshal.c: Add more helper functions to reduce code duplication and use them
7459         everywhere.
7460
7461 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
7462
7463         * marshal.c: Fix non-x86 stdcall warnings.
7464         
7465         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
7466         them everywhere.
7467
7468 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
7469
7470         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
7471         type check on multi-dimensional arrays. Fixes #79000.
7472
7473 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7474
7475         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
7476         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
7477         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
7478         * class-internals.h: add is_com_object to class structure.
7479         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
7480         null checks to COM object marshalling. Fix .ctor call on RCW.
7481         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
7482         
7483         All code is contributed under the MIT/X11 license.
7484
7485 2006-08-09  Dick Porter  <dick@ximian.com>
7486
7487         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
7488         racing mono_monitor_allocator_lock() somewhere, so don't delete
7489         the critical section for now.  Found by running and exiting
7490         monodevelop.
7491
7492 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
7493
7494         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
7495         (ves_icall_System_ComObject_FindInterface): Ditto.
7496         (ves_icall_System_ComObject_CacheInterface): Ditto.
7497
7498         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
7499         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
7500
7501 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7502
7503         * threadpool.c: treat pipes from process asynchronous reads as sockets
7504         when reading from them, so we get select/poll or epoll to wait for
7505         data.
7506
7507 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
7508
7509         * loader.c: Fix a typo (CID #233) in the null check.
7510
7511 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
7512
7513         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
7514         Hopefully fixes #78949.
7515         
7516         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
7517         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
7518         bytes. Fixes #78972.
7519
7520 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7521
7522         * filewatcher.c: we need to set errno here.
7523
7524 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7525
7526         * filewatcher.c: let Win32Exception get the error value.
7527
7528 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7529
7530         * filewatcher.c: translate errno into win32 errors for Win32Exception
7531         to know what happened.
7532
7533 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7534
7535         * threadpool.c: Fix more warnings.
7536
7537         * assembly.c (search_loaded): Fix warnings.
7538
7539         * threadpool.c (mono_thread_pool_finish): Fix warnings.
7540         (mono_async_invoke): Ditto.
7541
7542 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
7543
7544         * object.c (mono_remote_class_vtable): Need to create proxy vtable
7545         entries for __ComObject type in addition to ComImport types.
7546         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
7547         about hash table.
7548         
7549         All code is contributed under the MIT/X11 license.
7550
7551 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
7552
7553         * image.c: avoid tentative loading of modulerefs that contain
7554         no metadata (P/Invoke library names).
7555
7556 2006-07-28  Dick Porter  <dick@ximian.com>
7557
7558         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
7559         mono_loader_lock() somewhere, so don't delete the critical section
7560         for now.  Found by running and exiting monodevelop.
7561
7562 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7563
7564         * filewatcher.c: define the inotify syscalls when we're building on
7565         linux and have sys/syscall.h. The build system might not have support
7566         for inotify but the target system might have it.
7567
7568 2006-07-26  Miguel de Icaza  <miguel@novell.com>
7569
7570         * domain.c: Documentation updates.
7571
7572         * loader.c (mono_free_method): Do not release the method
7573         information if we are being profiled, as profilers will use this
7574         information at shut down to present some data to the user.
7575
7576         This is needed so that the profiler does not crash, as the
7577         profiler tends to keep MonoMethods around, and they might become
7578         invalid if we free these.
7579
7580         (mono_get_method_constrained): Return the original CIL stream
7581         method as well, so verification can be performed against it.
7582
7583 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7584
7585         * filewatcher.[ch]: support for inotify file system watcher.
7586         * icall.c: add new internal calls for the inotify file system watcher.
7587
7588 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7589
7590         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
7591         #78888.
7592
7593 2006-07-20  Dick Porter  <dick@ximian.com>
7594
7595         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
7596         warning.
7597
7598 2006-07-20  Dick Porter  <dick@ximian.com>
7599
7600         * threads.c (start_wrapper): Do the thread cleanup while we still
7601         hold a reference to its object.  Fixes bug 78123.
7602
7603 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7604
7605         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
7606         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
7607           "managed-to-managed".
7608         * icall.c: Redirect string constructors that take sbyte* to
7609           ves_icall_System_String_ctor_RedirectToCreateString.
7610         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
7611           to CreateString () methods with matching signature.
7612         * reflection.c: Use original security informations for
7613           MONO_WRAPPER_MANAGED_TO_MANAGED.
7614         * security-manager.c: Use original security informations for
7615           MONO_WRAPPER_MANAGED_TO_MANAGED.
7616         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
7617           that is a placeholder and only its address should be used.
7618         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
7619           that is a placeholder and only its address should be used.
7620
7621 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7622
7623         Begin implementing COM Interop.
7624         * appdomain.c: Increment corlib version.
7625         * class.c: Set ComImport classes' parent to __ComObject.
7626         * loader.c: Mark cominterop methods as such.
7627         * domain.c: Add __ComObject class to MonoDefaults structure.
7628         * image.c: Add 2 hashtables to the image for COM Interop related methods
7629         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
7630         using the mempool allocator
7631         
7632         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
7633         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
7634         declaration for mono_metadata_type_dup_mp.
7635         
7636         * debug-helpers.c: Added strings for two additional wrapper types
7637         * object.c: Create proxy objects for ComImport classes
7638         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
7639         and added __ComObject class to MonoDefaults structure.
7640         
7641         * object-internals.h: Finish MonoRealProxy definition, and add definition of
7642         MonoComInteropProxy and MonoComObject.
7643         
7644         * marshal.c: Added support for COM Interop
7645         (signature_cominterop): Converts managed signature to corresponding
7646         unmanaged COM signature.
7647         (cominterop_get_function_pointer): gets unmanaged function pointer via
7648         COM object vtable
7649         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
7650         (cominterop_get_method_interface): returns interface type that method is defined on
7651         (mono_mb_emit_cominterop_call): emits native call to function pointer
7652         gotten from vtable
7653         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
7654         that matches signature of unmanaged function.
7655         (cominterop_get_native_wrapper): wrapper around adjusted method call.
7656         (cominterop_get_invoke): forwards call from proxy to __ComObject
7657         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
7658         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
7659         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
7660         
7661         * marshal.h: Added Marshal icall declarations.
7662         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
7663         so we can access them in finalizer
7664         
7665 2006-07-14  Dick Porter  <dick@ximian.com>
7666
7667         * object.c (mono_type_initialization_cleanup): Fix a race
7668         condition by temporarily commenting out the critical section
7669         deletion.
7670
7671 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
7672
7673         * reflection.c (create_custom_attr): Fix some warnings.
7674         (create_custom_attr_data): Ditto.
7675         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
7676         types. Fixes #78855.
7677
7678 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
7679
7680         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
7681
7682         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
7683
7684 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7685
7686         * reflection.c (resolve_object): Add support for DynamicMethod.
7687
7688         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
7689         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
7690
7691 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
7692
7693         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
7694         don't leak GPtrArray's pdata has we have no use (nor free) for it.
7695
7696 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
7697
7698         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
7699         Fixes #77888.
7700
7701 2006-06-30  Raja R Harinath  <rharinath@novell.com>
7702
7703         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
7704         slightly: remove a shadow local variable.
7705
7706 2006-06-29  Raja R Harinath  <rharinath@novell.com>
7707
7708         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
7709         definition that introduces the virtual function slot.
7710         Also fix Coverity #105.
7711
7712 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
7713
7714         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
7715         for dynamic assemblies. Fixes #78724.
7716
7717 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
7718
7719         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
7720         Fixes #78722.
7721
7722 2006-06-21  Martin Baulig  <martin@ximian.com>
7723
7724         * reflection.c
7725         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
7726         fixes #76484.
7727
7728 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7729
7730         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
7731
7732 2006-06-20  Raja R Harinath  <rharinath@novell.com>
7733
7734         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
7735         nor TYPEREFs.
7736         * class.c (mono_class_create_from_typespec): Add 'context' argument.
7737         Inflate result if necessary.
7738         (mono_class_get_full): Remove old version.  Rename from
7739         'mono_class_get' and add 'context' argument.  Pass it to
7740         ..._create_from_typespec.
7741         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
7742         (mono_ldtoken): Revert change below.
7743
7744 2006-06-20  Martin Baulig  <martin@ximian.com>
7745
7746         * class.c (mono_ldtoken): Don't pass the generic context to
7747         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
7748
7749 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
7750
7751         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
7752         and later freeing it. Fixes #78638.
7753
7754 2006-06-15  Miguel de Icaza  <miguel@novell.com>
7755
7756         * icall.c (mono_class_get_throw): Revert over-zealous error
7757         throwing, the caller for mono_class_get_throw will cope with
7758         errors when classes are not properly initialized already.
7759
7760         The code still copes with loader exceptions though.
7761
7762         Fixes the regression in reftype1 and reftype3 from the CAS tests.
7763         
7764 2006-06-14  Miguel de Icaza  <miguel@novell.com>
7765
7766         Fixes the `make run1' version of RuntimeAbort (to be commited,
7767         source is in Bugzilla).
7768         
7769         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
7770         FALSE on class loading failure instead of returning true.
7771
7772         * class.c (mono_class_create_from_typedef): It is possible for
7773         mono_metadata_interfaces_from_typedef_full to fail if a class is
7774         not found, cope with this.
7775         
7776
7777 2006-06-14  Dick Porter  <dick@ximian.com>
7778
7779         * socket-io.c: 
7780         * process.c: Fix a bunch of signed/unsigned warnings from gcc
7781         4.1.1
7782
7783 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
7784
7785         * culture-info-table.h : oops, forgot to make it nsync with r61548.
7786
7787 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7788
7789         * icall.c: Another fix for building mono in Visual Studio.
7790
7791 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7792
7793         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
7794         
7795 2006-06-09  Martin Baulig  <martin@ximian.com>
7796
7797         * debug-mono-symfile.c: Put this back and really fix it this
7798         time. Sorry for all the trouble.
7799
7800 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7801
7802         * icall.c (mono_class_get_throw): Fix a warning.
7803         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
7804         ReflectionTypeLoadException if needed. Fixes #78606.
7805
7806         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
7807         (mono_class_init): Ditto.
7808
7809         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
7810         ref_only exceptions.
7811         (mono_loader_clear_error): Make this work even if there is no error.
7812
7813 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
7814
7815         * object-internals.h marshal.c marshal.h icall.c: Implement method 
7816         Marshal.GetComSlotForMethodInfo using internal call.
7817
7818 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
7819
7820         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
7821         a function for signalling it.
7822
7823         * class.c (mono_class_from_typeref): Use the new kind of loader error when
7824         a referenced assembly is not found.
7825
7826         * loader.c (mono_loader_error_prepare_exception): Add support for 
7827         LOADER_ERROR_ASSEMBLY. Fix formatting.
7828
7829 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
7830
7831         * domain.c appdomain.c class-internals.h marshal.c: Add support 
7832         for VARIANT marshalling on windows and increment corlib version
7833         since Variant struct was added.
7834
7835 2006-06-03  Miguel de Icaza  <miguel@novell.com>
7836
7837         * debug-mono-symfile.c: Revert Martin's previous patch which broke
7838         stack trace line information:
7839
7840         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
7841         (Martin) when looking up B which is between A and C, return A not C.
7842
7843         Bug is #78573.
7844
7845         Thanks to Alexander Olk for tracking this down.
7846
7847 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7848
7849         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
7850         
7851         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
7852         avoid clobbering its value.
7853         (mono_string_to_lpstr): Fix a warning on windows.
7854
7855 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
7856
7857         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
7858
7859         * reflection.c loader.c: Removed references to 'dummy' flag.
7860
7861         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
7862
7863         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
7864         it gets GC tracking.
7865
7866         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
7867         GC tracking.
7868         
7869         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
7870
7871         * marshal.c threadpool.c: Update callers of mono_async_result_new.
7872
7873         * appdomain.c: Bump corlib version.
7874
7875 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
7876
7877         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
7878         CEE_STIND_REF when working with object references.
7879
7880 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
7881
7882         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
7883         Fixes #78539.
7884
7885 2006-05-30  Miguel de Icaza  <miguel@novell.com>
7886
7887         * loader.c (method_from_memberref): Fix argument value for
7888         mono_loader_set_error_method_load (I was passing the MonoClass
7889         instead of the class name char *).
7890
7891 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
7892
7893         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
7894         CEE_STIND_REF when working with object references.
7895
7896 2006-05-30  Martin Baulig  <martin@ximian.com>
7897
7898         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
7899         mono_method_full_name() change and replace the ':' with a '.'
7900         here.
7901
7902 2006-05-30  Martin Baulig  <martin@ximian.com>
7903
7904         * debug-mono-symfile.c
7905         (mono_debug_symfile_lookup_location): Fix the algorithm:
7906         when looking up B which is between A and C, return A not C.
7907
7908 2006-05-29  Martin Baulig  <martin@ximian.com>
7909
7910         * mono-debug.h
7911         (MonoDebugMethodInfo): Make the typedef public.
7912         (MonoDebugSourceLocation): New public struct.
7913
7914         * mono-debug.c
7915         (mono_debug_source_location_from_address): Removed.
7916         (mono_debug_source_location_from_il_offset): Removed.
7917         (mono_debug_il_offset_from_address): Removed.
7918         (mono_debug_address_from_il_offset): Removed.
7919         (mono_debug_lookup_method): New public function.
7920         (mono_debug_lookup_source_location): New public function; replaces
7921         the old mono_debug_source_location_from_*() functions; see the
7922         inline documentation.
7923         (mono_debug_free_source_location): New public function.
7924         (mono_debug_print_stack_frame): New public function; see the
7925         inline documentation.
7926
7927         * debug-mono-symfile.c
7928         (mono_debug_find_source_location): Renamed into
7929         mono_debug_symfile_lookup_location(); only take a
7930         `MonoDebugMethodInfo *' and an `offset' argument; added inline
7931         documentation.
7932         (mono_debug_find_method): Renamed into
7933         mono_debug_symfile_lookup_method().
7934
7935 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7936
7937         * assembly.c (mono_assembly_open_full): Dont overwrite the status
7938         returned by mono_image_open_full ().
7939
7940         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
7941         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
7942         #78517.
7943
7944         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
7945         #78518.
7946
7947 2006-05-27  Miguel de Icaza  <miguel@novell.com>
7948
7949         * class.c (mono_class_from_typeref): handle missing images
7950         earlier, deals with bug #78418.   Refactor code; 
7951
7952         Fix a warning introduced in my previous commit (some stale code
7953         from before I revisited my patch).
7954
7955         * class.c (mono_class_create_from_typedef): On failure, remove the
7956         class from the MonoImage->class_cache as the class is not
7957         initialized;   Fixes the leak pointed out by Paolo.
7958
7959 2006-05-25  Dick Porter  <dick@ximian.com>
7960
7961         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
7962         DeleteCriticalSections until I figure out which one may still be
7963         sometimes locked when mono_thread_cleanup is called.
7964
7965 2006-05-24  Dick Porter  <dick@ximian.com>
7966
7967         * threads.c (mono_thread_cleanup): Move the threading cleanup out
7968         of mono_thread_manage and back into its own function, so it can be
7969         called after the finalizer thread has finished.
7970
7971         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
7972
7973 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
7974
7975         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
7976         Fixes #78495.
7977
7978         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
7979         with non-blittable elements.
7980         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
7981
7982 2006-05-24  Martin Baulig  <martin@ximian.com>
7983
7984         * mono-debug-debugger.h (MonoDebuggerEvent): Added
7985         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
7986
7987         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
7988         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
7989         `mono_debugger_event_handler' to NULL.
7990
7991 2006-05-24  Martin Baulig  <martin@ximian.com>
7992
7993         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
7994
7995 2006-05-24  Martin Baulig  <martin@ximian.com>
7996
7997         * mono-debug-debugger.h
7998         (mono_debugger_create_notification_function): Added
7999         `MonoCodeManager *' argument.
8000
8001 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
8002
8003         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
8004
8005 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
8006
8007         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
8008         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
8009         implementation.
8010
8011 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
8012
8013         * icall.c: precise GC support: objects can't be stored in unmanaged
8014         memory anymore, even if they are kept alive by other references: since
8015         they can move the GC needs to be able to always find them.
8016
8017 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8018
8019         * object.c: precise GC support for static fields. Support
8020         for moving GCs: write barriers and pinned allocation for interned
8021         strings.
8022
8023 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
8024
8025         * domain.c, domain-internals.h: precise GC support for the MonoDomain
8026         structure.
8027
8028 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8029
8030         * class.c, gc.c: sgen and precise GC updates.
8031
8032 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8033
8034         * marshal.h, marshal.c: added write barrier wrapper and precise type
8035         fixes.
8036
8037 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
8038
8039         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
8040         support.
8041
8042 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8043
8044         * reflection.c: precise and sgen GC updates.
8045
8046 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8047
8048         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
8049
8050 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
8051
8052         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
8053
8054 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
8055
8056         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
8057         MONO_TYPE_OBJECT. Fixes #78462.
8058
8059 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8060
8061         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
8062         and blittable types.
8063
8064 2006-05-17  Miguel de Icaza  <miguel@novell.com>
8065
8066         * class.c (mono_class_get_exception_for_failure): Implement parts
8067         of a TODO: if the loader error is set (instead of the class
8068         error), we return a Loader exception that can be properly thrown
8069         elsewhere.
8070
8071         This was exposed by some Winforms 2.0 code that I tried to run
8072         (Atsushi pointed me to it).
8073
8074 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
8075
8076         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
8077         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
8078         
8079         * marshal.c (emit_marshal_vtype): Add limited support for 
8080         UnmanagedType.LPStruct. Fixes #78427.
8081
8082         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
8083         Applied a patch from kangaroo to fix #77523.
8084
8085 2006-05-17  Martin Baulig  <martin@ximian.com>
8086
8087         * threads.c
8088         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
8089         (debugger_thread_created): Removed.
8090         (debugger_thread_exited): Removed.
8091
8092 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
8093
8094         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8095
8096         * object-internals.h (MonoReflectionResource): Sync with managed version.
8097
8098 2006-05-12  Wade Berrier <wberrier@novell.com>
8099
8100         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
8101
8102 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
8103
8104         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
8105         functions try to allocate from the image mempool.
8106
8107 2006-05-12  Dick Porter  <dick@ximian.com>
8108
8109         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
8110
8111 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
8112
8113         * object.c: The FieldGetter and FieldSetter methods require the full
8114         name of the class, not only the name. Fixes bug #78277.
8115
8116 2006-05-11  Miguel de Icaza  <miguel@novell.com>
8117
8118         * loader.c (method_from_memberref): Do not pass the NULL klass to
8119         mono_loader_set_error_() methods.  Pass the non-NULL value
8120         (class). 
8121
8122 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8123
8124         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
8125         (mono_assembly_close): Null out assembly->image->references after freeing it.
8126
8127         * image.c (mono_image_close): Free image->references.
8128         
8129         * reflection.c (mono_image_basic_init): Fix a small memory leak.
8130
8131 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
8132
8133         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
8134         before checking if it's NULL (g_assert).
8135
8136 2006-05-10  Martin Baulig  <martin@ximian.com>
8137
8138         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
8139         I thought I already killed that two months ago, but now it somehow reappeared.
8140
8141 2006-05-10  Martin Baulig  <martin@ximian.com>
8142
8143         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
8144
8145 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8146
8147         * reflection.c: Allocate memory for dynamically created methods in the image
8148         mempools.
8149
8150 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
8151
8152         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
8153         don't use the ad pointer before checking if it's NULL (g_assert).
8154
8155 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8156
8157         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
8158         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
8159
8160         * marshal.c: Allocate all signatures from mempools.
8161
8162         * marshal.c: Allocate some more signatures from mempools.
8163
8164 2006-05-09  Miguel de Icaza  <miguel@novell.com>
8165
8166         * object.c (mono_load_remote_field): The code used to provide a
8167         temporary variable for returning results if the user did not
8168         provide a result pointer.  But our temporary variable was allocted
8169         on the satck.
8170
8171         Fix calling code to always pass a result area.   Coverity ID 103.
8172
8173 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8174
8175         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
8176         value, not the old. Fixes #78312.
8177         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
8178
8179         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
8180         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
8181         per-image cache.
8182
8183         * assembly.c (mono_assembly_close): Free image->references.
8184
8185         * assembly.c (mono_assembly_names_equal): Fix a warning.
8186         (mono_assemblies_cleanup): Cleanup more global data.
8187
8188         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
8189
8190         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
8191         ptr_cache and image->modules.
8192
8193         * image.c (mono_image_init): Allocate array_cache lazily.
8194         
8195 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8196
8197         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
8198         behavior was changed recently and has bad side effects.
8199
8200 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8201
8202         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
8203         
8204         * assembly.c (mono_assembly_close): Remove a debug printf.
8205
8206         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
8207
8208         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
8209         to also allow for temporary references between mono_image_open ()/close ().
8210
8211         * domain.c (get_runtimes_from_exe): Add a FIXME.        
8212
8213 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8214
8215         * marshal.c: Fix support for dynamic methods.
8216
8217         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
8218
8219         * marshal.c (mono_marshal_cleanup): New cleanup function.
8220
8221         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
8222         image mempools.
8223
8224         * class.c (mono_class_init): Fix leaking class->nested_classes.
8225
8226         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
8227
8228         * image.c (mono_image_init): Initialize the new cashes.
8229
8230         * image.c (mono_image_close): Destroy the new cashes.
8231
8232         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
8233
8234         * mempool.c (mono_mempool_strdup): New helper function.
8235
8236         * class-internals.h: Add prototype for mono_loader_unlock ().
8237
8238         * domain.c (mono_jit_info_table_find): Fix a warning.
8239         (mono_debugger_check_runtime_version): Ditto.
8240
8241         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
8242         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
8243         functions to these modules.
8244
8245         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
8246         metadata modules.
8247         
8248         * marshal.c (mono_free_bstr): Fix a warning.
8249
8250         * assembly.c (mono_assembly_open_full): Fix another small leak.
8251
8252         * object.c: Fix some unload leaks in the remoting code.
8253
8254         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
8255         function.
8256
8257         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
8258
8259         * reflection.c: Fix some unload leaks in dynamic assemblies.
8260
8261 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
8262
8263         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
8264         * marshal.h: Add BSTR support on Win32
8265         * icall.c: Add BSTR icalls
8266         * metadata.h: Add BSTR enums
8267
8268 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8269
8270         Work to catch the crash from #76795 and turn it into an
8271         exception.   As I stubbed out pieces of the VisualBasic support,
8272         I found a number of places where the code was failing and I added
8273         checks to those places. 
8274         
8275         * metadata.c (do_mono_metadata_parse_generic_class): Make this
8276         function return a status code.  If we fail to parse the signature
8277         from mono_metadata_parse_generic_inst, return FALSE.
8278
8279         * loader.c (mono_get_method_from_token): If we fail to load the
8280         method (mono_class_get) return NULL.   
8281
8282         * (method_from_memberref): Return NULL if we are unable to parse
8283         the method signature
8284
8285         (mono_loader_error_prepare_exception): Since we now use the
8286         loader_error flag internally to stop processing, and obtaining
8287         exceptions that might be thrown will walk this code path the
8288         proper way of going from a MonoLoaderError into a
8289         MonoException was convoluted.   This new routine encapsulates the
8290         process of turning the error into an exception and *clearing* the
8291         error afterwards.
8292         
8293 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8294
8295         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
8296         with missing assemblies), and to cope with:
8297
8298                 * Missing fieldref from a non-existing assembly.
8299                 * Missing methodref from a non-existing assembly.
8300
8301         The first batch of work to address *some* of the issues from 76661.
8302         
8303         * object.c (mono_class_create_runtime_vtable): If we fail to
8304         initialize the class raise the exception here. 
8305
8306         * metadata.c (mono_class_get_overrides_full): If any methods fail
8307         to load return the failure to the caller.
8308
8309         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
8310         flagging assemblies that failed to load.   
8311
8312         Do not crash if we are unable to load the assembly.
8313
8314         (mono_assembly_close): Do nothing with REFERENCE_MISSING
8315         assemblies. 
8316
8317         * loader.c (mono_loader_set_error_type_load): Change the
8318         convention to always pass unallocated strings, so we make our own
8319         copies (I know our own code had duplicated strings before, but
8320         this keeps the normal conventions).
8321         (method_from_memberref): Call mono_loader_set_error_method_load
8322         for all possible failures of loading the class. 
8323         Remove assert, turn into a loader error.
8324
8325         (mono_loader_error_to_exception): Move this routine from mini
8326         (mini_loader_error_to_exception) there was no need to have that in
8327         mini. 
8328
8329         * class.c (mono_class_from_typeref): If we were not able to load
8330         the assembly with mono_assembly_load_reference, call the
8331         mono_loader_set_error_type_load to register the problem.
8332
8333         (mono_class_setup_fields): If we fail to load the type from
8334         mono_metadata_parse_type_full, call mono_class_set_failure and
8335         break from the loop.
8336
8337         If class->exception_type is set, we do not layout the fields as
8338         that might crash the runtime, and instead return (from breaking
8339         from the previous loop).
8340
8341         (mono_class_setup_vtable): This now returns a boolean indicating
8342         whether the table was properly setup.   The decision is driven by
8343         mono_class_get_overrides_full which might run into non-existing
8344         methods. 
8345         
8346         (mono_class_init): Returns TRUE on success or FALSE if there was a
8347         problem in loading the type (incorrect assemblies, missing
8348         assemblies, methods, etc).
8349
8350         When we call mono_class_setup_fields we also check for a potential
8351         error inside this call (either a class exception or a general
8352         loader exception).
8353
8354         (mono_class_create_from_typedef): If the parent fails to load
8355         (calling mono_class_get_full) return NULL.
8356         
8357         ** Important **
8358
8359         calls to mono_metadata_parse_type_full should be checked
8360         everywhere and set the mono_class_set_failure
8361         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
8362
8363         The current patch checks the places where my manually constructed
8364         tests show the errors are showing up, but we should do it
8365         everywhere. 
8366
8367         ** Important2 **
8368
8369         mono_class_init return values should be tested everywhere, like
8370         the previous case this is something that we should audit
8371         everywhere and not only on the cases exposed by the tests I
8372         created. 
8373
8374 2006-04-26  Miguel de Icaza  <miguel@novell.com>
8375
8376         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
8377         boolean parameter and instead pass the information on `options'
8378         parameter (FileOptions).
8379
8380         * icall.c: Register the new signature for MonoIO.Open.
8381
8382         * debug-helpers.c (dis_one): Trying to understand how coverity
8383         works.  Fix Run 5, item 78.
8384
8385 2006-04-26  Dick Porter  <dick@ximian.com>
8386
8387         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
8388         dereference.
8389
8390 2006-04-25  Martin Baulig  <martin@ximian.com>
8391
8392         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
8393
8394         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
8395         debugger_thread_created().
8396         (debugger_gc_push_all_stacks): Don't handle the main thread in any
8397         special way.
8398         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
8399         (mono_debugger_finalize_threads): New function; undo the effects
8400         of mono_debugger_init_threads().
8401         (mono_debugger_create_all_threads): Removed.
8402
8403 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8404
8405         * image.c (mono_image_close): Tidy up trace messages.
8406
8407         * assembly.c (mono_assembly_close): Ditto.
8408
8409         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
8410         no longer references an already freed assembly. Fixes #78168.
8411
8412 2006-04-21  Dick Porter  <dick@ximian.com>
8413
8414         * threads.c (mono_thread_detach): Fix reference counting when
8415         detaching threads.
8416
8417 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
8418
8419         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
8420         #78155.
8421
8422 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8423
8424         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
8425         (mono_type_to_stind): Ditto.
8426
8427         * marshal.c: Use the new helper functions to simplify code.
8428
8429         * image.c (mono_image_close): Add some code for help debug assembly unloading
8430         problems.
8431
8432         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
8433         image mempool.
8434
8435         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
8436         assembly was already loaded in another appdomain. Fixes #78083.
8437
8438 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
8439
8440         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
8441         referenced assemblies.
8442         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
8443
8444         * domain.c (mono_domain_free): Add a trace message.
8445
8446         * appdomain.c (add_assemblies_to_domain): Ditto.        
8447
8448         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
8449         field.  
8450
8451 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8452
8453         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
8454
8455 2006-04-12  Martin Baulig  <martin@ximian.com>
8456
8457         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
8458         `USE_INCLUDED_LIBGC'.   
8459
8460 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8461
8462         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
8463         the patch contains ../ and a small directory name later. Hopefully fixes
8464         #78035.
8465
8466 2006-04-10  Martin Baulig  <martin@ximian.com>
8467
8468         Clean up the debugger's thread-handling code.
8469
8470         The debugger's thread-handling code has been moved from
8471         ../mini/debug-debugger.c to threads.c.  We now iterate directly
8472         over the `threads' hash, keep track of exiting threads and also
8473         use proper locking.
8474
8475         We can now debug XSP and XSP based applications with the debugger.
8476
8477         * object-internals.h (MonoThread): Added `gpointer end_stack'.
8478
8479         * threads.h
8480         (MonoThreadCallbacks): Removed; this was only used by the debugger.
8481         (mono_install_thread_callbacks): Likewise.      
8482
8483         * threads.c (mono_thread_callbacks): Removed.
8484         (debugger_thread_created, debugger_thread_exited): New static functions.
8485         (start_wrapper): Call debugger_thread_created().
8486         (thread_cleanup): Call debugger_thread_exited().
8487         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
8488         (mono_debugger_init_threads): New public function.
8489         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
8490         iterate directly over the `threads' hash and also use proper locking.
8491
8492         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
8493
8494         * mono-debug-debugger.h
8495         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
8496
8497 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8498
8499         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
8500         argument type=array. Fixes #78057.
8501
8502 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
8503
8504         * culture-info-table.h : regenerated. Fixed bug #69652.
8505
8506 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8507
8508         * loader.c metadata.c: Reapply a variant r59116.
8509         
8510         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
8511
8512         * class.c (mono_class_setup_interface_offsets): New internal function.
8513
8514         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
8515         interfaces too. Fixes #77398.
8516
8517         * reflection.c (encode_cattr_value): Add support for 
8518         parameter type=object, argument type=array.
8519         (load_cattr_value): Ditto. Fixes #77916.
8520
8521         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
8522         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
8523
8524         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
8525         a byval char array and CharSet is Ansi.
8526
8527         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
8528
8529 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
8530
8531         * metadata.c: Add some locking comments.
8532         
8533         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
8534         mempool.
8535         (mono_metadata_free_method_signature): Don't free the signature itself.
8536
8537         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
8538
8539         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
8540         reference the same MonoImage.
8541         (mono_assembly_load_from_full): Add an assert.
8542
8543 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8544
8545         * image.c (mono_image_close): Don't put the image we are about to free into the
8546         loaded_images_guid_hash.
8547
8548         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
8549         to reduce code duplication.
8550
8551         * marshal.c: Register the native functions called by this module as icalls, to
8552         somewhat centralize the creation of MonoMethodSignature's.
8553
8554         * loader.c (mono_method_signature): Add a cache for method signatures.
8555
8556         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
8557         the parameter attributes of a method.
8558         (mono_metadata_parse_method_signature_full): Refactored the computation of
8559         parameter attributes into a separate function. Also avoid one allocation in
8560         most cases.
8561
8562         * assembly.c (mono_assembly_close): Ditto.
8563
8564         * image.c (mono_image_close): Log trace messages with INFO level.
8565
8566         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
8567
8568         * image.c reflection.c: Correct reference counting of image modules.
8569         
8570         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
8571         of this function from the image mempool.
8572         
8573         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
8574         to allow more cached types to be used.
8575
8576         * mono-debug.c (mono_debug_add_method): Appled patch from
8577         David S. Miller  <davem@sunset.davemloft.net>: Access 
8578         minfo->lexical_blocks[] entry elements using read32().
8579
8580 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8581
8582         * loader.c (mono_free_method): No longer free the method header for non-dynamic
8583         methods as it is allocated from the mempool.
8584
8585         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
8586         image mempool.
8587
8588         * metadata-internals.h: Add comments describing the reference counting scheme
8589         used for MonoImage and MonoAssembly.
8590
8591         * image.c assembly.c reflection.c: Rework reference counting of images and 
8592         assemblies so they are freed when the runtime is shut down. Free some 
8593         additional memory structures when an image is unloaded.
8594         
8595 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8596
8597         * class.c loader.c reflection.c: Allocate more data structures in
8598         the image mempool.
8599
8600 2006-03-31  Miguel de Icaza  <miguel@novell.com>
8601
8602         * icall.c
8603         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
8604         build on pre glib 2.4 systems.
8605
8606 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8607
8608         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
8609
8610         * icall.c: Fix some warnings.
8611
8612 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
8613
8614         * culture-info-table.h : regenerated.
8615
8616 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
8617
8618         * threads.c, object-internals.h, verify.c: changed the culture caching
8619         code to use a normal MonoArray for storage so the GC can keep track of
8620         them easily. Fixed bits of the cache logic, too and simplified the
8621         code.
8622
8623 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
8624
8625         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
8626         thread for non-Boehm GCs.
8627
8628 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
8629
8630         * domain.c, object.c, domain-internals.h: reduce the amount of memory
8631         needed to keep track of the data for static fields.
8632
8633 2006-03-29  Raja R Harinath  <rharinath@novell.com>
8634
8635         Fix #75172
8636         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
8637         for interface classes.  Use 'num_methods' instead.
8638         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
8639         before using '->vtable_size' field.
8640
8641 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8642
8643         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
8644         doesn't contain managed pointers, so use a normal hashtable.
8645
8646 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8647
8648         * reflection.c, class-internals.h, domain.c: fixed handling of types
8649         used as values for objects in custom attributes (bug #77915):
8650
8651 2006-03-24  Martin Baulig  <martin@ximian.com>
8652
8653         * class.c (mono_class_setup_fields): Added support for generic
8654         instances; fixes #77580.
8655
8656 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8657
8658         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
8659
8660 2006-03-24  Dick Porter  <dick@ximian.com>
8661
8662         * file-io.c (get_file_attributes): More stat macro breakage.
8663         Fixes bug 77759.
8664
8665 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
8666
8667         * profiler.c: added the file=filename option in the default profiler
8668         to output the profile data to filename.
8669
8670 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8671
8672         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
8673         bug #77877.
8674
8675 2006-03-22  Martin Baulig  <martin@ximian.com>
8676
8677         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
8678         allocated `MonoClassField *' in `fb->handle'.
8679
8680 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8681
8682         * class.c, image.c, metadata-internals.h: implemented new mechanism to
8683         allocate interface ID to save memory and allow better ID reuse on
8684         appdomain unload. setup_generic_vtable () removal from Martin.
8685
8686 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
8687
8688         * object.h, appdomain.c, domain.c, exception.c, icall.c,
8689         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
8690         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
8691         write barriers for reference stores with managed objects accessed with
8692         C structures in the runtime and in embedding programs.
8693
8694 2006-03-20  Raja R Harinath  <rharinath@novell.com>
8695
8696         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
8697         'interface_id' and 'max_interface_id' fields of MonoClasses
8698         representing open generic types.
8699
8700 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
8701
8702         * object.h, object.c, icall.c: added functions to deal with
8703         storing valuetypes that contain references in managed objects.
8704         * reflection.c, string-icalls.c, threads.c, marshal.c: small
8705         fixes and comments around uses of mono_array_addr ().
8706
8707 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
8708
8709         * object.h, icall.c, monitor.c: object.GetHashCode ()
8710         implementation that supports the moving garbage collector.
8711
8712 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8713
8714         * icall.c, threads-types.h, threads.c: implemented finalizer for
8715         LocalDataStoreSlot.
8716
8717 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8718
8719         * metadata.c (mono_type_size): Add a fixme.
8720         (mono_type_stack_size): Ditto.
8721
8722         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
8723         'type_forwarders' field.
8724
8725         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
8726         attribute from net 2.0.
8727
8728         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
8729         from class.c.
8730
8731         * class.c (mono_class_setup_fields): Fix a warning.
8732         
8733         * class.c (mono_class_from_name): Add support for assemblyref entries
8734         in the EXPORTEDTYPE table.
8735
8736         * reflection.c: Add support for handling type forwarders under net 2.0.
8737
8738         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
8739         
8740 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8741
8742         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
8743         overwriting entries in ModuleBuild->types, also clean up the code
8744         a little. Fixes #77774.
8745
8746 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8747
8748         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
8749         load friend assembly info when present.
8750
8751 2006-03-14  Raja R Harinath  <rharinath@novell.com>
8752
8753         Fix crasher on gtest-158.cs.
8754         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
8755         the return value if the MonoClass we want is yet in an
8756         inconsistent state.
8757         * class.c (mono_class_create_from_typedef): Add an comment
8758         explaining an order dependency between mono_class_setup_parent and
8759         mono_class_setup_mono_type.
8760
8761 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8762
8763         * class.c: documentation updates and events bug fix.
8764
8765 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
8766
8767         * class.c: some cleanup, locking fixes.
8768
8769 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8770
8771         * class.c: fix the generics code to setup nested
8772         type info to the instantiated type (bug #77770).
8773
8774 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8775
8776         * marshal.c: fixed a few type correctness issues.
8777
8778 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8779
8780         * loader.c: the Set/Get/Addrtess array methods should be public.
8781
8782 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8783
8784         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
8785         
8786         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
8787         info->wrapper.
8788
8789 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8790
8791         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
8792
8793         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
8794
8795         * mempool.c (mono_mempool_alloc): Speed this up a bit.
8796         (mono_mempool_alloc0): Ditto.
8797
8798 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8799
8800         * socket-io.c:
8801         (create_object_from_sockaddr): it was allocating 4 extra bytes
8802         for the AF_UNIX data. Fixes bug #77747.
8803
8804 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8805
8806         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
8807
8808 2006-03-09  Dick Porter  <dick@ximian.com>
8809
8810         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
8811         Fixes bug 76966 again.
8812
8813 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
8814
8815         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
8816         names from r57532
8817         * appdomain.c: Bumped corlib version to 48 (due to r57532)
8818
8819 2006-03-07  Martin Baulig  <martin@ximian.com>
8820
8821         * object.c
8822         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
8823
8824 2006-03-07  Martin Baulig  <martin@ximian.com>
8825
8826         * class.c
8827         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
8828         regression introduced in r56970; see gtest-252.cs.
8829
8830         * loader.c (mono_get_method_constrained): Correctly handle generic
8831         methods; see gtest-253.cs.
8832
8833 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8834
8835         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
8836
8837 2006-03-04  Martin Baulig  <martin@ximian.com>
8838
8839         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
8840         compute the parent type at runtime, just like we're already doing
8841         it for interfaces.
8842
8843         * reflection.c
8844         (mono_reflection_bind_generic_parameters): Don't compute the
8845         parent type anymore.
8846
8847         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
8848
8849 2006-03-04  Martin Baulig  <martin@ximian.com>
8850
8851         * mono-debug-debugger.h
8852         (mono_debugger_create_notification_function): Allocate memory at
8853         runtime and return a pointer to it.
8854
8855 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
8856
8857         * assembly.c: Fix windows build.
8858         
8859         * assembly.c: Fix build.
8860
8861         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
8862
8863         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
8864         
8865 2006-03-03  Dick Porter  <dick@ximian.com>
8866
8867         * process.c
8868         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
8869         Check parameters before dereferencing them.  Fixes Aaron's part of
8870         bug 77393.
8871
8872 2006-03-03  Raja R Harinath  <rharinath@novell.com>
8873
8874         Fix performance regression.
8875         * loader.c (find_method_in_class): Add 'from_class' argument.
8876         Rename 'klass' argument to 'in_class'.  The signature is compared
8877         against the method in 'in_class', and the corresponding method is
8878         returned from 'from_class'.
8879         (find_method): Walk both 'in_class' and 'from_class' in parallel.
8880         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
8881         type definition and generic instantiation in parallel.
8882         (mono_get_method_constrained): Update to changes.
8883
8884 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8885
8886         * threads.c: make sure the domain is correct, too when doing
8887         mono_thread_attach ().
8888
8889 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
8890
8891         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
8892         windows. Fixes #77683.
8893
8894 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8895
8896         * object.h, *: introduced specific way to set elements of an array
8897         of references to be used as write barrier. Still need to audit the
8898         uses of mono_array_addr.
8899
8900 2006-03-01  Miguel de Icaza  <miguel@novell.com>
8901
8902         * object-internals.h: New field to cache the assmebly name, patch
8903         from Tambet Ingo (tambet@ximian.com)
8904
8905 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
8906
8907         * decimal.h, class-internals.h, metadata-internals.h,
8908         file-io.h: mark a few function declarations as internal, to
8909         reduce the number of PLT entries.
8910
8911 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8912
8913         * file-io.c: fix typo in warning message.
8914
8915 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
8916
8917         * loader.c: on unix, lookup the "*A" version of a function
8918         if charset is auto as a second option before failing.
8919
8920 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8921
8922         * class.h (mono_class_inflate_generic_method): Revert to two
8923         argument version.
8924         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
8925         (mono_class_inflate_generic_method_full): Add.
8926         * class.c (mono_class_inflate_generic_method_full): Rename from
8927         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
8928         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
8929         * loader.c, reflection.c: Update to changes.
8930
8931 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8932
8933         * icall.c: const fixes and small improvements.
8934
8935 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8936
8937         * threadpool.c: for asynchronous connect(), enable the same workaround
8938         for BSD 6 as for the Mac. Fixes bug #77637.
8939
8940 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8941
8942         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
8943         formatted classes. Fixes #77524.
8944
8945 2006-02-24  Raja R Harinath  <rharinath@novell.com>
8946
8947         * class.c (inflate_generic_type): Add a couple more
8948         micro-optimizations.
8949         (inflate_generic_context): Don't use the 'gmethod' from
8950         'inflate_with'.
8951         (mono_class_inflate_generic_method): If the method has generic
8952         parameters, but the passed-in context doesn't have a 'gmethod',
8953         create one.  Use the possibly simplified generic instantiation
8954         from the declaring class instead of the one passed in.
8955
8956 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8957
8958         Make generic method signature and method header handling lazy.
8959         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
8960         (inflate_generic_header): Likewise.
8961         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
8962         parameter to avoid inflating types.
8963         (mono_get_inflated_method): Empty out.
8964         * class.h (mono_class_inflate_generic_method): Update to changes.
8965         * loader.c (mono_get_method_from_token): Don't parse signature for
8966         generic methods, nor methods of generic classes.
8967         (mono_method_signature): Rename from 'mono_method_signature'.
8968         Inflate signature on demand.
8969         (mono_method_get_header): Inflate method header on demand.
8970         * reflection.c: Update to changes.
8971
8972 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8973
8974         * metadata.c (mono_metadata_inflate_generic_inst): If the
8975         instantiation is closed, don't bother expanding it in the new
8976         context.
8977         * class.c (inflate_generic_class): If the generic instantiation
8978         doesn't change after inflation, return the argument itself.
8979         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
8980         Add bounds checks.
8981         (inflate_generic_context): If neither the generic class nor the
8982         generic method instantiations change, return the original context.
8983         * reflection.c (mono_method_get_object): Do
8984         'mono_get_inflated_method' before accessing the ->klass field.
8985         (inflate_mono_method): Don't create a MonoGenericMethod unless
8986         necessary.
8987         (inflate_method): Don't pass a constructed type as the declaring
8988         type of a methodbuilder.
8989
8990 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
8991
8992         * object.c: fix memory overwrite.
8993
8994 2006-02-22  Dick Porter  <dick@ximian.com>
8995
8996         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
8997         it doesn't work any more.
8998         (mono_threads_request_thread_dump): Fix unused variable warnings.
8999
9000 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9001
9002         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
9003         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
9004         the public header file.
9005
9006 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
9007
9008         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
9009
9010 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9011
9012         * class-internals.h, object.c: reduce the size of MonoVTable
9013         and store the interface_offsets array at negative offsets.
9014
9015 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9016
9017         * metadata.c: tweak table descriptors data structures to reduce
9018         size and runtime relocations.
9019
9020 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9021
9022         * marshal.c: fix some types and opcodes to be type-safe
9023         in marshaling wrappers.
9024
9025 2006-02-21  Ankit Jain  <jankit@novell.com>
9026
9027         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
9028
9029 2006-02-21  Raja R Harinath  <rharinath@novell.com>
9030
9031         * metadata.c (get_constraints): Relax debugging checks for monodis.
9032
9033 2006-02-21  Ankit Jain  <jankit@novell.com>
9034
9035         * metadata.c (mono_metadata_load_generic_params): Move the code
9036         checking for ambiguous generic params from here to mono/dis/get.c
9037         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
9038
9039 2006-02-21  Raja R Harinath  <harinath@gmail.com>
9040
9041         Fix assertion triggered when compiling nemerle.
9042         * class.c (mono_get_shared_generic_inst): Rename from
9043         get_shared_inst and make non-static.
9044         * loader.c (mono_get_shared_generic_method): New.  Used to create
9045         the MonoGenericContext-equivalent of a MonoGenericContainer.
9046         (mono_get_method_from_token): Initialize the 'context' field of
9047         the created MonoGenericContainer.
9048         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
9049         * metadata.c (get_constraints): Add sanity check.
9050         * class-internals.h: Add new internal methods.
9051
9052         * reflection.c (verify_safe_for_managed_space): New sanity check.
9053         Currently checks that owner-less generic parameters aren't allowed
9054         in managed space.
9055         (mono_type_get_object): Use it.
9056         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
9057         that are now in mono_type_get_object.
9058         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
9059
9060 2006-02-19  Raja R Harinath  <harinath@gmail.com>
9061
9062         * metadata.c (mono_type_create_from_typespec): Rename from
9063         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
9064         argument and caching of types in the generic container.
9065         (unwrap_arrays, find_generic_param): Remove.
9066         * metadata-internals.h: Update.
9067         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
9068
9069 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
9070
9071         * class.c (mono_class_get_exception_for_failure): Fix a warning.
9072
9073         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
9074         return values. Fixes #77581.
9075
9076         * class.c (mono_fnptr_class_get): Switch name and name_space.
9077
9078         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
9079         classes and add support for [In, Out] attributes.
9080         (mono_marshal_free_asany): Ditto. Fixes #77524.
9081
9082 2006-02-18  Raja R Harinath  <harinath@gmail.com>
9083
9084         * class.c (mono_class_from_generic_parameter): Make more robust to
9085         incomplete MonoGenericContainers from monodis.
9086
9087 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9088
9089         * class-internals.h: added some more exception types.
9090         * class.c, metadata.c: added a few checks to handle missing
9091         types.
9092
9093 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9094
9095         Use owner-less generic-params some more.
9096         * class.c (my_mono_class_from_generic_parameter): Remove.
9097         (mono_class_from_generic_parameter): Handle null image,
9098         param->name and param->owner.
9099         (mono_class_from_mono_type): Update.
9100         (mono_class_create_from_typespec): Remove 'container' parameter.
9101         If that parameter is non-null, the result is always inflated by
9102         'mono_class_get_full' anyway.
9103         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
9104         parameter.
9105         (mono_class_get_full): Update.
9106
9107         * class.c (inflate_generic_type) [GENERICINST]: If the generic
9108         instance is not open, don't bother inflating.
9109         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
9110         parse metadata for inflated classes.
9111         (_mono_class_get): Change GenericContext* parameter to
9112         GenericContainer*.
9113         (mono_class_create_from_typespec): Likewise.  Simplify, and
9114         implement trivially.  All the cases are handled in
9115         mono_class_from_mono_type.  Don't inflate returned class.
9116         (mono_class_get_full): Delegate GENERICINST optimization to
9117         inflate_generic_type.
9118         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
9119
9120 2006-02-16  Dick Porter  <dick@ximian.com>
9121
9122         * socket-io.c (create_object_from_sockaddr): Fix typo.
9123         (create_sockaddr_from_object): Check array lengths before
9124         potentially accessing items off the end.
9125         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
9126         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
9127         (ves_icall_System_Net_Sockets_Socket_Send_internal)
9128         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
9129         length checks to avoid wraparound overflows.
9130         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
9131         contents of the array of sockets
9132         (hostent_to_IPHostEntry2)
9133         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
9134         Check return value of inet_ntop ().
9135         (addrinfo_to_IPHostEntry): Fix typo
9136
9137 2006-02-16  Raja R Harinath  <rharinath@novell.com>
9138
9139         Type metadata parsing doesn't use generic-instantiation information.
9140         * metadata.c (mono_metadata_parse_array_full): Change
9141         MonoGenericContext* parameter to MonoGenericContainer*.
9142         (mono_metadata_parse_type_full): Likewise.
9143         (mono_type_create_from_typespec_full): Likewise.
9144         (mono_metadata_parse_mh_full): Likewise.
9145         (mono_metadata_parse_generic_inst): Likewise.
9146         (do_mono_metadata_parse_generic_class): Likewise.
9147         (do_mono_metadata_parse_type): Likewise.
9148         * metadata-internals.h: Update to changes.
9149         * class.c (mono_class_find_enum_basetype): Likewise.
9150         (mono_class_setup_fields): Likewise.
9151         (mono_class_create_from_typespec): Likewise.
9152         * loader.c (method_from_methodspec): Likewise.
9153         (mono_get_method_from_token): Likewise.
9154         (mono_method_get_header): Likewise.
9155
9156 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9157
9158         * marshal.c: handle additional GENERICINST case (patch from
9159         Thong Nguyen <tum@veridicus.com>).
9160         Fix a few cases where LDIND_I/STIND_I was used for references.
9161
9162 2006-02-16  Raja R Harinath  <rharinath@novell.com>
9163
9164         * reflection.c (mono_reflection_get_token): Remove unused variable.
9165
9166 2006-02-16  Martin Baulig  <martin@ximian.com>
9167
9168         * reflection.c (mono_reflection_get_token): Add support for fields
9169         in instantiated generic types.
9170
9171         * icall.c
9172         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
9173
9174 2006-02-15  Martin Baulig  <martin@ximian.com>
9175
9176         * icall.c
9177         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
9178         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
9179         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
9180         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
9181
9182 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
9183
9184         * class.c, metadata.c, metadata.h, object.c, icall.c,
9185         marshal.c: changed mono_type_get_underlying_type () to do
9186         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
9187         Fixed handling of instantiated generic valuetypes (bug #75479).
9188
9189 2006-02-15  Raja R Harinath  <rharinath@novell.com>
9190
9191         * metadata.c (mono_metadata_decode_signed_value): Simplify.
9192         Delegate to mono_metadata_decode_value, and work on the returned value.
9193
9194         * icall.c (ves_icall_MonoType_GetGenericArguments):
9195         Add consistency check here too.
9196         
9197 2006-02-15  Ankit Jain  <jankit@novell.com>
9198
9199         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
9200         char/short etc.
9201
9202 2006-02-15  Ankit Jain  <jankit@novell.com>
9203
9204         * metadata.c (mono_metadata_decode_signed_value): New function to decode
9205         signed values, used only for representing lower bounds of arrays.
9206         (mono_metadata_parse_array_full): Use new
9207         mono_metadata_decode_signed_value to decode lower bounds.
9208
9209 2006-02-14  Martin Baulig  <martin@ximian.com>
9210
9211         * reflection.c
9212         (mono_reflection_get_token): Support "MonoGenericMethod" and
9213         "MonoGenericCMethod" and allow generic instances / methods.
9214
9215 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9216
9217         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
9218         to obtain the terminal size using an ioctl.
9219
9220         * object.c (mono_nullable_init): Revert this as nullable reference
9221         types are not valid.
9222         (mono_nullable_box): Ditto.
9223
9224 2006-02-09  Dick Porter  <dick@ximian.com>
9225
9226         * threads.c (mono_thread_detach): Drop a reference to the thread
9227         we're detaching.
9228
9229 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9230
9231         * object.c (mono_nullable_init): Handle nullable reference types.
9232         (mono_nullable_box): Ditto. Fixes #77446.
9233
9234 2006-02-07  Martin Baulig  <martin@ximian.com>
9235
9236         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
9237
9238 2006-02-07  Ankit Jain  <jankit@novell.com>
9239
9240         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
9241         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
9242         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
9243         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
9244         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
9245         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
9246
9247 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
9248
9249         * class.c (mono_class_create_generic): Set type_token as well.
9250
9251         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
9252         compatible with MS.
9253
9254 2006-02-02  Martin Baulig  <martin@ximian.com>
9255
9256         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
9257         has never been used so far.
9258
9259 2006-02-02  Martin Baulig  <martin@ximian.com>
9260
9261         * mono-debug-debugger.h: Changed comment at the top of this file;
9262         the header is not installed, but it's safe to #include it from
9263         within the JIT.
9264
9265         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
9266         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
9267
9268 2006-02-02  Martin Baulig  <martin@ximian.com>
9269
9270         * mono-debug.h
9271         (MonoSymbolTable): Removed the `metadata_info' field.
9272
9273         * mono-debug.c
9274         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
9275
9276         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
9277         (mono_debugger_add_builtin_types): Removed.
9278         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
9279         (mono_debugger_create_notification_function): We now operate on a
9280         pre-allocated area; take a `gpointer' and return `void'.
9281
9282         * mono-debug-debugger.c
9283         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
9284         (mono_debugger_add_builtin_types): Removed.
9285
9286 2006-02-02  Martin Baulig  <martin@ximian.com>
9287
9288         * threads.c (mono_debugger_create_all_threads): New public method.
9289
9290 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9291
9292         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
9293         breaks on several platforms.
9294
9295 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
9296
9297         * assembly.c: the VS.NET build doesn't supply default values for
9298         MONO_ASSEMBLIES and MONO_CFG_DIR.
9299
9300 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9301
9302         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
9303         helper function.
9304
9305         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
9306
9307         * loader.c (method_from_memberref): Fix a warning.
9308
9309         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
9310
9311         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
9312         with explicit layout. Fixes #77433.
9313
9314 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9315
9316         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
9317         max_interface_id is initialized before using it. Fixes #77398.
9318         (ves_icall_Type_GetInterfaces): Ditto.
9319
9320 2006-01-30  Raja R Harinath  <rharinath@novell.com>
9321
9322         * metadata.c (mono_metadata_parse_method_signature_full): Don't
9323         allocate memory for parameter attributes when parsing memberref
9324         signatures.
9325         * loader.c (mono_loader_set_error_method_load): Don't warn.
9326         (method_from_memberref): Ensure MissingMethodException gets thrown
9327         if method is not found.  Make warning more informative.
9328
9329 2006-01-29  Raja R Harinath  <harinath@gmail.com>
9330
9331         Fix #77397
9332         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
9333         return true if is byref.
9334         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
9335         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
9336         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
9337
9338 2006-01-27  Raja R Harinath  <rharinath@novell.com>
9339
9340         Fix tests/find-method.2.il
9341         * loader.c (find_method, find_method_in_class): Remove is_inflated
9342         argument.  Revert 2006-01-18 change.
9343         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
9344         is generic, search for method in its generic definition.
9345         * class.c (mono_class_setup_vtable_general): Print generic
9346         arguments of generic types in debugging printf.
9347
9348 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9349
9350         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
9351
9352         * threads.c (mono_threads_request_thread_dump): New helper function.
9353
9354 2006-01-25  Raja R Harinath  <rharinath@novell.com>
9355
9356         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
9357
9358 2006-01-25  Ankit Jain  <jankit@novell.com>
9359
9360         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
9361         move definition to ..
9362         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
9363         
9364 2006-01-25  Ankit Jain  <jankit@novell.com>
9365             Raja R Harinath  <rharinath@novell.com>
9366
9367         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
9368         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
9369         as necessary.
9370
9371 2006-01-25  Martin Baulig  <martin@ximian.com>
9372
9373         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
9374         `MonoDebuggerThread' into debug-debugger.c.
9375
9376 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9377
9378         * profiler.c: fix printing of data.
9379
9380 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
9381
9382         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
9383           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
9384
9385 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9386
9387         * object.c: fix deadlock related to string interning.
9388
9389 2006-01-23  Martin Baulig  <martin@ximian.com>
9390
9391         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
9392
9393         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
9394
9395 2006-01-23  Martin Baulig  <martin@ximian.com>
9396
9397         * mono-debug.h: Moved the prototypes of some functions which are
9398         used by the JIT here from mono-debug-debugger.h.
9399
9400 2006-01-21  Martin Baulig  <martin@ximian.com>
9401
9402         * Makefile.am: Don't install mono-debug-debugger.h.
9403
9404 2006-01-21  Martin Baulig  <martin@ximian.com>
9405
9406         * mono-debug-debugger.h: Enforce the private status of this header
9407         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
9408         Moved some stuff from mono-debugger-jit-wrapper.h here.
9409
9410 2006-01-20  Raja R Harinath  <rharinath@novell.com>
9411
9412         * class.c (mono_class_from_typeref): Add a sanity test to help
9413         catch lack of assembly load/search hooks.
9414
9415 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
9416
9417         * marshal.c (emit_struct_conv): Relax the fields with same offset
9418         check even more. Fixes #77230.
9419
9420 2006-01-18  Martin Baulig  <martin@ximian.com>
9421
9422         * loader.c (find_method_in_class): Added `gboolean is_inflated'
9423         argument; if false, we compare the uninstantiated signatures.
9424         (method_from_memberref): Compare the uninstantiated signatures;
9425         fixes #76417.
9426
9427 2006-01-18  Robert Jordan  <robertj@gmx.net>
9428
9429         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
9430         Clear the weak link. Fixes bug #77170.
9431
9432         * gc.c (mono_gchandle_free):
9433         Reflect *-gc.c changes (tiny optimization).
9434
9435 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
9436
9437         * metadata.c (mono_metadata_signature_dup): Applied patch from
9438         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
9439         Fixes #77288.
9440
9441 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9442
9443         * marshal.c (emit_struct_conv): Allow fields with the same offset when
9444         marshalling from native to managed code. Fixes #77230.
9445
9446 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9447
9448         * threadpool.c: fix problem (Mac only) when more than one asynchronous
9449         connect. Fixes bug #77020.
9450
9451 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9452
9453         * class.c: fixed id assignement for nested interfaces (bug #77275).
9454         Added also better info for --print-vtable debugging.
9455
9456 2006-01-12  Martin Baulig  <martin@ximian.com>
9457
9458         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
9459         interfaces on-the-fly; fixes #76625.
9460
9461         * class-internals.h
9462         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
9463         don't need that anymore.
9464
9465 2006-01-12  Miguel de Icaza  <miguel@novell.com>
9466
9467         * socket-io.c
9468         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9469         To avoid initing the nested_classes when not needed I turned the
9470         PeerCredData as a toplevel internal class, as it has to be shared
9471         anyways. 
9472
9473         Fixes the CASA issue.
9474
9475 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9476
9477         * domain.c: Accessors for MonoJitInfo
9478
9479         * profiler-private.h: Add jitinfo to the end jit hook
9480
9481         * profiler.[ch]: Define new hooks, called after jitting which give
9482         the MonoJitInfo that was compiled
9483
9484 2006-01-10  Martin Baulig  <martin@ximian.com>
9485
9486         * class.c (mono_class_setup_events): Add support for generic
9487         classes; fixes #76440.
9488
9489 2006-01-06  Raja R Harinath  <rharinath@novell.com>
9490
9491         Fix #77160.
9492         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
9493         on passed-in method.
9494
9495 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9496
9497         * object.c (mono_runtime_invoke_array): Add Nullable support.
9498
9499         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
9500
9501 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
9502
9503         * file-io.c: Don't consider sockets as directory and avoid an endless
9504         loop. Fix bug #76966.
9505
9506 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9507
9508         * object.c (mono_nullable_init): New helper function.
9509         (mono_nullable_box): Ditto.
9510
9511         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
9512
9513         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
9514
9515         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
9516         
9517 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
9518
9519         * class.c (mono_class_is_assignable_from): Make T assignable to 
9520         Nullable<T>.
9521
9522 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
9523
9524         * appdomain.c: Bump corlib version to 46.
9525         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
9526         serialization purpose) and changed ves_icall_System_Reflection_
9527         Assembly_get_code_base signature to accept a boolean (to escape, or 
9528         not, the assembly code base).
9529
9530 2005-12-23  Dick Porter  <dick@ximian.com>
9531
9532         * icall.c: 
9533         * threads-types.h: 
9534         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
9535         CreateEvent icall now returns "created" boolean parameter.
9536
9537 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9538
9539         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
9540         #76967.
9541
9542         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
9543         when attr_klass is an interface. Fixes #77045.
9544
9545 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
9546
9547         * marshal.c (emit_struct_conv): Fix previous patch.
9548         
9549         * marshal.c (emit_struct_conv): Add a check for fields with the same
9550         offset.
9551
9552 2005-12-20  Raja R Harinath  <rharinath@novell.com>
9553
9554         Fix regression in Mono.C5.
9555         * class.c (mono_class_create_generic): If 'klass' is an interface
9556         set up the interface offsets.
9557         (mono_class_is_assignable_from): Don't throw away generic arguments.
9558
9559 2005-12-19  Raja R Harinath  <rharinath@novell.com>
9560
9561         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
9562         type parameters.
9563
9564 2005-12-15  Raja R Harinath  <rharinath@novell.com>
9565
9566         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
9567         dead store.
9568         (do_mono_metadata_parse_generic_class): Don't pass the current
9569         generic context when parsing the type being instantiated: it
9570         cannot use it, anyway.
9571
9572         * loader.c (method_from_memberref): Don't inflate a signature if
9573         it doesn't contain any type parameters.
9574
9575 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9576
9577         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
9578
9579 2005-12-14  Martin Baulig  <martin@ximian.com>
9580
9581         * class.c
9582         (mono_type_get_name_recurse): Don't return null for type
9583         parameters and open generic classes.
9584         (mono_class_setup_methods): Don't exclude generic instances.
9585         (mono_get_unique_iid): Use different IDs for different
9586         instantiations of the same generic type.
9587         (mono_class_setup_vtable): Only use setup_generic_vtable() for
9588         open generic instances; create a normal vtable for closed generic
9589         instances.
9590         (mono_class_setup_vtable_general): We're now also called for
9591         closed generic instances.
9592
9593         * reflection.c
9594         (mono_reflection_bind_generic_parameters): Correctly use
9595         mono_metadata_lookup_generic_inst() everywhere.
9596
9597 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
9598
9599         * object.c (mono_class_create_runtime_vtable): Call 
9600         mono_class_setup_vtable ().
9601
9602         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
9603         function.
9604         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
9605         #76959.
9606
9607         * loader.c (mono_loader_set_error_type_load): Print the type load
9608         warnings to the console so they are more visible to the user.
9609         (mono_loader_set_error_method_load): Ditto.
9610
9611         * reflection.c (ensure_runtime_vtable): Revert the last change as it
9612         is still broken.
9613         
9614         * reflection.c (ensure_runtime_vtable): Fix build.
9615
9616         * reflection.c (ensure_runtime_vtable): Disable an optimization which
9617         doesn't work in all cases.
9618
9619 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
9620
9621         * object.c (mono_array_new_full): Treat a single dimensional array
9622         with 0 lower bounds as an szarray. Fixes #76973.
9623
9624         * reflection.c (custom_attr_visible): Really fix this.
9625
9626 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
9627
9628         * reflection.c (custom_attr_visible): Allow nested public attributes
9629         as well.
9630
9631         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
9632         interface check.
9633
9634 2005-12-12  Raja R Harinath  <harinath@gmail.com>
9635
9636         * class.c (set_generic_param_owner): Delete.
9637         (mono_class_create_from_typedef): Don't set ->owner field of
9638         generic parameters to "param containers" of enclosing classes.
9639         * reflection.c (mono_reflection_initialize_generic_parameter):
9640         Likewise.
9641
9642 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
9643
9644         * reflection.c (custom_attr_visible): Fix build.
9645
9646 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
9647
9648         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
9649         private attributes.
9650         
9651         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
9652         handling of null parameter defaults.
9653
9654 2005-12-09  Raja R Harinath  <rharinath@novell.com>
9655
9656         * class.c (mono_class_from_generic_parameter): Don't set
9657         klass->generic_container.
9658         (my_mono_class_from_generic_parameter): Likewise.
9659
9660 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9661
9662         * reflection.c (load_public_key): Fix a warning.
9663         (method_encode_code): Fix unaligned accesses.
9664
9665 2005-12-07  Martin Baulig  <martin@ximian.com>
9666
9667         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
9668
9669         * reflection.c
9670         (write_generic_param_entry): Encode our custom attrs.
9671
9672         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
9673
9674 2005-12-07  Martin Baulig  <martin@ximian.com>
9675
9676         * reflection.c (encode_new_constraint): Removed; we don't use the
9677         `NewConstraintAttribute' anymore.
9678
9679 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9680
9681         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
9682         not fire a TypeResolve event when Assembly.GetType () is called.
9683
9684 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9685
9686         Beginning of support for nullable types in the runtime. Parts of
9687         this patch are from Martin.
9688
9689         * appdomain.c (MONO_CORLIB_VERSION): Bump
9690
9691         * domain.c (mono_init_internal): get the nullable type
9692
9693         * class.c (mono_class_is_nullable): New method
9694         (mono_class_get_nullable_param): New mehod
9695         (mono_class_create_generic): In types T? set cast_class to T
9696
9697         * class-internals.h (MonoDefaults): new nullable default class
9698         (mono_class_get_nullable_param, mono_class_get_nullable_param):
9699         new methods.
9700
9701 2005-12-05  Raja R Harinath  <rharinath@novell.com>
9702
9703         * metadata.c (select_container): New.  Refactor code to select the
9704         appropriate GenericContainer given the type of generic parameter
9705         we are looking for.
9706         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
9707         not a MonoGenericContext.  Use select_container.  Update parameters.
9708         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
9709         and MONO_TYPE_MVAR.
9710         (unwrap_arrays): Remove duplicate tests.
9711         (find_generic_param): Rename from 'has_same_context'.  Now walks a
9712         generic instantiated class to find any arguments that are generic
9713         parameters.
9714         (mono_type_create_from_typespec_full): Use find_generic_param to
9715         avoid evicting some generic instantiations from the typespec
9716         cache.
9717
9718 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
9719
9720         * reflection.c: fixed writing of doubles on ARM FPA.
9721
9722 2005-12-02  Robert Jordan  <robertj@gmx.net>
9723
9724         * icall.c: Fixed EventInfo.ReflectedType (#76829).
9725
9726 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9727
9728         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
9729         least on SUSE 10 they are not the same (on debian, they are just the
9730         same thing).
9731
9732 2005-12-01  Raja R Harinath  <rharinath@novell.com>
9733
9734         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
9735         DeclaringType for VARs and MVARs.
9736         * class.c (set_generic_param_owner): Fix initialization of owner
9737         fields.
9738
9739 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
9740
9741         * icall.c: fixed Enum.ToObject() to correctly convert the values.
9742
9743 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9744
9745         * threadpool.c: workaround for a bug that shows up on the Mac:
9746         select()+connect() on a blocking socket is not like it should
9747         be, so we proceed to connect() in that case, wasting the I/O
9748         threadpool thread until connect succeedes. Fixes bug #75436.
9749
9750 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9751
9752         * threadpool.c: fix typo when setting file descriptor states.
9753
9754 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9755
9756         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
9757         * metadata.c (mono_metadata_parse_method_signature_full): Don't
9758         create a temporary signature container.
9759         (mono_metadata_parse_generic_param): Update to changes.
9760         (mono_type_create_from_typespec_full): Update to changes.
9761         * loader.c (method_from_memberref): Don't use a
9762         MonoGenericContainer while parsing a memberref signature.
9763         (method_from_methodspec): Remove dead-store of the 'container'
9764         variable.  It's overwritten before use.
9765
9766         * metadata.c (mono_type_create_from_typespec_full): Make debugging
9767         checks tighter.
9768         (mono_metadata_parse_generic_param): Likewise.
9769         * loader.c (find_method_in_class): Does not need a
9770         MonoGenericContainer.  Use 'mono_method_signature' rather than
9771         'mono_method_signature_full'.
9772         (find_method, mono_get_method_constrained, method_from_memberref):
9773         Update to changes.
9774
9775         * metadata.c (mono_type_create_from_typespec_full): Ensure that
9776         owner-less generic-parameters are never evicted from the typespec
9777         cache.
9778
9779         * loader.c (method_from_memberref): Don't use the current context
9780         when parsing signatures.
9781         (method_from_methodspec, mono_get_method_from_token): Update to changes.
9782
9783         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
9784         side-effects in g_assert.
9785         * loader.c (mono_get_method_from_token): Resolve klass earlier so
9786         that we don't potentially lose information.
9787
9788 2005-11-26  Dick Porter  <dick@ximian.com>
9789
9790         * icall.c:
9791         * threads.c: icalls to implement basic (ie, not named)
9792         System.Threading.Semaphore.
9793
9794 2005-11-24  Dick Porter  <dick@ximian.com>
9795
9796         * process.c
9797         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
9798         Use GetProcessId() if it's available.
9799
9800 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
9801
9802         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
9803
9804 2005-11-23  Raja R Harinath  <rharinath@novell.com>
9805             Ankit Jain  <jankit@novell.com>
9806
9807         * loader.c (mono_get_method_from_token): Initialize 'method' field
9808         of all generic parameters before parsing the signature.  Remove
9809         code that "fixed"-up MVAR references.
9810
9811 2005-11-23  Ankit Jain  <jankit@novell.com>
9812
9813         * metadata.c (mono_metadata_has_generic_params):
9814         (mono_metadata_load_generic_param_constraints):
9815         (mono_metadata_load_generic_params): Move duplicate code ...
9816         (mono_metadata_get_generic_param_row): ... here. Returns the
9817         first row-id in GenericParam table for a given owner (token).
9818         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
9819         prototype.
9820
9821 2005-11-23  Raja R Harinath  <rharinath@novell.com>
9822             Ankit Jain  <jankit@novell.com>
9823
9824         * metadata.c (mono_metadata_class_equal): Pass signature_only when
9825         comparing VARs too.
9826         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
9827         type->data.generic_param only if the type is an MVAR.
9828         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
9829         leak owner-less VARs and MVARs into managed space.
9830
9831 2005-11-21  Martin Baulig  <martin@ximian.com>
9832
9833         * class-internals.h
9834         (MonoMethod): Moved the `generic_container' here from
9835         `MonoMethodNormal' since we now also need it for
9836         `MonoMethodPInvoke';
9837         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
9838         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
9839         an union containing both `MonoMethodNormal' and
9840         `MonoMethodPInvoke'.
9841
9842         * loader.c
9843         (mono_get_method_from_token): Allow implementing generic methods
9844         as interncalls.
9845
9846         * threads.c
9847         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
9848         icall.
9849
9850 2005-11-17  Dick Porter  <dick@ximian.com>
9851
9852         * icall.c: 
9853         * process.h: 
9854         * process.c: Split the Process Start_internal icall into
9855         ShellExecuteEx_internal and CreateProcess_internal, which are
9856         called depending on whether UseShellExecute is true.  Fixes bug
9857         76670.
9858
9859         * appdomain.c (MONO_CORLIB_VERSION): Incremented
9860
9861 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9862
9863         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
9864         'msize' parameters, use the information in 'mspec' instead.
9865         (emit_object_to_ptr_conv): Ditto.
9866
9867         * marshal.c (emit_struct_conv): Handle explicit layout structs with
9868         fields out of order. Fixes #76733.
9869
9870 2005-11-17  Ankit Jain  <jankit@novell.com>
9871
9872         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
9873
9874 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
9875
9876         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
9877           bug #76575.
9878
9879 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
9880
9881         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
9882         for types with non-auto layout. Fixes #76717.
9883
9884 2005-11-16  Ankit Jain  <jankit@novell.com>
9885
9886         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
9887         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
9888         if generic_context is null.
9889           (mono_metadata_generic_param_equal): param->owner can be null.
9890           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
9891         null.
9892
9893 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
9894
9895         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
9896         the correct value.
9897
9898 2005-11-15  Martin Baulig  <martin@ximian.com>
9899
9900         * object.c (set_value): Use mono_class_from_mono_type() instead of
9901         the hack for generic instances; fixes #76136.
9902
9903 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
9904
9905         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
9906         fields.
9907
9908         * image.c (load_metadata_ptrs): Initialize the new fields.
9909
9910         * reflection.c (create_dynamic_mono_image): Ditto.
9911
9912         * reflection.c (build_compressed_metadata): Use the new fields.
9913
9914         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
9915         icall.
9916
9917         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
9918         icall.
9919         
9920 2005-11-15  Ankit Jain  <jankit@novell.com>
9921             Raja R Harinath  <harinath@gmail.com>
9922
9923         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
9924         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
9925         new per-generic_container cache if the cached MonoType's context matches
9926         the current context.
9927           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
9928         to the expected context.
9929           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
9930
9931 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9932
9933         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
9934         we changed the signature of an icall.
9935         * icall.c: Modify to mono_double_ParseImpl return true/false 
9936         depending on the success, instead of throwing the exception. This will
9937         help us in Double.TryParse methods.
9938         
9939 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
9940
9941         * marshal.c (emit_marshal_object): Throw an exception when
9942         marshalling 'object' instead of crashing. Fixes #76696.
9943
9944 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9945
9946         * class-internals.h: Add prototype for mono_type_get_full_name ().
9947
9948 2005-11-11  Dick Porter  <dick@ximian.com>
9949
9950         * threads.c (mono_thread_manage): Make sure the main thread has
9951         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
9952
9953 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9954
9955         * loader.c (mono_loader_set_error_type_load): Log a warning to the
9956         console about the missing type.
9957         (mono_loader_set_error_method_load): Ditto.
9958
9959 2005-11-09  Miguel de Icaza  <miguel@novell.com>
9960
9961         * mono-config.c (mono_get_config_dir): Set the system defaults if
9962         none is specified.
9963
9964         * assembly.c (mono_set_dirs): New API entry point to set the
9965         assembly and the config directory in one call
9966
9967 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
9968
9969         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
9970         the ftnptr was created from a delegate in a domain other than the
9971         current domain. Fixes #75377.
9972
9973         * exception.h exception.c: Add mono_get_exception_not_supported ().
9974
9975 2005-11-08  Martin Baulig  <martin@ximian.com>
9976
9977         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
9978
9979 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
9980
9981         * security-manager.h: Added definitions to deal with strongname key 
9982         pairs bigger (and smaller) than 1024 bits.
9983         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
9984         adjust wrt the public key length being used.
9985
9986 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
9987
9988         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
9989           Windows build (r51396-51397).
9990
9991 2005-11-03  Martin Baulig  <martin@ximian.com>
9992
9993         * class.c (mono_class_setup_vtable_general): Also add generic
9994         methods to the vtable; fixes #76581.
9995
9996 2005-11-01  Miguel de Icaza  <miguel@novell.com>
9997
9998         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
9999         sure that we lookup GetString method from the System.Text.Encoding
10000         class, not the derived class or we get an empty method.
10001
10002         Fixed class #76612.
10003
10004 2005-10-25  Miguel de Icaza  <miguel@novell.com>
10005
10006         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
10007         if it has been previously set (embedders). 
10008
10009         Make mono_set_rootdir available also on Unix.
10010
10011 005-10-24  Robert Jordan  <robertj@gmx.net>
10012
10013         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
10014
10015 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10016
10017         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
10018         only calls which are made to native code use this flag.
10019
10020         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
10021
10022 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10023
10024         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
10025         Add support for FieldBuilders.
10026
10027 2005-10-29  Martin Baulig  <martin@ximian.com>
10028
10029         * mono-debug.c
10030         (mono_debug_using_mono_debugger): New public method; returns
10031         whether we're running inside the debugger.
10032
10033 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
10034
10035         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
10036         for Method/Constructor/FieldBuilders.
10037
10038 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10039
10040         * reflection.c (module_add_cattrs): Save custom attributes for global methods
10041         and fields as well.
10042
10043 2005-10-26  Martin Baulig  <martin@ximian.com>
10044
10045         * mono-debug-debugger.c
10046         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
10047
10048 2005-10-24  Raja R Harinath  <harinath@gmail.com>
10049
10050         * icall.c (base64_to_byte_array): Don't pass an out-of-range
10051         integer to isspace.
10052
10053 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10054
10055         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
10056         when passing valuetypes byref. Fixes #76502.
10057
10058 2005-10-19  Jackson Harper  <jackson@ximian.com>
10059
10060         * profiler.c: Don't put a . in front of types that are not in a
10061         namespace.
10062
10063 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10064
10065         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
10066
10067 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
10068
10069         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
10070         #76436.
10071         (mono_marshal_get_ldflda_wrapper): Fix a warning.
10072
10073 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10074
10075         * assembly.c metadata-internals.h icall.c: Define an additional
10076         parameter for mono_assembly_name_parse_full, so we can avoid creating
10077         S.R.AssemblyName.Version when no version info wasn't passed.
10078         
10079 2005-10-09  Miguel de Icaza  <miguel@novell.com>
10080
10081         * class.c (mono_type_get_full_name): Reimplement method that was
10082         removed. 
10083
10084         * image.c: Some docs
10085
10086 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10087
10088         * profiler.c (output_newobj_profile): Fix printing of Total memory
10089         on x86.
10090
10091 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10092
10093         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
10094
10095 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
10096
10097         * threads.c: remove debug output.
10098
10099 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * threads.c (mono_thread_manage): Fix crashes if more than 64
10102         threads need to be aborted. Hopefully fixes #75899.
10103
10104         * assembly.c (mono_stringify_assembly_name): New helper function.
10105
10106         * class.c: Use mono_stringify_assembly_name instead of the similar
10107         static function.
10108
10109         * assembly.h assembly.c: Add support for calling a postload search 
10110         hook if an assembly cannot be loaded.
10111
10112         * appdomain.c: Register new search hooks which call the AssemblyResolve
10113         events in AppDomain. Fixes #75231
10114
10115 2005-10-07  Martin Baulig  <martin@ximian.com>
10116
10117         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
10118         methods without debug info.
10119
10120 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10121
10122         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
10123         wrappers.
10124
10125 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10126
10127         * file-io.c: now that we return symlinks, use lstat and, when the file
10128         is a symbolic link, stat, to get the file attributes. Also avoid the
10129         conversion to/from utf16/external.
10130
10131 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
10132
10133         * class.c (mono_class_layout_fields): Compute klass->has_references
10134         correctly if an embedded valuetype is not yet initialized. Fixes
10135         #76331.
10136
10137 2005-10-04  Martin Baulig  <martin@ximian.com>
10138
10139         * metadata.c
10140         (mono_metadata_load_generic_param_constraints): New public
10141         function; splitted the constraints loading out from
10142         mono_metadata_load_generic_params().
10143
10144         * class.c (mono_class_create_from_typedef): Call
10145         mono_metadata_load_generic_param_constraints() after setting up
10146         the type and creating our parent; fixes #75329.
10147
10148 2005-10-04  Martin Baulig  <martin@ximian.com>
10149
10150         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
10151         non-dynamic parent classes.
10152
10153 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
10154
10155         * file-io.c : win32 build fix (ETXTBSY seems not found).
10156
10157 2005-10-04  Martin Baulig  <martin@ximian.com>
10158
10159         * reflection.c
10160         (mono_image_get_methodspec_token): Make the cache actually work;
10161         fixes #75974.
10162
10163 2005-10-04  Martin Baulig  <martin@ximian.com>
10164
10165         * class.c (mono_class_name_from_token): Removed the unneccessary
10166         `MonoGenericContext *' argument.
10167
10168 2005-10-04  Martin Baulig  <martin@ximian.com>
10169
10170         * loader.c
10171         (method_from_methodspec): Make the caching work again; fixes the
10172         performance regression from #76262.
10173
10174 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10175
10176         * file-io.c:
10177         * file-io.h:
10178         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
10179         GetFileSystemEntries that performs the same work but without going
10180         into io-layer, locking, etc.
10181
10182 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10183
10184         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
10185         ThreadState_Stopped as well. Fixes #76047.
10186
10187 2005-09-29  Martin Baulig  <martin@ximian.com>
10188
10189         * class.c
10190         (inflate_generic_context): If the new context has a `gmethod', set
10191         its `container' that that gmethod's `container'.
10192
10193         * metadata.c
10194         (mono_metadata_parse_generic_param): Simplify things;
10195         `generic_container = generic_context->container;' is just fine.
10196
10197         * loader.c (method_from_methodspec): Code cleanups.
10198
10199 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10200
10201         * decimal.c: fix warning (and let gcc generate correct
10202         code on ARM with optimizations).
10203
10204 2005-09-28  Martin Baulig  <martin@ximian.com>
10205
10206         * loader.c
10207         (method_from_memberref): Added `MonoGenericContext *class_context'
10208         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
10209         (method_from_methodspec): If we're a memberref, use the enclosing
10210         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
10211
10212 2005-09-28  Martin Baulig  <martin@ximian.com>
10213
10214         * object.c (mono_runtime_invoke_array): Added support for
10215         MONO_TYPE_GENERICINST; fixes #75917.
10216
10217 2005-09-27  Martin Baulig  <martin@ximian.com>
10218
10219         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
10220         `k->byval_arg.type' to determine the actual type.
10221
10222         * loader.c (method_from_methodspec): Removed some hacks.
10223
10224 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10225
10226         * class-internals.h (mono_field_is_deleted): Do the test for
10227         rtspecialname before we check the actual name of the field. This
10228         prevents us from dereferencing a pointer into the string table,
10229         saving us from accessing a few pages
10230
10231         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10232         macros. This will allow a deadlock debugger to easily be plugged
10233         in.
10234
10235 2005-09-27  Martin Baulig  <martin@ximian.com>
10236
10237         * loader.c (method_from_methodspec): Create a "signature"
10238         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
10239
10240 2005-09-27  Martin Baulig  <martin@ximian.com>
10241
10242         * class.c
10243         (inflate_generic_class): Correctly set the new context's
10244         container.
10245
10246         * loader.c
10247         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
10248         instead of a `MonoGenericContext *'.
10249         (mono_method_signature_full): Take a `MonoGenericContainer *'
10250         instead of a `MonoGenericContext *'.
10251
10252         * metadata.c
10253         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
10254         instead of a `MonoGenericContext *'.
10255         (mono_metadata_parse_method_signature_full): Likewise.
10256
10257 2005-09-26  Martin Baulig  <martin@ximian.com>
10258
10259         * class.c
10260         (mono_class_from_generic_parameter): Set `klass->generic_container'
10261         (mono_class_from_generic_parameter): Likewise.
10262         (mono_bounded_array_class_get): We inherit the generic container
10263         from the element class.
10264
10265         * loader.c
10266         (find_method, find_method_in_class): Take a `MonoGenericContext *'
10267         argument rather than computing it here.
10268         (method_from_memberref): Correctly set the generic context before
10269         parsing the signature.  Fixes #75681.
10270
10271 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10272
10273         * object.c (mono_class_has_special_static_fields): Fix warnings.
10274
10275 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10276
10277         * assembly.c: Add parse_public_key function, to
10278         par the public keys. Also added mono_assembly_name_parse_full,
10279         to define it the parsed key should be freed or not.
10280         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
10281         to parse a long format assembly name.
10282         * metadata-internals.h: Keep mono_assembly_name_parse_full as
10283         private, since calling it to preserve the key requires
10284         freeing it manually.
10285         
10286 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
10287
10288         * locales.c : removed HAVE_ICU part.
10289
10290 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10291
10292         * object.c (mono_class_create_runtime_vtable): Avoid calling 
10293         field_is_special_static if the klass has no special static fields.
10294
10295         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
10296         (MonoCachedClassInfo): Likewise.
10297
10298         * object.c (mono_class_has_special_static_fields): New helper function.
10299
10300 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10301
10302         * class.c (mono_class_create_from_typedef): Don't call 
10303         interfaces_from_typedef_full for enums.
10304         (mono_class_create_from_typedef): Compute the base types of enums directly
10305         without calling mono_class_setup_fields ().
10306         (mono_class_find_enum_basetype): New helper function.
10307
10308         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
10309         one place inside the string heap.
10310         
10311 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
10312
10313         * class.c: locking fixes, code cleanups, some docs added.
10314         Allocate some data structures in the image mempool.
10315
10316 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10317
10318         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
10319         the example code.
10320         
10321 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
10322
10323         * class-internals.h, class.c, reflection.c: reduce memory taken by
10324         MonoClass.
10325
10326 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
10327
10328         * metadata.c, metadata.h, loader.h: documentation updates, code and
10329         API cleanups.
10330
10331 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10332
10333         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
10334         the example code.
10335
10336         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
10337         page faults caused by the runtime while reading metadata.
10338
10339 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10340
10341         * socket-io.c: the field names were changed 3 months ago and no one
10342         realized until bug #76077 got filed!
10343
10344 2005-09-20  Martin Baulig  <martin@ximian.com>
10345
10346         * icall.c (assembly_icalls): Removed some unused debugger icalls.
10347
10348 2005-09-20  Martin Baulig  <martin@ximian.com>
10349
10350         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
10351         write the rank into the class entry.
10352
10353 2005-09-20  Martin Baulig  <martin@ximian.com>
10354
10355         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
10356
10357 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
10358
10359         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10360
10361         * icall.c (custom_attrs_defined_internal): New icall.
10362
10363         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
10364         function.
10365         (mono_custom_attrs_construct_by_type): New helper function.
10366
10367 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
10368
10369         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
10370         terminate the resulting string. Fixes #76123.
10371
10372 2005-09-16  Martin Baulig  <martin@ximian.com>
10373
10374         * mono-debug.c
10375         (mono_debug_add_method): Ignore inflated methods for the moment.
10376
10377 2005-09-14  Martin Baulig  <martin@ximian.com>
10378
10379         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
10380
10381 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
10382
10383         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
10384         return a success/failure indication.
10385         (mono_metadata_interfaces_from_typedef_full): Ditto.
10386         (get_constraints): Ditto.
10387
10388 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10389
10390         * marshal.c (emit_marshal_array): Fix handling of null arrays.
10391         
10392         * marshal.c (emit_marshal_array): Add support for returning string
10393         arrays from delegates. Fixes #76063.
10394
10395         * marshal.c: Use the emit_ldloc/stloc macros where possible.
10396
10397 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10398
10399         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
10400         icall.
10401
10402 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10403
10404         * reflection.c icall.c: Fix after mono_get_exception_type_load
10405         signature change.
10406
10407         * assembly.c (mono_assembly_get_assemblyref): New helper function.
10408         (mono_assembly_load_reference): Use the new helper.
10409
10410         * class-internals.h (MonoLoaderError): New structure containing 
10411         information about type loading errors.
10412
10413         * class-internals.h loader.c: Add APIs to store per-thread loader
10414         error information.
10415
10416         * loader.c class.c: Set the loader error if needed.
10417
10418         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
10419
10420 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
10421
10422         * decimal.c: fixed to handle the broken ARM fp format.
10423
10424 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
10425
10426         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
10427         broken.
10428
10429 2005-09-06  Martin Baulig  <martin@ximian.com>
10430
10431         * domain.c (supported_runtimes): Added v2.0.50727.
10432
10433 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
10434
10435         * culture-info.h: reduce the size of some structures.
10436
10437 2005-09-05  Martin Baulig  <martin@ximian.com>
10438
10439         Reflect latest API changes in the August CTP.
10440
10441         * icall.c
10442         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
10443         ("MonoType.HasGenericArguments"): Removed.
10444         ("MonoMethod.BindGenericParameters"): Renamed to
10445         "MakeGenericMethod".
10446         ("MethodBuilder.BindGenericParameters"): Renamed to
10447         "MakeGenericMethod".    
10448
10449 2005-09-05  Martin Baulig  <martin@ximian.com>
10450
10451         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
10452
10453 2005-09-05  Martin Baulig  <martin@ximian.com>
10454
10455         Applying a patch from Michal Moskal <malekith@nemerle.org>.
10456
10457         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
10458         generic_container is non-NULL.
10459
10460 2005-09-05  Martin Baulig  <martin@ximian.com>
10461
10462         Applying a patch from Michal Moskal <malekith@nemerle.org>.
10463
10464         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
10465
10466 2005-08-29  Michal Moskal  <malekith@nemerle.org>
10467
10468         * reflection.c (encode_locals,
10469         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
10470         for large generic types.
10471
10472 2005-09-05  Martin Baulig  <martin@ximian.com>
10473
10474         Applying a patch from Michal Moskal <malekith@nemerle.org>.
10475
10476         * class.c (mono_dup_array_type): New public method.
10477         (mono_metadata_signature_deep_dup): New public method.
10478         (dup_type): Correctly duplicate array and function types.
10479
10480 2005-09-05  Martin Baulig  <martin@ximian.com>
10481
10482         Applying a patch from Michal Moskal <malekith@nemerle.org>.
10483
10484         * reflection.c (get_default_param_value_blobs): Handle generic types
10485         and generic methods.
10486
10487 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
10488
10489         * class.c: Fixed error reporting (method/class were inversed) for 
10490         inheritance demands.
10491         * security-manager.c|h: Added the AppDomain when calling the managed
10492         System.Security.SecurityManager.InheritanceDemand method.
10493
10494 2005-09-01  Raja R Harinath  <rharinath@novell.com>
10495
10496         * reflection.c (encode_marshal_blob): 'marshaltype' and
10497         'marshaltyperef' are alternate sources for the custom marshaler
10498         name.
10499
10500 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
10501
10502         * class.c: fix creation of array classes with rank == 1
10503         (patch by Ankit Jain <jankit@novell.com>).
10504
10505 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
10506
10507         * object.c: fix check for creating the bound data for arrays vs
10508         szarrays.
10509
10510 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10511
10512         * object.c: configuration file name is now based on the executable name,
10513         not the image name. Fixes bug #75931.
10514
10515 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10516
10517         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
10518         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
10519
10520 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10521
10522         * rand.c: Use wincrypt.h instead of WinCrypt.h.
10523
10524 2005-08-24  Ankit Jain  <jankit@novell.com>
10525             Raja R Harinath  <rharinath@novell.com>
10526
10527         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
10528           called by it recursively.
10529           (mono_class_init): Remove special case in pending_init handling, since it's
10530           superseded by the fix to mono_class_from_typeref.
10531
10532 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10533
10534         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
10535         BROKEN_THREAD_START stuff.
10536
10537 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10538
10539         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
10540         trampoline.
10541
10542         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
10543         
10544         * object.c (mono_delegate_ctor): Replace the original function address with
10545         a delegate trampoline.
10546
10547 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
10548
10549         * icall.c: add boolean argument to base64_to_byte_array and 
10550         InternalFromBase64String to control whether a whitespace-only string
10551         is allowed (or should casue a FormatException to be thrown). We need
10552         this as the behavior has changed between MS.NET 1.x and 2.0, and we
10553         to match the MS behaviour in both profiles.
10554         * appdomain.c: Bump corlib version.
10555
10556 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10557
10558         This patch implements a big portion of publisher policy
10559         support, used to bind assembly versions and redirect
10560         one assembly from version A to version B.
10561
10562         * assembly.c:
10563         New GSList loaded_assembly_bindings, for storing the cached
10564         assembly bindings.
10565         (assembly_binding_maps_name): New static function for checking if a 
10566         assembly binding information maps an assembly name.
10567         (mono_assembly_binding_info_free): New function for freeing
10568         assembly binding information resources.
10569         (get_publisher_policy_info): New static function for retrieving 
10570         assembly binding information from a MonoImage.
10571         (compare_versions): New static function for comparing an assembly
10572         binding information data and the version of an assembly name.
10573         (check_policy_versions): New static function for checking if an
10574         assembly binding info mapping an assembly name is valid for it.
10575         (mono_assembly_load_publisher_policy): New static function for
10576         loading the 'policy.major.minor.MyAssembly' image for an assembly
10577         with an assembly name 'aname'.
10578         (mono_assembly_bind_version): New static function for updating
10579         assembly redirection.
10580         (mono_assembly_apply_binding): New static function for applying
10581         assembly binding.
10582         (search_binding_loaded): New static function for searching 
10583         loaded assembly binding infos in the cache domain.
10584         (mono_assembly_load_full): Don't apply assembly binding for
10585         reflection only assemblies.
10586
10587         * metadata-internals.h: Add MonoAssemblyBindingInfo,
10588         which contains information about assembly binding. Also
10589         declare signature for mono_config_parse_publisher_policy ()
10590         function, used to retrieve pub policy info.
10591         
10592         * mono-config.c:
10593         (publisher_policy_start): New static function used to parse publisher 
10594         policy config files.
10595         (publisher_policy_parser): New static MonoParseHandler containing 
10596         the functions used when parsing config files.
10597         (mono_config_parse_publisher_policy): New function for parsing
10598         publisher policy files.
10599         
10600 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10601
10602         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
10603
10604         * marshal.c (mono_delegate_free_ftnptr): Ditto.
10605
10606         * object.c (mono_get_addr_from_ftnptr): New helper function.
10607
10608         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
10609
10610         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10611
10612 2005-08-19  Dick Porter  <dick@ximian.com>
10613
10614         * threads.c, threads.h, appdomain.c, appdomain.h,
10615         profiler-private.h, monitor.c, object.c, object-internals.h,
10616         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
10617         store the thread ID, so it can hold a 64 bit value if needed.
10618
10619 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10620
10621         * reflection.c (mono_reflection_create_dynamic_method): Store the
10622         handle class into the method references as well so ldtoken works in
10623         dynamic methods.
10624
10625         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
10626         types.
10627
10628 2005-08-19  Ankit Jain <jankit@novell.com>
10629
10630         Fix #75847.
10631         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
10632           here rather than using the method signature of a arbitrary function
10633           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
10634           two arguments.
10635           Hack done with Harinath.
10636
10637 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10638
10639         * threadpool.c: disable printing stack traces when we get a exception
10640         in a threadpool thread. I need to do more testing to figure out which
10641         cases actually print this. Fixes bug #75828.
10642
10643 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10644
10645         * icall.c: there might be ignored whitespace after the last '='. This
10646         fixes length computation and bug #75840.
10647
10648 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
10649
10650         * assembly.c (mono_assembly_load_full): Consider .exe extension as
10651         well. Fixes #75809.
10652
10653         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
10654         #75784.
10655         
10656         * reflection.c (create_custom_attr_data): Ditto.
10657
10658 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
10659
10660         * locales.c, culture-info.h : removed RegionLCIDMap.
10661         * culture-info-tables.h : regenerated.
10662
10663 2005-08-16  Martin Baulig  <martin@ximian.com>
10664
10665         * class.c (mono_type_get_name_recurse): Small fix.
10666
10667 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
10668
10669         * locales.c : indentation fixie.
10670
10671 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
10672
10673         * object-internals.h,
10674           locales.h,
10675           locales.c,
10676           culture-info.h,
10677           icall.c : added RegionInfo table support.
10678         * culture-info-table.h : regenerated for region support.
10679
10680 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
10681
10682         * reflection.c (resolve_object): handle all kinds of MonoMethod
10683         including generic ones
10684
10685 2005-08-12  Ankit Jain <jankit@novell.com>
10686
10687         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
10688           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
10689
10690 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
10691
10692         * process.c: Don't close a thread handle when it's NULL. This is a
10693         workaround for bug #75733.
10694
10695 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10696
10697         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
10698
10699 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
10700
10701         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
10702
10703 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10704
10705         * threadpool.c: if a work item in the thread pool has a callback that
10706         catches a exception, don't propagate it after invoking the callback.
10707         Fixes bug #75336.
10708
10709 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10710
10711         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
10712
10713         * class-internals.h (MonoCachedClassInfo): Add some new fields.
10714
10715         * class.c (mono_class_init): Load field info lazily in the AOT case.    
10716
10717         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
10718
10719 2005-08-03  Ankit Jain  <jankit@novell.com>
10720
10721         Fix #75683.
10722         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
10723           PInvoke calling convention is 0.
10724
10725 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
10726
10727         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
10728         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
10729
10730 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
10731
10732         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
10733         to handle threads not started by the GC (patch by Michael Meeks
10734         <michael.meeks@novell.com>).
10735
10736 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
10737
10738         * reflection.c: Make buffer used in emitting types larger for some
10739         big generic types (patch by Michal Moskal).
10740
10741 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10742
10743         * mono-debug.c: Fix some (not all) alignment problems.
10744
10745 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10746
10747         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
10748         Invoke mono_image_load_from_data_full passing the refonly
10749         parameter.
10750
10751         * assembly.c
10752         (mono_assembly_open_from_bundle): Add the refonly argument, 
10753         in order to pass it to other methods it calls to.
10754         (do_mono_assembly_open): Add the refonly argument, in order 
10755         to pass it to other methods it calls to.
10756         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
10757         the refonly parameter to it.
10758
10759         * image.c: Add loaded_images_refonly_hash and
10760         loaded_images_refonly_guid_hash to cache the reflection
10761         only loaded images.
10762         (mono_images_init): Initialize the hash tables used for
10763         caching the reflection only images.
10764         (load_modules): Invoke mono_image_open_full passing the refonly
10765         parameter to load the modules the correct way.
10766         (build_guid_table): Add the refonly argument, to re-build the 
10767         correct hash table.
10768         (do_mono_image_open): Added the refonly argument, in order to
10769         define it for the loaded image.
10770         (mono_image_loaded_full): New function, which receives an
10771         additional parameter to look for the image in the refonly or
10772         non-refonly section.
10773         (mono_image_loaded): Updated, using mono_image_loaded_full.
10774         (mono_image_loaded_by_guid_full): The same case that happens
10775         with mono_image_loaded_full.
10776         (mono_image_loaded_by_guid): Likewise.
10777         (register_image): Use the ref_only variable inside MonoImage
10778         to decide in which hash table store the current image.
10779         (mono_image_open_from_data_full): Rename
10780         mono_image_open_from_data to mono_image_open_from_data_full,
10781         adding the refonly argument, to define the ref_only variable 
10782         inside MonoImage.
10783         (mono_image_open_from_data): Return 
10784         mono_image_open_from_data_full.
10785         (mono_image_open_full): Rename mono_image_open to
10786         mono_image_open_full, receiving the new refonly argument,
10787         to pass it to inner methods.
10788         (mono_pe_file_open): Update this function, to open
10789         a MonoImage as a non-refonly image.
10790         (mono_image_close): Use the refonly variable inside
10791         MonoImage to remove the image from the correct caches.
10792
10793         * image.h: Add the signatures of mono_image_open_full,
10794         mono_image_open_from_data_full, mono_image_loaded_full,
10795         mono_image_loaded_by_guid_full.
10796
10797         * metadata-internals.h: Add the ref_only field to 
10798         MonoImage.
10799         
10800 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10801
10802         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
10803         Fix the last behavior, which used to load the assemblies and
10804         extract MonoReflectionAssemblyName information, instead of
10805         extract it from the metadata tables. Needed for Reflection
10806         Only assemblies.
10807         
10808 2005-07-29  Martin Baulig  <martin@ximian.com>
10809
10810         * mono-debug-debugger.c
10811         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
10812         not initialized.
10813
10814         * mono-debug.c
10815         (mono_debug_address_from_il_offset): Check whether we have
10816         debugging support before attempting to take the lock.
10817         (mono_debug_source_location_from_address): Likewise.
10818         (mono_debug_source_location_from_il_offset): Likewise.
10819         (mono_debug_il_offset_from_address): Likewise.
10820         (mono_debug_address_from_il_offset): Likewise.
10821
10822 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
10823
10824         * class.c (mono_class_from_name_case): Add support for dynamic images.
10825         Fixes #75650.
10826
10827         * object.c (mono_class_compute_gc_descriptor): Add a workaround
10828         for #75479.
10829
10830 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10831         
10832         * reflection.c (mono_method_get_object): Fix warning.
10833
10834 2005-07-28  Martin Baulig  <martin@ximian.com>
10835
10836         * mono-debug.c
10837         (mono_debug_add_wrapper): Also write the wrapper type.
10838
10839 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10840
10841         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
10842         
10843         * class.c (mono_class_init): Avoid reading nested classes if the AOT
10844         data indicates the class has none.
10845
10846 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
10847
10848         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
10849         loader lock with the debugger lock. Prevents deadlocks for beagle.
10850
10851         Beagle can now run on an smp box for a weekend without any
10852         issues. Woohoo!
10853
10854 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
10855
10856         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
10857         in a module. Fixes #75629.
10858
10859 2005-07-26  Martin Baulig  <martin@ximian.com>
10860
10861         * mono-debug.c (mono_debug_add_wrapper): New static method.
10862         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
10863         interncall or a wrapper.
10864
10865         * mono-debug.h (MonoDebugWrapperData): New public typedef.
10866         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
10867         (MONO_DEBUGGER_VERSION): Bump to 51.
10868
10869         * mono-debug-debugger.c
10870         (mono_debugger_add_type): Removed this empty function.
10871         (mono_debugger_add_method): Likewise.
10872
10873 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
10876         before accessing method->slot.
10877
10878 2005-07-21  Jb Evain  <jbevain@gmail.com>
10879
10880         * reflection.c (method_encode_clauses/class): Handle filters clauses.
10881         Fixes #75010.
10882
10883 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10884
10885         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
10886         #75587.
10887
10888 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10889
10890         * image.h image.c: Add mono_image_get_guid () API function.
10891
10892 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
10893
10894         There were issues when multiple threads tried to load
10895         assemblies. A deadlock was created between assemblies_mutex and
10896         mono_domain_assemblies_lock. This fixes the issue by making the
10897         assembly ref counting be lock free. See bug 75586.
10898         
10899         * image.c (mono_image_close): The add ref function here was using
10900         Interlocked operations while the unref was using a mutex and a
10901         --. I don't think this was ever a bug that would be exposed in a
10902         non-pendantic way (ie, by an embedder doing a ref on one thread
10903         and an unref on another), but for the sake of correctness, this is
10904         now Interlocked.
10905
10906         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
10907         (mono_assembly_load_reference): Call mono_assembly_addref rather
10908         than touching the refcount ourselves.
10909         (mono_assembly_close): Use InterlockedDecrement to unref the
10910         assembly. Don't acquire the lock unless it is actually needed.
10911
10912 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
10913
10914         * class.c (mono_class_layout_fields): Fix calculation of has_references
10915         for generic types.
10916
10917 2005-07-12  Martin Baulig  <martin@ximian.com>
10918
10919         Applying a patch from Michal Moskal <malekith@nemerle.org>.
10920
10921         * metadata.c
10922         (mono_type_hash): Provide better hashing for generic instances.
10923         (mono_generic_inst_hash): Improve hashing.
10924         (mono_generic_class_hash): Likewise.
10925
10926         * reflection.c (mymono_metadata_type_hash): Improve hashing for
10927         generic instances.
10928
10929 2005-07-12  Martin Baulig  <martin@ximian.com>
10930
10931         * reflection.c (mono_reflection_create_runtime_class): Remove the
10932         hack for generic type definitions and non-`Run' assemblies.
10933         (mono_reflection_bind_generic_parameters): Also use
10934         `klass->wastypebuilder' to check for TypeBuilders.
10935
10936 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
10937
10938         * class.c (mono_class_layout_fields): Fix calculation of has_references
10939         for generic types.
10940
10941         * class.c (inflate_generic_class): Fix a leak.
10942         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
10943         for generic types.
10944
10945 2005-07-11  Martin Baulig  <martin@ximian.com>
10946
10947         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
10948         on error.
10949
10950 2005-07-11  Martin Baulig  <martin@ximian.com>
10951
10952         * loader.c (find_method): Also lookup in
10953         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
10954
10955 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10956
10957         * appdomain.c (mono_domain_unload): Don't free the error message
10958         before passing it to mono_get_exception_...
10959
10960         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
10961         
10962 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
10963
10964         * threads.c: try to better guess an available RT signal (bug #75387).
10965
10966 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10967
10968         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
10969         and CACHE_OBJECT.
10970
10971 2005-07-07  Martin Baulig  <martin@ximian.com>
10972
10973         * class.c (mono_type_get_name_full): Return NULL for
10974         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
10975         fixes #75408.
10976
10977 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10978
10979         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
10980         exit the appdomain as well being aborted.
10981
10982         * threadpool.c: Create all threadpool threads inside the root appdomain, and
10983         change back to the root domain after calling managed code. This enables
10984         appdomains using threadpools to be unloaded.
10985
10986 2005-07-07  Martin Baulig  <martin@ximian.com>
10987
10988         * class-internals.h
10989         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
10990         into `MonoDynamicGenericClass' since we only need it for dynamic
10991         types.
10992
10993         * reflection.c (mono_class_bind_generic_parameters): We don't need
10994         to compute the `parent' here.
10995
10996 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
10997
10998         * culture-info-table.h : regenerated.
10999
11000 2005-07-06  Martin Baulig  <martin@ximian.com>
11001
11002         * icall.c
11003         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
11004
11005         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
11006
11007 2005-07-06  Martin Baulig  <martin@ximian.com>
11008
11009         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
11010         we're doing a signature-only comparision; fixes #74945.
11011
11012 2005-07-06  Martin Baulig  <martin@ximian.com>
11013
11014         * class-internals.h (MonoGenericClass): Moved some things out into
11015         a new `MonoInflatedGenericClass' type.  
11016         (MonoInflatedGenericClass): New type; the `klass' of a
11017         `MonoGenericClass' is now computed lazyly in
11018         mono_get_inflated_generic_class().      
11019
11020         * class.c (mono_get_inflated_generic_class): New public function.
11021         (mono_class_inflate_generic_method): Removed the unused
11022         `MonoClass *' argument.
11023         (setup_generic_vtable): Don't call mono_get_inflated_method() on
11024         all the methods.
11025         (mono_class_create_generic): Make this static and merge it with
11026         mono_class_create_generic_2(); we're now called automatically from
11027         mono_get_inflated_generic_class().
11028
11029         * loader.c (mono_method_signature): Call
11030         mono_get_inflated_method() here.
11031
11032 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
11035         type of fields with RVA.
11036
11037         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
11038         for this pseudo class.
11039         (my_mono_class_from_generic_parameter): Likewise.
11040         (mono_class_init): Allow interfaces to have cctors.
11041
11042 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
11043
11044         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
11045         lazily for AOT methods.
11046
11047 2005-07-05  Martin Baulig  <martin@ximian.com>
11048
11049         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
11050         returns FALSE for a successful match, not TRUE.
11051
11052 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
11053
11054         * loader.c (mono_method_get_index): Optimize this a bit.
11055
11056 2005-07-04  Martin Baulig  <martin@ximian.com>
11057
11058         * class.c
11059         (class_compute_field_layout): Move the check for generic type
11060         definitions into mono_class_layout_fields().  Fixes #74684.
11061         (mono_class_from_generic_parameter): Correctly compute
11062         `klass->parent'; fixes #75457.
11063
11064         * reflection.c (register_assembly, register_module): Make sure
11065         `domain->rejobject_hash' is already created.
11066
11067 2005-07-02  Martin Baulig  <martin@ximian.com>
11068
11069         * class-internals.h
11070         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
11071         `MonoDynamicGenericClass'.      
11072
11073 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
11074
11075         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
11076         returned by a field getter is null, since null is a valid value.
11077
11078 2005-07-01  Martin Baulig  <martin@ximian.com>
11079
11080         * reflection.c (mono_reflection_generic_class_initialize): Update
11081         the `dgclass->fields [i].parent' to the correct class.
11082         (mono_image_get_fieldref_token): Use the declaring type, not the
11083         reflected type.
11084
11085 2005-07-01  Martin Baulig  <martin@ximian.com>
11086
11087         * loader.c (find_method): Also look in the interfaces; fixes #75429.
11088
11089 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
11090
11091         * threads.c (thread_cleanup): assert that thread != NULL
11092         (wait_for_tids_or_state_change): We were using the wrong variable
11093         when accessing wait->threads. `i' was always out of the bounds of
11094         the array.
11095
11096 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11097
11098         * loader.c: map user32 and kernel32 to libMonoSupportW
11099
11100 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
11101
11102         * appdomain.c (unload_thread_main): Mark this as WINAPI.
11103
11104 2005-06-28  Martin Baulig  <martin@ximian.com>
11105
11106         * loader.c (method_from_methodspec): Fix #75334.
11107
11108 2005-06-28  Martin Baulig  <martin@ximian.com>
11109
11110         Fix #74953 - Arrays now implement the generic IList<T> interface
11111         on the 2.0 platform.
11112
11113         * class-internals.h (MonoDefaults): Added `generic_array_class'.
11114
11115         * reflection.c (mono_class_bind_generic_parameters): New public
11116         function; similar to mono_reflection_bind_generic_parameters(),
11117         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
11118
11119         * domain.c (mono_init_internal): Try to initialize.
11120         `mono_defaults.generic_array_class' here; this'll only succeed if
11121         we're using the 2.0 corlib.
11122
11123         * icall.c
11124         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
11125         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
11126         (mono_lookup_internal_call): Added support for nested classes.
11127
11128         * loader.c
11129         (mono_get_method_from_token): Set `result->signature->pinvoke' if
11130         we're an interncall and have generic arguments.
11131
11132         * class.c
11133         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
11134         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
11135         instance of System.Array.InternalArray<T> for arrays, so they
11136         implement the generic IList<T> interface.
11137
11138 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
11139
11140         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
11141         (chastamar@yahoo.com). Fixes #75374.    
11142
11143 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
11144
11145         * culture-info-table.h: regenerated.
11146
11147 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11148
11149         * icall.c: handle spaces correctly for base64 strings.
11150
11151 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
11152
11153         * *.c: Kill some warnings.
11154
11155 2005-06-23  Duncan Mak  <duncan@novell.com>
11156
11157         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
11158         that this builds on Solaris 10 (x86).
11159
11160 2005-06-23  Martin Baulig  <martin@ximian.com>
11161
11162         * class.c
11163         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
11164         generic type definitions.
11165
11166 2005-06-23  Martin Baulig  <martin@ximian.com>
11167
11168         Fix #75331.
11169
11170         * metadata.c (mono_class_get_overrides): Renamed to
11171         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
11172         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
11173         pass it to mono_get_method_full().
11174
11175 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
11176
11177         * reflection.c (mono_reflection_create_runtime_class): take the
11178         mono_domain_lock in this method. Prevents deadlocks
11179
11180 2005-06-22  Martin Baulig  <martin@ximian.com>
11181
11182         * loader.c (method_from_methodspec): Fix #75330.
11183
11184 2005-06-22  Martin Baulig  <martin@ximian.com>
11185
11186         * reflection.c (type_get_qualified_name): Use
11187         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
11188         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
11189         argument; use it if we don't have an assembly name.
11190
11191 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
11192
11193         * object.c: In mono_message_init, set "copy out" flag for in
11194         parameters with the [Out] flag.
11195
11196 2005-06-21  Martin Baulig  <martin@ximian.com>
11197
11198         * class.c
11199         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
11200         and MONO_TYPE_PTR.
11201
11202 2005-06-21  Martin Baulig  <martin@ximian.com>
11203
11204         * class.c (mono_class_init): Don't initialize `class->fields' for
11205         generic instances since they're initialized again in
11206         compute_field_layout(). 
11207         (compute_field_layout): Set the field's `generic_info' here; fix
11208         #75320. 
11209
11210 2005-06-21  Martin Baulig  <martin@ximian.com>
11211
11212         * class-internals.h
11213         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
11214
11215         * metadata.c (mono_metadata_generic_method_equal): Also
11216         distinguish the `generic_class'; fixes #75334.
11217
11218 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11219
11220         * domain.c:
11221         * appdomain.c:
11222         * domain-internals.h:
11223         * reflection.c: 'domain_assemblies' field is now protected by its own
11224         lock. Don't call into managed code to run the AssemblyLoad event if we
11225         now there are no registered delegates for it.
11226
11227 2005-06-20  Martin Baulig  <martin@ximian.com>
11228
11229         * class.c (mono_class_is_assignable_from): Use a custom version of
11230         mono_class_has_parent() to make things work for generic instances;
11231         fix #75300.
11232
11233 2005-06-20  Martin Baulig  <martin@ximian.com>
11234
11235         * loader.c (method_from_methodspec): Apply a patch from
11236         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
11237
11238 2005-06-20  Martin Baulig  <martin@ximian.com>
11239
11240         * class.c (mono_class_init): Reverted Zoltan's last change; it
11241         breaks generics.
11242
11243 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
11244
11245         * threads.c (wait_for_tids_or_state_change): Add missing locking.
11246
11247 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11248
11249         * socket-io.c: fix the index in the socket array for writable/error
11250         sockets. Fixes bug #75306.
11251
11252 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11253
11254         * class.c (mono_class_init): Allow interfaces to have static ctors.
11255
11256 2005-06-17  Martin Baulig  <martin@ximian.com>
11257
11258         * loader.c (method_from_methodspec): Use `context->container' when
11259         parsing the `gmethod->inst'.
11260
11261 2005-06-17  Martin Baulig  <martin@ximian.com>
11262
11263         * class.c (mono_type_get_name_recurse): Don't add the assembly
11264         name for type arguments.
11265
11266 2005-06-15  Martin Baulig  <martin@ximian.com>
11267
11268         * reflection.c (mono_image_get_inflated_method_token): Encode
11269         correct klass; fixes #75260.
11270
11271 2005-06-13 Michal Moskal <malekith@nemerle.org>
11272
11273         * icall.c: Make GetCorrespondingMethod/Constructor take
11274         MonoReflectionMethod method not MonoMethod. Removed
11275         MonoType.GetCorrespondingField, and make
11276         MonoGenericType.GetCorrespondingField take name not
11277         MonoClassField.
11278
11279 2005-06-13  Michal Moskal <malekith@nemerle.org>
11280
11281         * reflection.c (field_encode_signature, encode_locals):
11282          Make sizes of buffers for types larger (for big generic types).
11283          (create_generic_typespec,
11284          mono_reflection_sighelper_get_signature_local,
11285          mono_reflection_sighelper_get_signature_field):
11286          Add asserts for too small buffers.
11287
11288 2005-06-15  Martin Baulig  <martin@ximian.com>
11289
11290         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
11291         if our parent is not a dynamic type.
11292
11293 2005-06-15  Martin Baulig  <martin@ximian.com>
11294
11295         * class-internals.h (MonoTypeNameFormat): New enum.
11296
11297         * class.c
11298         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
11299         (mono_type_get_full_name): Removed.
11300         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
11301         argument instead of the boolean's.
11302
11303         * icall.c (ves_icall_System_MonoType_getFullName):
11304         Added `gboolean assembly_qualified'.    
11305
11306         * reflection.h
11307         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
11308
11309         * reflection.c (mono_reflection_parse_type): Parse the new type
11310         name format.
11311
11312 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11313
11314         * icall.c: no need to convert from utf16 to utf8 and then back again
11315         after the call to GetLogicalDrives.
11316
11317 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11318
11319         * icall.c: frombase64. Fix problems exposed by new tests.
11320
11321 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11322
11323         * icall.c: added internal calls for converting char [] and strings in
11324         base64 into byte [].
11325
11326 2005-06-10  Martin Baulig  <martin@ximian.com>
11327
11328         * class.c (mono_class_create_generic_2): Read the nested classes
11329         from the metadata rather than from `gklass->nested_classes' since
11330         `gklass' might not be initialized yet.
11331
11332 2005-06-09  Duncan Mak  <duncan@novell.com>
11333
11334         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
11335         all public headers. Fixes #74919.
11336
11337 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
11338
11339         * domain.c: The key for proxy_vtable_hash is now a pointer
11340         array. Added new GHashFunc and GCompareFunc functions for this.
11341
11342         * class.h: The list of interfaces in MonoRemoteClass is known in
11343         advance and can't grow (we create a new MonoRemoteClass if needed),
11344         so now the interface array can be allocated together with
11345         MonoRemoteClass.
11346         
11347         * object.c: Added a new method create_remote_class_key.
11348         Fixed mono_remote_class so it does not depend on
11349         mono_upgrade_remote_class.
11350         Removed extend_interface_array.
11351         Added new method clone_remote_class(), which makes a copy of a remote
11352         class and adds a new interface or class to it.
11353         mono_upgrade_remote_class() now creates a new remote class (or gets
11354         it from the cache) if an vtable upgrade is needed. In this way
11355         we make sure that other objects sharing the same remote class
11356         don't get the new vtable with unwanted interfaces.
11357         
11358         * object-internals.h:
11359         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
11360         
11361         * marshal.c: Track changes in mono_upgrade_remote_class().
11362
11363 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
11364         * icall.c: Add runtime methods for obtaining members of inflated
11365         class, which were created from supplied non-inflated members. It
11366         is used in internal Get{Method,Constructor,Field} methods in
11367         System.Type
11368
11369 2005-06-09  Martin Baulig  <martin@ximian.com>
11370
11371         * reflection.c
11372         (mono_reflection_bind_generic_method_parameters): Fix #75169.
11373
11374 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
11375         * reflection.c (mono_image_basic_init): Define
11376         Version in MonoDynamicAssembly. 
11377         
11378 2005-06-08  Martin Baulig  <martin@ximian.com>
11379
11380         Fix #75136.
11381
11382         * loader.c
11383         (mono_method_signature_full): New public method; takes a
11384         `MonoGenericContext *'.
11385         (find_method): Use mono_method_signature_full() and pass the
11386         klass'es context to it.
11387
11388         * class.c (mono_class_is_inflated_method): Use
11389         mono_method_signature_full() and pass the context to it.
11390
11391 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
11392
11393         * object.c: add proper locking in mono_remote_class_vtable(),
11394         fixes possible memory corruption.
11395
11396 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
11397
11398         * marshal.c (mono_remoting_marshal_init): set
11399         initialized after initialization.
11400
11401 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
11402
11403         * locales.c : hush.
11404
11405 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
11406
11407         * object.c (extend_interface_array): fix really silly
11408         memory corrupting / comparison bug.
11409
11410 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
11411
11412         * reflection.c: Functions added to support the creation
11413         of CustomAttributeData, which includes Attribute data
11414         used by ReflectionOnly methods.
11415
11416         * reflection.h:  mono_reflection_get_custom_attrs_data and
11417          mono_custom_attrs_data_construct added (functions exposed).
11418
11419          * icall.c: Added mono_reflection_get_custom_attrs_data
11420          as icall.
11421         
11422 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11423
11424         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
11425         lupus's request.
11426
11427 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
11428
11429         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
11430
11431         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
11432         dynamic DllImportAttribute.
11433
11434         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
11435         dynamic DllImportAttribute.
11436
11437         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
11438         Fixes #75162.
11439
11440 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11441
11442         * threads.c: avoid segfault when an unstarted thread is aborted.
11443
11444 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
11445
11446         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
11447         Returns the name and version of the runtime for reporting.
11448
11449 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11450
11451         * appdomain.c: bump corlib version.
11452         * object-internals.h: new field in MonoReflectionAssembly.
11453
11454 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11455
11456         * object-internals.h: Carlos forgot to add this field.
11457
11458 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
11459
11460         * icall.c: Added create_version to create instances
11461         of Version of MonoReflectionAssemblyName. This change helps
11462         the AssemblyName tests to keep running fine.
11463         
11464 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
11465   
11466         * object.c (mono_method_return_message_restore): A somehow less
11467         intrusive fix for #75138.
11468
11469 2005-06-03  Raja R Harinath  <rharinath@novell.com>
11470
11471         * object.c (mono_method_return_message_restore): Fix computation
11472         of expected number of out args.
11473
11474 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
11475
11476         * reflection.c (mono_image_get_method_info): Fix the case when the
11477         charset is empty.
11478
11479 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
11480
11481         * object.c: Added missing null check in
11482           mono_method_return_message_restore.
11483
11484 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * reflection.c (mono_image_get_method_info): Handle the case when
11487         dllentry is empty.
11488
11489 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
11490
11491         * object.c: When creating the vtable for a proxy, take into account
11492         all inherited interfaces, not only the ones registered in
11493         iclass->interfaces. This fixs bug #74996.
11494         Also, in mono_method_return_message_restore, verify that the array
11495         of out args has the expected lengh.
11496
11497 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11498
11499         * socket-io.c: update the timeout in Poll when the call is interrupte.
11500
11501 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11502
11503         * socket-io.c: support abort/suspend in Select_internal after last
11504         change.
11505
11506 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11507
11508         * threadpool.c: remove warning.
11509
11510 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11511
11512         * icall.c:
11513         * socket-io.[ch]: Select_internal uses poll() now when available, thus
11514         removing the 1024 limit from select(). Runtime part of the fix for
11515         bug #71203.
11516
11517 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11518
11519         * socket-io.c: when resolving the addresses for the same
11520         host returned by gethostname(), get the local IPs from the interface
11521         list. Loopback addresses are discarded if the are interfaces up with
11522         non-loopback ones. Fixes bug #63265.
11523
11524 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
11525
11526         * appdomain.c, verify.c, object-internals.h, reflection.c:
11527         bumped corlib number to 36, and added new extra_flags field
11528         to ReflectionMethodBuilder and friends.  Fixes #75060.
11529
11530 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
11531
11532         * gc.c: register a new weak link only if the object is non-null
11533         (fixes bug#75047).
11534
11535 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
11536
11537         * culture-info.h : short time pattern too.
11538
11539 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
11540
11541         * culture-info.h : expand long time pattern string length.
11542
11543 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
11544
11545         * culture-info-table.h : update (more French date format; #72788).
11546
11547 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
11548
11549         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
11550         the method is static. Fixes #75029.
11551
11552 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
11553
11554         * reflection.c: Update the table_idx field of method builders after
11555         saving the module, since it can change. This is a workaround for
11556         bug #74914. 
11557
11558 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
11559
11560         * culture-info-table.h : update (additional French date format).
11561
11562 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11563
11564         * icall.c (ves_icall_type_Equals): Revert last change.
11565         
11566         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
11567
11568         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
11569
11570 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
11571
11572         * class-internals.h: Added executioncontext_class field to 
11573         MonoDefaults structure.
11574         * domain.c: Cache System.Threading.ExecutionContext class in 
11575         mono_defaults.
11576         * object.c: Capture the ExecutionContext for asynchroneous calls in
11577          mono_async_result_new.
11578         * object-internals.h: Added execution_context and original_context 
11579         fields to MonoAsyncResult. Added execution_context to MonoThread.
11580         * security-manager.c|.h: Added mono_get_context_capture_method to 
11581         return the capture method (if required by the security manager or by
11582         the framework version used).
11583         * threadpool.c: Apply capture (if present) ExecutionContext in 
11584         mono_async_invoke and revert to original context after it completes.
11585
11586 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
11587
11588         * culture-info-table.h : updated (real hacky solution for zh-CHT).
11589
11590 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
11591
11592         * culture-info-table.h : zh-CHT related workaround.
11593
11594 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
11595
11596         * marshal.c (emit_marshal_custom): Add some error checking and call the
11597         methods in the ICustomMarshaler interface. Fixes #74875.
11598         
11599         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
11600         native->managed wrappers.
11601
11602 2005-05-12  Martin Baulig  <martin@ximian.com>
11603
11604         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
11605         here and use the loader lock.
11606
11607         * mono-debug.c: Properly lock when the debugger is not attached.
11608         (mono_debug_init): Release the initial lock if we're not running
11609         in the debugger.
11610
11611 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
11612
11613         * marshal.c (emit_marshal_custom): Pass through NULL values without
11614         calling the custom marshalling routines.
11615
11616         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
11617         conversion in structures. Fixes #74882.
11618
11619 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
11620
11621         * culture-info-table.h : zh-* cultures were missing.
11622
11623 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
11624
11625         * threads.c: Added a new event background_change_event which is signaled
11626         when a thread changes its background mode.
11627         Moved here several checks previously done in managed code. The checks
11628         require the thread lock, and using the thread lock in managed code
11629         can result in deadlocks.
11630         Merged Start_internal and Thread_internal into a single method. Now 
11631         Thread_internal does all work of creating and starting a thread.
11632         Added icalls for setting and getting the state of the object. Moved from
11633         managed code to avoid locking there.
11634         Added wait_for_tids_or_state_change() which is called instad of
11635         wait_for_tids when waiting for non-backround threads to end. This method
11636         will return if one of the threads ends or the background_change_event
11637         is signaled.
11638         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
11639         the background mode. This method signals the background_change_event
11640         event.
11641         * icall.c:
11642         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
11643         removed Start_internal.
11644         
11645 2005-05-11  Martin Baulig  <martin@ximian.com>
11646
11647         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
11648         to order of some fields to get proper alignment on 64-bit machines.
11649
11650 2005-05-11  Martin Baulig  <martin@ximian.com>
11651
11652         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
11653         changes as they're broken and completely fuck up the debugger.
11654
11655         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
11656
11657 2005-05-10  Martin Baulig  <martin@ximian.com>
11658
11659         * reflection.c (mono_reflection_generic_class_initialize): Don't
11660         call mono_class_setup_parent() here.
11661
11662 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11663
11664         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
11665         send/receive timeout use an integer in milliseconds. We were using a
11666         struct timeval.
11667
11668 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11669
11670         * locales.c:
11671         (internal_get_cultures): reserve the first slot of the array for the
11672         InvariantCulture, which will be filled in managed code.
11673
11674 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
11675
11676         * reflection.c (mono_image_fill_module_table): Initialize the
11677         GENERATION field as well.
11678
11679 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11680
11681         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
11682         Monitor.Enter on the object.
11683
11684 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11685
11686         * threads.c: Enable the wait for running threads when exiting.
11687         * icall.c: Suspend all threads before exiting.
11688
11689 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11690
11691         * assembly.c (mono_assembly_load_reference): Fix warning.
11692
11693 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11694
11695         * threadpool.c: changed the default number of threads per cpu. From now
11696         on, the default will be 20 + (5 * number of cpus) instead of 50.
11697
11698 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
11699
11700         * loader.c (mono_method_get_signature_full): Add locking here.
11701
11702 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
11703
11704         * appdomain.c: Moved methods for parsing and freeing assembly
11705         names to assembly.c.
11706         * assembly.c, domain-internals.h: Created public methods for parsing
11707         assembly names. Fixed mono_assembly_load_with_partial_name:
11708         it now finds the best match, taking into account the version,
11709         token and culture specified in the partial name. Also return
11710         the latest version if no version information is specified.
11711
11712 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
11713
11714         * threadpool.c: replace check for SocketAsyncCall class.
11715
11716 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11717
11718         * threadpool-internals.h:
11719         * Makefile.am: added threadpool-internals.h
11720
11721         * threadpool.c: call mono_unhandled_exception on exceptions not handled
11722         that happen in threadpool threads (tested on MS).
11723         (mono_thread_pool_remove_socket): new function that dispatch any pending
11724         AIO call on a socket that is closing. By now only epoll really needs it,
11725         as select/poll wake up when the socket closes.
11726
11727
11728         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
11729
11730 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
11731
11732         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
11733
11734 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
11735
11736         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
11737
11738 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
11739
11740         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
11741         has an abort request, convert it into a suspend request.
11742
11743 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
11744
11745         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
11746         warning for the usage of `UnmanagedFunctionPointerAttribute' which
11747         is not supported yet.
11748
11749 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11750
11751         * image.c: register assemblies loaded from data (bundles) in the loaded
11752         assemblies hash. Fixes bug #74772.
11753
11754 2005-04-29  Martin Baulig  <martin@ximian.com>
11755
11756         * class.c (mono_type_get_name_recurse): Update to the new naming
11757         schema from the latest .NET 2.x beta2.
11758         (mono_class_setup_vtable_general): If we're a generic instance,
11759         copy the vtable from our generic type definition and inflate all
11760         the methods in it.
11761
11762         * loader.c (find_method): Update to the new naming schema from the
11763         latest .NET 2.x beta2.
11764
11765 2005-04-29  Raja R Harinath  <harinath@gmail.com>
11766
11767         * class.c (mono_class_init): Add a mono_loader_unlock to the
11768         #74734 fix.
11769
11770 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11771
11772         * icall.c (ves_icall_System_Environment_Exit): Remove the 
11773         suspend_all_other_threads () call for the time being, since it can hang.
11774
11775         * threads.c (mono_thread_manage): Similarly, disable the waiting for
11776         the background threads to exit, since it can also hang.
11777
11778         * class.c (mono_class_init): Applied patch from Ankit Jain 
11779         (radical@gmail.com). Avoid pending init errors when a field refers
11780         to a nested class using a typeref. Fixes #74734.
11781
11782         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
11783         this for dynamic modules.
11784
11785 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11786
11787         * threads.c: don't wait for threads that are in the process of aborting
11788         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
11789         and waiting for background threads to finish. This makes xsp and
11790         mod-mono-server exit without random length delays and/or hangs.
11791
11792 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11793
11794         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
11795
11796 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
11799         dynamic types to prevent infinite loops. Fixes #74727.
11800
11801         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
11802         ..._is_assignable_to.
11803
11804 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
11805
11806         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
11807
11808 2005-04-25  Martin Baulig  <martin@ximian.com>
11809
11810         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
11811
11812         * domain.c
11813         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
11814
11815         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
11816
11817         * reflection.c (build_compressed_metadata): Set metadata header
11818         version to 2.0.
11819
11820 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11821
11822         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
11823         number into an integral and a decimal part. Fixes #70473.
11824
11825         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
11826
11827 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
11828
11829         * culture-info-table.h : reflected the latest locale-builder output.
11830
11831 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11832
11833         * threadpool.c: check for SuspendRequested too when deciding if
11834         mono_thread_interruption_checkpoint should be called.
11835
11836 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11837
11838         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
11839         * threads.c: remove interruption_mutex and use Interlocked instead. When
11840         suspending all the threads, wait for all the suspended events at once.
11841         If we're shutting down and get an APC that is going to be queued,
11842         call mono_thread_execute_interruption immediately, as the thread might
11843         be sleeping on a pthread condition or mutex.
11844
11845         * icall.c: call mono_runtime_set_shutting_down before suspending the
11846         threads.
11847
11848         Fixes bug #74693. And now xsp is happier when exiting.
11849
11850 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11851
11852         * loader.c (mono_stack_walk): Fix #74690.
11853
11854 2005-04-22  Martin Baulig  <martin@ximian.com>
11855
11856         * mono-debug.h (MonoDebugMethodJitInfo): Added
11857         `MonoDebugMethodJitInfo *jit'.
11858
11859         * mono-debug.c (mono_debug_read_method): Cache the
11860         MonoDebugMethodJitInfo in `address->jit'.
11861         (mono_debug_free_method_jit_info): New public method.
11862
11863 2005-04-22  Martin Baulig  <martin@ximian.com>
11864
11865         * class.c (mono_class_is_assignable_from): Disallow
11866         type parameter -> interface.
11867
11868 2005-04-21  Dick Porter  <dick@ximian.com>
11869
11870         * threads.c (mono_thread_create): Turn an assertion into an error.
11871
11872 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11873
11874         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
11875         
11876         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
11877         Fix some gcc 4.0 warnings.
11878
11879 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
11880
11881         * file-io.c: fix alt dir separator char on unix systems
11882         and cleanup (fixes bug #71214).
11883
11884 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
11885
11886         * marshal.c: Use CALLVIRT instead of CALL when dispatching
11887         a call to a remote domain, since the method may be an
11888         interface method in the client domain. This fixes bug #74192.
11889
11890 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11891
11892         * threadpool.c: recv/send are now performed before going back to managed
11893         code to save one transition.
11894
11895 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11896
11897         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
11898
11899         * metadata/threadpool.c: removed hack to workaround the bug above.
11900
11901         Fixes bug #74618.
11902
11903 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11904
11905         * reflection.c reflection.h: Fix handling of parameter defaults in
11906         dynamic methods. Also fixes handling of parameter attributes.
11907         Fixes #74609.
11908
11909         * mono-debug.c (mono_debug_close_image): Fix warning.
11910
11911 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11912
11913         * socket-io.h: replaced old unused field with new 'blocking'.
11914         * threadpool.c: restore socket blocking state on windows(tm).
11915
11916 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
11917
11918         * icall.c: don't return the codebase in the AssemblyName[] returned by
11919         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
11920         * object-internals.h: Removed FIXME (fields were presents) and fixed
11921         versioncompat declaration.
11922
11923 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11924
11925         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
11926         not closed, so don't cleanup when it happens.
11927
11928 2005-04-13  Chris Toshok  <toshok@ximian.com>
11929
11930         * mono-debug-debugger.h: change prototype for
11931         mono_debugger_lookup_type.
11932
11933         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
11934         this function, although it should probably be named
11935         mono_debugger_init_type.
11936
11937 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11938
11939         * threadpool.c: fix non-AIO case.
11940
11941 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11942
11943         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
11944         the built-in profiler to measure just JIT compilation times.
11945
11946 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11947
11948         * threadpool.c: the epollfd might be closed by another thread at
11949         any time, so ignore EBADF at treat it as a "we're closing" sign.
11950
11951 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11952
11953         * threadpool.c: release the semaphores with a count equals to the number
11954         of working threads in both IO and regular pools. Fixed typo that messed
11955         up the count of IO pool threads. Don't initialize the pipe handles if
11956         we're using epoll.
11957
11958 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11959
11960         * threadpool.c: some systems don't like a NULL when deleting the socket
11961         from epoll.
11962
11963 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11964
11965         * threadpool.c: fix semaphore allocation.
11966
11967 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11968
11969         * threadpool.c: added epoll() based implementation for asynchronous IO
11970         that is used instead of the default poll() when available.
11971         It can be disabled by setting MONO_DISABLE_AIO.
11972
11973 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11974
11975         * threadpool.c: windows needs 'closesocket' and instead of returning
11976         0 when the stream is closed while in select, it returns -1. Fixes bug
11977         #74573.
11978
11979 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
11980
11981         * class.c (class_compute_field_layout): Fix the regression caused by
11982         the previous try.
11983
11984 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11985
11986         * threadpool.c: separate pool for socket async. IO.
11987         * threadpool.h: mono_max_worker_threads is not a global any more.
11988
11989 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11990
11991         * class.c (class_compute_field_layout): Fix #74549.
11992
11993 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11994
11995         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
11996         use 2 connected sockets instead.
11997
11998 2005-04-08  Miguel de Icaza  <miguel@novell.com>
11999
12000         * mono-config.c: Add new entry point for mkbundle
12001         mono_config_parse_memory. 
12002
12003 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12004
12005         * threadpool.c: removed another unused function.
12006
12007 2005-04-08  Ankit Jain  <radical@corewars.org>
12008
12009         * reflection.c (get_default_param_value_blobs): Add 'types'
12010         parameter to get the types encoded in the constant table.
12011         (mono_param_get_objects): Use the type from the constant table,
12012         not the type of the parameter, when creating default values.
12013         Handle null default values correctly.
12014
12015 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12016
12017         * file-io.c:
12018         * file-io.h:
12019         * threadpool.c:
12020         * threadpool.h:
12021         * icall.c:
12022         * socket-io.c: removed dead code for async IO.
12023
12024 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12025
12026         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
12027
12028         * threadpool.c: intercept socket async. calls and pass them to a thread
12029         that is polling and dispatching the job items to the threadpool as
12030         socket become ready. Fixes bugs #71217, #71933.
12031
12032         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
12033         between char and short/ushort arrays.
12034
12035         * socket-io.c: remove dead code.
12036
12037 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
12038
12039         * locales.c,
12040           icall.c : removed InternalToUpper_Comp() and
12041           InternalToLower_Comp().
12042
12043 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
12044
12045         * char-conversions.h : The tables were incorrectly generated. Should
12046           be generated against invariant culture.
12047
12048 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
12049
12050         * object.c (mono_runtime_invoke_array): Fix return value when 
12051         passing pre-created valuetype objects to ctors.
12052
12053         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
12054         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
12055         Fixes #74338.
12056
12057 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
12058
12059         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
12060         only used with --security and hides the wrong corlib version error.
12061
12062 2005-03-30  Joshua Tauberer  <tauberer@for.net>
12063
12064         * class.c: Changed mono_class_name_from_token so that types
12065         outside of a namespace don't have an initial period.  Improved
12066         the g_warning message used in _mono_class_get when loading
12067         fails.
12068         * assembly.c: In mono_assembly_load_reference, when an assembly
12069         can't be found, "No such file or directory" is misleading and
12070         unhelpful because a few paths were checked for the presence of
12071         the assembly.  When that happens (ENOENT), display a nicer
12072         message indicating the directories that were searched.  In all
12073         cases, the warning is made easier to read for non-hackers.
12074
12075 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
12076
12077         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
12078         project/solution.
12079         * appdomain.h|domain.c: Removed inline from functions.
12080         * appdomain.c: Reduced warnings when compiling on windows.
12081         * icall.c: Fixed output_debug declaration to gunichar2*.
12082         * mono-config.c: Reduced warnings when compiling on windows.
12083         * rand.c: Added missing "windows.h". Added missing return value.
12084         * rawbuffer.c: Added missing winsock2.h for windows.
12085         * sysmath.h: Added mono-compiler.h header to allow/ease 
12086         compilation with non-GCC compilers.
12087         * threads.c: Fixed declarations to compile with VS.NET C compiler.
12088         Removed cast warnings.
12089
12090         Adapted from the work of J Lothian (for VC6).
12091
12092 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
12093
12094         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
12095         from default_path.
12096
12097 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
12098
12099         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
12100         the 2.0 profile.
12101
12102 2005-03-27  Raja R Harinath  <harinath@gmail.com>
12103
12104         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
12105         has to be in $(exec_prefix).  $(prefix) is for arch-independent
12106         stuff, and it would probably use $(prefix)/share rather than
12107         $(prefix)/lib.
12108
12109 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12110
12111         * console-io.c: added 2 includes that might be missing.
12112
12113 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
12114
12115         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
12116         profile.
12117
12118         * reflection.c (create_custom_attr): Allocate the params array using
12119         alloca so it gets GC tracking.
12120
12121 2005-03-23  Chris Toshok  <toshok@ximian.com>
12122
12123         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
12124         out some spew.
12125
12126 2005-03-24  Raja R Harinath  <rharinath@novell.com>
12127
12128         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
12129         changes to pick up any changes in prefix, etc.
12130
12131 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
12132
12133         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
12134         
12135         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
12136         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
12137
12138 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
12139
12140         * class-internals.h object-internals.h class.c reflection.c: Extend the
12141         mono_lookup_dynamic_token () function to return the class of the
12142         token as well. 
12143
12144         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
12145         well. Fixes #73848.
12146
12147 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
12148
12149         * security-manager.c: Skip inheritance checks for intra-corlib
12150         class inheritance and method overrides. This skips a lot of checks
12151         and (anyway) permissions cannot work until corlib is loaded.
12152
12153 2005-03-23  Martin Baulig  <martin@ximian.com>
12154
12155         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
12156         MONO_TYPE_GENERICINST.  
12157
12158 2005-03-23  Martin Baulig  <martin@ximian.com>
12159
12160         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
12161
12162 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12163
12164         * class.c: added locking comments to some functions.
12165         Cache the interface offsets arrays (saves about 20 KB
12166         of runtime memory in a typical app).
12167         Reduce the time overhead in mono_class_setup_supertypes ().
12168
12169 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
12170
12171         * icall.c: speedup and fix leaks in GetMethodsByName and
12172         GetPropertiesByName.
12173
12174 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
12175
12176         * reflection.c: some locking fixes.
12177
12178 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
12179
12180         * metadata.c: added missing break in case statement.
12181
12182 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
12183
12184         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
12185         typedbyref return values. Fixes #73941.
12186
12187 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
12188
12189         * security-manager.c|h: Added demandunmanaged method and 
12190         suppressunmanagedcodesecurity class to MonoSecurityManager.
12191         Renamed aptc class to allowpartiallytrustedcallers.
12192
12193 2005-03-17  Martin Baulig  <martin@ximian.com>
12194
12195         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
12196
12197 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12198
12199         * file-io.c: disabled file async. IO using aio_*. It uses the
12200         threadpool now. Workaround for bug #73718.
12201
12202 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12203
12204         * assembly.h, mono-config.c: added code to deal with bundled configs
12205         for bundled assemblies.
12206
12207 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
12208
12209         * *.c, private.h: cleanup, removing old private.h header file.
12210
12211 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
12212
12213         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
12214         and throw_on_unmappable_char attributes.
12215
12216 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
12217
12218         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
12219         _ProcessName_internal.
12220
12221 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
12222
12223         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
12224         #73631.
12225
12226         * icall.c threads.c threads-types.h: Remove slothash icalls as they
12227         are no longer used.
12228
12229 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
12230
12231         * object.c (compute_class_bitmap): Add support for generics. Fixes
12232         #73527.
12233
12234 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
12235
12236         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
12237
12238 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12239
12240         * filewatcher.c: commented out the code for windows watcher, as we don't
12241         use it (we use the managed implementation instead).
12242
12243 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
12244
12245         * object-internals.h (MonoThread): Remove 'unused1' field.
12246
12247         * appdomain.c: Bump corlib version.
12248
12249         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
12250
12251         * reflection.c (mono_reflection_create_runtime_class): Remove the
12252         AssemblyBuilder.Save optimization since it causes too many problems.
12253
12254 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
12255
12256         * exception.c|h: Added mono_get_exception_reflection_type_load to
12257         create a ReflectionTypeLoadException object.
12258         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
12259         to return NULL is a InheritanceDemand fails during reflection. Updated
12260         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
12261         ReflectionTypeLoadException if an InheritanceDemand fails during 
12262         reflection. Added icall mapping for GetLinkDemandSecurity.
12263         * security-manager.c|h: Added ves_icall_System_Security_
12264         SecurityManager_GetLinkDemandSecurity internal call to return the
12265         class and methods permissions set for a LinkDemand. Removed unused
12266         fields in MonoSecurityManager.
12267
12268 2005-03-10  Martin Baulig  <martin@ximian.com>
12269
12270         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
12271         it's a generic instance.
12272
12273 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
12274
12275         * reflection.c (mono_get_object_from_blob): Applied patch from
12276         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
12277
12278         * class.c (mono_class_is_assignable_from): Another try at fixing 
12279         #73469 without breaking anything.
12280
12281 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
12282
12283         * class.c: (mono_class_is_assignable_from): Revert the last changes
12284         since they don't work with generics.
12285         
12286         * class.c (mono_class_is_assignable_from): Fix build bustage.
12287
12288         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
12289         the managed IsAssignableFrom method. Fixes #73469.
12290
12291         * reflection.c (mono_reflection_call_is_assignable_from): New helper
12292         function.
12293
12294 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
12295
12296         * object.c (mono_load_remote_field_new): Fix returning uninitialized
12297         memory when the remoting callback does not sets the out arguments.
12298         Fixes #73007.
12299
12300         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
12301         by mistake.
12302
12303         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
12304
12305         * object-internals.h (MonoStackFrame): Sync with managed object layout.
12306
12307         * appdomain.c: Bump corlib version.
12308
12309 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
12310
12311         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
12312         function.
12313
12314         * threads.c (mono_thread_attach): Detect threads which are not started
12315         by the GC pthread wrappers.
12316
12317 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
12318
12319         * icall.c: Added new icall for RNG.
12320         * rand.c|h: Added new icall to open the RNG. This allows to share a 
12321         single handle on Linux to access /dev/urandom and fix #73183.
12322
12323 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
12324
12325         * object.c: setting the new vtable in a transparent proxy object must
12326         not change the GC descriptor.
12327
12328 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12329
12330         * object.c: fixed compilation without GCJ support.
12331         * reflection.c: for runtime-created types ensure klass->has_references
12332         is correct (bug #73215).
12333
12334 2005-03-02  Martin Baulig  <martin@ximian.com>
12335
12336         * class.c (mono_class_is_assignable_from): Make this work if
12337         `oklass' is a generic instance; fixes #72831.
12338
12339 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
12340
12341         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
12342         with hasthis set.
12343         
12344         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
12345
12346         * marshal.c: Reorganize native->managed marshalling code to also use
12347         the emit_marshal_... functions.
12348
12349 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
12350
12351         * object.c: typed allocs have issues with bitmap sizes > 30,
12352         so check for max_set >= 30.
12353
12354 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
12355
12356         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
12357         managed code. Fixes #73012.
12358
12359         * metadata.h (MonoMarshalSpec): Add elem_mult field.
12360
12361         * metadata.c reflection.c: Load/Emit elem_mult as well.
12362         
12363         * metadata.h (MonoMarshalSpec): Add comment.
12364
12365         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
12366
12367         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
12368         num_elem to -1 if not given.
12369
12370         * object-internals.h (MonoReflectionMarshal): Add has_size field.
12371
12372         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
12373         given values.
12374
12375 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
12376
12377         * null-gc.c (mono_gc_free_fixed): Was not compilable.
12378
12379 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
12380
12381         * reflection.c (encode_marshal_blob): Encode param_num field as well.
12382
12383         * object-internals.h (MonoReflectionMarshal): Add param_num field.
12384
12385 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
12386
12387         * object.c: generalized the reference bitmap creation
12388         and added hooks for the new GC.
12389         * class-internals.c: removed the gc_bitmap field from MonoClass.
12390
12391 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12392
12393         * domain.c: help the compiler to produce better code
12394         in mono_jit_info_table_find ().
12395
12396 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
12397
12398         * object.c: make all allocations look typed.
12399
12400 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12401
12402         * socket-io.c: load Mono.Posix if it's not loaded already
12403         (fixes bug#73033).
12404
12405 2005-02-24  Martin Baulig  <martin@ximian.com>
12406
12407         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
12408         * reflection.c (dup_type): Likewise.
12409
12410 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
12411
12412         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
12413         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
12414
12415 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12416
12417         * domain.c, threads.c, object-internals.h: make the critical thread
12418         local vars use the fast access mode (even when we're compiled in
12419         a lib). Provide accessors to be used by the jit during codegen.
12420
12421 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12422
12423         * appdomain.c: Changed hook functios behavior to include
12424         support for the reflection only assemblies. Some icalls were changed
12425         to support the mentioned assemblies too. Signatures of static methods
12426         try_assembly_resolve and real_load now have an additional parameter:
12427         refonly.
12428
12429         * assembly.c: General changes to mono_assembly_ methods to support
12430         reflection only api. Functions mono_assembly_open, mono_assembly_load,
12431         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
12432         suffix, to support an additional gbool parameter to specify whether
12433         the assembli is reflection only or not. Created some new hook functions 
12434         to add support for reflection only assemblies. Signatures of static 
12435         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
12436         have now an additional parameter: refonly.
12437
12438         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
12439         indicating whether the assembly is reflection only or not.
12440
12441         * exception.c: Add mono_get_exception_invalid_operation.
12442
12443         * icall.c: Throw an InvalidOperationException when trying to invoke
12444         a property/method/event, or trying to set/get the value of a field.
12445         Also add an icall to retrieve the ref_only flag to the
12446         MonoReflectionAssembly.
12447
12448 2005-02-23  Chris Toshok  <toshok@ximian.com>
12449
12450         Part of fix for #72827.
12451         * mono-debug.c (mono_debug_add_method): add lexical block data to
12452         the info we write.  Kind of a hack at the moment - we copy the
12453         lexical block info from the MonoDebugMethodInfo to the
12454         MonoDebugMethodJitInfo here, before writing it.
12455         (mono_debug_read_method): read the lexical block info.
12456
12457         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
12458
12459         * debug-mono-symfile.h: add lexical block support.
12460
12461         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
12462         support.
12463
12464 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
12465
12466         * loader.c (mono_lookup_pinvoke_call): Fix warning.
12467
12468         * object.c (mono_runtime_free_method): Call mono_free_method () and
12469         put the TODOs there.
12470
12471         * loader.c (mono_free_method): Free up most memory allocated for 
12472         dynamic methods.
12473
12474 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12475
12476         * reflection.c: properly flag a Type argument to a
12477         named custom attr value (bug #72248).
12478
12479 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12480
12481         * reflection.c: reduce code duplication in named custom
12482         attribute encoding.
12483
12484 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
12485
12486         * reflection.c: properly encode custom attrs of type object
12487         (bug #72649).
12488
12489 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
12490
12491         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
12492
12493 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
12494
12495         * socket-io.c: load System.dll if it's not loaded already
12496         (bug #72850 and #70477).
12497
12498 2005-02-21  Martin Baulig  <martin@ximian.com>
12499
12500         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
12501         generic instances.
12502
12503 2005-02-21  Martin Baulig  <martin@ximian.com>
12504
12505         * reflection.c (mono_image_build_metadata): We also need to
12506         "fixup" the MethodImpl table after we computed the final method
12507         indices.  Call fixup_methodimpl() to do that.
12508         (fixup_methodimpl): New private method.
12509
12510 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
12511
12512         * assembly.c: special case mscorlib.dll (bug#72536),
12513         patch from Carlos Alberto Cortez.
12514
12515 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
12516
12517         * threads-types.h threads.c: Fix build bustage.
12518
12519         * threads.c: Use a union for long<->double conversions.
12520
12521         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
12522         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
12523
12524         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
12525         containing the checkpoint call with NOT_TAKEN.
12526         
12527         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
12528         checkpoint before pushing the arguments, so they won't have to be
12529         spilled to stack.
12530
12531 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12532
12533         * domain.c, assembly.c, domain-internals.h: make some data
12534         const and relocation-free.
12535
12536 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12537
12538         * object.c, appdomain.c, class-internals.h: introduce the
12539         MonoClassRuntimeInfo structure to hold the info needed to
12540         use a class at runtime. Made mono_class_vtable() lock-free
12541         for all the appdomains.
12542
12543 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
12544
12545         * metadata-internals.h, image.c: introduce a per-image mempool to
12546         be used for memory that has the same lifetime as the image.
12547
12548 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
12549
12550         * domain.c: In mono_init_internal(), instead of selecting the first
12551         runtime version supported by an executable, get a list of all
12552         supported versions and select the one for which an mscorlib exists
12553         (since even if the runtime supports a given version, it doesn't mean
12554         that the framework for that version is installed).
12555         Modified get_runtimes_from_exe to support this behavior.
12556         In supported_runtimes, added information about additional system
12557         assembly versions.
12558         
12559         * assembly.c: Added support for more than one system assembly version
12560         per runtime version. Updated the assembly list.
12561         In mono_assembly_remap_version, removed the initial version check,
12562         since we don't know to which version we need to compare until we
12563         get the version set on which the assembly is based.
12564         Moved the code for loading corlib into the new method
12565         mono_assembly_load_corlib(), so it can be used by the initialization
12566         code.
12567         
12568         * domain-internals.h: Updated data structures and added declaration
12569         for mono_assembly_load_corlib.
12570
12571 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
12572
12573         * reflection.c (resolve_object): Fix the creation of the signature in 
12574         the SignatureHelper case.
12575
12576         * assembly.c (mono_assembly_remap_version): Fix binary search.
12577         
12578 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
12579  
12580         * class.c: Added inheritance check when a method is overloaded (from a
12581         virtual method or when implementing an interface) and when a class is
12582         inherited. Added functions to set a failure for a class and to 
12583         retreive the exception from a failure.
12584         * class-internals.h: Added fields to MonoClass to keep the exception
12585         information status for inheritance (or other exceptions) to be thrown
12586         later (i.e. not at load time).
12587         * object.c: Throw the inheritance SecurityException when a type is to 
12588         be created with either class or method inheritance violations.
12589         * reflection.c|h: Fix when getting declsec from a class. Removed 
12590         unrequired code for class. Improved sanity in parameter naming.
12591         * security-manager.c|h: Added functions to check for class and method
12592         inheritance.
12593
12594 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
12595
12596         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
12597         and has_finalize in dynamic types as well.
12598
12599 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
12600
12601         * culture-info-table.h : fixed currency format for en-GB (and so on).
12602
12603 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
12604
12605         * gc.c: ensure the GC handles never have 0 as a value.
12606
12607 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
12608
12609         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
12610         a pointer to a struct to unmanaged code. Fixes #72625.
12611
12612 2005-02-16  Martin Baulig  <martin@ximian.com>
12613
12614         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
12615
12616 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
12617
12618         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
12619
12620 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
12621
12622         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
12623
12624         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
12625         UnmanagedFunctionPointerAttribute, use it for determining calling convention
12626         etc. Fixes #71471.
12627
12628         * reflection.c (mono_custom_attrs_get_attr): New helper function.
12629
12630         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
12631
12632 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
12633
12634         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
12635         changes to make the current context a field in MonoThread.
12636
12637 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
12640         the last change.
12641         
12642         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
12643         extracted from mono_marshal_get_native_wrapper.
12644
12645         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
12646         to create wrappers around native functions.
12647
12648         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
12649         delegates for arbitrary function pointers. Fixes #71472.
12650
12651 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
12652
12653         * threads.c: cleaned up the code a little.
12654
12655 2005-02-15  Martin Baulig  <martin@ximian.com>
12656
12657         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
12658         the data table.
12659
12660         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
12661         allocate larger chunks if needed.
12662
12663 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
12664
12665         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
12666         in by mistake.
12667
12668 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
12669
12670         * domain.c: keep the domains in an array and ensure the domain ids
12671         are kept small, so they can be used as indexes to domain-specific data
12672         with a small memory overhead.
12673
12674 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
12675
12676         * icall.c: Handle byref types in Type icalls. Fixes #72544.
12677
12678 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
12679
12680         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
12681
12682 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
12683
12684         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
12685
12686         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
12687         values.
12688
12689         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
12690         
12691 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
12692
12693         * domain-internals.h: add the hashtable here.
12694
12695         * class-internals.h: Remove `info' from MonoMethod
12696
12697         * domain.c: Add a new hashtable, jit_trampoline_hash
12698
12699 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
12700
12701         * object.c: don't set the value of static fields
12702         (fixes bug#72494).
12703
12704 2005-02-11  Martin Baulig  <martin@ximian.com>
12705
12706         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
12707         (mono_debug_add_method): Silently ignore the method if it's too big.
12708         (mono_debug_add_type): Likewise.
12709
12710 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
12711
12712         * threads.c, appdomain.c: remove #ifdefs from the code.
12713
12714 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
12715
12716         * metadata-internals.h: Added flags to MonoAssembly to cache the most
12717         common security informations. This allows us to stay in unmanaged code
12718         when doing LinkDemand and it's special cases (except for the first 
12719         time for initialization). The flags a very much used with --security.
12720         * reflection.c|h: Added code to get declarative security attributes 
12721         for LinkDemand and InheritanceDemand. This required to refactor the
12722         existing code for Demand.
12723         * security-manager.c|h: Added new method fields for the special cases
12724         of LinkDemand.
12725
12726 2005-02-10  Martin Baulig  <martin@ximian.com>
12727
12728         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
12729         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
12730
12731 2005-02-10  Martin Baulig  <martin@ximian.com>
12732
12733         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
12734         debugging code; this is almost a complete rewrite.
12735
12736         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
12737
12738 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12739
12740         * domain.c, object.h: expose mono_string_equal () and 
12741         mono_string_hash ().
12742         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
12743         it's implemented in managed code.
12744
12745 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12746
12747         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
12748         lo leak objects between appdomains.
12749
12750 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12751
12752         * assembly.c: old compilers compilation fix from 
12753         robertj@gmx.net (Robert Jordan).
12754
12755 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
12756
12757         * class-internals.h: Little reminder for the future.
12758
12759         * debug-helpers.c: Fix up wrapper_type_names
12760
12761 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
12762
12763         * image.c, metadata-internals.h: when loading an image from a file,
12764         mmap all of it and use the same codepaths as when using a
12765         in-memory image: the code is simpler and we use less memory
12766         (both writable and readonly).
12767
12768 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
12769
12770         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
12771         API to alloc runtime data structures that need to be tracked by the
12772         GC and contain pointers.
12773         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
12774         make the code more readable and eventually use a different GC.
12775
12776 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
12777
12778         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
12779         for out arguments.
12780         
12781 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
12782
12783         * object.c: In release_type_locks(), don't release the cctor lock
12784         if it has already been released. This fixes a crash in the
12785         thread5 test.
12786
12787 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12788
12789         * gc.c, marshal.c, icall.c: register a delegate for finalization
12790         only when the native function pointer has been allocated for it.
12791
12792 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
12793
12794         * object.c: cleaned up some code, allocate objects that are
12795         pointer free with the atomic malloc variant. Allocate memory
12796         for static data from the mempool if it's pointer-free.
12797         Allocate the bounds array at the end of the array data, when needed.
12798         * object-internals.h, object.h: move a private function in a private
12799         header.
12800         * class.c: handle missing case in tracking references in fields.
12801
12802 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
12803
12804         * class.c, class-internals.h: keep track if a type has
12805         reference fields in either the instance or static fields.
12806
12807 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
12808
12809         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
12810         and renamed to MonoRuntimeInfo. Added fields to store the expected
12811         framework assembly version. Changed mono_get_framework_version and
12812         mono_get_runtime_version for a single mono_get_runtime_info method.
12813         
12814         * assembly.c: Added method to remap system assembly versions to the
12815         current executing runtime version. Removed old mapping code.
12816         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
12817         
12818         * icall.c, reflection.c: Track api changes.
12819
12820 2005-02-06  Miguel de Icaza  <miguel@novell.com>
12821
12822         * loader.c (method_from_memberref): Improve error reporting,
12823         produce the class name instead of the typeref/typedef index. 
12824
12825 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
12826
12827         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
12828
12829 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
12830
12831         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
12832         stdcall and charset name mangling.  Reorganize the code and add
12833         some tracing stuff.
12834
12835 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
12836
12837         * monodiet.c: More iters!
12838
12839         * marshal.c: Iter usage.
12840
12841         * icall.c: Iter usage.
12842
12843         * object.c: Use iters.
12844
12845         * debug-helpers.c: More iters
12846
12847 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
12848
12849         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
12850         under win32.
12851
12852 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
12853
12854         * mono-debug-debugger.c: use iters
12855
12856         * class.c, class-internals.h: mono_class_setup_events is static
12857         now
12858
12859         * All callers: use iters
12860
12861 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
12862
12863         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
12864         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12865
12866 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
12867
12868         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
12869
12870         * marshal.h: Add prototypes for ldfld/stfld_remote.
12871
12872         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
12873         this is called during startup.
12874         
12875 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12876
12877         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
12878         MonoThreadsSync struct private in monitor.c. Changed the way
12879         MonoThreadsSync is allocated so it's faster and there is no
12880         need to keep track of it with a finalizer and it uses less memory.
12881         This also finally allows us to allocate mono objects as ptrfree when
12882         there are no reference fields.
12883
12884 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
12885
12886         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
12887         disappearing link to the GC interface and use them to simplify
12888         the gchandles code.
12889
12890 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
12891
12892         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
12893         stfld_remote which call mono_load/store_field_new. This allows methods
12894         calling ldfld/stfld wrappers to be AOTed.
12895
12896         * console-io.c: Include sys/filio.h under solaris.
12897         
12898         * console-io.c: Include curses.h if needed correctly.
12899
12900 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
12901         
12902         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
12903         method->klass as well.
12904
12905         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
12906
12907         * class.c (mono_class_init): Switch on lazy initialization of 
12908         methods.
12909
12910         * class.c (mono_class_get_finalizer): Handle the case when the 
12911         finalizer is inherited.
12912
12913 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12914
12915         * console-io.c: <curses.h> is needed by term.h on solaris.
12916
12917 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
12918
12919         * icall.c, class-internals.h, monodiet.c, class.c: Remove
12920         mono_class_setup_properties where possible. Remove this ftn from
12921         the header file, and make it static.
12922
12923 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
12924
12925         * loader.c: Add missing setup_... call.
12926
12927         * class.c: Add missing setup_... calls.
12928
12929         * class.c (mono_class_init): Switch on lazy initialization of 
12930         the generic vtable.
12931         
12932         * class.c (mono_class_init): Fix generics broken by the recent changes.
12933
12934         * monodiet.c (handle_type): Add missing setup_... calls.
12935
12936         * class.c: Back out garbage in previous patch.
12937         
12938         * class.c: Add missing setup_... calls.
12939
12940         * class.c (mono_class_get_method_from_name_flags): Avoid calling
12941         mono_class_setup_methods () if possible.
12942
12943         * class-internals.h (MonoClass): Add 'has_cctor' flag.
12944
12945         * class-internals.h (MonoCachedClassInfo): New structure.
12946
12947         * class.c: Initialize properties and events fields of MonoClass lazily.
12948
12949         * class.c: Add infrastructure for lazily initializing the methods and
12950         vtable fields of MonoClass. Not yet used.
12951
12952         * class.c (mono_class_get_finalizer): New helper function.
12953
12954         * class.c: Add infrastructure for loading some class related data from
12955         an AOT file.
12956
12957         * object.c: Add infrastructure for initializing the vtable from data
12958         in the AOT file.
12959
12960         * gc.c (run_finalize): Use mono_class_get_finalizer ().
12961
12962         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
12963         appropriate initialization function before accessing parts of the
12964         MonoClass structure.
12965
12966         * marshal.c: Fix warnings.
12967         
12968         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
12969
12970         * mono-debug-debugger.c (get_exception_message): Use 
12971         mono_class_get_method_from_name_flags ().
12972
12973 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
12974
12975         * reflection.c, appdomain.c: Replace a few manual searches that
12976         Zoltan missed. (Paolo approved this part of my initial patch).
12977
12978 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
12979
12980         * profiler.c: disable recording statistical events at report time.
12981
12982 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12983
12984         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
12985         to byteswap arrays of enum values, too (bug #72080).
12986
12987 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
12988
12989         * appdomain.c (set_domain_search_path): Allow this to be called if
12990         domain->setup is not yet set.
12991
12992         * loader.c (mono_method_get_index): New helper function.
12993
12994         * loader.c reflection.c: Use mono_method_get_index ().
12995
12996         * class.c (mono_class_get_method_from_name_flags): New helper method.
12997
12998         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
12999         this.
13000
13001         * class.c (mono_class_get_cctor): New helper method.
13002
13003         * string-icalls.c object.c class.c marshal.c reflection.c: Use
13004         mono_class_get_method () to look up methods.
13005
13006 2005-02-01  Miguel de Icaza  <miguel@novell.com>
13007
13008         * console-io.c: Fix the build, this should work on Windows.
13009
13010 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
13011
13012         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
13013         be set to null to keep things valid
13014
13015 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13016
13017         * icall.c: added Console 2.0 icalls.
13018         * Makefile.am: added console-io.[ch]
13019         * console-io.[ch]: internal calls for Console 2.0 API.
13020
13021 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13022
13023         * class.c: make sure we consider all the interfaces
13024         when calculating max_interface_id (bug found by
13025         Jeroen Frijters running ikvm).
13026
13027 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
13028
13029         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
13030         valuetype fields to null.
13031
13032         * object.c (set_value): Ditto. Fixes #71669.    
13033
13034 2005-01-31  Martin Baulig  <martin@ximian.com>
13035
13036         * metadata.c (mono_metadata_has_generic_params): New public
13037         function; checks whether something is a generic method.
13038
13039 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13040
13041         * appdomain.c: fix infinite recursion when adding assemblies.
13042
13043 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
13044
13045         * object.c: Fix small typo to return all items for Environment.
13046         GetCommandLineArgs.
13047
13048 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13049
13050         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
13051         reflection.c: more domain and assembly-unload related fixes
13052         and memory leaks plugs.
13053
13054 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
13055
13056         * 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.
13057
13058 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
13059
13060         * loader.c (mono_method_signature): Make this method lazy
13061         (mono_get_method_from_token): Don't computate the signature here.
13062
13063         Doing this saves quite a bit of memory. I got 90 kb on starting up
13064         monodoc. It should also save some disk reads on startup.
13065
13066         * *: MonoMethod->signature might be NULL now. You *MUST* use
13067         mono_method_signature.
13068
13069 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * object.c (mono_runtime_get_main_args): Return an array from the
13072         current domain here. Fixes #71938.
13073
13074 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13075
13076         * monitor.c: formatting changes to comply with the
13077         mono coding style and remove #ifdefs from the code.
13078
13079 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13080
13081         * metadata.c, private.h: remove some unneeded data
13082         and use a more compact representation for table schemas.
13083
13084 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13085
13086         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
13087         to get a better distribution in hash tables.
13088         * *.c: use mono_aligned_addr_hash() where appropriate.
13089         * assembly.c: make var static.
13090
13091 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13092
13093         * domain-internals.h: Put MonoJitInfo on a diet.
13094
13095         * domain.c: Fix a warning.
13096
13097 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
13098
13099         * gc.c: rework the gc handles code to reuse handles
13100         when freed.
13101
13102 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
13103
13104         * domain.c: fixed long standing bug in mono_string_equal() which
13105         was brought to light with the ldstr changes.
13106
13107 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
13108
13109         * reflection.c: Remove warning by adding missing include for marshal.h
13110
13111 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
13112
13113         * domain.c, object.c: change the ldstr_table to hold
13114         MonoString* as keys: makes the runtime isinterned lookup
13115         faster and simplifies memory management.
13116
13117 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
13118  
13119         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
13120         possible to add imperative security checks before calling the icall.
13121         * reflection.c: Return security attributes on the original MonoMethod
13122         (and not the wrapped one). This fix permissions on icalls.
13123
13124 2005-01-25  Dick Porter  <dick@ximian.com>
13125
13126         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
13127         the check for mktime() support actually test the mktime() return
13128         value.  "Fixes" bug 71682, though the output is still different to
13129         MS.
13130
13131 2005-01-25  Martin Baulig  <martin@ximian.com>
13132
13133         * class.c (mono_class_is_assignable_from): Make this work for
13134         generic instances.
13135
13136 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
13137
13138         * marshal.c (mono_string_utf8_to_builder)
13139         (mono_string_builder_to_utf16): We might not have ownership of the
13140         string. In thise case, we need to create a new buffer.
13141
13142         * object-internals.h (mono_stringbuilder_capacity): sb->str might
13143         be null, in which case, use the default capacity.
13144
13145 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13146
13147         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
13148         GC events to the profiler.
13149
13150 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13151
13152         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
13153         if you don't want the GC to run.
13154
13155 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
13156
13157         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
13158         start providing a GC API and keeping different implementations in
13159         their own file.
13160         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
13161
13162 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
13163
13164         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
13165         mmap rather than allocating a huge buffer.
13166         (mono_debug_close_mono_symbol_file): Free the buffer allocated
13167         above.
13168
13169 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
13170
13171         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
13172         and CheckExecutionRights.
13173         * reflection.c|h: Keep the index of the declarative security to be 
13174         used, instead of the pointer, when AOT compiler is used. Also add 
13175         class initialization when requesting demands.
13176         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
13177         CheckExecutionRights. Both properties are now FALSE by default, and
13178         unmodifiable, unless the --security option is used.
13179
13180 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13181
13182         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
13183         reflection.c: properly refcount images and assemblies, many leaks fixed.
13184
13185 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13186
13187         * threadpool.c: increase the timeout for threads in the thread pool to
13188         10s.  Fixes bug #67159.
13189
13190 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
13191
13192         * class-internals.h: Sun's compiler insists on explicit
13193         signed on bit fields to handle then correctly.
13194
13195 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
13196
13197         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
13198         Make the size of the array fit only the number of invalid path
13199         chars that we have.
13200
13201         * class.c (_mono_class_get): Improve the error reporting when a
13202         class referenced is not found, to assist debugging. 
13203
13204 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
13205
13206         * threads.c: fix off-by-one error.
13207         * domain.c: free data allocated in the domain.
13208
13209 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
13210
13211         * reflection.c (mono_method_body_get_object): Fill out exception info
13212         as well.
13213
13214         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
13215         structure.
13216         
13217 2005-01-19  Martin Baulig  <martin@ximian.com>
13218
13219         * loader.c (mono_get_method_constrained): Make this work again.
13220
13221 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
13222
13223         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
13224         guint16 to match the managed side.
13225
13226         * reflection.c (mono_reflection_body_get_object): Fill out local
13227         variables array.
13228
13229         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
13230         as well.
13231
13232         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
13233         'local_var_sig_token'.
13234
13235 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13236
13237         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
13238         System.Drawing.
13239
13240         * reflection.c (mono_method_body_get_object): Handle abstract and
13241         runtime methods.
13242
13243 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
13244
13245         * marshal.c, loader.c, class-internals.h, reflection.c:
13246         store the emthod data for a wrapper in an array instead of a list.
13247
13248 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
13249
13250         * marshal.c: change the code to allocate memory more
13251         conservatively for method wrappers.
13252
13253 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13254
13255         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
13256         fields from MonoClass to the marshal info structure where they belong.
13257
13258 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
13259
13260         * class.c, object.c, class-internals.h, marshal.c: rearrange
13261         some fields and tweak some types to lower memory usage.
13262
13263 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13264
13265         * threads.c (signal_thread_state_change): Handle the case when the
13266         target thread is the current thread.
13267
13268         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
13269
13270         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
13271         emit_ptr_to_object_conv. 
13272
13273         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
13274         marshalling. Fixes #71352.
13275
13276 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13277
13278         * metadata.h, blob.h: move table enum to blob.h so it can be included
13279         in any header.
13280         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
13281         cut the size of MonoImage/MonoDynamicImage.
13282
13283 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
13284
13285         * profiler.c (mono_profiler_install_simple): Fix default arguments.
13286
13287 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
13288
13289         * reflection.c, reflection.h, icall.c: add a function to check
13290         if an attribute type is defined for a metadata object.
13291
13292 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
13293
13294         * object-internals.h: Added some needed fields from StringBuilder class.
13295         * marshal.c: Set the maxCapacity when creating a StringBuilder.
13296
13297 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
13298
13299         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
13300         threads before shutting down the runtime.
13301
13302         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
13303
13304 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13305
13306         * object-internal.h, threads.c: implement stacksize and 
13307         parameterized thread start functionality (requires
13308         matching corlib). Marked broken code for later removal.
13309
13310 2005-01-12  Martin Baulig  <martin@ximian.com>
13311
13312         * class-internals.h (MonoGenericClass): Moved the `initialized'
13313         flag to MonoDynamicGenericClass, removed `init_pending'.
13314         (MonoGenericInst): Added `is_reference' flag.
13315
13316 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
13317
13318         * reflection.c (mono_image_create_pefile): Only set the pe_offset
13319         inside the MSDOS header. Fixes #71201.
13320
13321         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
13322         gc thread.
13323         (mono_domain_finalize): Ditto.
13324
13325 2005-01-12  Martin Baulig  <martin@ximian.com>
13326
13327         * class.c (mono_get_shared_generic_class): Use the cache for
13328         non-dynamic generic classes.
13329
13330         * class-internals.h (mono_class_create_generic_2): Removed
13331         function prototype, this function is now static inside class.c.
13332
13333         * class.c (mono_class_create_generic_2): Made this static, only
13334         call it from mono_class_init() and mono_class_setup_parent().
13335         (collect_implemented_interfaces_aux): Call mono_class_init() on
13336         the interfaces we collect.
13337         (mono_class_setup_vtable): Call mono_class_init (class->parent).
13338
13339 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
13340
13341         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
13342         it a real thread handle.
13343
13344         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
13345         MonoJitExceptionInfo, since each catch clause needs its own variable.
13346         
13347 2005-01-11  Dick Porter  <dick@ximian.com>
13348
13349         * image.c (mono_pe_file_open): New variant on mono_image_open()
13350         that does not set up the CLI metadata; used for FileVersionInfo so
13351         it can get the data for windows binaries too.
13352         
13353         * process.c (process_read_string_block): Don't read off the end of
13354         the StringTable block.
13355
13356         These both fix bug 70766.
13357
13358 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
13359
13360         * gc.c: set some fields to NULL at GC cleanup time.
13361         * threads.c: if we quit the main thread, call exit ().
13362
13363 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
13364
13365         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
13366
13367 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
13368
13369         * threads.h, threads.c, object.c: added accessor and settor for
13370         main_thread. Handle it specially when exiting from it: wait
13371         for other foreground threads to exit.
13372
13373 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
13374
13375         * process.c, verify.c: remove some bloat.
13376
13377 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
13378
13379         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
13380         the calling convention to cdecl under win32.
13381
13382 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
13383
13384         * object.c (mono_object_get_size): New function to get the size of
13385         an object instance.
13386
13387         * profiler.c (simple_allocation): Use above.
13388
13389 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
13390
13391         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
13392         ves_icall_System_AppDomain_getRootDomain (as it's not required to
13393         get an appdomain by it's id and we can't assume the root's id is 0).
13394         * domain-internals.h: Change the function prototype to match.
13395         * icall.c: Change the icall table for AppDomain.
13396
13397 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
13398
13399         * locales.c (string_invariant_compare_char): Only compute
13400         GUnicodeTypes in the case where we need them.  Test for ordinality
13401         first and return if so.
13402
13403         From the commit:
13404
13405                 /*
13406                  * FIXME: here we must use the information from c1type and c2type
13407                  * to find out the proper collation, even on the InvariantCulture, the
13408                  * sorting is not done by computing the unicode values, but their
13409                  * actual sort order.
13410                  */
13411
13412 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13413
13414         * loader.c: for P/Invoke methods, allow the "Internal" shared
13415         library name to refer to the calling process symbol namespace.
13416
13417 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
13418
13419         * Makefile.am: Add the security manager to the build.
13420         * security-manager.c|h: New. Initialization of the security manager.
13421
13422 2005-01-07  Dick Porter  <dick@ximian.com>
13423
13424         * threads.c: 
13425         * monitor.c: Update thread state during Monitor and WaitHandle
13426         waits.  Fixes bug 71031.
13427
13428 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13429
13430         * reflection.c (property_encode_signature): Correctly handle when the
13431         property has no methods.
13432
13433 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
13434
13435         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
13436         
13437         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
13438         fields from mb, not rmb. Fixes #71017.
13439
13440         * marshal.c (emit_ptr_to_str_conv): Add support for 
13441         ByValTStr -> string conversion. Fixes #71015.
13442
13443         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
13444
13445         * mempool.c (mono_mempool_contains_addr): New helper function.
13446
13447 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
13448
13449         * metadata.c (mono_metadata_compute_size): Fix size calculation of
13450         HasSematics encoded fields.
13451         
13452         * metadata.c (mono_type_to_unmanaged): Improve error message for 
13453         invalid string marshalling.
13454
13455         * metadata.c: Fix warnings.
13456         
13457 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13458
13459         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
13460         profiler support.
13461
13462 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
13463
13464         * domain.c object.c domain-internals.h: Revert part of r38077 since the
13465         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
13466         tests.
13467
13468 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
13469
13470         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
13471         so methods containing these can be AOTed.
13472
13473 2005-01-03  Martin Baulig  <martin@ximian.com>
13474
13475         * loader.c (find_method): Removed the hack for generic instances.
13476         (method_from_memberref): If our parent is a generic instance, pass
13477         its generic type definition to find_method() and then inflate the
13478         method.
13479         (mono_get_method_constrained): Pass the generic type definition to
13480         find_method() and inflate the method later.
13481
13482         * class-internals.h (MonoStats): Added `generic_class_count'.
13483
13484         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
13485         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
13486
13487         * reflection.c (mono_custom_attrs_from_params): Don't ignore
13488         generic type definitions.
13489
13490 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
13491
13492         * loader.c icall.c: Fix warnings.
13493
13494 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
13495
13496         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
13497         blittable types. Fixes #70864.
13498
13499 2004-12-29  Martin Baulig  <martin@ximian.com>
13500
13501         * icall.c
13502         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
13503
13504         * reflection.c (mono_method_get_object): Create a
13505         "System.Reflection.MonoGenericMethod" for inflated methods; don't
13506         call mono_get_inflated_method().
13507
13508         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
13509
13510 2004-12-27  Martin Baulig  <martin@ximian.com>
13511
13512         * class-internals.h (MonoMethod): Added `is_inflated' flag.
13513         (MonoMethodInflated): Added `inflated' field.
13514
13515         * class.c (mono_class_inflate_generic_method): Don't really
13516         inflate the method here; just set the `is_inflated' flag in the
13517         MonoMethod.
13518         (mono_class_get_inflated_method): Actually inflate the method here
13519         if it's not already inflated; we use the MonoMethodInflated's new
13520         `inflated' field as a cache.
13521
13522 2004-12-26  Martin Baulig  <martin@ximian.com>
13523
13524         * class.c
13525         (inflate_generic_class): Moved some code out of inflate_generic_type().
13526         (mono_class_inflate_generic_method): If we're already inflated,
13527         inflate the context and use the declaring method; ie. make sure
13528         the declaring method of an inflated method is always the generic
13529         method definition.
13530         (mono_class_create_from_typedef): Create
13531         `class->generic_container->context->gclass'.
13532
13533 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
13534
13535         * metadata-internals.h, marshal.c, reflection.c: More
13536         MonoGHashTable->GHashTable.
13537
13538         * domain-internals.h, class.c: Change MonoGHashTable's into
13539         GHashTables for some cases where no gc stuff is used
13540
13541         All users: update apis
13542
13543 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
13544
13545         * metadata.c (builtin_types): Make this `const'. Makes this get
13546         put into the shareable section.
13547         (mono_metadata_init): Casts to make gcc happy.
13548
13549 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
13550
13551         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
13552
13553 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
13554
13555         * icall.c: Added an internal call to retrieve the position and length
13556         of assembly-level declarative security attributes (RequestMinimum, 
13557         RequestOptional and RequestRefuse). This is used by the Assembly class
13558         to re-create the corresponding permission sets.
13559
13560 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13561
13562         * marshal.c: fix the stelemref wrapper to be type correct
13563         (and faster).
13564
13565 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
13566
13567         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
13568         to do key & 0x7fffffff. Hashtable already does this. It just
13569         results in longer code.
13570
13571 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
13572
13573         * appdomain.c: Bump corlib version.
13574         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
13575         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
13576         * reflection.c|h: Add functions to get declarative security infos
13577         (blob position and length) for assemblies, classes and methods.
13578
13579 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
13580
13581         * reflection.c: sort the constant table (bug #70693).
13582
13583 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
13584
13585         * object-internals.h, threads.c, domain.c: add accessors for
13586         the MonoThread and MonoDomain tls keys.
13587
13588 2004-12-18  Martin Baulig  <martin@ximian.com>
13589
13590         * class.c (inflate_generic_type): If we're inflating a generic
13591         instance, set `ngclass->context->container = context->container';
13592         ie. the container we inflated into.
13593
13594         * metadata.c (mono_metadata_parse_generic_param): Reflect above
13595         inflate_generic_type() changes.
13596
13597 2004-12-17  Martin Baulig  <martin@ximian.com>
13598
13599         * class-internals.h
13600         (MonoGenericClass): Replaced `MonoType *generic_type' with
13601         `MonoClass *generic_class'.  Removed `dynamic_info'; if
13602         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
13603         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
13604
13605 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
13606
13607         * exception.c (mono_exception_from_token): New helper function.
13608
13609 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
13610
13611         * assembly.c (mono_assembly_load_with_partial_name): Call 
13612         mono_assembly_loaded before invoking the preload hooks. Fixes
13613         #70564.
13614
13615         * object-internals.h (MonoThread): Change culture_info and 
13616         ui_culture_info into an array.
13617
13618         * threads.c: Cache culture info objects from more than one appdomain.
13619
13620         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
13621         current UI culture.
13622
13623 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
13624
13625         * threads.h threads.c appdomain.c: Clear the culture_info field of
13626         all threads during unloading if they point to an object in the dying
13627         appdomain.
13628
13629 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
13630
13631         * culture-info.h (TextInfoEntry): New struct
13632         * object-internals.h: sync with managed
13633         * locales.c: fill the `text_info_data' field
13634         * culture-info-tables.h: update
13635
13636 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13637
13638         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
13639         collector.
13640
13641 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
13642
13643         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
13644         (ves_icall_ModuleBuilder_getMethodToken): Ditto
13645
13646 2004-12-12  Martin Baulig  <martin@ximian.com>
13647
13648         * mono-debug-debugger.c (write_type): If we're an enum and the
13649         builtin types have already been initialized, call mono_class_init().
13650
13651 2004-12-11  Martin Baulig  <martin@ximian.com>
13652
13653         * metadata.c (mono_metadata_load_generic_params): Added
13654         `MonoGenericContainer *parent_container' argument; automatically
13655         compute `container->is_method'; pass the correct owner to
13656         get_constraints().      
13657
13658         * reflection.c (compare_genericparam): Sort the GenericParam table
13659         according to increasing owners. 
13660
13661 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13662
13663         * profiler.c: allow disabling the default profiler.
13664
13665 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
13666
13667         * decimal.c, icall.c: allow disabling System.Decimal support.
13668
13669 2004-12-09  Marek Safar <marek.safar@seznam.cz>
13670
13671         * reflection.c: Add support for null attribute arguments.
13672
13673 2004-12-09  Martin Baulig  <martin@ximian.com>
13674
13675         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
13676         names to get rid of compiler warnings.
13677
13678 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13679
13680         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
13681         mono_marshal_load_type_info (). Fixes #69625.
13682         (mono_marshal_get_ptr_to_struct): Likewise.
13683
13684 2004-12-08  Martin Baulig  <martin@ximian.com>
13685
13686         * mono-debug.h: Bumped version number to 47.
13687
13688         * mono-debug-debugger.c
13689         (mono_debugger_event_handler, mono_debugger_event): Take two
13690         guint64 arguments insteed of a gpointer and a guint32.  
13691
13692 2004-12-08  Martin Baulig  <martin@ximian.com>
13693
13694         * debug-mono-symfile.h
13695         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
13696         `address' to `native_offset'.
13697
13698 2004-12-08  Martin Baulig  <martin@ximian.com>
13699
13700         * class.c (mono_class_create_from_typespec): Only inflate if we
13701         either have `context->gclass' or `context->gmethod'.
13702
13703 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13704
13705         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
13706
13707         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
13708
13709         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
13710
13711         * reflection.c (mono_assembly_get_object): Remove the workaround put
13712         in for the release.
13713         
13714         * appdomain.c: Use the corlib_internal field from MonoAssembly.
13715
13716         * appdomain.c: Bump corlib version.
13717
13718         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
13719         be visible in other appdomains.
13720
13721 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
13722
13723         * threads.c: Interlocked inc and dec for longs were messed up,
13724         use a KISS based impl for this. Fixes 70234
13725
13726 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
13727
13728         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
13729
13730 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
13731
13732         * icall.c: fix to follow policy not to allow struct
13733         arguments in icalls.
13734
13735 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13736
13737         * process.c: make the patch that handles spaces in file paths work
13738         on mono/windows too.
13739
13740 2004-12-06  Martin Baulig  <martin@ximian.com>
13741
13742         * class.c (mono_class_create_generic): Call
13743         mono_class_setup_supertypes() if we're dynamic.
13744         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
13745
13746 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
13747
13748         * object-internals.h: Add new fields to MonoThread.
13749
13750         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13751
13752         * icall.c threads-types.h threads.c: Add new icalls.
13753
13754         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
13755
13756         * object-internals.h (MonoReflectionAssembly): Sync object layout with
13757         managed side.
13758
13759         * appdomain.c: Bump corlib version.
13760
13761         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
13762         internal assemblies. Fixes #69181.
13763
13764 2004-12-05  Martin Baulig  <martin@ximian.com>
13765
13766         * class.c (mono_class_inflate_generic_signature): Make this a
13767         no-op if `context' is NULL or we don't have any type parameters;
13768         also copy `sentinelpos'.        
13769
13770 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
13771
13772         * image.c: Add unbox_wrapper_cache.
13773
13774         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
13775
13776         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
13777         function generator.
13778         
13779         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
13780         Fixes #70173.
13781
13782         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
13783         
13784 2004-12-04  Martin Baulig  <martin@ximian.com>
13785
13786         * loader.c (mono_method_get_signature_full): New public function;
13787         like mono_method_get_signature(), but with an additional
13788         `MonoGenericContext *' argument.
13789
13790         * class.c (mono_class_inflate_generic_signature): Formerly known
13791         as inflate_generic_signature(); make this public.
13792
13793 2004-12-04  Martin Baulig  <martin@ximian.com>
13794
13795         * metadata.c
13796         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
13797         instead of a `MonoGenericContainer *'.  
13798         (mono_metadata_parse_array_full): Likewise.
13799         (mono_metadata_parse_signature_full): Likewise.
13800         (mono_metadata_parse_method_signature_full): Likewise.
13801         (mono_metadata_parse_generic_inst): Likewise.
13802         (mono_metadata_parse_generic_param): Likewise.
13803         (mono_metadata_parse_mh_full): Likewise.
13804         (mono_type_create_from_typespec_full): Likewise.
13805
13806 2004-12-03  Martin Baulig  <martin@ximian.com>
13807
13808         * class-internals.h (MonoGenericContainer): Replaced the
13809         `MonoGenericContext * pointer with a `MonoGenericContext'
13810         structure and made it the first element.
13811
13812 2004-12-03  Martin Baulig  <martin@ximian.com>
13813
13814         * class.c
13815         (inflate_generic_type): Set the `context->container' when creating
13816         a new MonoGenericContext.
13817         (mono_class_inflate_generic_method): Likewise.
13818         (mono_class_create_from_typespec): Just use `context->container'
13819         to get the container.
13820
13821         * loader.c (method_from_methodspec): Set `context->parent' from
13822         `context->container' - and if that's a method container, use its
13823         parent.  Also set the `context->container' when creating a new
13824         MonoGenericContext.
13825         (mono_get_method_from_token): Use just `context->container' to get
13826         the container.
13827
13828         * metadata.c (do_mono_metadata_parse_generic_class): Also set
13829         `gclass->context->container'.
13830
13831         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
13832         the `context->container' when creating a new MonoGenericContext.
13833
13834 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
13835
13836         * reflection.c (compare_genericparam): Sort params with identical
13837         owner by their number. Fixes gen-111 on sparc.
13838
13839 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
13840
13841         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
13842         around the domain changes.
13843
13844         * appdomain.c (mono_domain_unload): Handle the case when the thread
13845         calling Unload is itself being aborted during unloading. Fixes #70022.
13846
13847         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
13848
13849         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
13850         checkpoint_func as an icall so it gets a wrapper.
13851         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
13852         in the cross-appdomain wrappers too.
13853
13854         * threads.c (mono_thread_has_appdomain_ref): Make this public.
13855
13856         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
13857
13858         * reflection.c: Fix some memory leaks.
13859         
13860 2004-12-02  Martin Baulig  <martin@ximian.com>
13861
13862         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
13863
13864         * metadata.c (generic_class_cache): New static hashtable.
13865         (mono_metadata_lookup_generic_class): New public method.
13866
13867 2004-12-02  Martin Baulig  <martin@ximian.com>
13868
13869         * class.c (mono_class_create_from_typedef): Call
13870         mono_class_setup_parent() and mono_class_create_mono_type() before
13871         parsing the interfaces.
13872
13873 2004-12-02  Martin Baulig  <martin@ximian.com>
13874
13875         * metadata.c (generic_inst_cache): New static hashtable.
13876         (mono_metadata_lookup_generic_inst): New public function.
13877         (mono_metadata_inflate_generic_inst): New public function.
13878         (mono_metadata_parse_generic_inst): New public function.
13879         (do_mono_metadata_parse_generic_class): Use the new
13880         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
13881         since this'll also use the cache.
13882
13883         * reflection.c (mono_reflection_bind_generic_method_parameters):
13884         Use mono_metadata_lookup_generic_inst() to use the new cache.
13885
13886         * class.c (inflate_mono_type): Use
13887         mono_metadata_inflate_generic_inst() to inflate a generic
13888         instance; this'll also use the new cache.
13889
13890         * loader.c (method_from_methodspec): Use
13891         mono_metadata_parse_generic_inst() and
13892         mono_metadata_inflate_generic_inst() rather than parsing it
13893         manually, so we can use the new cache.
13894
13895 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
13896
13897         * threads.c (wait_for_tids): Do not incorrectly free threads when 
13898         the wait times out.
13899
13900 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13901
13902         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
13903         iter->args based on whether parameters are passed in registers (i.e.
13904         MONO_ARCH_REGPARMS is defined)
13905
13906 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
13907
13908         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
13909         the exception message. Fixes #70070.
13910         (method_from_methodspec): Fix warnings.
13911
13912 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13913
13914         * process.c: (complete_path) return the path quoted
13915
13916 2004-12-01  Martin Baulig  <martin@ximian.com>
13917
13918         * class-internals.h (MonoGenericInst): New structure.
13919         (MonoGenericClass): Replaced `type_argc', `type_argv' and
13920         `is_open' with `MonoGenericInst *inst'.
13921         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
13922         `is_open' with `MonoGenericInst *inst'.
13923
13924 2004-11-30  Martin Baulig  <martin@ximian.com>
13925
13926         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
13927
13928         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
13929         to `generic_class_cache'.
13930
13931         * metadata.c
13932         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
13933         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
13934         (mono_generic_inst_is_valuetype): Renamed to
13935         mono_generic_class_is_valuetype().
13936
13937         * class-internals.h
13938         (MonoGenericInst): Renamed to MonoGenericClass.
13939         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
13940         (MonoClass): Renamed `generic_inst' to `generic_class'.
13941         (MonoGenericContext): Renamed `ginst' to `gclass'.
13942
13943         * object-internals.h
13944         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
13945
13946         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
13947         mono_reflection_generic_class_initialize().
13948
13949         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
13950         now known as "System.Reflection.MonoGenericClass".
13951         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
13952
13953 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
13954
13955         * class-internals.h: Added a flag field to MonoClass to cache the
13956         declarative security attributes actions associated with the class.
13957         * domain-internals.h: Added booleans to MonoJitInfo to cache the
13958         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
13959         applicable to the JITted method.
13960         * reflection.c|h: Added functions to extract (as flags) which security
13961         actions are available (declaratively) for a method, class or assembly.
13962         * metadata.c|h: Added functions to search the declarative security
13963         table in the metadata.
13964         
13965 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
13966
13967         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
13968         EXPORTEDTYPES are already in the class name cache, so there is no
13969         need to add extra code here to look at them. Just removes a bit of
13970         cruft.
13971
13972         (ves_icall_System_Environment_get_TickCount): No need for #if
13973         WINDOWS. We already have the code in io-layer.
13974
13975 2004-11-28  Martin Baulig  <martin@ximian.com>
13976
13977         * loader.c
13978         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
13979         Fixes gen-112.cs.
13980
13981 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
13982
13983         * assembly.c (do_mono_assembly_open): Instead of having a
13984         conditional WITH_BUNDLE, incorporate support for bundles here, by
13985         having a global `bundles' variable holding a pointer to the actual
13986         bundles. 
13987
13988         (mono_register_bundled_assemblies): New API call used by the
13989         bundle code. 
13990
13991         See mkbundle.1 for details.
13992         
13993 2004-11-27  Martin Baulig  <martin@ximian.com>
13994
13995         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
13996         the vtable for generic methods.
13997
13998 2004-11-26  Martin Baulig  <martin@ximian.com>
13999
14000         * metadata.c
14001         (mono_metadata_generic_method_hash): New public function.
14002         (mono_metadata_generic_method_equal): Likewise.
14003
14004         * class-internals.h
14005         (MonoGenericContainer): Added `GHashTable *method_hash'.
14006
14007         * reflection.c (ReflectionMethodBuilder): Added
14008         `MonoGenericContainer *generic_container'.
14009         (reflection_methodbuilder_to_mono_method): Don't create a new
14010         MonoGenericContainer each time we're called.
14011         (mono_reflection_bind_generic_method_parameters): Use
14012         `container->method_hash' to cache the results so we don't create a
14013         different method if we're called several times with the same
14014         arguments.
14015
14016         * loader.c (method_from_methodspec): Use the new
14017         `container->method_hash' here, too.
14018
14019 2004-11-26  Martin Baulig  <martin@ximian.com>
14020
14021         * class.c (inflate_generic_signature): Correctly compute
14022         `res->has_type_parameters'.
14023         (mono_class_vtable): Use the `has_type_parameters' flag to
14024         determine whether we're a generic method.
14025
14026         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
14027
14028 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
14029
14030         * object.c (mono_runtime_run_main): Fix a small memory leak.
14031
14032 2004-11-25  Martin Baulig  <martin@ximian.com>
14033
14034         * class.c (set_generic_param_owner): Fixed the loop.
14035
14036 2004-11-25  Martin Baulig  <martin@ximian.com>
14037
14038         * object.c (mono_class_vtable): Don't create any JIT wrappers for
14039         generic methods.
14040
14041 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
14042
14043         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
14044         names. Fixes #69787.
14045
14046 2004-11-24  Martin Baulig  <martin@ximian.com>
14047
14048         * class.c (mono_class_create_generic_2): If we don't have a
14049         `ginst->parent', inflate `gklass->parent' to get our parent.
14050
14051 2004-11-24  Martin Baulig  <martin@ximian.com>
14052
14053         * reflection.c (compare_genericparam): Correctly sort the
14054         GenericParam table; fixes #69779.
14055
14056 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
14057
14058         * reflection.c: When writing a PE file, don't create a huge
14059         buffer in memory. Just write the arrays we have to the file.
14060         This reduces memory usage.
14061
14062         * metadata-internals.h: MonoDynamicStream pefile is no longer used
14063         globally.
14064
14065 2004-11-17  Martin Baulig  <martin@ximian.com>
14066
14067         * class.c (mono_class_init): Don't setup `class->parent' for
14068         dynamic instances; moved this to mono_class_generic_2().
14069         (mono_class_create_generic): Also set `klass->inited' for dynamic
14070         generic instances.
14071         (mono_class_create_generic_2): Don't do anything for dynamic
14072         generic instances.  Set `klass->parent' here and also call
14073         mono_class_setup_parent() here. 
14074
14075         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
14076         `MonoType *parent' argument; set `ginst->parent' before calling
14077         mono_class_create_generic_2(), so we set the correct parent.
14078
14079 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
14080
14081         * reflection.c: allow getting attributes from ModuleBuilder
14082         (used by ikvm).
14083
14084 2004-11-17  Martin Baulig  <martin@ximian.com>
14085
14086         * class.c (mono_class_create_from_typedef): If a type parameter is
14087         inherited from an outer class, set its owner to that class.
14088
14089 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
14090
14091         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
14092           for (int*) written size. This fixes bug #69592.
14093
14094 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
14095
14096         * icall.c: Added IsAuthenticodePresnet internal call.
14097         * image.c|h: New function that check a MonoImage for an Authenticode
14098         signature in the certificate PE data directory.
14099         * security.c|h: New internal call to ask the runtime if an 
14100         Authenticode signature seems referenced in the PE header.
14101
14102 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
14103
14104         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
14105
14106         * reflection.c (mono_image_create_pefile): Free the assembly streams
14107         after writing out the assembly file.
14108
14109         * object.c (mono_runtime_run_main): Fix small memory leak.
14110
14111         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
14112         property access modifiers. Fixes #69389.
14113
14114 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14115
14116         * domain.c, object.c, object-internals.h, domain-internals.h,
14117         object.h, marshal.c: keep dynamic code info per domain.
14118
14119 2004-11-15  Martin Baulig  <martin@ximian.com>
14120
14121         * class.c (mono_type_get_name_recurse): Put type arguments in
14122         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
14123         see bug #68387.
14124
14125 2004-11-15  Martin Baulig  <martin@ximian.com>
14126
14127         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
14128         (mono_class_setup_vtable): When computing `the_cname' for a
14129         generic instance, don't include the namespace since we'd otherwise
14130         add it twice.
14131
14132 2004-11-15  Martin Baulig  <martin@ximian.com>
14133
14134         * class.c (mono_class_create_generic): Changed return type to void.
14135         (mono_class_create_generic_2): New public function; setup
14136         `class->method', `class->field' and `class->interfaces' here
14137         instead of in mono_class_init().
14138
14139         * class.h (mono_class_create_generic): Moved to class-internals.h.
14140
14141 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
14142
14143         * reflection.c (mono_image_create_pefile): take a file HANDLE.
14144         rather than writing to memory, write to this file. Right now,
14145         we are just writting into a buffer, and copying that. However
14146         we can avoid the buffer later.
14147
14148         (mono_dynamic_stream_reset): new function
14149
14150         * icall.c, object-internals.h: update for the above.
14151
14152 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
14153
14154         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
14155         have been using gc'd memory. First it is slower, unlikely
14156         the comment in the source code said, secondly, it increases
14157         our footprint to do it in the gc.
14158
14159         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
14160         the method so that it does not have to copy to managed code.
14161
14162 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
14163
14164         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
14165
14166 2004-11-12  Martin Baulig  <martin@localhost>
14167
14168         * reflection.c (mono_image_create_token): Allow generic method
14169         definitions here, since they may appear in an `.override'; see
14170         gen-98/gen-99 for an example.
14171
14172 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
14173
14174         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
14175         #69365.
14176
14177         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
14178         descriptive.
14179
14180 2004-11-11  Martin Baulig  <martin@ximian.com>
14181
14182         * class.c (mono_class_setup_vtable): In an explicit interface
14183         implementation, the method name now includes the arity.
14184
14185 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
14186
14187         * object.c (mono_array_full_copy): Fix warning.
14188
14189 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
14190
14191         * appdomain.c: Removed look_for_method_by_name(). Use the new method
14192         mono_class_get_method_from_name() instead.
14193         
14194         * class-internals.h: Added two new types of wrappers. 
14195         Added MonoRemotingTarget enum. Added new trampoline function type, which
14196         takes an additional MonoRemotingTarget value as parameter, so it is
14197         possible to request a trampoline for a specific target.
14198         
14199         * class.c: Added new mono_class_get_method_from_name() method.
14200         
14201         * class.h: In MonoRemoteClass, we can have now to vtables, one for
14202         general remoting sinks and one specific for cross domain calls.
14203         
14204         * debug-helpers.c: Added new wrapper names.
14205         
14206         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
14207         of a remote class.
14208         
14209         * image.c: Porperly delete value objects form the remoting invoke hashtable.
14210         
14211         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
14212         with several other methods (mono_marshal_get_xappdomain_dispatch,
14213         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
14214         and others) can generate a fast remoting wrapper for cross domain calls.
14215         More information can be found in docs/remoting.
14216         Other changes: Removed mono_find_method_by_name, and used
14217         mono_class_get_method_from_name instead.
14218         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
14219         is stored in the remoting invoke hashtable.
14220         
14221         * marshal.h: published the new method for getting the xdomain wrapper,
14222         and also added a method for getting the adequate wrapper for a given
14223         method and target.
14224         
14225         * object-internals.h, object.c: Added a couple of methods for capying and
14226         cloning arrays.
14227         Modified mono_install_remoting_trampoline, which takes the new remoting
14228         trampoline that has a remoting target as parameter.
14229         mono_class_proxy_vtable now also takes a remoting target as parameter, and
14230         will return the most suitable vtable for the target.
14231         Added mono_remote_class_vtable, which returns the vtable of a remote class
14232         (which can be the normal remoting vtable or the xdomain vtable).
14233         
14234         * threads.c: the xdomain invoke and dispatch wrappers must also be
14235         protected against interruptions.
14236
14237 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14238
14239         * icall.c: use memmove in BlockCopyInternal when the source and
14240         destination arrays are the same.
14241
14242 2004-11-09  Martin Baulig  <martin@ximian.com>
14243
14244         * class-internals.h (MonoGenericContainer): Removed `method' and
14245         `signature', replaced them with `is_method' and `is_signature'
14246         flags.  Added `context'.
14247
14248         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
14249         instead of a `MonoGenericContainer *'.
14250
14251         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
14252         for dynamic type parameters.
14253         (mono_metadata_load_generic_params): Setup `container->context'.
14254
14255         * reflection.c (mono_reflection_setup_generic_class): Setup
14256         `tb->generic_container->context'.
14257         (do_mono_reflection_bind_generic_parameters): Use
14258         mono_class_inflate_generic_type() to correctly inflate types,
14259         rather than using our own hack just for MONO_TYPE_VAR.
14260
14261 2004-11-09  Martin Baulig  <martin@ximian.com>
14262
14263         * class.c (mono_class_inflate_generic_method): Small fix; don't
14264         crash here.
14265
14266         * icall.c
14267         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
14268         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
14269         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
14270         (ves_icall_Type_BindGenericParameters): Likewise.
14271         (ves_icall_Type_get_IsGenericInstance): Likewise.
14272         (ves_icall_Type_GetGenericParameterPosition): Likewise.
14273         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
14274         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14275         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
14276
14277 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
14278
14279         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
14280         assembly versions and public key tokens. Fixes #69113.
14281
14282 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
14283
14284         * metadata.c: fix bug introduced with the type cache changes
14285         on 2004-11-06.
14286
14287 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
14288
14289         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
14290         the MonoClass pointer instead of the token in exception clauses.
14291         * reflection.c: updates for the above and make the code not depend
14292         on the structure of MonoExceptionClause.
14293
14294 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14295
14296         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
14297         Add support for dynamic assemblies. Fixes #69114.
14298
14299         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
14300
14301 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
14302
14303         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
14304         since most only those methods use it. the code member of
14305         MonoMethodPInvoke was dead, so that can be removed too. Also,
14306         remove inline_count (again, not used), and move slot so that it
14307         can share bits with some other flags. This saves 8 bytes in the
14308         structure and gives us about 50 kb back for mcs helloworld.cs
14309
14310         * *.[ch]: Do naming changes for the above.
14311
14312         * loader.c (mono_method_get_header): Lazily init the header
14313         on first access.
14314         (mono_get_method_from_token): don't init the header here
14315         (mono_free_method): the header may never be allocated
14316
14317         Overall, this saves 150 kb of unmanaged allocations
14318         for mcs helloworld.cs. That accounts for 10% of the unmanaged
14319         memory at runtime.
14320         
14321         * loader.c, loader.h (mono_method_get_header): new accessor.
14322
14323         * *.[ch]: use the above method. Prepares us to lazily load
14324         the header.
14325
14326         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
14327         three warnings, which are actual bugs (see 69206).
14328
14329         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
14330         unused. Saves a cool 4 bytes / method.
14331
14332 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
14333
14334         * metadata.c (builtin_types): Add types for System.Object here.
14335         (mono_metadata_parse_type_full): Cache MonoType*'s that are
14336         for a class or valuetype from klass->this_arg or klass->byval_arg.
14337
14338         On mcs for a hello world, this gets us down from 21836 MonoType's
14339         to 14560.
14340
14341         (mono_metadata_free_type): Account for the above change.
14342
14343 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
14344
14345         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
14346         exception instead of asserting if name is null.
14347         (ves_icall_System_AppDomain_GetData): Ditto.
14348
14349 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
14350
14351         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
14352         EnumBuilder.
14353
14354         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
14355         Return NULL when the domain does not have entry_assembly set.
14356
14357         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
14358         Add a 'resource_modules' argument.
14359         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
14360
14361         * reflection.c (mono_reflection_create_runtime_class): Move setting
14362         of wastypebuilder here, so mono_get_type_object () returns a MonoType
14363         for enums too.
14364
14365         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
14366         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
14367         Throw an ArgumentNullException if 'ptr' is null.
14368
14369         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
14370         assemblies here. Fixes #69020.
14371
14372 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
14373
14374         * reflection.c (build_compressed_metadata): Fix the previous patch for
14375         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
14376         the stack.
14377
14378 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
14379
14380         * assembly.c (mono_assembly_names_equal): Allow a match if one of
14381         the cultures is false. Fixes #69090.
14382
14383         * reflection.c (build_compressed_metadata): Fix invalid memory read 
14384         detected by valgrind.
14385         
14386         * reflection.c (mono_reflection_get_type): Avoid triggering a 
14387         TypeResolve multiple times for the same type. Fixes #65577.
14388
14389 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
14390
14391         * marshal.c: Avoid using ldftn to call managed functions. It is
14392         much slower than just a call.
14393
14394         * reflection.c (mono_module_get_object): free the basename we
14395         allocate here from glib.
14396         
14397         * reflection.c (ensure_runtime_vtable): make sure to free
14398         overrides.  Also, we were allocating an array of MonoMethod not an
14399         array of MonoMethod*.
14400
14401         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
14402
14403         * image.c (mono_image_close): free image->guid here.
14404
14405 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
14406
14407         * reflection.c: Fix some spec conformance issues with the PE file
14408         structures so mcs compiled apps run on the Net 2.0 beta.
14409
14410 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
14411
14412         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
14413         Implement this. Fixes #67264.
14414
14415         * debug-helpers.h debug-helpers.c marshal.c: Move 
14416         mono_find_method_by_name to debug-helpers.c.
14417
14418 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
14419
14420         * object.c (mono_release_type_locks): type_initialization_hash is
14421         a GHashTable.
14422
14423         * reflection.c object.c object-internals.h: Fix warnings.
14424
14425         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
14426         without accessors. Fixes #61561.
14427
14428         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
14429         application base from the root domain if not set. Fixes #65641.
14430         (mono_runtime_init): Fix warning.
14431
14432 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14433
14434         * appdomain.c: call mono_thread_pool_init.
14435         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
14436         of worker threads based on the number of CPUs and the environment
14437         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
14438         for non-windows (windows) systems.
14439
14440 2004-10-27  Chris Toshok  <toshok@ximian.com>
14441
14442         * mono-debug-debugger.c (write_class): don't call mono_class_init
14443         here, as even with the check for (!klass->init_pending), we get
14444         into a situation where we're hitting cycles in class
14445         initialization.  Fixes #68816.
14446
14447 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
14448
14449         * image.c: Avoid overwriting values in the loaded_images_hash when an
14450         assembly is loaded multiple times. Fixes #61152.
14451
14452         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
14453         so multiple satellite assemblies for the same name can be loaded.
14454         Fixes #68259.
14455
14456         * mono_domain_assembly_preload: Actually return the loaded assembly, 
14457         not NULL.
14458
14459         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
14460         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
14461
14462         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
14463         pending finalizers are not invoked after the appdomain has been 
14464         unloaded. Fixes #67862.
14465
14466 2004-10-22  Martin Baulig  <martin@ximian.com>
14467
14468         * mono-debug-debugger.c
14469         (mono_debugger_runtime_invoke): Don't box valuetypes.
14470
14471 2004-10-22  Chris Toshok  <toshok@ximian.com>
14472
14473         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
14474         don't hide private methods.
14475
14476 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
14477
14478         * icall.c: Allows the runtime to "share" (when known) the public key
14479         token of an assembly. This avoid the need to recalculate the token 
14480         (from the public key) in managed code.
14481
14482 2004-10-21  Chris Toshok  <toshok@ximian.com>
14483
14484         * debug-helpers.c (append_class_name): argh, revert last patch.
14485         
14486 2004-10-21  Chris Toshok  <toshok@ximian.com>
14487
14488         * debug-helpers.c (append_class_name): use '+' as the delimiter,
14489         not '/', so that it matches what the debugger uses to look up
14490         methods.
14491
14492 2004-10-21  Martin Baulig  <martin@ximian.com>
14493
14494         * mono-debug-debugger.c (mono_debugger_throw_exception): New
14495         public method; this is called each time an exception is thrown and
14496         allows the debugger to use exception catch points.
14497
14498 2004-10-21  Martin Baulig  <martin@ximian.com>
14499
14500         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
14501         the stack pointer and the exception object in some struct and pass
14502         that to the debugger.
14503
14504 2004-10-21  Chris Toshok  <toshok@ximian.com>
14505
14506         * mono-debug-debugger.c (do_write_class): add instance/static
14507         event support.  We don't expose "raise" or "other" yet.
14508         (event_is_static): new method.
14509
14510 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
14511
14512         * mono-debug-debugger.c
14513         (mono_debugger_handle_exception): Remove
14514         bogus return value for fussy compilers.
14515
14516 2004-10-20  Martin Baulig  <martin@ximian.com>
14517
14518         * mono-debug-debugger.c
14519         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
14520         (mono_debugger_handled_exception): Likewise.
14521
14522 2004-10-20  Martin Baulig  <martin@ximian.com>
14523
14524         * mono-debug-debugger.h (MonoDebuggerEvent): Added
14525         MONO_DEBUGGER_EVENT_EXCEPTION.
14526
14527         * mono-debug-debugger.c (mono_debugger_handle_exception): New
14528         public function to send the debugger a notification for an
14529         exception and inform it about a catch/finally clause.
14530
14531 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
14532
14533         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
14534         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
14535         fix 2.95 build. 
14536
14537         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
14538
14539 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
14540
14541         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
14542         marshalled as [In,Out]. Fixes #58325.
14543
14544 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
14545
14546         * reflection.c (mono_method_body_get_object): Implement some fields.
14547
14548 2004-10-12  Martin Baulig  <martin@ximian.com>
14549
14550         * reflection.c (mono_reflection_bind_generic_parameters): Small
14551         fix, correctly retrieve our parent from a generic instance.
14552
14553 2004-10-12  Martin Baulig  <martin@ximian.com>
14554
14555         * metadata.c (mono_metadata_generic_param_equal): We always have
14556         an owner.
14557
14558         * class.c
14559         (mono_class_from_generic_parameter): We need to have an owner.
14560         (my_mono_class_from_generic_parameter): Likewise.
14561
14562         * reflection.c (mono_reflection_setup_generic_class): Renamed to
14563         mono_reflection_create_generic_class() and added a new
14564         mono_reflection_setup_generic_class().  
14565         (mono_reflection_initialize_generic_param): If we're a nested
14566         generic type and inherited from the containing class, set our
14567         owner to the outer class.
14568
14569 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
14570
14571         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
14572
14573         * reflection.c (mono_method_body_get_object): New function to create
14574         a MethodBody object.
14575
14576         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
14577
14578 2004-10-11  Martin Baulig  <martin@ximian.com>
14579
14580         * metadata.c (_mono_metadata_type_equal): Renamed to
14581         do_mono_metadata_type_equal() and made static.
14582
14583 2004-10-11  Martin Baulig  <martin@ximian.com>
14584
14585         * appdomain.c: Bump corlib version number to 28.
14586
14587 2004-10-10  Martin Baulig  <martin@ximian.com>
14588
14589         * class-internals.h
14590         (MonoGenericInst): Added `MonoGenericContainer *container'.
14591         (MonoGenericMethod): Likewise.
14592         (MonoGenericContext): Likewise.
14593         (MonoGenericParam): Added `MonoGenericContainer *owner'.
14594
14595         * metadata.c
14596         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
14597         (do_mono_metadata_parse_generic_inst): Likewise.
14598         (mono_metadata_parse_type_full): New public method.  This is the actual
14599         mono_metadata_parse_type() implementation - with an additional
14600         `MonoGenericContainer *' argument.
14601         (mono_metadata_parse_array_full): Likewise.
14602         (mono_metadata_parse_signature_full): Likewise.
14603         (mono_metadata_parse_method_signature_full): Likewise.
14604         (mono_metadata_parse_mh_full): Likewise.
14605         (mono_type_create_from_typespec): Likewise.
14606         (mono_metadata_interfaces_from_typedef_full): New public method;
14607         this is similar to the other _full() methods, but we take a
14608         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
14609         (mono_metadata_parse_generic_param): Take an additional
14610         `MonoGenericContainer *' argument and lookup the MonoGenericParam
14611         from that container.
14612         (mono_metadata_generic_param_equal): New static method to compare
14613         two type parameters.
14614         (_mono_metadata_type_equal): New static method; takes an
14615         additional `gboolean signature_only' argument - if true, we don't
14616         compare the owners of generic parameters.
14617         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
14618         with a TRUE argument - do a signature-only comparision.
14619
14620         * loader.c: Use the new _full() methods and pass the
14621         MonoGenericContainer to them.
14622
14623         * object-internals.h (MonoReflectionTypeBuilder): Added
14624         `MonoGenericContainer *generic_container' field.
14625         (MonoReflectionMethodBuilder): Likewise.
14626
14627 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
14628
14629         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
14630         case initial images of dynamic assemblies.
14631
14632         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
14633
14634         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
14635
14636         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
14637         length of event->other array.
14638         (typebuilder_setup_events): Ditto.
14639
14640         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
14641         'assembly_by_name' and add an 'assemblies' list.
14642
14643         * assembly.h assembly.c: Add a new search hook for determining whenever
14644         an assembly is already loaded. Use this instead of searching in the
14645         loaded_assemblies list.
14646
14647         * domain.c appdomain.c: Implement the new search hook so loaded 
14648         assemblies are now scoped by appdomain. Fixes #67727.
14649
14650 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
14651
14652         * threads.c (mono_thread_attach): Initialize synch_lock field so
14653         mono_thread_detach works again.
14654
14655         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
14656         'lib' too. Fixes #63130.
14657
14658 2004-10-06  Jackson Harper  <jackson@ximian.com>
14659
14660         * culture-info-tables.h: regenerated.
14661
14662 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
14663
14664         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
14665         implemented by other interfaces in the result. Fixes #65764.
14666         
14667         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
14668         Handle unloadable modules without crashing.
14669
14670         * image.c (load_modules): Revert the previous patch since modules must
14671         have a fixed index inside the array.
14672         
14673         * image.c (load_modules): Don't include native modules in the modules
14674         array.
14675
14676 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
14677
14678         * reflection.h: Add param_defaults field.
14679
14680         * reflection.c: Add support for parameter defaults in dynamic methods.
14681         Fixes #64595.
14682
14683         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
14684         an empty string when a type has no namespace. Fixes #64230.
14685
14686 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
14687
14688         * tabledefs.h: Added "internal" security actions to support non-CAS
14689         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
14690         Note: they do not seems to be used anymore in 2.0 (new metadata format)
14691
14692 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
14693
14694         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
14695         constructor of abstract class. Fixes #61689.
14696
14697 2004-10-04  Martin Baulig  <martin@ximian.com>
14698
14699         * class-internals.h (MonoGenericContainer): New type.
14700         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
14701         `MonoGenericContainer *generic_container'.
14702         (MonoClass): Replaced `gen_params' and `num_gen_params' with
14703         `MonoGenericContainer *generic_container'.
14704
14705         * metadata.c (mono_metadata_load_generic_params): Return a
14706         `MonoGenericContainer *' instead of a `MonoGenericParam *';
14707         removed the `num' argument.
14708
14709 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
14710
14711         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
14712         for dynamic images.
14713
14714         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
14715         machine fields.
14716
14717         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
14718
14719         * reflection.c: Save pe_kind and machine values into the generated
14720         image file.
14721
14722         * appdomain.c: Bump corlib version number.
14723
14724         * object-internals.h: Reorganize layout of LocalBuilder.
14725
14726         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
14727         New helper function.
14728
14729         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
14730         created MonoType for dynamic types. Fixes #66180.
14731
14732 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
14733
14734         * threadpool.c: the ares hashtable needs a critical section around it.
14735         this prevents some nasty segfaults
14736
14737 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
14738
14739         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
14740         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
14741         bug 67324).
14742         
14743 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
14744
14745         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
14746         
14747 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
14748
14749         * image.c: Always canonicalize image file names, to avoid loading
14750         the same assembly twice when referenced using a relative path.
14751
14752 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
14753
14754         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
14755
14756         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
14757
14758         * marshal.c: Fix warnings.
14759
14760 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
14761
14762         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
14763         attempting to marshal the delegate_trampoline as the method_addr.
14764         This patch has a static hashtable of marshalled delegates so that 
14765         we can map delegate_trampoline addresses back to delegates.  This
14766         allows a delegate passed to managed code to be passed back into native
14767         code.  Fixes #67039
14768
14769 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
14770
14771         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
14772
14773         * reflection.c (method_encode_code): Align method headers properly.
14774         Fixes #66025.
14775
14776 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
14777
14778         * marshal.c: In the runtime invoke wrapper, reset the abort
14779         exception if it is cached. This avoids the automatic rethrowal of 
14780         the exception after the catch of the wrapper. Also check for pending
14781         interruptions before calling the managed method. This is done using
14782         the new method emit_thread_force_interrupt_checkpoint, since the
14783         normal checkpoint method is ignored when running the invoke wrapper.
14784         * object.c: If the abort exception is rethrown, set the abort_exc
14785         field of the thread, so it will be rethrown aftere every catch.
14786         * threadpool.c: Only run an interruption checkpoint if what has been
14787         requested is a stop of the thread (aborts will be ignored).
14788         * threads.c: By default, a thread will now never be interrumped while
14789         running the runtime invoke wrapper (this ensures that runtime_invoke
14790         will always return to the caller if an exception pointer is provided).
14791         There is a new special method mono_thread_force_interruption_checkpoint()
14792         to force an interruption checkpoint even if running a protected
14793         wrapper, which is used by the same runtime invoke wrapper to do a check
14794         at a safe point.
14795
14796 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
14797
14798         * object.c, object-internals.h: Implemented mono_release_type_locks,
14799         which releases the cctor locks held by a thread.
14800         * threads.c, threads.h: In thread_cleanup, release cctor locks held
14801         by a thread. Added mono_thread_exit() method to be used to safely stop
14802         a thread.
14803
14804 2004-09-28  Raja R Harinath  <rharinath@novell.com>
14805
14806         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
14807         Move null check before dereference.  Avoid indexing beyond the end
14808         of the 'modules' array.
14809
14810 2004-09-28  Raja R Harinath  <rharinath@novell.com>
14811
14812         * metadata-internals.h (MonoImage): Add module_count field.
14813         * image.c (load_modules): Set image->module_count.
14814         (mono_image_load_file_for_image): Use image->module_count.
14815         * reflection.c (mono_image_load_module): Append to image->modules array 
14816         of dynamic assembly.
14817         (mono_module_get_object): Fix loop to actually increment index.
14818         Use image->module_count.
14819         * assembly.c (mono_assembly_load_references): Use image->module_count.
14820         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14821         Likewise.
14822
14823 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
14824
14825         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
14826         Avoid assert on generic types.
14827
14828 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
14829
14830         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
14831
14832         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
14833
14834         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
14835         function to convert a MarshalSpec structure to its managed counterpart.
14836
14837         * reflection.c: Fix warnings.
14838         
14839         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
14840         field.
14841
14842         * icall.c (mono_create_icall_signature): Fix build.
14843
14844 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
14845
14846         * icall.c: Add MakePointType icall.
14847
14848         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
14849         warnings.
14850
14851 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14852
14853         * threadpool.c: reuse allocated slots in the queue.
14854
14855 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
14856
14857         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
14858
14859         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
14860
14861         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
14862         previous change.
14863
14864         * tabledefs.h: Add constants for pinvoke attributes BestFit and
14865         ThrowOnUnmappableChar.
14866
14867         * icall.c (ves_icall_Type_GetPacking): New icall.
14868
14869 2004-09-24  Martin Baulig  <martin@ximian.com>
14870
14871         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
14872
14873 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14874
14875         * appdomain.c:
14876         (mono_domain_set): allow setting a domain that is being unloaded.
14877         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
14878         being unloaded.
14879
14880 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
14881
14882         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
14883         the GetCustomAttributes icall.
14884
14885 2004-09-23  Martin Baulig  <martin@ximian.com>
14886
14887         * object-internals.h (MonoReflectionGenericParam): Replaced
14888         'has_ctor_constraint', `has_reference_type' and `has_value_type'
14889         with `guint32 attrs'.
14890
14891 2004-09-23  Martin Baulig  <martin@ximian.com>
14892
14893         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
14894
14895 2004-09-23  Martin Baulig  <martin@ximian.com>
14896
14897         * object-internals.h (GenericParameterAttributes): New enum.
14898
14899 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
14900
14901         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
14902         
14903         * class.c (init_events): Fill out event->other field.
14904
14905         * class.c: Fix warnings.
14906
14907         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
14908
14909 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14910
14911         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
14912         walk which doesn't supply the IL offset.
14913
14914 2004-09-22  Martin Baulig  <martin@ximian.com>
14915
14916         * reflection.c (mono_reflection_setup_internal_class): If we're
14917         System.ValueType, System.Object or System.Enum, set
14918         `klass->instance_size' and create the vtable.
14919         (mono_reflection_create_internal_class): If we're an enum type,
14920         get the base class from our current corlib.
14921
14922 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
14923
14924         * reflection.h (MonoResolveTokenError): New type.
14925
14926         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
14927         icall.
14928
14929         * icall.c: Add an 'error' argument to the ResolveToken icalls.
14930
14931 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
14932
14933         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
14934         Support also calling constructors, but only for already allocated objects.
14935
14936 2004-09-17  Geoff Norton <gnorton@customerdna.com>
14937
14938         * reflection.c (type_get_qualified_name): If the klass is null
14939         return the typename to avoid a NullRefEx.
14940         (encode_cattr_value): Get the qualified name of the boxed type,
14941         not the underlying enumtype.  Fixes #62984.
14942
14943 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
14944
14945         * marshal.c: Fix problems with previous checkin.
14946
14947 2004-09-21    <vargaz@freemail.hu>
14948
14949         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
14950         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
14951
14952         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
14953
14954 2004-09-21  Geoff Norton <gnorton@customerdna.com>
14955
14956         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
14957         should only return a type for pointers, arrays, and passbyref types.
14958         Fixes bug #63841.
14959
14960 2004-09-21  Martin Baulig  <martin@ximian.com>
14961
14962         * domain.c (mono_debugger_check_runtime_version): New public
14963         function.
14964
14965         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
14966
14967 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
14968
14969         * reflection.c: Added missing sort to the declarative security 
14970         attributes table. MS implementation stops seeing the attributes if the
14971         token number regress in the table (as shown by ildasm and permview).
14972
14973 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
14974
14975         * object-internals.h (MonoReflectionModule): Add 'token' field.
14976         
14977         * reflection.c (mono_reflection_get_token): Add support for Module
14978         and Assembly.
14979         (mono_module_get_object): Set 'token' field.
14980         (mono_module_file_get_object): Set 'token' field.
14981
14982         * icall.c: Add new Assembly and Module icalls.
14983
14984         * appdomain.c: Bump corlib version.
14985
14986 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
14987
14988         * loader.h loader.c class.h class.c: Add helper functions for obtaining
14989         tokens of metadata objects.
14990
14991         * reflection.h reflection.c (mono_reflection_get_token): New function
14992         to obtain the token of a metadata object.
14993
14994         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
14995
14996 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
14997
14998         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
14999         
15000         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
15001
15002 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
15003
15004         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
15005         * object-internals.h: Added 3 MonoArray* members to MonoReflection
15006         AssemblyBuilder to access the permissions set in the class lib.
15007         * reflection.c: Added security attributes encoding step in 
15008         mono_image_build_metadata.
15009         * tabledefs.h: Added new security actions defined in 2.0:
15010         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
15011
15012 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
15013
15014         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
15015         macro parameter.
15016
15017 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
15018  
15019         * locales.c: nullify the ICU_collator member of CompareInfo when it is
15020           finalized. There where random SIGSEVs at program termination, when
15021           an object being finalized was trying to do a string comparison and
15022           the current culture was already finalized.
15023  
15024 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15025
15026         * threads.c: call thread_cleanup before finishing the thread if we get
15027         there.
15028
15029 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
15030
15031         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
15032         assemblies from the parent. Fixes #65665.
15033
15034 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
15035
15036         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
15037         modifiers.
15038
15039 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
15040
15041         * reflection.h: add prototype for mono_get_dbnull_object
15042         * reflection.c: add prototypes for get_default_param_value_blobs 
15043         and mono_get_object_from_blob for fussier compilers
15044
15045 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
15046  
15047         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
15048         false deadlock checks in class initialization.
15049  
15050 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15051
15052         * image.c (mono_image_addref): Fix comment.
15053
15054         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
15055         possible.
15056
15057 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
15058
15059         * reflection.c (mono_param_get_objects): Modified to return
15060         ParameterInfo.DefaultValue object.
15061
15062         (get_default_param_value_blobs):
15063         (mono_get_object_from_blob):
15064         (mono_get_dbnull_object): New helper routines. 
15065
15066         * object.c (mono_get_constant_value_from_blob): New helper routine
15067         carved out from get_default_field_value ()
15068
15069         * object-internals.h (mono_get_constant_value_from_blob): Added
15070         function declaration.
15071
15072 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15073
15074         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
15075         referenced assemblies. Fixes #62135.
15076
15077         * exception.h exception.c (mono_get_exception_file_not_found2): New
15078         helper function.
15079
15080 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15081
15082         * class.h class.c: Add mono_type_get_underlying_type ().
15083
15084 2004-09-09  Geoff Norton <gnorton@customerndna.com>
15085
15086         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
15087         Fix GetTypes() to support dynamically created assemblies.
15088
15089 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
15090
15091         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
15092         
15093         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
15094         previous patch.
15095
15096         * reflection.h reflection.c loader.c: Allow dynamic construction of
15097         pinvoke methods. Fixes #65571.
15098         
15099         * reflection.c (mono_reflection_get_type): Revert previous change since
15100         it causes regressions.
15101
15102 2004-09-08  Martin Baulig  <martin@ximian.com>
15103
15104         * class.c (class_compute_field_layout): Don't call
15105         mono_class_layout_fields() for open generic instances.
15106
15107 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
15108         * threads.c appdomain.c: fix typo in GC macro
15109
15110 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15111
15112         * threads.c: don't call mono_thread_detach() in start_wrapper(),
15113         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
15114
15115 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
15116
15117         * image.c (mono_image_close): Applied patch from 
15118         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
15119         assembly is loaded multiple times from data.
15120         
15121         * image.c (mono_image_open): Fix warning.
15122
15123 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15124
15125         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
15126         once. Fixes #58334.
15127         
15128         * reflection.c (mono_reflection_create_runtime_class): Initialize
15129         klass->nested_classes. Fixes #61224.
15130
15131 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15132
15133         * threads.c: sched_yield() on exit, to allow threads to quit.
15134
15135 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15136
15137         * object.c (mono_unhandled_exception): Remove leftover debug code.
15138
15139 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
15140
15141         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
15142
15143 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15144
15145         * marshal.c (emit_marshal_array): Really null terminate string arrays.
15146         
15147         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
15148
15149 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15150
15151         * marshal.c (emit_marshal_array): Null terminate string arrays.
15152         
15153         * marshal.c (raise_auto_layout_exception): Fix warning.
15154
15155         * reflection.c (mono_param_get_objects): Initialize the default value
15156         with DBNull.Value, not null. Fixes #62123.
15157
15158 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
15159
15160         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
15161         throw an exception with a cute explanation.
15162
15163 2004-09-06  Dick Porter  <dick@ximian.com>
15164
15165         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
15166         Close the new process's thread handle, as we don't use it.  The
15167         handle stays around forever otherwise.
15168
15169 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15170
15171         * object.c (arith_overflow): Fix warning.
15172
15173         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
15174         calling conventions in method refs. Fixes #65352.
15175
15176         * reflection.c: Fix warnings.
15177
15178 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
15179
15180         * icall.c: Add a new icall for Array.Clear
15181
15182 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
15183
15184         * object.c: When allocating an array, we have to throw
15185         an overflow exception if any of the lengths are < 0.
15186
15187 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15188
15189         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
15190         properly. Also move implementation of string array marshalling to 
15191         managed code. Fixes #42316.
15192
15193 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15194
15195         * assembly.c: provide more information when loading an assembly fails.
15196
15197 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15198
15199         * filewatcher.c: don't expect the development fam package to be
15200         installed.
15201
15202 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
15203
15204         * marshal.c: Make a copy of the signature cookie since it will be
15205         freed by the caller.
15206         
15207         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
15208
15209         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
15210
15211         * metadata.c (mono_metadata_free_marshal_spec): New function to free
15212         marshal specs.
15213
15214         * marshal.c: More refactoring.
15215         
15216         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
15217         smaller functions.
15218
15219 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
15220
15221         * object.c: In mono_message_invoke, fill the output parameter array after
15222           calling the managed method (it was done before the call). This fixes
15223           bug #59299.
15224
15225 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15226
15227         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
15228         as well.
15229
15230 2004-09-02  Martin Baulig  <martin@ximian.com>
15231
15232         * class.c (mono_class_instance_size): Don't allow generic type
15233         definitions or open generic instances.
15234         (mono_class_array_element_size): If we're a value type, call
15235         mono_class_instance_size() on the original class.
15236
15237         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
15238         handle generic instances.
15239
15240         * mono-debug-debugger.c (write_type): Handle generic instances
15241         like classes.
15242
15243 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15244
15245         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
15246         the allocation request fails. Fixes #65089.
15247
15248         * object.c (mono_runtime_free_method): Do not call mono_free_method.
15249         
15250         * object.c (mono_runtime_free_method): New function to free a dynamic
15251         method.
15252
15253         * marshal.c (mono_delegate_free_ftnptr): New function to free the
15254         delegate trampoline.
15255
15256         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
15257         with hasthis as dynamic,
15258
15259         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
15260
15261         * domain.c (mono_jit_info_table_remove): New function to remove an
15262         entry from the jit info table.
15263
15264         * class-internals.h (MonoMethod): Add 'dynamic' field.
15265
15266         * loader.c: Fix warnings.
15267
15268 2004-09-01  Martin Baulig  <martin@ximian.com>
15269
15270         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
15271         instead of mono_debugger_lock() because the latter one is a no-op
15272         unless running in the debugger.
15273
15274 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
15275
15276         * class.c (class_compute_field_layout): Classes with auto-layout or
15277         reference fields are not blittable.
15278         
15279 2004-09-01  Dick Porter  <dick@ximian.com>
15280
15281         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
15282         mono_image_get_filename() to get the assembly location.
15283
15284         * icall.c:
15285         * metadata.h: Fix compile warnings
15286
15287 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
15288
15289         * class.c (class_compute_field_layout): System.Object is blittable.
15290
15291         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
15292         as in/out. Fixes #59909.
15293
15294 2004-09-01  Martin Baulig  <martin@ximian.com>
15295
15296         * metadata.h (MONO_TYPE_ISREFERENCE): Call
15297         mono_metadata_generic_inst_is_valuetype() if we're a generic
15298         instance to check whether our underlying type is a reference type.
15299
15300 2004-09-01  Martin Baulig  <martin@ximian.com>
15301
15302         * metadata.c (mono_type_size): If we're a generic instance, call
15303         mono_class_value_size() for value types.
15304
15305 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
15306
15307         * marshal.c: Implement more custom marshalling functionality. Fixes
15308         #64915.
15309
15310 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15311
15312         * mono-debug.c, debug-mono-symfile.c: add some locking love.
15313
15314 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15315
15316         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
15317
15318         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
15319
15320         * icall.c: Fix some warnings.
15321
15322         * threads.c (abort_appdomain_thread): Fix unref errors.
15323         (mono_thread_current): Fix THREAD_DEBUG define.
15324
15325 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15326
15327         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
15328
15329         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
15330
15331 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
15332
15333         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
15334         string arrays.
15335
15336 2004-08-28  Martin Baulig  <martin@ximian.com>
15337
15338         * metadata.c
15339         (mono_metadata_generic_inst_is_valuetype): New public function.
15340
15341         * metadata.h (MONO_TYPE_ISSTRUCT): Call
15342         mono_metadata_generic_inst_is_valuetype() if we're a generic
15343         instance to check whether our underlying type is a valuetype.
15344
15345 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15346
15347         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
15348         #63768.
15349
15350 2004-08-25  Martin Baulig  <martin@ximian.com>
15351
15352         * loader.c (mono_get_method_from_token): Abstract methods can also
15353         be generic and thus have type parameters.
15354
15355         * metadata-internals.h
15356         (MonoDynamicImage): Added `GPtrArray *gen_params'.
15357
15358         * reflection.c (mono_image_get_generic_param_info): Don't create a
15359         metadata row, just add an entry to the `gen_params' array.
15360         (build_compressed_metadata): Sort the `gen_params' array and then
15361         actually create the metadata.
15362
15363 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15364
15365         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
15366
15367 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15368
15369         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
15370
15371 2004-08-24  Martin Baulig  <martin@ximian.com>
15372
15373         * class.cs (mono_class_is_subclass_of): Like an interface, a
15374         generic instance also derives from System.Object.
15375
15376 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15377
15378         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
15379         custom modifiers to be in any order. Fixes #61990.
15380
15381 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15382
15383         * object.c: Register mono_object_new_fast icall.
15384         
15385         * object.c (mono_class_get_allocation_ftn): Return to calling
15386         mono_object_new_fast, since it seems faster to compute the object 
15387         size in unmanaged code than passing it as a parameter.
15388
15389         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
15390
15391         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
15392         this function with Boehm as the oom handler, so we don't have to check
15393         the result of GC_malloc.
15394
15395         * object.c: Remove checks for oom.
15396
15397         * object.h object.c (mono_class_get_allocation_ftn): New function to
15398         return the icall which can be used to allocate an instance of a given
15399         class. 
15400
15401         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
15402
15403         * class-internals.h: Add 'enabled' field.
15404
15405 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
15406
15407         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
15408
15409 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
15410         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
15411         value 0x0010.
15412
15413 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15414
15415         * appdomain.c: use the Tls function for appdomain too,
15416         at Zoltan's request. Actually return in mono_context_get
15417
15418         * appdomain.c, profiler.c, threads.c: use __thread
15419
15420 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15421
15422         * appdomain.c threads.c: Call GC_CreateThread on windows.
15423
15424         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
15425         multiple libraries since this don't work on windows.
15426
15427 2004-08-18  Martin Baulig  <martin@ximian.com>
15428
15429         * class-internals.h
15430         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
15431         MonoMethodHeader.
15432
15433         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
15434         MonoMethodNormal since we also need it for abstract and interface
15435         methods.
15436
15437         * reflection.c
15438         (build_compressed_metadata): Sort the GenericParam table.
15439         (mono_image_create_token): Added `gboolean create_methodspec'
15440         argument; this is false when generating a MethodImpl token.
15441         (reflection_methodbuilder_to_mono_method): Abstract and interface
15442         methods may also have generic parameters.
15443
15444 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15445
15446         * appdomain.c: thread local alloc
15447
15448 2004-08-17  Martin Baulig  <martin@ximian.com>
15449
15450         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
15451
15452         * icall.c
15453         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
15454         argument.
15455
15456         * class.c (mono_type_get_full_name): New public function.
15457         (mono_type_get_name): Don't include the type arguments.
15458
15459 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
15460
15461         * Makefile.am: Build static versions of libmetadata and libmonoruntime
15462         for inclusion into the mono executable.
15463
15464 2004-08-16  Martin Baulig  <martin@ximian.com>
15465
15466         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
15467         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
15468
15469 2004-08-14  Martin Baulig  <martin@ximian.com>
15470
15471         * class.c (dup_type): Also copy the `byref' field.
15472
15473 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
15474
15475         * reflection.c (create_dynamic_mono_image): Revert the last change 
15476         since it breaks bootstrap.
15477
15478 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15479
15480         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
15481
15482         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
15483         not free them with g_free.
15484
15485 2004-08-11  Martin Baulig  <martin@ximian.com>
15486
15487         * reflection.c (mono_reflection_setup_internal_class): Also call
15488         mono_class_setup_mono_type() if we already have a `tb->type.type'.
15489
15490 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
15491
15492         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
15493         called during default (first) AppDomain creation. Keep track of
15494         Evidence when loading assemblies.
15495
15496 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
15497
15498         * opcodes.c, opcodes.h: reduce runtime relocations.
15499
15500 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15501
15502         * culture-info.h, locales.c: fixes and chages to sue the new
15503         optimized format of the locale data.
15504         * culture-info-tables.h: regenerated.
15505
15506 2004-08-06  Geoff Norton <gnorton@customerdna.com>
15507         
15508         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
15509
15510 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
15511
15512         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
15513         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
15514         * domain-internals.h: icall declaration.
15515         * icall.c: icall registration.
15516         * object-internals.h: New fields in MonoAssembly for CAS.
15517
15518 2004-08-05  Duncan Mak  <duncan@ximian.com>
15519
15520         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15521         CEE_LDELEM_ANY.
15522
15523 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
15524
15525         * reflection.c: fix to deal with object[] arrays in custom ctors
15526         (bug #62550).
15527
15528 2004-08-05  Martin Baulig  <martin@ximian.com>
15529
15530         * class.c (mono_class_array_element_size): Added support for
15531         generic instances and correctly handle "recursive" types.
15532
15533 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15534
15535         * assembly.c: Fix warnings.
15536
15537 2004-08-04  Martin Baulig  <martin@ximian.com>
15538
15539         * class.c
15540         (mono_type_get_name_recurse): Added `gboolean include_arity'
15541         argument specifying whether or not we should include the generic
15542         arity in the type name.
15543         (_mono_type_get_name): New static function.
15544         (mono_class_setup_vtable): If we're a generic instance, don't
15545         include the generic arity in the names of explicit method
15546         implementations.        
15547
15548 2004-08-03  Martin Baulig  <martin@ximian.com>
15549
15550         * class.c (mono_type_get_name_recurse): Enclose the generic type
15551         arguments in `<', '>'.
15552
15553 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
15554
15555         * gc.c: make GC warning messages use the trace API, they are just
15556         noise to most of the users.
15557
15558 2004-08-03  Martin Baulig  <martin@ximian.com>
15559
15560         * debug-mono-symfile.c (read_string): Correctly read the string.
15561
15562 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15563
15564         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
15565         
15566         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
15567         icalls.
15568         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
15569
15570 2004-07-30  Martin Baulig  <martin@ximian.com>
15571
15572         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
15573         Reflect latest symbol writer changes.   
15574
15575 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
15576
15577         * object.c: always create an object if null is passed
15578         to Invoke() where a valuetype is expected.
15579
15580 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
15581
15582         * marshal.c (mono_marshal_init): make managed
15583         signatures match native ones better for 64bits.
15584
15585 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15586
15587         * appdomain.c: hack to build correctly the private bin path on windows.
15588         Fixes bug #61991.
15589
15590 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
15591
15592         * assembly.c: Load mscorlib from the correct framework directory
15593           (mono/<version>/mscorlib.dll).
15594         * appdomain.h: Added prototypes for new functions.
15595         * internals.h: Added some prototypes.
15596         * domain.c: When initializing the runtime, get from the executable and
15597           the configuration files the runtime version that the app supports.
15598           Added support methods for reading app.exe.config. Added list of versions
15599           supported by the JIT. Added two new methods: mono_init_from_assembly,
15600           which initializes the runtime and determines the required version from
15601           the provided exe file, and mono_init_version, which initializes
15602           the runtime using the provided version.
15603         * icall.c: Get machine.config from version-specific directory.
15604         * reflection.c: When generating an image, embed the version number
15605           of the current runtime.
15606
15607 2004-07-28  Dick Porter  <dick@ximian.com>
15608
15609         * socket-io.c
15610         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
15611         returned sockaddr size before creating the remote address object.
15612         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
15613         61608.
15614
15615 2004-07-28  Dick Porter  <dick@ximian.com>
15616
15617         * locales.c (string_invariant_compare_char): Fix invariant char
15618         compares between upper and lower cases.  Fixes bug 61458.
15619
15620 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
15621         
15622         * marshal.c: actually cache stelem.ref wrappers.
15623         
15624 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15625
15626         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
15627         sections and remove the mono_cli_rva_map () function.
15628
15629 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15630
15631         * debug-mono-symfile.c: fix one more endianess issue, from a patch
15632         by Geoff Norton (<gnorton@customerdna.com>).
15633
15634 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
15635
15636         * class.c: fix class loads for pointer types (typeof(int) !=
15637         typeof(int*)).
15638
15639 2004-07-27  Martin Baulig  <martin@ximian.com>
15640
15641         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
15642         reading the debugging information from an external ".mdb" file.
15643
15644 2004-07-24  Martin Baulig  <martin@ximian.com>
15645
15646         * reflection.c (mono_image_get_type_info): Only write a class
15647         layout entry if we actually have a size or a packing size.
15648
15649 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
15650
15651         * reflection.c (type_get_fully_qualified_name): 
15652         insert cast to get type checking of ?: with non-gcc compilers
15653
15654 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
15655
15656         * rand.c: use g_getenv for both lookups of
15657         MONO_EGD_SOCKET
15658
15659 2004-07-17  Martin Baulig  <martin@ximian.com>
15660
15661         * reflection.c (mono_reflection_bind_generic_method_parameters):
15662         Set `gmethod->reflection_info'.
15663
15664 2004-07-17  Martin Baulig  <martin@ximian.com>
15665
15666         * class.c (mono_class_create_from_typedef): Insert the newly
15667         created class into the hash table before computing the interfaces
15668         since we could be called recursively.
15669
15670 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
15671
15672         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
15673         function to implement stelem.ref in managed code
15674         * class-internals.h, debug-helpers.c: a new wrapper type
15675         for the above.
15676
15677 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
15678
15679         * gc.c: allow GC handles to work even when no GC is compiled in.
15680         Fix part of bug #61134 (GetAddrOfPinnedObject).
15681
15682 2004-07-13  Peter Williams  <peter@newton.cx>
15683  
15684         * process.c (complete_path): Make sure we don't attempt to execute
15685         directories.
15686  
15687 2004-07-12  Geoff Norton <gnorton@customerdna.com>
15688
15689         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
15690           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
15691           and will add/subtract the hour if needed
15692
15693 2004-07-12  Martin Baulig  <martin@ximian.com>
15694
15695         * reflection.c (mono_field_get_object): If we have
15696         `field->generic_info', take the attributes from
15697         `field->generic_info->generic_type'.    
15698
15699 2004-07-12  Martin Baulig  <martin@ximian.com>
15700
15701         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
15702         This function must be called before initializing the runtime.
15703         (mono_debug_init_1): New function; call this after initializing
15704         the runtime, but before loading the assembly.  It tells the
15705         debugger to load corlib and the builtin types.
15706
15707         * mono-debug-debugger.c: Did some larger changes in the debugging
15708         code; support recursive class declarations, make sure we actually
15709         add all classes.
15710
15711 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15712
15713         * debug-helpers.c: undo my previous patch and fixed the real issue in
15714         ../mini/exceptions-x86.c
15715
15716 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15717
15718         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
15719         when no HOME env. variable was set and a NullRef was thrown in a .cctor
15720         called from other .cctors.
15721
15722 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
15723
15724         * loader.c: Removed the mono_loader_wine_init hack now that we are
15725         doing a managed version of Windows.Forms.
15726
15727 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
15728
15729         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
15730         threadpool.c, threads.c: remove static data from rootset.
15731
15732 2004-07-09  Dick Porter  <dick@ximian.com>
15733
15734         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
15735         Don't do any more processing if the matched length was 0.  It was
15736         increasing the size of the string before.  Fixes bug 61167.
15737
15738 2004-07-09  Dick Porter  <dick@ximian.com>
15739
15740         * socket-io.h:
15741         * socket-io.c
15742         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
15743         Add support for SO_PEERCRED if its available.
15744
15745 2004-07-09  Peter Bartok <pbartok@novell.com>
15746         * loader.c: winelib.exe.so error message is now only displayed if
15747         MONO_DEBUG is set. To help us avoid questions when people are trying
15748         out the new Managed.Windows.Forms.
15749
15750 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
15751
15752         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
15753         for isinst and castclass wrappers.
15754
15755         * class-internals.h icall.c: Move registration and lookup of JIT icalls
15756         to libmetadata from the JIT, so they could be used by the marshalling
15757         code and the interpreter.
15758
15759         * marshal.c: Register marshalling related JIT icalls here instead of
15760         in mini.c. Use CEE_MONO_ICALL instead of the family of 
15761         CEE_MONO_PROC<x> opcodes to call marshalling functions.
15762
15763         * metadata.h: Remove unneeded marshalling conversions.
15764
15765         * opcodes.c: Update for new opcodes.
15766         
15767 2004-07-08  Martin Baulig  <martin@ximian.com>
15768
15769         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
15770         (mono_debug_get_domain_data): Make this function static.
15771
15772 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
15773
15774         * gc.c, object.h: add nice GC handle API for embedders.
15775
15776 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
15777
15778         * reflection.c: more changes for the new api
15779
15780         * object.c: When we reflect on a field w/ a constant value, it
15781         will not have a memory location, so we must access metadata. Also,
15782         allow easier reading of strings so that we can read them from
15783         the constant data.
15784
15785         * class.c (mono_class_layout_fields): no need for literal fields here.
15786
15787         * class-internals.h: api changes for const fields
15788
15789         * icall.c (ves_icall_get_enum_info): use new apis for const fields
15790
15791 2004-07-06  Martin Baulig  <martin@ximian.com>
15792
15793         * mono-debug.h: Increment version number to 44.
15794
15795         * mono-debug.c (mono_debug_add_wrapper): The second argument is
15796         now a gpointer, rewrote this whole method.
15797
15798         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
15799         function.  Add information about the wrapper in a new "misc table".
15800
15801         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
15802         for the new misc table.
15803
15804 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
15805
15806         * metadata-internals.h image.c: Add a cache for helper signatures.
15807
15808         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
15809
15810 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
15811
15812         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
15813         delegates from a delegate. Fixes #61033.
15814         
15815         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
15816         marshalling of stringbuilder arrays. Fixes #59900.
15817
15818 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15819
15820         * icall.c: Add EnumBuilder:setup_enum_type icall.
15821
15822 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
15823
15824         * icall.c: Added a new icall for the property version of
15825         OffsetOfStringData.
15826
15827 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15828
15829         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
15830         it has a constant size across platforms.
15831
15832         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
15833         stack trace.
15834
15835 2004-06-29  Martin Baulig  <martin@ximian.com>
15836
15837         * mono-debug.c (mono_debug_add_method): Protect the whole function
15838         in mono_debugger_lock(), not just parts of it.
15839
15840 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15841
15842         * reflection.c: make sure padding bytes in heaps are zeroed.
15843
15844 2004-06-24  David Waite  <mass@akuma.org>
15845
15846         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
15847         image.c, loader.c, locales.c, marshal.c, metadata.c,
15848         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
15849         string-icalls.c, threads.c: change to C90-style comments from C99 /
15850         C++ -style
15851
15852 2004-06-24  Dick Porter  <dick@ximian.com>
15853
15854         * threads.c
15855         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
15856         return createdNew.  Fixes bug 60412.
15857
15858         * threads-types.h: 
15859         * icall.c: Add createdNew parameter to CreateMutex icall
15860
15861 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15862
15863         * reflection.c, object-internals.h: save default value in params.
15864
15865 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15866
15867         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
15868         no need to build a new path combining that with the application base.
15869         Fixes bug #60442.
15870
15871 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15872
15873         * reflection.c: fixed minor standard compliance issues.
15874
15875 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
15876
15877         * reflection.c: fixed issue with encoding some custom attributes
15878         (arrays in properties and fields, bug #60411).
15879
15880 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15881
15882         * reflection.c: fix start address when copying the public key token.
15883
15884 2004-06-23  Martin Baulig  <martin@ximian.com>
15885
15886         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
15887         the `exc' object in a static object to put it into the GC's root set.
15888
15889 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15890
15891         * reflection.c: make mono_reflection_setup_internal_class ()
15892         callable a second time to setup a new parent class.
15893
15894 2004-06-23  Dick Porter  <dick@ximian.com>
15895
15896         * threads.c: Check for WAIT_IO_COMPLETION return values.
15897
15898 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
15899
15900         * appdomain.c: Removed the g_free on the public key token. Now copy 
15901         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
15902         * assembly.c: Added public key token string value when loading 
15903         assemblies. Fix bug #60439.
15904         * icall.c: Added missing informations (like public key) in 
15905         GetReferencedAssemblies. Fix #60519.
15906         * image.h: Changed definition for public key token from const char*
15907         public_tok_value to guchar public_key_token [17];
15908         * reflection.c: Updated for changes to public key token.
15909
15910 2004-06-22  Lluis Sanchez Gual
15911
15912         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
15913         for the field in base classes.
15914
15915 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
15916
15917         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
15918         mark headers as not supported, they are installed only for use by the
15919         debugger.
15920
15921 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
15922
15923         * *.c, *.h: avoid namespace pollution in public headers.
15924
15925 2004-06-21  Martin Baulig  <martin@ximian.com>
15926
15927         * exception.c (mono_get_exception_security): It's in
15928         "System.Security", not in "System".
15929
15930         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
15931         the exception classes.
15932
15933 2004-06-21  Martin Baulig  <martin@ximian.com>
15934
15935         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
15936         Protect the exception object from being finalized.
15937
15938 2004-06-21  Martin Baulig  <martin@ximian.com>
15939
15940         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
15941         public function.
15942
15943 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
15944
15945         * reflection.c: Load the assembly in mono_reflection_type_from_name,
15946         if it was not loaded before. Fix parts of #60439.
15947
15948 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
15949
15950         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
15951         code that was broken since Ben's change: wrappers are now
15952         dependent on the method signature only again.
15953
15954 2004-06-21  Martin Baulig  <martin@ximian.com>
15955
15956         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
15957         added interface support.
15958
15959 2004-06-21  Martin Baulig  <martin@ximian.com>
15960
15961         * class.c (mono_vtable_get_static_field_data): New public method.
15962
15963 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
15964
15965         * filewatcher.c : Windows build fix to be compliant with API changes.
15966
15967 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15968
15969         * class.h, class.c: more accessors.
15970         * metadata.h, metadata.c: prepare for hiding MonoType and
15971         MonoMethodSignature: people should use the accessors from now on
15972         outside of the tree.
15973
15974 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15975
15976         * *.c, *.h: more API cleanups.
15977
15978 2004-06-18  Jackson Harper  <jackson@ximian.com>
15979
15980         * assembly.c: Trace loading assemblies.
15981         * loader.c: Trace loading native libraries.
15982         * mono-config.c: Trace loading config files.
15983         
15984 2004-06-18  Dick Porter  <dick@ximian.com>
15985
15986         * locales.c: Tell ICU the lengths of strings, it can cope with
15987         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
15988
15989 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15990
15991         * image.c: swapped name/filename;
15992
15993 2004-06-18  Martin Baulig  <martin@ximian.com>
15994
15995         * mono-debug-debugger.c (write_class): Write the parent class at
15996         the end of the header.
15997
15998 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
15999
16000         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
16001
16002 2004-06-17  Raja R Harinath  <rharinath@novell.com>
16003
16004         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
16005         (bundle_obj): New conditional define.
16006         (BUILT_SOURCES): Remove.
16007         ($(bundle_srcs)): Make parallel-make safe.
16008         (libmonoruntime_la_LIBADD): Make unconditional.
16009         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
16010         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
16011
16012 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
16013
16014         * culture-info-tables.h: It was inconsistent with the latest
16015           supp info files.
16016
16017 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
16018
16019         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
16020         be loaded.
16021
16022         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
16023         with gcc 2.95.
16024
16025 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16026
16027         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
16028         cleaned up public header threads.h.
16029
16030 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16031
16032         * Makefile.am, *.c, *.h: more API cleanups.
16033
16034 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16035
16036         * Makefile.am: removed monosn from compilation.
16037         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
16038         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
16039         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
16040         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
16041         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
16042         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
16043
16044 2004-06-15  Jackson Harper  <jackson@ximian.com>
16045
16046         * assembly.c: Make locales lower case when searching the GAC for
16047         assemblies. gacutil will always make locales lowercase when
16048         installing so this effectively makes them case insensitive.
16049         
16050 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
16051
16052         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
16053         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
16054           parameter which allows to choose whether the wait can be interrupted or 
16055           not. Also added the method mono_monitor_enter(), which locks the monitor
16056           using an infinite wait and without allowing interruption.
16057           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
16058           interrupted.
16059         * object.h: Added new fields in MonoThread. suspend_event holds the event
16060           used to susped/resume the thread. synch_lock is the lock object to use for
16061           modifying the thread state.
16062         * threads.c: Use the new synch_lock object for locking, instead of "this",
16063           which can generate deadlocks.
16064           Moved thread state change in Thread.Sleep and Thread.Join from managed
16065           to unmanaged code. This avoids a deadlock when the thread was suspended
16066           just after acquiring the thread lock.
16067           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
16068           Implemented Thread.Suspend using an event instead of ThreadSuspend,
16069           which is not fully implemented in the io-layer.
16070         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
16071
16072 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
16073
16074         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
16075         threads-types.h: more API cleanups.
16076
16077 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
16078
16079         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
16080         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
16081         threadpool.c, threads.c: first pass at the exported API cleanup.
16082
16083 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16084
16085         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
16086
16087 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16088
16089         * icall.c: added internalGetHome.
16090
16091 2004-06-14  Dick Porter  <dick@ximian.com>
16092
16093         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
16094         possible to return successfully when '.' or '..' were the only
16095         entries in a directory, but were skipped.  The MonoIOStat was not
16096         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
16097         Fixes bug 59574.
16098
16099 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16100
16101         * reflection.c: make binaries run on .Net 1.1 by default.
16102
16103 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16104
16105         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
16106
16107 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
16108
16109         * marshal.c: keep track of struct size with explicit layout
16110         (bug #59979).
16111
16112 2004-06-12  Martin Baulig  <martin@ximian.com>
16113
16114         * mono-debug-debugger.c: Comment out a debugging g_message().
16115
16116 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
16117
16118         * reflection.c, reflection.h: do not free custom attrs that are cached.
16119         * icall.c: use braces to make code clearer.
16120
16121 2004-06-11  Martin Baulig  <martin@ximian.com>
16122
16123         * class.h (MonoInflatedField): New type.
16124         (MonoClassField): Replaced `MonoType *generic_type' with
16125         `MonoInflatedField *generic_info'.
16126
16127         * icall.c
16128         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
16129
16130 2004-06-11  Martin Baulig  <martin@ximian.com>
16131
16132         * reflection.c (mono_image_create_method_token): Correctly encode
16133         varargs methods.
16134
16135 2004-06-11  Martin Baulig  <martin@ximian.com>
16136
16137         * metadata.c (mono_metadata_parse_method_signature): When parsing
16138         a MethodDef which has VarArgs, also set sentinelpos if we don't
16139         have any parameters.
16140
16141 2004-06-11  Martin Baulig  <martin@ximian.com>
16142
16143         * verify.c (mono_method_verify): In CEE_CALL, use
16144         mono_method_get_signature() to get the method's signature, unless
16145         we're a PInvoke method.
16146
16147 2004-06-10  Jackson Harper  <jackson@ximian.com>
16148
16149         * assembly.c: Use <path>/lib/mono/gac for the extra paths
16150         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
16151         logical name as the supplied path is just a prefix to the gac not
16152         the direct path to it.
16153         
16154 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
16155
16156         * reflection.c: make the token for a created method match
16157         the token of the MethodBuilder it was created from
16158         (IKVM requires this behaviour now).
16159
16160 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
16161
16162         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
16163         reflection.c, socket-io.c: leak fixes.
16164
16165 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16166
16167         * icall.c: handle sentinel pos in vararg methods in position different
16168         from 0.
16169
16170 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16171
16172         * culture-info-tables.h: freshly generated.
16173
16174 2004-06-09  Martin Baulig  <martin@ximian.com>
16175
16176         * loader.c (mono_get_method_constrained): Call `mono_class_init
16177         (constrained_class)'.   
16178
16179 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
16180
16181         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
16182         any methods. Fixes #59629.
16183
16184 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
16185
16186         * culture-info-tables.h: reflecting locale-builder updates.
16187
16188 2004-06-08  Dick Porter  <dick@ximian.com>
16189
16190         * object.h:
16191         * locales.c: Fixed compile warnings, including a real bug in
16192         CompareInfo_internal_compare.
16193         
16194 2004-06-08  Dick Porter  <dick@ximian.com>
16195
16196         * locales.c
16197         (ves_icall_System_Globalization_CompareInfo_internal_index):
16198         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
16199         Double-check the resuls of usearches, because ICU currently
16200         ignores most of the collator settings here.  Fixes bug 59720.
16201         
16202 2004-06-08  Dick Porter  <dick@ximian.com>
16203
16204         * locales.c
16205         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
16206         Fix memory leak and segfault-causing typo.  No idea how this one
16207         lasted so long without being noticed.
16208
16209 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
16210
16211         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
16212         any methods. Fixes #59629.
16213
16214 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16215
16216         * assembly.c:
16217         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
16218         own the critical section before). Removed dead code (that's done
16219         in the preload hook).
16220
16221         (mono_assembly_load_with_partial_name): call the preload hook.
16222
16223 2004-06-08  Martin Baulig  <martin@ximian.com>
16224
16225         * metadata.c (mono_metadata_signature_alloc): Default
16226         `sentinelpos' to -1.
16227
16228         * reflection.c (mono_image_get_array_token): Likewise.
16229
16230 2004-06-08  Martin Baulig  <martin@ximian.com>
16231
16232         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
16233
16234         * metadata.c (mono_metadata_parse_method_signature): When parsing
16235         a MethodDef which has VarArgs, set sentinelpos.
16236
16237         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
16238         `gint16' since we're using -1 for non-varargs methods.
16239
16240         * reflection.c
16241         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
16242         (method_encode_signature): Added varargs support.
16243         (method_builder_encode_signature): Likewise.
16244         (mono_image_get_varargs_method_token): New static method.
16245         (mono_image_create_method_token): New public method; this is
16246         called via an icall instead of mono_image_create_token() when
16247         calling a varargs method.       
16248
16249 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
16250
16251         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
16252
16253 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
16254
16255         * culture-info-tables.h : Reflecting the latest locale-builder that
16256           fixed empty array representation ({} to {0}).
16257
16258 2004-06-07  Jackson Harper  <jackson@ximian.com>
16259
16260         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
16261         looking up extra gac paths. This allows MONO_GAC_PATH to act
16262         exactly like a prefix.
16263         
16264 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
16265
16266         * reflection.c (mono_reflection_type_from_name): Make a copy of the
16267         type name before modifying it. Fixes #59405.
16268
16269 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
16270
16271         * culture-info.h: added fields for "all datetime patterns".
16272         * locales.c: (  ves_icall_System_Globalization_CultureInfo
16273           _construct_datetime_format ()): fill xxx_patterns fields.
16274         * object.h: added fields for "all datetime patterns" to
16275           MonoDateTimeFormatInfo.
16276         * culture-info-tables.h: reflecting locale-builder updates.
16277
16278 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
16279
16280         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
16281         the event has no add and remove methods. Fixes #59629.
16282
16283 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
16284
16285         * object.c: Fixed possible integer overflow when allocating large
16286         strings.
16287
16288 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
16289
16290         * culture-info-tables.h: reflecting locale-builder updates.
16291
16292 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
16293
16294         * culture-info-tables.h: reflecting locale-builder updates.
16295
16296 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
16297
16298         * culture-info-tables.h: reflecting locale-builder updates.
16299
16300 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
16301
16302         * threads.c: Made Thread.Sleep abortable.
16303
16304 2004-06-02  Martin Baulig  <martin@ximian.com>
16305
16306         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
16307
16308         * debug-mono-symfile.h: Bumped symbol file version number to 37.
16309
16310 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
16311
16312         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
16313
16314 2004-05-30  Jackson Harper  <jackson@ximian.com>
16315
16316         * reflection.c: Do not hardcode assembly versions or public key
16317         tokens anymore. All of this except the corlib section was dead
16318         code anyways.
16319         
16320 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
16321
16322         * object.c (mono_runtime_invoke_array): Automatically create boxed
16323         objects for byref valuetypes if needed. Fixes #59300.
16324         
16325         * object.c (mono_method_return_message_restore): Handle 
16326         MONO_TYPE_OBJECT as well.
16327
16328 2004-05-28  Jackson Harper  <jackson@ximian.com>
16329
16330         * reflection.c: The modified type encoding was causing build
16331         problems. Reverted for now.
16332         
16333 2004-05-28  Jackson Harper  <jackson@ximian.com>
16334
16335         * reflection.c/h: Take an assembly ref so that we dont create
16336         fully qualified names when encoding types in the same assembly as
16337         the custom attribute being emitted.
16338         * appdomain.c: Increment version number.
16339         
16340 2004-05-26  Duncan Mak  <duncan@ximian.com>
16341
16342         * icall.c
16343         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16344         Set the full version number (major, minor, build, revision).
16345
16346 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
16347
16348         * marshal.c (emit_struct_conv): increment src/dst after blit
16349         (mono_marshal_get_managed_wrapper,
16350         mono_marshal_get_native_wrapper): make sure we have marshalling
16351         info before marshalling params (info computation affects
16352         blittable)
16353
16354         * class.c (class_compute_field_layout): correctly deal with
16355         blittable
16356         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
16357         value types (as per what windows dows by default)
16358         (mono_class_setup_mono_type): System.ValueType is blittable
16359         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
16360         blittable
16361
16362         * marshal.c (mono_marshal_load_type_info): flag types  as
16363         non-blittable if the native layout doesn't match the managed
16364         layout
16365
16366 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16367
16368         * appdomain.c: don't add stuff in the private search path that is
16369         above the application base. If application base is not set, there's
16370         no private search path.
16371
16372 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
16373
16374         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
16375         byref struct arguments in native->managed marshalling.
16376
16377 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
16378
16379         * marshal.c (mono_marshal_get_runtime_invoke): correctly
16380         cache methods using signature (special case for methods
16381         that are value type or string class)
16382         
16383         * image.c (mono_image_close): clean up allocated GSList's
16384         in runtime_invoke_cache.
16385
16386 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16387
16388         * mono-config.c: set the correct path for mono_cfg_dir on windows when
16389         there's no MONO_CFG_DIR environment variable defined.
16390
16391 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16392
16393         * threads.c: windows version must be >= 0x0500 to include OpenThread.
16394
16395 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
16396
16397         * threadpool.c: Really wait for 500ms after the async call, even if the wait
16398           is interrumped.
16399         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
16400           before waiting for it, and call CloseHandle after the wait to unref it.
16401           This will make sure that handles are not disposed too early.
16402
16403 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16404
16405         * appdomain.c:
16406         * appdomain.h:
16407         * icall.c: removed
16408         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
16409         needed now.
16410
16411         * object.c: se the application_base only for the domain that runs
16412         Main. Fixes bug #59216,
16413
16414 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16415
16416         * appdomain.c:
16417         * object.c: only the domain in which Main is run have
16418         SetupInformation.ConfigurationFile set, so moved a few lines from
16419         appdomain.c to object.c.
16420
16421 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16422
16423         * appdomain.c: we tried to load [name].(dll|exe), but according
16424         to bug #57710, we must also try [culture]/[name].(dll|exe) and
16425         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
16426         There's a test case attached to bug #58922.
16427
16428 2004-05-27  Dick Porter  <dick@ximian.com>
16429
16430         * icall.c:
16431         * file-io.c: Implemented icalls for locking and unlocking regions
16432         in a file.
16433         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
16434         FALSE on error (fixes both compiler warning and real bug.)
16435
16436 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
16437
16438         * culture-info-tables.h: reflecting locale-builder updates.
16439
16440           (Added missing ChangeLog entry for 05/26)
16441
16442 2004-05-27  Jackson Harper  <jackson@ximian.com>
16443
16444         * locales.c: Fix some cut and paste errors.
16445         
16446 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16447
16448         * mono-config.c: set the correct path for config. directory on windows.
16449
16450 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
16451
16452         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
16453           on win32.
16454
16455 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16456
16457         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
16458         from pinvoke functions.
16459         
16460         * marshal.c (mono_ftnptr_to_delegate): Implement this.
16461
16462 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
16463
16464         * culture-info-tables.h: reflecting locale-builder updates.
16465
16466 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16467
16468         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
16469         #59086.
16470
16471 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
16472
16473         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
16474         * icall.c: Modified icalls for RNG.
16475         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
16476         Windows (CryptoAPI).
16477
16478 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16479
16480         * locales.c: Fix build.
16481
16482 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
16483
16484         * culture-info-tables.h: reflecting locale-builder updates.
16485
16486 2004-05-25  Jackson Harper  <jackson@ximian.com>
16487
16488         * locales.c: When creating the current culture use the $LANGs
16489         specific culture. So DateTimeFormat and NumberFormat entries are created.
16490         
16491 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16492
16493         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
16494         a char array as parameter.
16495
16496 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
16497
16498         * image.c: In mono_image_open(), always use an absolute path name to
16499           look for already loaded images.
16500
16501 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
16502
16503         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
16504         missing in the windows build (like older cygwin include files).
16505
16506 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
16507
16508         * icall.c: Fixed check for possible integer overflow in Buffer_
16509         BlockCopy icall. Replaced comments style // by /* */.
16510
16511 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16512
16513         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
16514         
16515         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
16516         check after MONO_VTADDR. Fixes pinvoke2.exe.
16517
16518         * marshal.h marshal.c metadata.h: Add beginnings of support for
16519         ftnptr -> delegate marshalling.
16520
16521 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16522
16523         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
16524         * threads.c: Fix warnings.
16525
16526 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16527
16528         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
16529         * icall.c: Registered icalls for Suspend and Resume.
16530         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
16531           Thread.Abort.
16532         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
16533         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
16534         * process.c: Use WaitForSingleObjectEx.
16535         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
16536           checkpoints.
16537         * threads.c, threads.h: Make use of new Ex wait methods. Improved
16538           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
16539           for Suspend and Resume. Added new mono_thread_stop, used for stoping
16540           background threads. Added basic support for Abort in Windows.
16541           Start new threads using a managed delegate invoke wrapper. This wrapper
16542           has an interruption checkpoint that is needed since an interruption
16543           can be requested before the thread leaves the unmanaged code that starts 
16544           the thread.
16545         * marshal.c: Added interruption checkpoint after every native call, and
16546           also before managed calls for wrappers called from unmanaged code to
16547           go into managed code.
16548         * object.h: Added new field in MonoThread to keep track of interruption
16549           requests.
16550
16551 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16552
16553         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
16554         calls.
16555
16556 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16557
16558         * appdomain.c:
16559         * assembly.c:
16560         * gc.c:
16561         * locales.c:
16562         * mono-config.c:
16563         * rand.c: getenv -> g_getenv (windows!)
16564
16565         * process.c: complete_path is also used on non-windows platforms.
16566
16567 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16568
16569         * icall.c: new signature for Process_Start.
16570
16571         * process.[ch]: new signature for Process_Start. If we're on windows
16572         and UseShellExecute is false, we have to search for the program by
16573         ourselves if we don't get a full path.
16574
16575 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16576
16577         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
16578         marshalling and call CleanUpNativeData if needed. Fixes #58646.
16579
16580 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16581
16582         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
16583         Fixes bug #58373.
16584
16585 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16586
16587         * process.c: use double quotes to quote program name and arguments on
16588         windows. Fixes bug #58575.
16589
16590 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16591
16592         * file-io.c: don't return "." and ".." when using windows Find*File.
16593
16594 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
16595
16596         * marshal.c: Don't pass wrappers to message init because method 
16597         addressed used to lookup metadata. part of remoting[2|3] fix.
16598
16599 2004-05-15  Jackson Harper  <jackson@ximian.com>
16600
16601         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
16602         path is essentially the same as MONO_PATH except that it points to
16603         GACs instead of lib directories.
16604         * loader.h: The user gac is gone so we dont need function to
16605         enable/disable it.
16606         * mono-config.c: user gac option is now gone.
16607         
16608 2004-05-15  Jackson Harper  <jackson@ximian.com>
16609
16610         * culture-info.h: Make defines more consistent, add calendar data
16611         to the culture info table.
16612         * culture-info-tables.h: Add basic calendar data. Basically
16613         everyone gets default gregorian until all the data is
16614         updated.
16615         * locales.c: Use the new consistent defines. Set calendar data for
16616         culture info objects.
16617         * object.h: add a field for calendar data to CultureInfo
16618         
16619 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16620
16621         * image.c: image->runtime_invoke_cache is keyed on signatures now.
16622         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
16623         a signature.
16624         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
16625         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
16626         an extra param that is the pointer of the method to invoke. The IL for
16627         the invoke method is no longer specific to the method, but to the
16628         signature of the method. Thus, we can share the same code for multiple
16629         methods. This reduces the number of methods that have to be compiled.
16630
16631 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16632
16633         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
16634
16635         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16636
16637         * icall.c: Optimize Buffer.BlockCopy.
16638
16639 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16640
16641         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
16642         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
16643         quote). Changed them to "MMMM yyyy".
16644
16645 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
16646
16647         * rand.c
16648         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
16649
16650 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
16651
16652         * reflection.h: Updated after changes to managed structures.
16653
16654         * appdomain.c: Bump corlib version.
16655
16656 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16657
16658         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
16659         windows.
16660
16661 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16662
16663         * Makefile.am: link to ../os/libmonoos.la on windows.
16664
16665         * assembly.c:
16666                 -If MONO_DEBUG, warn about non-existing directories in
16667                 MONO_PATH.
16668                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
16669                 compile time variable.
16670                 -Removed init_default_path and call mono_set_rootdir from
16671                 libmonoos.a instead (windows only).
16672
16673         * assembly.h: declare mono_assembly_getrootdir().
16674
16675         * domain.c:
16676         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
16677
16678         * loader.c: s/getenv/g_getenv/
16679
16680 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16681
16682         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
16683
16684         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
16685
16686         * metadata.h: Add new marshalling conversions.
16687
16688         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
16689         function.
16690
16691         * reflection.c (mono_reflection_get_type): Lookup the type in all
16692         modules of a multi-module assembly. Fixes #58291.
16693
16694 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16695
16696         * threads.c: Before aborting a background, set the StopRequested
16697         state.  This avoids throwing the Abort exception.
16698         In mono_thread_manage, don't continue with the shutdown until all
16699         aborted threads have actually stopped.
16700
16701 2004-05-10  Jackson Harper  <jackson@ximian.com>
16702
16703         * locales.c: Remove the modifier from culture names.
16704         
16705 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16706
16707         * Makefile.am: monosn is not installed any more. It has been deprecated
16708         in favor of sn.
16709
16710 2004-05-07  Jackson Harper  <jackson@ximian.com>
16711
16712         * locales.c
16713         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
16714         Fix array construction, add bailout if the length is 0.
16715
16716 2004-05-07  Dick Porter  <dick@ximian.com>
16717
16718         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
16719         machine doesn't have a DNS entry.  Patch by Urs Muff
16720         (umuff@quark.com), fixes bug 57928.
16721
16722 2004-05-06  Jackson Harper  <jackson@ximian.com>
16723
16724         * reflection.c: Handle null PublicTokens properly. alloc mem for
16725         assembly names culture so we dont crash when freeing it.
16726         
16727 2004-05-06  Jackson Harper  <jackson@ximian.com>
16728
16729         * assembly.c: Check the usergac when loading with partial names.
16730         
16731 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
16732
16733         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
16734         does nothing for now (not required for Linux/Windows) but the class
16735         library can call it (and a newer or modified runtime could need it).
16736         * icall.c: Registred icall.
16737
16738 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16739
16740         * loader.c: prints a message on module loading error we set MONO_DEBUG
16741         environment variable.
16742
16743 2004-05-05  Jackson Harper  <jackson@ximian.com>
16744
16745         * appdomain.c: Handle PublicKeyToken=null properly.
16746         
16747 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
16748
16749         * environment.c|h: Added icall ves_icall_System_Environment_
16750         GetOSVersionString to get the current OS version as a string.
16751         * icall.c: Registred icall.
16752
16753 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
16754
16755         * object.c: in mono_object_get_virtual_method(), take into account that
16756         non-virtual methods don't have a slot in the vtable. Check needed when
16757         the object is a proxy.
16758
16759 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16760
16761         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
16762         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
16763
16764         * object.c (mono_class_compute_gc_descriptor): Fix warning.
16765
16766         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
16767         passed when a valuetype is expected.
16768
16769         * object.c (mono_unhandled_exception): Only set the exit code if the
16770         exception happens in the main thread. Fixes thread5.exe.
16771
16772         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
16773         invalid names. Fixes #58047.
16774
16775 2004-05-03  Jackson Harper  <jackson@ximian.com>
16776
16777         * assembly.c: This line was committed accidently and is unneeded.
16778         
16779 2004-05-03  Jackson Harper  <jackson@ximian.com>
16780
16781         * icall.c: Add new icall for Assembly::LoadWithPartialName
16782         * assembly.c/.h: new function that probes the GAC to load partial
16783         assembly names by Paolo Molaro.
16784         
16785 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16786
16787         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
16788         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
16789         (type_get_fully_qualified_name): Added PublicKeyToken when building a
16790         full type name.
16791
16792 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16793
16794         * appdomain.c: fixed check for 'neutral' culture and removed warning.
16795         * reflection.c: fix bug when parsing a full type name and Version is not
16796         the last thing in the string.
16797
16798 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
16799
16800         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
16801         crashes when it is freed.
16802
16803 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16804
16805         * assembly.c: print the compat warning to stderr.
16806
16807 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
16808
16809         * assembly.c (mono_assembly_load_references): Add a compatibility
16810         hack to run old applications that might be still referencing the
16811         3300-based assemblies, only do this for System.xxx.
16812
16813 2004-05-01  Jackson Harper  <jackson@ximian.com>
16814
16815         * appdomain.c: If the culture is neutral we set it to "".
16816         
16817 2004-04-29  Jackson Harper  <jackson@ximian.com>
16818
16819         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
16820
16821 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
16822  
16823         * string-icalls.c: added low overhead function for copying chars
16824         * icall.c: added needed icall for the above function
16825  
16826 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16827
16828         * icall.c: fix return value of get_global_assembly_cache.  Implemented
16829         Environment.GetLogicalDrives.
16830
16831 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
16832
16833         * rand.c: try and talk to egd or prngd
16834         for random bytes if opening devices fail.
16835
16836 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
16837
16838         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
16839         alignment for the type using the native alignment of its members 
16840         instead of using klass->min_align.
16841
16842         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
16843
16844 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16845
16846         * file-io.c:
16847         * socket-io.c: added check for sys/aio.h.
16848
16849 2004-04-28  Dick Porter  <dick@ximian.com>
16850
16851         * threads.c: Don't abort a thread thats already aborting, when
16852         terminating everything.
16853
16854 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16855
16856         * icall.c: added 2 new async calls for Socket.
16857
16858         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
16859         IO on *nix systems.
16860
16861         * threadpool.c: removed unused variable.
16862
16863 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
16864
16865         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
16866
16867 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
16868
16869         * locales.c: put back string_invariant_tolower () and
16870         string_invariant_toupper ().
16871
16872 2004-04-26 David Waite <mass@akuma.org>
16873
16874         * file-io.h:
16875         * socket-io.h:
16876         * threads.h:
16877         * unicode.h: remove comma from end of enumeration declarations
16878
16879 2004-04-26 David Waite <mass@akuma.org>
16880
16881         * debug-mono-symfile.h:
16882         * decimal.c:
16883         * mono_debug.h:
16884         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
16885
16886
16887 2004-04-26  Jackson Harper  <jackson@ximian.com>
16888
16889         * appdomain.c: Increment version number.
16890         
16891 2004-04-26  Jackson Harper  <jackson@ximian.com>
16892
16893         * appdomain.c: Set assembly references public token value when
16894         PublicKeyToken is specified, not the hash_value. Free public token
16895         values when free assembly name data. Previously the public key
16896         token was hex decoded, however we are using hex encoded public key
16897         tokens, so this is not neccasary.
16898         * assembly.c: Lookup assemblies in the gac if their public token
16899         value is set. Add function to allow enabling user gac
16900         lookups. Specify whether or not the assembly was loaded from the
16901         GAC. Compare full assembly names when checking the cache for
16902         assemblies (Temporarily disabled see comment in code). Remove
16903         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
16904         specifies trace-loader they get extra info to stdout on the
16905         loading of assemblies.
16906         * image.h: Add a field for an assembly references public token
16907         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
16908         whether an assembly has been loaded from the GAC.
16909         * image.c: Remove a corlib -> mscorlib name mapping.
16910         * loader.h: Add function to enable/disable the user gac.
16911         * mono-config.c: Check if the usergac is enabled in the config
16912         file.
16913         * icall.c: New icall to determine whether or not an assembly has
16914         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
16915         * tabldefs.h: Add constant for assemblyref flag that specifies a
16916         full public key is used instead of a public token.
16917         * reflection.c: Remove mscorlib -> corlib mappings. Set
16918         PublicTokenValue instead of hash value. This value is a hex
16919         string so it does not need to be expanded.
16920
16921 2004-04-26  Martin Baulig  <martin@ximian.com>
16922
16923         * mono-debug-debugger.c (mono_debugger_initialize): Set
16924         `mono_debugger_initialized' before calling mono_debug_lock().
16925
16926 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
16927
16928         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
16929           InternalToUpper/InternalToLower.
16930         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
16931           removed invariant culture shortcut.  This is now done in managed code.
16932         * locales.c: (string_invariant_toupper/tolower) removed.
16933
16934 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16935
16936         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
16937         Added Poll internal call.
16938
16939         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
16940         call for Poll. Select was too heavy for polling a single socket.
16941
16942         * threadpool.[ch]: added mono_threadpool_cleanup.
16943         * threads.c: use it. Don't use Thread_Abort on windows.
16944
16945 2004-04-23  Martin Baulig  <martin@ximian.com>
16946
16947         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
16948
16949 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
16950
16951         * icall.c: Registred new icalls for key pair protection and added an
16952         icall for Environment.GetFolderPath on Windows.
16953         * security.c|h: Added new icalls for key pair protection.
16954
16955 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16956
16957         * socket-io.c: don't display the non-supported family warning for known
16958         families. Now this is not displayed on windows when checking support
16959         for IPv4/IPv6.
16960
16961 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16962
16963         * class.c: don't display the layout warning for static fields.
16964
16965 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
16966
16967         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
16968         * locales.c, locales.h: Added new icalls for culture-specific
16969         Char.ToLower and Char.ToUpper.
16970
16971 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16972
16973         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
16974         by David Waite.
16975
16976 2004-04-20  Martin Baulig  <martin@ximian.com>
16977
16978         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
16979         of the type name before passing it to mono_reflection_type_from_name().
16980
16981 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16982
16983         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
16984         encodings here. Fixes #56965.
16985
16986 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
16987
16988         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
16989         fix test on strstr result not that I can see anything that
16990         relies on the result.
16991
16992 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
16993
16994         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
16995         Fixes #57081.
16996
16997         * marshal.c (mono_marshal_get_string_encoding): New helper function.
16998
16999         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
17000         function to determine which marshalling to use for strings. Fixes
17001         #56965.
17002
17003         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
17004
17005         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
17006
17007 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
17008
17009         * icall.c: #include mono-config.h
17010
17011 2004-04-15  Jackson Harper  <jackson@ximian.com>
17012
17013         * culture-info-tables.h: Fix date formats for en-US culture.
17014         
17015 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
17016
17017         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
17018         ThreadPool.SetMinThreads.
17019         * threadpool.c: Implemented ThreadPool.GetMinThreads and
17020         ThreadPool.SetMinThreads.
17021
17022 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17023
17024         * mono-config.c: also load the .config file in the directory
17025         where the assembly was found.
17026
17027 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17028
17029         * assembly.c: load per-assembly config files.
17030         * icall.c: decrapified code to get the config dir and moved to
17031         mono-config.c.
17032         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
17033         per-assembly config files. When doing a dll map lookup give precedence
17034         to the per-assembly data.
17035
17036 2004-04-14  Martin Baulig  <martin@ximian.com>
17037
17038         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
17039         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
17040         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
17041
17042         * mono-debugger-debugger.c: While the debugger is locked, remember
17043         whether the symbol tables have changes and send one single
17044         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
17045
17046 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
17047
17048         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
17049
17050         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
17051         function.
17052
17053         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
17054         account when marshalling string arrays. Fixes #56965.
17055
17056 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
17057
17058         * icall.c: Add new icalls mapping for security.
17059         * security.c|h: Add internal calls for WindowsIdentity,
17060         WindowsImpersonationContext and WindowsPrincipal.
17061
17062 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
17063
17064         * class.c: Added comment to ensure the System.MonoDummy class
17065         is removed when no longer necessary
17066
17067 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
17068
17069         * appdomain.c: Pass arguments to the bootstraping exceptions to
17070         minimize JITed methods at boot
17071
17072         * metadata.c (mono_exception_from_name_two_strings): Allow for the
17073         second string to be null.
17074
17075         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
17076         Change the protocol to minimize the JIT methods at startup.  Now
17077         it Returns the internal codepage, if the value of "int_code_page"
17078         is 1 at entry, and we can not compute a suitable code page
17079         number, returns the code page as a string.
17080
17081 2004-04-13  Jackson Harper  <jackson@ximian.com>
17082
17083         * culture-info-tables.h: Fix number of decimal digits for all
17084         english locales.
17085
17086 2004-04-13  Jackson Harper  <jackson@ximian.com>
17087
17088         * icall.c: Clairfy out of sync error message. It is not always
17089         your corlib that is out of sync.
17090
17091 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
17092
17093         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
17094         properties when only the set accessor is overriden. Fixes #55874.
17095
17096 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
17097
17098         * assembly.c (mono_assembly_load_references): Make this thread safe.
17099         Fixes #56327.
17100
17101 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
17102
17103         * monosn.c: Add missing initialization calls.
17104
17105 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
17106
17107         * locales.c:
17108         ves_icall_System_Globalization_CultureInfo_construct_number_format
17109         Fix g_assert so it compiles on fussier compilers re int/ptr
17110         mismatch
17111
17112 2004-04-08  Dick Porter  <dick@ximian.com>
17113
17114         * socket-io.h:
17115         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
17116         53992.  Also rearrange the code so that the internal calls return
17117         an error value and exceptions are thrown from managed code.
17118
17119         * icall.c: Add type info to the socket icalls.
17120
17121 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17122
17123         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
17124         owes me a beer.
17125
17126 2004-04-07  Martin Baulig  <martin@ximian.com>
17127
17128         * class.c (mono_class_from_generic_parameter): Don't default
17129         `klass->parent' to `mono_defaults.object_type'.
17130
17131 2004-04-07  Martin Baulig  <martin@ximian.com>
17132
17133         * reflection.c (mono_reflection_initialize_generic_parameter): Set
17134         `param->pklass->reflection_info'.       
17135
17136 2004-04-07  Jackson Harper  <jackson@ximian.com>
17137
17138         * culture-info-tables.h: Fix date separator symbol.
17139         
17140 2004-04-07  Martin Baulig  <martin@ximian.com>
17141
17142         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
17143         from System.Type to System.MonoType.
17144
17145 2004-04-07  Martin Baulig  <martin@ximian.com>
17146
17147         * reflection.h
17148         (MonoReflectionGenericParam): Added `has_reference_type' and
17149         `has_value_type' fields.
17150
17151         * reflection.c (mono_image_get_generic_param_info): Encode the
17152         correct flags if we have the `class' or `struct' constraint.
17153
17154 2004-04-07  Martin Baulig  <martin@ximian.com>
17155
17156         * reflection.h
17157         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
17158
17159 2004-04-07  Jackson Harper  <jackson@ximian.com>
17160
17161         * appdomain.c: Revert extra patches, just wanted to bump the
17162         version number.
17163         
17164 2004-04-07  Jackson Harper  <jackson@ximian.com>
17165
17166         * Makefile.am: Add culture-info private headers.
17167         * icall.c: Add new icalls for contructing locales.
17168         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
17169         * locales.h: Declare new culture info construction methods.
17170         * object.h: Add new fields used to avoid the CultureMap to
17171         MonoCultureInfo.
17172         * culture-info.h: Definition of structs used in the culture info
17173         tables.
17174         * culture-info-tables.h: Autogenerated tables that contain culture
17175         info data. This file was generated with the locale-builder tool.
17176         * appdomain.c: Incement corlib version number.
17177         
17178 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
17179
17180         * appdomain.c: (mono_runtime_init) move mono_thread_init
17181         to before mono_object_new calls so critical sections
17182         are initialized before use.
17183
17184 2004-04-07  Martin Baulig  <martin@ximian.com>
17185
17186         * icall.c
17187         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
17188         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
17189         (ves_icall_MonoGenericParam_initialize): Removed.
17190         (monogenericparam_icalls): Removed.
17191         (generictypeparambuilder_icalls): Added new table for
17192         System.Reflection.Emit.GenericTypeParameterBuilder.
17193
17194         * reflection.c
17195         (mono_reflection_define_generic_parameter): Removed.
17196         (mono_reflection_initialize_generic_parameter): This is now called
17197         from GenericTypeParameterBuilder's .ctor.
17198
17199 2004-04-06  Martin Baulig  <martin@ximian.com>
17200
17201         * class.c (mono_class_init): Don't inflate nested classes in a
17202         generic instance.
17203         (mono_type_get_name_recurse): Include the generic arguments for
17204         generic instances and generic type declarations.
17205         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
17206         (_mono_class_get_instantiation_name): Removed.
17207         (mono_class_create_generic): Always use `gklass->name' as our name.
17208
17209         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
17210
17211         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
17212         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
17213         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
17214         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
17215         closed generic methods here.
17216
17217         * reflection.c
17218         (mono_reflection_generic_inst_get_nested_types): Removed.
17219         (inflate_mono_method): Copy the generic parameters from the
17220         MonoMethodHeader into out MonoGenericMethod.
17221
17222 2004-04-06  Martin Baulig  <martin@ximian.com>
17223
17224         * row-indexes.h
17225         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
17226
17227         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
17228
17229         * reflection.c (build_compressed_metadata): If we have any entries
17230         in the GenericParam, MethodSpec or GenericParamConstraint tables,
17231         set the header version to 1.1.
17232
17233 2004-04-06  Martin Baulig  <martin@ximian.com>
17234
17235         * class.c (mono_class_init): If we're a generic instance,
17236         initialize our nested classes, too.
17237         (_mono_class_get_instantiation_name): Deal with the new `!%d'
17238         suffix. 
17239
17240 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17241
17242         * process.c: quote the argument passed to the shell on windows.
17243
17244 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
17245
17246         * threads.c (mono_alloc_special_static_data): Allow this to be
17247         called during startup.
17248
17249 2004-04-02  Martin Baulig  <martin@ximian.com>
17250
17251         * icall.c
17252         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
17253
17254 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
17255
17256         * icall.c: Fix build.
17257
17258 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
17259
17260         * Makefile.am: Added security.c|h.
17261         * icall.c: Added icall for get_UserName;
17262         * security.c: New file for security related icalls. Added function
17263         get_UserName for System.Environment (fix #56144).
17264         * security.h: New. Header file for security.c
17265
17266 2004-04-02  Dick Porter  <dick@ximian.com>
17267
17268         * icall.c: Deleted the icalls that were obsoleted some time ago
17269         by the ICU string code, and which were mixed into the icall
17270         rearranging.  Fixes bug 55969.
17271
17272         * string-icalls.h: 
17273         * string-icalls.c: Deleted the code that those icalls reference.
17274
17275 2004-04-01  Martin Baulig  <martin@ximian.com>
17276
17277         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
17278
17279         * class.c (mono_class_from_generic_parameter): Don't set 
17280         TYPE_ATTRIBUTE_INTERFACE.
17281         (my_mono_class_from_generic_parameter): Likewise.
17282
17283 2004-04-01  Martin Baulig  <martin@ximian.com>
17284
17285         * loader.c (find_method): Added an optional `MonoClass *ic'
17286         argument to search in a specific interface.
17287         (mono_get_method_constrained): New public function.
17288
17289 2004-04-01  Martin Baulig  <martin@ximian.com>
17290
17291         * reflection.c (mono_image_get_generic_field_token): Use the
17292         `handleref' cache here.
17293
17294 2004-04-01  Martin Baulig  <martin@ximian.com>
17295
17296         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
17297
17298         * reflection.c (create_generic_typespec): Use the `typespec' hash
17299         here, not the `typeref' one.    
17300
17301 2004-04-01  Martin Baulig  <martin@ximian.com>
17302
17303         * class.c (mono_class_inflate_generic_type): Moved the
17304         functionality into a new static inflate_generic_type() which
17305         returns NULL if it didn't do anything.  Only increment the
17306         `mono_stats.inflated_type_count' if we actually inflated
17307         something.
17308         (mono_class_get_full): Check the classes type to see whether we
17309         need to inflate it; also inflate MONO_TYPE_(M)VAR.
17310
17311 2004-04-01  Jackson Harper  <jackson@ximian.com>
17312
17313         * reflection.c: Set culture for assembly references.
17314         
17315 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
17316
17317         * reflection.[ch], icall.[ch], Fix support for pinning variables.
17318
17319 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17320
17321         * assembly.c:
17322         (do_mono_assembly_open): the critical section also covers
17323         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
17324
17325 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17326
17327         * threads.c:
17328         (mono_manage_threads): abort the background threads when finishing.
17329         Fixes bug #47232.
17330
17331 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17332
17333         * gc.c: only close the done_event handle if there was no timeout.
17334         C-ified comments.
17335
17336 2004-03-30  Martin Baulig  <martin@ximian.com>
17337
17338         * icall.c (icall_entries): It's called "System.Activator", not
17339         "System.Activation".    
17340
17341 2004-03-30  Martin Baulig  <martin@ximian.com>
17342
17343         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
17344         (mono_class_create_from_typespec): Likewise.
17345
17346 2004-03-30  Martin Baulig  <martin@ximian.com>
17347
17348         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
17349         `has_ctor_constraint' and `initialized'.
17350
17351 2004-03-30  Martin Baulig  <martin@ximian.com>
17352
17353         * reflection.c (encode_new_constraint): New static function to add
17354         the constructor constraint attribute to a type parameter.
17355         (encode_constraints): Call encode_new_constraint() if necessary.
17356
17357         * reflection.h
17358         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
17359
17360         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
17361         
17362 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17363
17364         * reflection.c, icall.c: add support for pinning variables. 
17365
17366 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
17367
17368         * marshal.c (mono_marshal_get_managed_wrapper):
17369         init bool local with zero rather than null.
17370
17371 2004-03-29  Martin Baulig  <martin@ximian.com>
17372
17373         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
17374         the "official" behavior here.
17375         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
17376
17377 2004-03-29  Martin Baulig  <martin@ximian.com>
17378
17379         * icall.c: Reflect latest API changes.
17380
17381 2004-03-29  Martin Baulig  <martin@ximian.com>
17382
17383         * loader.c (mono_get_method_from_token): Also call
17384         mono_metadata_load_generic_params () for abstract and interface
17385         methods; replace the type arguments in the method signature with
17386         the ones which are loaded from the metadata.
17387
17388 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
17389
17390         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
17391         of the lock is not the current thread. MS.NET don't do it, in spite of
17392         what the documentation says. See bug #56157.
17393
17394 2004-03-28  Martin Baulig  <martin@ximian.com>
17395
17396         * class.c (mono_class_init): Don't call init_properties() and
17397         init_events() for generic instances; set `prop->parent' when
17398         inflating properties.
17399
17400         * reflection.c (mono_generic_inst_get_object): Call
17401         `mono_class_init (ginst->klass)'.
17402         (mono_type_get_object): Only create a MonoGenericInst if your
17403         generic type is a TypeBuilder.
17404         (do_mono_reflection_bind_generic_parameters): Only set
17405         `ginst->is_dynamic' if our generic type is a TypeBuilder.
17406
17407 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
17408
17409         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
17410         Fixes #56091.
17411
17412 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17413
17414         * icall.c: added Kill_internal icall.
17415         * process.[ch]: added Kill_internal icall.
17416
17417 2004-03-25  Martin Baulig  <martin@ximian.com>
17418
17419         * class.h (MonoStats): Added `generic_instance_count',
17420         `inflated_method_count', `inflated_type_count' and
17421         `generics_metadata_size'.       
17422
17423 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17424
17425         * reflection.c: no warnings now.
17426
17427 2004-03-25  Martin Baulig  <martin@ximian.com>
17428
17429         * class.c (mono_class_get_full): New public function; does a
17430         mono_class_get(), but also takes a `MonoGenericContext *'.
17431
17432         * loader.c (mono_field_from_memberref): Renamed to
17433         `field_from_memberref', made static and added `MonoGenericContext *'
17434         argument.
17435         (mono_field_from_token): Added `MonoGenericInst *' argument.
17436         (method_from_memberef): Likewise.
17437         (mono_get_method_from_token): Likewise.
17438         (mono_get_method_full): New public function; does a
17439         mono_get_method(), but also takes a `MonoGenericContext *'.
17440
17441         * verify.c (mono_method_verify): Get the method's generic context
17442         and pass it to mono_field_from_token(), mono_get_method_full() and
17443         mono_class_get_full().
17444
17445 2004-03-25  Martin Baulig  <martin@ximian.com>
17446
17447         * class.c (mono_class_inflate_generic_type): Take a
17448         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
17449         `MonoGenericMethod *'.
17450
17451 2004-03-25  Martin Baulig  <martin@ximian.com>
17452
17453         * loader.h (MonoMethodInflated): Store the MonoGenericContext
17454         instead of the MonoGenericMethod here.
17455
17456 2004-03-25  Martin Baulig  <martin@ximian.com>
17457
17458         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
17459         each time we create a new MonoGenericInst, we also create a new
17460         context which points back to us.
17461
17462         * class.c (inflate_method): Use `ginst->context' instead of
17463         creating a new context.
17464
17465         * loader.c (method_from_memberref): Use
17466         `klass->generic_inst->context' instead of creating a new context.
17467
17468 2004-03-25  Martin Baulig  <martin@ximian.com>
17469
17470         * class.h (MonoGenericContext): New struct.
17471         (MonoGenericMethod): Removed `generic_inst'.
17472
17473         * class.c (mono_class_inflate_generic_method): Take a
17474         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
17475
17476 2004-03-25  Martin Baulig  <martin@ximian.com>
17477
17478         * loader.h (MonoMethodInflated): New typedef.
17479
17480         * metadata.h (MonoMethodSignature): Removed `gen_method', make
17481         `generic_param_count' consume just 30 bits, added `is_inflated'
17482         and `has_type_parameters' flags (one bit each).
17483
17484         * class.c (mono_class_inflate_generic_method): Create a
17485         MonoMethodInflated instead of a MonoMethodNormal and set
17486         `is_inflated' in the method signature.
17487
17488         * class.h (MonoGenericMethod): Removed `generic_method'.
17489
17490 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
17491
17492         * image.c: Make sure the name of a MonoImage is always an absolute path.
17493           This fixes bug #54415.
17494
17495 2004-03-24  Martin Baulig  <martin@ximian.com>
17496
17497         * class.c (mono_class_setup_vtable): If we're a generic instance,
17498         use our generic type's vtable size.
17499
17500 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
17501
17502         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
17503         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
17504         problems.
17505
17506 2004-03-23  Martin Baulig  <martin@ximian.com>
17507
17508         * class.h (MonoDynamicGenericInst): Added `int count_events' and
17509         `MonoEvent *events'.
17510
17511         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
17512         (typebuilder_icalls): Added "get_event_info"; calls
17513         mono_reflection_event_builder_get_event_info(). 
17514
17515         * reflection.c (mono_reflection_generic_inst_initialize): Added
17516         `MonoArray *events'.
17517         (mono_reflection_event_builder_get_event_info): New function.
17518
17519 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
17520
17521         * object.h: add mono_type_initialization_init
17522
17523         * object.c (mono_runtime_class_init): 
17524         implement class constructor synchronization rules
17525         to cope with threading issues.  
17526         add mono_type_initialization_init
17527
17528         * appdomain.c (mono_runtime_init): call 
17529         mono_type_initialization_init
17530
17531         * class.h: removing initializing field from MonoVTable
17532
17533 2004-03-23  Martin Baulig  <martin@ximian.com>
17534
17535         * class.c (my_mono_class_from_generic_parameter): Use
17536         `param->name' if it's not NULL. 
17537
17538 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
17539
17540         * class.c: do not insert non-virtual methods in the vtable.
17541         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
17542         that means the method is non-virtual. This never would have
17543         happened before.
17544
17545 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
17546
17547         * profiler.c: Added lock for accessing coverage_hash.
17548
17549 2004-03-22  Martin Baulig  <martin@ximian.com>
17550
17551         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
17552         `method->method->signature->generic_param_count != 0' to make it
17553         work for interface methods.
17554
17555 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17556
17557         * process.c: quote the string passed to the shell using g_shell_quote.
17558
17559 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17560
17561         * threads.c:
17562         (mono_threads_manage): don't remove the finalizer thread and self
17563         from the threads hash table so that mono_thread_manage can be called
17564         more than once.
17565
17566 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17567
17568         * process.c: quote the arguments when UseShellExecute is true. Fixes
17569         bug #55790.
17570
17571 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17572
17573         * threads.c: set mono_thread_detach as a cleanup routine for every
17574         thread. This way it's always executed upon thread termination, either
17575         aborted or finished normally. No more xsp hangs!
17576
17577 2004-03-17  Martin Baulig  <martin@ximian.com>
17578
17579         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
17580         `int count_nested' and a `MonoType **nested'.
17581
17582         * reflection.c (mono_reflection_bind_generic_parameters): Moved
17583         most of the functionality into a new static
17584         do_mono_reflection_bind_generic_parameters() and don't take a
17585         `MonoType *nested_in' argument any more.  Don't compute nested
17586         types here.
17587         (mono_reflection_generic_inst_get_nested_types): New public method
17588         to get nested types.
17589
17590         * class.c (mono_class_create_generic): Set `klass->nested_in' if
17591         we're a nested class.
17592
17593         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
17594         mono_reflection_generic_inst_get_nested_types() to compute the
17595         nested types.
17596
17597 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
17598
17599         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
17600         descriptive error message under windows.
17601         
17602 2004-03-17  Martin Baulig  <martin@ximian.com>
17603
17604         * class.c (dup_type): Added `const MonoType *original' argument;
17605         copy the attrs from the original type.
17606
17607 2004-03-17  Martin Baulig  <martin@ximian.com>
17608
17609         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
17610         `m->generic_inst_cache' here.
17611
17612 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
17613
17614         * exception.h exception.c: Add stack_overflow_exception.
17615
17616 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17617
17618         * threadpool.c:
17619         (overlapped_callback): call SetEvent *after* invoking the callback.
17620         No need to call CloseHandle.
17621
17622 2004-03-16  Martin Baulig  <martin@ximian.com>
17623
17624         * reflection.c (mono_image_get_fieldref_token): Take a
17625         `MonoReflectionField *' instead of a `MonoClassField *' and a
17626         `MonoClass *'; store the `MonoReflectionField *' in the hash.
17627
17628 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17629
17630         * appdomain.c: don't add the culture to the filename we're looking for
17631         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
17632
17633 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17634
17635         * locales.c: don't ignore symbols when doing case insensitive compares.
17636         Thanks Dick! Fixes bug #54046.
17637
17638         * threads.c: surround 'threads' usage with enter/leave in
17639         mono_thread_manage.
17640
17641 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
17642
17643         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
17644         implicitly marshalled as [Out]. Fixes #55450.
17645
17646         (mono_marshal_get_runtime_invoke): Zero out the result if there is
17647         an exception.
17648
17649 2004-03-16  Martin Baulig  <martin@ximian.com>
17650
17651         * class.c (mono_class_from_generic_parameter): Use the actual
17652         parameter name. 
17653
17654 2004-03-16  Martin Baulig  <martin@ximian.com>
17655
17656         * reflection.c (type_get_signature_size): New static function.
17657         Compues the size of the type in a method signature.
17658         (method_get_signature_size): New static function; calls
17659         type_get_signature_size() to compute the actual size of the
17660         method's signature.
17661         (method_encode_signature): Use method_get_signature_size() to get
17662         the signature's size rather than using `nparams * 10'.
17663
17664 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17665
17666         * file-io.h: define here WapiOverlapped on windows. I don't want the
17667         regular OVERLAPPED one.
17668
17669         * file-io.c:
17670         * threadpool.c: somehow, BindIoCompletionCallback is not found.
17671         Disabling AIO on windows.
17672
17673 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17674
17675         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
17676         bug #55385.
17677
17678 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17679
17680         * appdomain.c: upgraded corlib version.
17681
17682         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
17683         and BeginWrite. Allow opening files for asynchrnous operations.
17684
17685         * file-io.h: new struct that maps FileStreamAsyncResult.
17686         * icall.c: added new icalls.
17687         * process.[ch]: support setting child process environment variables
17688         and use the SHELL or COMSPEC when UseShellExecute is true.
17689
17690         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
17691         callback for async. IO is here and also BindHandle.
17692
17693         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
17694         from here.
17695
17696 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
17697
17698         * reflection.c (create_custom_attr): Allow len == 0.
17699
17700         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
17701         computation on big-endian machines.
17702
17703 2004-03-13  Martin Baulig  <martin@ximian.com>
17704
17705         * class.h (MonoGenericInst): Added `int count_ifaces'.
17706
17707         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
17708         `ginst->count_ifaces' instead `klass->interface_count' since we
17709         may get called before the vtable is created.
17710
17711         * loader.c (mono_method_get_param_names): If we're a generic
17712         instance, return and don't initialize the class.
17713
17714         * reflection.c (mono_reflection_setup_generic_class): Don't call
17715         ensure_runtime_vtable().
17716         (mono_reflection_bind_generic_parameters): Set
17717         `ginst->count_ifaces'.
17718
17719 2004-03-11  Jackson Harper <jackson@ximian.com>
17720
17721         * icall.c:
17722         * unicode.c:
17723         * unicode.h: Remove unused System.Char icalls.
17724         
17725 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
17726
17727         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
17728         code when we P/Invoke the first library in Windows.Forms, instead
17729         of when we first open the assembly.
17730
17731         * assembly.c: Drop the lookup from here.
17732
17733 2004-03-10  Martin Baulig  <martin@ximian.com>
17734
17735         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
17736         class for properties, fields and events.  Finally fixes #54945.
17737
17738 2004-03-10  Martin Baulig  <martin@ximian.com>
17739
17740         * metadata.c (mono_metadata_class_equal): New static function;
17741         checks whether two generic instances or two generic parameters are
17742         equal.
17743         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
17744         compare classes.        
17745
17746 2004-03-10  Martin Baulig  <martin@ximian.com>
17747
17748         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
17749
17750         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
17751         argument and write it into the `reflection_info' field.
17752
17753         * icall.c
17754         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
17755         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
17756
17757 2004-03-09  Jackson Harper  <jackson@ximian.com>
17758
17759         * char-conversions.h: use 8 bits for numeric data its all we need
17760         * icall.c: numeric data is only 8 bits now.
17761
17762 2004-03-09  Martin Baulig  <martin@ximian.com>
17763
17764         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
17765
17766         * class.c (init_properties, init_events): Initialize the new
17767         `parent' field.
17768
17769         * reflection.c (typebuilder_setup_properties): Likewise.
17770         (typebuilder_setup_events): Likewise.
17771
17772         * reflection.h (MonoEventInfo): Replaced `parent with
17773         `declaring_type' and `reflected_type'.
17774
17775         * icall.c (ves_icall_get_property_info): Distinguish between
17776         declaring and reflected type.
17777         (ves_icall_get_event_info): Likewise.
17778
17779 2004-03-09  Martin Baulig  <martin@ximian.com>
17780
17781         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
17782         (ves_icall_Type_GetField): Correctly set field->klass.
17783
17784 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
17785
17786         * loader.h: Fix warning.
17787
17788 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
17789
17790         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
17791         library routine if present.  Notice that it will still continue
17792         executing even if its missing, for those working on the Gtk#
17793         edition of Windows.Forms.
17794
17795         * assembly.c (do_mono_assembly_open): If loading the
17796         System.Windows.Forms call mono_loader_wini_init.
17797
17798 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
17799
17800         * class.h: Added MonoRemoteClass struct.
17801         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
17802         function for MonoStrings.
17803         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
17804         Added internal call for getting the proxy type.
17805         * marshal.c: Get the type of transparent proxies from its remote_class.
17806         Added methods that generate the IL for type checks and casts:
17807         mono_marshal_get_isinst, mono_marshal_get_castclass, 
17808         mono_marshal_get_proxy_cancast.
17809         * marshal.h: Declaration of the previous new methods.
17810         * object.c: Added new moethods for creating and updating MonoRemoteClass
17811         instances: mono_remote_class, mono_upgrade_remote_class, 
17812         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
17813         * verify.c: FIx transparent_proxy_fields layout.
17814         * appdomain.c: Bump corlib version.
17815
17816 2004-03-04  Jackson Harper  <jackson@ximian.com>
17817
17818         * icall.c: Add icall to access char conversion tables.
17819         * char-conversions.h: Character conversion tables.
17820         * Makefile.am: Add char-conversions.h private header file.
17821         
17822 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
17823
17824         * appdomain.c (unload_thread_main): Increase unloading timeout to
17825         10 sec as a temporary workaround for Nant problems.
17826
17827 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
17828
17829         * gc.c: Add checks for GC_enable and GC_disable.
17830
17831         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
17832         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
17833         (bug #54988).
17834         
17835 2004-02-27  Martin Baulig  <martin@ximian.com>
17836
17837         * reflection.c (mono_reflection_bind_generic_parameters): Take a
17838         `MonoReflectionType *' instead of a `MonoType *'.
17839
17840 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
17841
17842         * gc.c (run_finalize): Avoid finalizing the object representing the
17843         finalizer thread.
17844         (finalizer_thread): Fix warning.
17845
17846 2004-02-25  Martin Baulig  <martin@ximian.com>
17847
17848         * class.c (_mono_class_get_instantiation_name): Added `int offset'
17849         argument for nested types.
17850         (mono_class_create_generic): Added support for nested generictypes.
17851
17852         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
17853         `GList *nested'.
17854
17855         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
17856
17857         * reflection.c (method_encode_signature): Increase the minimum
17858         value of `size' from 10 to 11.
17859         (mono_reflection_bind_generic_parameters): Take `int type_argc'
17860         and `MonoType **types' arguments instead of the `MonoArray
17861         *types'; added `MonoType *nested_in'.  Recursively instantiate
17862         nested classes. 
17863
17864 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
17865
17866         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
17867         stack_overflow_ex members which are used by exception handling.
17868
17869         * appdomain.c (mono_runtime_init): Initialize the new members.
17870
17871         * gc.c (mono_gc_enable): New helper function.
17872         * gc.c (mono_gc_disable): New helper function.
17873
17874 2004-02-23  Martin Baulig  <martin@ximian.com>
17875
17876         * icall.c: I must have been really stupid - make it actually work
17877         this time ;-)
17878
17879 2004-02-23  Martin Baulig  <martin@ximian.com>
17880
17881         * loader.c (method_from_memberref): Only inflate the method if
17882         it's in another klass.
17883
17884 2004-02-23  Martin Baulig  <martin@ximian.com>
17885
17886         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
17887         (mono_class_init): If we're a generic instance and an interface,
17888         compute `class->interface_id'; also create `class->interfaces'
17889         here and inflate them.
17890
17891         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
17892         `ginst->is_open'.
17893         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
17894
17895         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
17896
17897 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
17898
17899         * reflection.c (method_encode_code): Improved the error message
17900         generated by the exception.
17901
17902 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17903
17904         * icall.c: Martin did not do what he said in the ChangeLog for
17905         2004-02-18, but put back the changes for properties and events.
17906         Commenting those changes out again and adding comment to bug #54518.
17907         
17908         * process.c: removed warning.
17909
17910 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
17911
17912         * marshal.c (emit_struct_conv): Print an error message instead of
17913         asserting when a type does not have the StructLayout attribute.
17914
17915 2004-02-20  Martin Baulig  <martin@ximian.com>
17916
17917         * reflection.c (mono_type_get_object): Also use the cache for
17918         generic instances.
17919         (mono_reflection_bind_generic_parameters): Always compute
17920         `ginst->ifaces'.        
17921
17922 2004-02-20  Martin Baulig  <martin@ximian.com>
17923
17924         * class.h (MonoGenericMethod): Removed `klass'.
17925
17926         * class.c (mono_class_inflate_generic_method): Added `MonoClass
17927         *klass' argument.
17928
17929 2004-02-20  Martin Baulig  <martin@ximian.com>
17930
17931         * reflection.c (method_encode_methodspec): Actually use the
17932         uninflated signature for the memberref.
17933
17934 2004-02-20  Martin Baulig  <martin@ximian.com>
17935
17936         * class.h (MonoGenericMethod): Removed `declaring'.
17937
17938         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
17939         is NULL, compute it here.
17940
17941 2004-02-20  Martin Baulig  <martin@ximian.com>
17942
17943         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
17944
17945         * metadata.c (mono_metadata_generic_inst_hash): New method.
17946         (mono_metadata_generic_inst_equal): New method.
17947
17948         * reflection.c (mono_reflection_bind_generic_parameters): Use the
17949         `klass->image->generic_inst_cache' cache to avoid creating
17950         duplicate MonoGenericInst's.
17951
17952         * class.c (mono_class_inflate_generic_type): Use the cache.
17953
17954 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
17955
17956         * object.c: fixed gc descriptor calculation for embedded valuetypes.
17957
17958 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17959
17960         * icall.c: added Socket.WSAIoctl icall.
17961
17962         * socket-io.[ch]: implemented
17963         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
17964
17965 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
17966
17967         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
17968
17969 2004-02-18  Urs C Muff  <umuff@quark.com>
17970
17971         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
17972         this work on PPC and other big-endian architectures.
17973
17974         * debug-mono-symfile.h: Prepended the names of all the `guint32'
17975         fields with an underscore to make sure they're only accessed by
17976         the read32() macro.
17977
17978 2004-02-18  Martin Baulig  <martin@ximian.com>
17979
17980         * icall.c: Put the klass->refclass changes back for methods and
17981         fields, but not for properties and events.  We're currently not
17982         distinguishing between DeclaringType and ReflectedType for
17983         properties and events, that's what caused the regressions.
17984
17985 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17986
17987         * object.c:
17988         (mono_async_result_new): the handle can be NULL.
17989
17990         * threadpool.c: Use an event instead of a semaphore, don't initialize
17991         it until needed. This saves quite a few semaphores from being created
17992         when using the threadpool.
17993
17994 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
17995
17996         * object.c (mono_string_is_interned_lookup): Fix interning of long
17997         strings. Fixes #54473.
17998
17999         * domain.c (ldstr_equal): Optimize if the two strings are equal.
18000
18001         * icall.c: Revert the klass->refclass changes since they introduce
18002         regressions (bug #54518).
18003
18004 2004-02-18  Martin Baulig  <martin@ximian.com>
18005
18006         * class.c (mono_class_init): If we're a generic instance and don't
18007         come from a TypeBuilder, inflate our members here.
18008         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
18009         (mono_class_create_generic): New public method.
18010         (mono_class_initialize_generic): Removed.
18011         (get_instantiation_name): Renamed to
18012         _mono_class_get_instantiation_name() and made it public.
18013
18014 2004-02-18  Martin Baulig  <martin@ximian.com>
18015
18016         * class.c (mono_class_inflate_generic_type): Clear the new
18017         instance's `nginst->klass' when inflating a generic instance.
18018         (mono_class_is_subclass_of): Added (basic) support for generic
18019         instances.
18020
18021 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
18022
18023         * appdomain.h, domain.c: use a MonoCodeManager instead of a
18024         MonoMempool to hold compiled native code.
18025
18026 2004-02-17  Martin Baulig  <martin@ximian.com>
18027
18028         * class.h (MonoDynamicGenericInst): Added `count_properties' and
18029         `properties'.
18030
18031         * reflection.c (mono_reflection_generic_inst_initialize): Added
18032         `MonoArray *properties' argument.
18033
18034         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
18035
18036 2004-02-17  Martin Baulig  <martin@ximian.com>
18037
18038         * icall.c (ves_icall_Type_GetFields): Renamed to
18039         ves_icall_Type_GetFields_internal() and added a
18040         `MonoReflectionType *rtype' argument; pass it to
18041         mono_field_get_object() to set the field's "reflected" type.
18042         (ves_icall_Type_GetConstructors): Likewise.
18043         (ves_icall_Type_GetEvents): Likewise.
18044         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
18045         argument; pass it to mono_method_get_object() to set the method's
18046         "reflected" type.       
18047
18048 2004-02-17  Martin Baulig  <martin@ximian.com>
18049
18050         * class.h (MonoDynamicGenericInst): New type.
18051         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
18052
18053         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
18054         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
18055         (ves_icall_MonoGenericInst_GetFields): New interncall.
18056
18057         * class.c (mono_class_from_generic): Don't call
18058         mono_class_initialize_generic() if this is a dynamic instance;
18059         ie. it's being created from a TypeBuilder.
18060         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
18061         `class->byval_arg.type'.
18062
18063         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
18064         to `inflate_method' and made static.
18065         (mono_reflection_inflate_field): Removed.
18066         (mono_reflection_generic_inst_initialize): New public method.
18067
18068         * reflection.h (MonoReflectionGenericInst): Removed `methods',
18069         `ctors' and `fields'; added `initialized'.
18070
18071 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
18072
18073         * debug-helpers.c (mono_method_full_name): Fix output for empty
18074         namespaces.
18075
18076 2004-02-12  Martin Baulig  <martin@ximian.com>
18077
18078         * class.h (MonoClassField): Added `MonoType *generic_type'.
18079
18080         * reflection.c (mono_image_get_fieldref_token): Added support for
18081         instantiated generic types.
18082         (field_encode_inflated_field): Removed.
18083         (mono_image_get_inflated_field_token): Removed.
18084         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
18085
18086         * reflection.h (MonoReflectionInflatedField): Removed.
18087
18088 2004-02-12  Martin Baulig  <martin@ximian.com>
18089
18090         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
18091         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
18092
18093         * reflection.c (mono_image_get_methodspec_token): Take a
18094         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
18095         (mono_image_create_token): Check whether we have a
18096         `method->signature->gen_method' and call
18097         mono_image_get_methodspec_token() if appropriate.
18098         (inflated_method_get_object): Removed.
18099         (mono_reflection_bind_generic_method_parameters): Return a
18100         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
18101         (mono_reflection_inflate_method_or_ctor): Likewise.
18102
18103         * reflection.h (MonoReflectionInflatedMethod): Removed.
18104
18105 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
18106
18107         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
18108         for custom valuetype marshalling.
18109
18110         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
18111
18112 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18113
18114         * icall.c: fixed WSAGetLastError_internal name.
18115
18116 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
18117
18118         * threads.c (mono_thread_attach): Allow this to be called multiple
18119         times for a thread.
18120         
18121         * threads.c (build_wait_tids): Do not wait for ourselves.
18122
18123         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
18124         appdomain list is empty.
18125
18126         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
18127         memory returned by mono_string_builder_to_utf16, since it points into
18128         managed memory. Thanks to Bernie Solomon for noticing this.
18129
18130         * icall.c: Add AppDomainSetup icalls.
18131
18132         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
18133
18134         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
18135         types.
18136
18137         * reflection.c (reflection_methodbuilder_to_mono_method): Save
18138         custom attributes to the method_aux struct. Also fix array indexes etc.
18139
18140         * loader.c (mono_method_get_param_names): Make dynamic case work again.
18141         
18142 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
18143
18144         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
18145         (both static and runtime) and reduce startup time.
18146
18147 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
18148
18149         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
18150         AsAny marshalling conversion instead of crashing.
18151
18152         * marshal.c: Fix warnings.
18153
18154 2004-02-09  Martin Baulig  <martin@ximian.com>
18155
18156         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
18157
18158         * reflection.h (MonoReflectionInflatedMethod): Removed the
18159         `declaring' field, it's now in the unmanaged MonoGenericMethod.
18160
18161         * reflection.c (method_encode_methodspec): Removed the `method'
18162         argument; we get it from `gmethod->declaring'.
18163         (inflated_method_get_object): Removed the `declaring' argument.
18164
18165 2004-02-09  Martin Baulig  <martin@ximian.com>
18166
18167         * class.h (MonoGenericMethod): New type.
18168         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
18169         `generic_method'.
18170
18171         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
18172         a `MonoGenericMethod *gen_method' one.
18173
18174         * class.c (mono_class_inflate_generic_type): Take an additional
18175         `MonoGenericMethod * argument.  This is only non-NULL if we're
18176         inflating types for a generic method.   
18177         (mono_class_inflate_generic_signature): Renamed to
18178         inflate_generic_signature() and made static; take a
18179         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
18180         (inflate_generic_header): Take a `MonoGenericMethod *' argument
18181         instead of a `MonoGenericInst *' one.
18182         (mono_class_inflate_generic_method): Likewise.
18183
18184         * reflection.c (encode_generic_method_sig): Take a
18185         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
18186         (method_encode_methodspec): Likewise.
18187         (inflated_method_get_object): Likewise. 
18188
18189         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
18190         field with a `MonoGenericMethod *gmethod' one.  
18191
18192 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
18193
18194         * class.h (mono_class_has_parent): add parens to expansion
18195         so you can ! this.
18196
18197 2004-02-08  Martin Baulig  <martin@ximian.com>
18198
18199         * image.h (MonoImage): Removed `generics_cache'.
18200
18201         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
18202         instead of a `MonoType *' argument; removed the `inflate_methods'
18203         argument.  Don't inflate methods here.
18204
18205         * loader.c (find_method): If it's a generic instance, call
18206         mono_class_init() on the `sclass->generic_inst->generic_type'.
18207
18208         * metadata.c (mono_type_size): Make this work on uninitialized
18209         generic instances; call it on the `ginst->generic_type's class.
18210
18211         * reflection.c (mono_reflection_bind_generic_parameters): Call
18212         mono_class_from_generic() to create the `ginst->klass'.
18213
18214 2004-02-08  Martin Baulig  <martin@ximian.com>
18215
18216         * class.h (MonoClass): Changed type of `generic_inst' from
18217         `MonoType *' to `MonoGenericInst *'.
18218
18219 2004-02-08  Martin Baulig  <martin@ximian.com>
18220
18221         * icall.c (ves_icall_Type_BindGenericParameters): Just call
18222         mono_type_get_object(), this is now creating a `MonoGenericInst'
18223         for MONO_TYPE_GENERICINST.
18224         (ves_icall_MonoGenericInst_GetParentType): Likewise.
18225         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
18226
18227         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
18228         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
18229         (inflated_method_get_object): Added `MonoClass *refclass' argument.
18230         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
18231         and reflected type.
18232
18233         * reflection.h (MonoReflectionInflatedMethod): Removed
18234         `declaring_type' and `reflected_type'.
18235
18236 2004-02-08  Martin Baulig  <martin@ximian.com>
18237
18238         * class.h (MonoGenericInst): Added `MonoType *parent' and
18239         `MonoType **ifaces'.
18240
18241         * reflection.h (MonoReflectionGenericInst): Removed `klass',
18242         `parent' and `interfaces'.
18243
18244         * reflection.c (mono_reflection_bind_generic_parameters): Take a
18245         `MonoType *' argument and return a `MonoType *'.
18246
18247         * icall.c
18248         (ves_icall_MonoGenericInst_GetParentType): New interncall.
18249         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
18250
18251 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
18252
18253         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
18254         valuetype marshalling.
18255
18256 2004-02-06  Martin Baulig  <martin@ximian.com>
18257
18258         * class.c
18259         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
18260         (my_mono_class_from_generic_parameter): Likewise.
18261
18262 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
18263
18264         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
18265         contents of the symbol files lazily.
18266
18267         * object.h (MonoThread): Add 'name' and 'name_len' fields.
18268
18269         * threads.h threads.c icall.c: New icalls for getting and setting the
18270         threads name.
18271
18272 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
18273
18274         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
18275         Raise an exception when the domain is not found.
18276
18277 2004-02-03  Martin Baulig  <martin@ximian.com>
18278
18279         * reflection.c (mono_image_get_methodspec_token): Use the
18280         uninflated signature; fixes gen-33.
18281
18282 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
18283
18284         * gc.c threads.c: Make the finalizer thread a normal managed thread so
18285         the finalizer code can use thread functionality.
18286
18287         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
18288         the finalizer thread.
18289
18290         * threads.c: Make some functions more robust.
18291
18292         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
18293
18294         * metadata.h: Add new marshalling conventions.
18295
18296         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
18297         stringbuilder marshalling. Fixes #53700.
18298
18299         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
18300
18301         * reflection.c (mono_image_get_type_info): Save declarative security
18302         info.
18303
18304         * reflection.c (mono_image_get_field_info): Handle uninitialized 
18305         unmanaged fields as well.
18306
18307         * appdomain.c: Bump corlib version.
18308
18309 2004-02-01  Martin Baulig  <martin@ximian.com>
18310
18311         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
18312         method type arguments.  
18313
18314 2004-01-30  Duncan Mak  <duncan@ximian.com>
18315
18316         * marshal.h: Add prototype for
18317         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
18318         and
18319         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
18320         fix the build.
18321
18322 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
18323
18324         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
18325         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
18326
18327 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
18328
18329         * marshal.c (mono_marshal_get_native_wrapper): Add support for
18330         custom marshalling of valuetypes.
18331
18332         * marshal.c: Fix some warnings.
18333
18334 2004-01-29  Martin Baulig  <martin@ximian.com>
18335
18336         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
18337         for generic method parameters.
18338
18339         * reflection.c (method_encode_methodspec): Write the uninflated
18340         signature into the methodspec table.
18341         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
18342         is always the uninflated method.
18343         (reflection_methodbuilder_to_mono_method): Copy the generic
18344         parameters from the MethodBuilder into `header->gen_params'.
18345
18346 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
18347
18348         * class.c (mono_class_from_generic_parameter): Fix warning.
18349
18350 2004-01-27  Martin Baulig  <martin@ximian.com>
18351
18352         * class.c (mono_class_from_generic_parameter): Don't create
18353         `klass->methods' here.  
18354
18355 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
18356
18357         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
18358         extension since it does not work with libraries named lib<FOO>.dll.so.
18359
18360 2004-01-25  Martin Baulig  <martin@ximian.com>
18361
18362         * class.c (mono_class_inflate_generic_type): Added support for
18363         MONO_TYPE_GENERICINST.
18364
18365         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
18366         inflate methods on open constructed types.      
18367
18368 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18369
18370         * object.c: fire ProcessExit event in the root AppDomain after running
18371         Main. Fixes bug #53299.
18372
18373 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18374
18375         * socket-io.c: include the new socket-wrappers.h header.
18376         Use the wrappers instead of the unix socket functions to make the code
18377         more clear.
18378
18379 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
18380
18381         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
18382
18383         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
18384         Fixes #22532.
18385
18386 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
18387
18388         * reflection.c (mono_image_create_pefile): Handle the case when the
18389         entry point is not a MethodBuilder.
18390
18391         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
18392         field to ReflectionMethod since it is not allways a builder.
18393
18394         * reflection.c (type_get_fully_qualified_name): New helper function to
18395         return the fully qualified name of a type.
18396
18397         * reflection.c (encode_marshal_blob): Always emit the fully qualified
18398         type name for custom marshallers.
18399
18400         * reflection.c (mono_marshal_spec_from_builder): Ditto.
18401
18402         * class.c (mono_class_setup_vtable): If a parent class already 
18403         implements an interface, use the implementing methods from that class.
18404         Fixes #53148.
18405
18406 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18407
18408         * threadpool.c: just return instead of ExitThread to allow for thread
18409         clean up earlier.
18410
18411 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
18412
18413         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
18414         when closing resource modules.
18415
18416         * reflection.c (mono_image_create_pefile): Handle the case when the
18417         entry point is not a MethodBuilder.
18418
18419         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
18420         field to ReflectionMethod since it is not allways a builder.
18421
18422 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
18423
18424         * marshal.c (mono_marshal_get_managed_wrapper): 
18425         mono_marshal_alloc takes native int so CONV_I
18426         the arg for 64bits.
18427
18428 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
18429
18430         * reflection.c (fixup_cattrs): New function to fixup the methoddef
18431         tokens in the cattr table. Fixes #53108.
18432
18433 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18434
18435         * loader.c: don't trim ".dll" before looking up in the config file.
18436         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
18437
18438 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
18439
18440         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
18441         Return the module which contains the resource as well.
18442         (ves_icall_System_Reflection_Module_Close): New icall.
18443
18444         * appdomain.c: Bump corlib version number.
18445
18446         * image.c (mono_image_addref): New public function.
18447
18448         * assembly.c: Call mono_image_addref.
18449
18450         * reflection.c (mono_module_get_object): Increase reference count of 
18451         the image.
18452
18453         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
18454         Fixes #22532.
18455
18456         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
18457         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
18458         proper exceptions on DllImport problems.
18459
18460 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
18461
18462         * class.c, metadata.c: eliminate CSIZE macro.
18463
18464 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
18465
18466         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
18467         * object.h: Added async_callback field in MonoAsyncResult.
18468         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
18469         * verify.c: Added async_callback in MonoAsyncResult layout.
18470
18471 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
18472
18473         * reflection.c (mono_reflection_get_custom_attrs): Add support
18474         for Modules.
18475
18476 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
18477
18478         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
18479         marshalling.
18480         (mono_marshal_method_from_wrapper): Add null pointer check.
18481
18482 2004-01-16  Martin Baulig  <martin@ximian.com>
18483
18484         * debug-mono-symfile.h: Set version number to 36 and reflect
18485         latest symbol writer changes.
18486
18487 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
18488
18489         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
18490         multi-dimensional arrays.
18491         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
18492         (mono_class_from_mono_type): Use bounded_array_class_get.
18493         
18494         * class.c (mono_bounded_array_class_get): New function which takes
18495         a 'bounded' bool argument to distinguish vectors from one dimensional
18496         arrays.
18497
18498         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
18499         bounded_array_class_get if the array has bounds.
18500
18501         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
18502         Search modules loaded using AssemblyBuilder:AddModule as well.
18503
18504 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18505
18506         * appdomain.c: increased corlib version.
18507         * filewatcher.c: removed g_print.
18508         * icall.c:
18509         (get_property_info): only allocate what is actually requested.
18510         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
18511
18512 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18513
18514         * Makefile.am: added filewatcher.[ch]
18515         * filewatcher.[ch]: FileSystemWatcher runtime support.
18516         * icall.c: added new FSW icalls.
18517
18518 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18519
18520         * string-icalls.c: fix stringbuilder regression as suggested by
18521         Iain McCoy <iain@mccoy.id.au>.
18522
18523 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
18524
18525         * process.c (process_read_stringtable_block): Recognize '007f' as
18526         a language neutral stringtable block.
18527
18528 2004-01-12  Patrik Torstensson
18529
18530         * object.h (MonoStringBuilder) : Changed layout to support our
18531         new stringbuilder class.
18532         * marshal.c: Change marshalling to support the new layout of 
18533         string builder.
18534         * appdomain.c: increased version number because new layout of
18535         string builder.
18536
18537 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
18538
18539         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
18540         assembly name as an string instead of an AssemblyName, since it is
18541         easier to extract info from it.
18542
18543         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
18544         the culture subdirectories too. Fixes #52231.
18545
18546 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18547
18548         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
18549         It takes 2 new parameters with an optional name for the method to look
18550         for and case ignoring info.
18551
18552         * threadpool.c: removed unused variable.
18553
18554 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18555
18556         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
18557         It takes 2 new parameters with an optional name for the property to look
18558         for and case ignoring info.
18559         Fixes bug #52753.
18560
18561 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
18562
18563         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
18564         Fix #52451.
18565
18566 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18567
18568         * appdomain.c:
18569         * assembly.c: escape the uri before passing it to g_filename_from_uri.
18570         Fixes bug #52630.
18571
18572 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
18573
18574         * reflection.c: Add support for more than one unmanaged resource.
18575
18576         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
18577         in field->def_value, as done in all other cases.
18578
18579         * reflection.c (mono_reflection_get_custom_attrs): Add support for
18580         TypeBuilders.
18581
18582         * reflection.c (mono_reflection_create_runtime_class): Remove 
18583         errorneous assignment to klass->element_class, since it is already
18584         done in mono_reflection_setup_internal_class.
18585
18586 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18587
18588         * gc.c: added missing LeaveCriticalSection.
18589         * icall.c: indented a couple of lines.
18590         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
18591         if we call EndInvoke inside a callback. Fixes bug #52601.
18592
18593 2004-01-07  Martin Baulig  <martin@ximian.com>
18594
18595         * mono-debug-debugger.h
18596         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
18597
18598 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
18599
18600         * appdomain.c: Use messages in NotImplementedException.
18601
18602         * exception.c (mono_get_exception_not_implemented): Now this takes
18603         a message argument.
18604
18605         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
18606         exception instead of g_asserting an aborting when something is not
18607         implemented.
18608
18609         Add some inline docs.
18610
18611 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
18612
18613         * reflection.h: Update after changes to object layout.
18614
18615         * reflection.c: Implement saving of unmanaged aka win32 resources.
18616
18617         * appdomain.c: Bump version number.
18618
18619         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
18620         Handle missing domains gracefully.
18621
18622 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
18623
18624         * file-io.c : On Windows, there are much more invalid_path_chars.
18625
18626 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18627
18628         * class.h, object.c: prepare for GetType () speedup.
18629
18630 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
18631
18632         * profiler.c: workaround for --profile null reference exception on
18633           cygwin. Patch by Patrik Torstensson.
18634
18635 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
18636
18637         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
18638         make work for unaligned access.
18639
18640 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
18641
18642         * class.c: small cleanup (class->fields [i] -> field).
18643         * image.c: check address of metadata is valid.
18644
18645 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
18646
18647         * assembly.h assembly.c (mono_assembly_loaded): New public function to
18648         search the list of loaded assemblies.
18649
18650         * reflection.c (mono_reflection_type_from_name): Use 
18651         mono_assembly_loaded instead of mono_image_loaded.
18652
18653         * reflection.c: Fix warnings.
18654
18655 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
18656
18657         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
18658         is dynamic. This is needed since an assembly can contain both dynamic and
18659         non-dynamic images.
18660
18661         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
18662         assembly->dynamic.
18663
18664         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
18665
18666         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
18667         to store modules loaded using AddModule.
18668
18669         * reflection.c (mono_image_fill_file_table): Generalize this so it works
18670         on Modules.
18671
18672         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
18673
18674         * reflection.c (mono_image_fill_export_table_from_module): New function to
18675         fill out the EXPORTEDTYPES table from a module.
18676
18677         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
18678         into a separate function. Also handle loaded non-dynamic modules.
18679
18680         * reflection.c (mono_image_basic_init): Fix memory allocation.
18681
18682         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18683
18684         * assembly.c (mono_assembly_load_references): Make this public.
18685
18686 2003-12-19  Martin Baulig  <martin@ximian.com>
18687
18688         * class.c (mono_class_initialize_generic): Made this static, take
18689         a `MonoGenericInst *' instead of a `MonoClass *'.
18690         (mono_class_from_generic): Call mono_class_initialize_generic()
18691         unless we're already initialized or being called from
18692         do_mono_metadata_parse_generic_inst().
18693
18694         * class.h (MonoGenericInst): Added `initialized' and
18695         `init_pending' flags.
18696
18697         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
18698         `mono_class_init (gklass)' or mono_class_initialize_generic()
18699         here; set `generic_inst->init_pending' while parsing the
18700         `type_argv'.
18701
18702 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
18703
18704         * locales.c: include string.h for memxxx prototypes
18705
18706 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
18707
18708         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
18709         constructor when accessing literal fields.
18710
18711 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
18712
18713         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18714
18715         * reflection.c (assembly_add_resource_manifest): New function to fill
18716         the MANIFESTRESOURCE table.
18717
18718         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
18719
18720         * reflection.h: Update to changes in class layout.
18721
18722         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
18723         Reenable call to mono_runtime_is_shutting_down ().
18724
18725         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
18726         determine if the runtime is shutting down.
18727
18728 2003-12-16  Jackson Harper <jackson@ximian.com>
18729
18730         * icall.c: comment out call to mono_runtime_is_shutting_down to
18731         fix build.
18732         
18733 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
18734
18735         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
18736         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
18737
18738 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
18739
18740         * reflection.c: move definition of swap_with_size
18741         to before its first call
18742
18743 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
18744
18745         * appdomain.c (mono_runtime_is_shutting_down): New public function.
18746
18747         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
18748         icall.
18749
18750         * object.c: Fix warnings.
18751
18752         * icall.c (ves_icall_Type_Get...): Only consider inherited static
18753         members if FlattenHierarchy is set.
18754
18755         * reflection.c (mono_image_add_decl_security): New function to emit
18756         declarative security.
18757
18758         * reflection.h reflection.c: Add support for declarative security.
18759
18760         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
18761         
18762 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
18763
18764         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
18765         
18766         * appdomain.c verify.c: Moved corlib version checking into its own
18767         function in appdomain.c since it needs to create vtables etc.
18768
18769 2003-12-13  Patrik Torstensson <p@rxc.se>
18770
18771         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
18772         instead of unwrapped server.
18773
18774 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
18775
18776         * verify.c (check_corlib): Fix field index.
18777
18778 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
18779
18780         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
18781         GetGacPath icall.
18782
18783 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
18784
18785         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
18786         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
18787         cope with sizeof(size_t) != sizeof(guint32).
18788
18789 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18790
18791         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
18792         in case of failure.
18793
18794 2003-12-10  Mark Crichton <crichton@gimp.org>
18795
18796         * icall.c: removed the GetNonZeroBytes.  We now handle this case
18797         in managed code.
18798
18799         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
18800
18801 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
18802
18803         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
18804         marked as deleted.
18805
18806 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
18807
18808         * verify.c (check_corlib): Handle the case when the version field is 
18809         initialized by a static constructor.
18810
18811 2003-12-08  Patrik Torstensson  <p@rxc.se>
18812
18813     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
18814
18815 2003-12-08  Martin Baulig  <martin@ximian.com>
18816
18817         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
18818         a MonoReflectionGenericParameter, also take the parameter index
18819         and name as arguments.
18820         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
18821         (ves_icall_MonoGenericParam_initialize): New interncall.
18822         (ves_icall_Type_make_byref_type): New interncall.
18823
18824         * reflection.h (MonoReflectionGenericParam): Derive from
18825         MonoReflectionType, not just from MonoObject.  Added `refobj' and
18826         `index' fields.
18827
18828         * reflection.c (mono_reflection_define_generic_parameter): Create
18829         and return a new MonoReflectionGenericParam; don't initialize the
18830         constraints here.
18831         (mono_reflection_initialize_generic_parameter): New public method;
18832         initializes the constraints and creates the `param->pklass'.
18833
18834 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
18835
18836         * reflection.h reflection.c: Use the new fields 'num_types', 
18837         'num_fields' and 'num_methods' to track the number of types etc.
18838
18839         * verify.c (check_corlib): Check corlib version number.
18840
18841 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
18842
18843         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
18844         function works on all methods.
18845
18846 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
18847
18848         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
18849         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
18850         the custom_type_info flag of the transparent proxy.
18851         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
18852         objects that supports IRemotingTypeInfo.
18853         * object.h: Added custom_type_info field in transparent proxy.
18854
18855 2003-12-06  Martin Baulig  <martin@ximian.com>
18856
18857         * class.c (mono_class_create_from_generic): Removed.
18858         (mono_class_from_generic): Check `ginst->klass' before doing
18859         anything else.  This is important to fully support "recursive"
18860         generic types.
18861
18862         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
18863         empty `generic_inst->klass' before doing anything else.
18864
18865 2003-12-06  Dick Porter  <dick@ximian.com>
18866
18867         * verify.c: 
18868         * object.h:
18869         * icall.c:
18870         * locales.c: Use C structs to access class fields.  Don't do a
18871         conversion between MonoString and UChar because both are
18872         platform-endian UTF-16.  Compare now takes startindex and count
18873         parameters.  Add a char overload for IndexOf.  Speed up the
18874         invariant string IndexOf.
18875
18876 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
18877
18878         * Makefile.am (monosn_LDADD): Fix parallel build.
18879
18880 2003-12-04  Martin Baulig  <martin@ximian.com>
18881
18882         * icall.c
18883         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
18884         (ves_icall_Type_make_array_type): New interncall.       
18885
18886 2003-12-04  Martin Baulig  <martin@ximian.com>
18887
18888         * locales.c: also change it in the !HAVE_ICU case.
18889
18890 2003-12-04  Dick Porter  <dick@ximian.com>
18891
18892         * icall.c:
18893         * locales.c: construct_compareinfo is now in CompareInfo, not
18894         CultureInfo.
18895
18896 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
18897
18898         * image.c (mono_image_load_file_for_image): Cache loaded images in the
18899         image->files array.
18900
18901         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
18902         table as well.
18903
18904         * assembly.c (mono_assembly_load_references): Only load references
18905         once.
18906
18907         * class.c (mono_class_from_name): Avoid linear search of the 
18908         EXPORTEDTYPE table.
18909
18910         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
18911
18912 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
18913
18914         * image.h (MonoImage): Add 'field_cache' field.
18915
18916         * loader.c (mono_field_from_token): Cache field lookups.
18917         
18918         * reflection.c (mono_module_get_object): Fix name property.
18919
18920         * icall.c (ves_icall_get_enum_info): Update after changes to 
18921         mono_metadata_get_constant_index ().
18922
18923         * icall.c: Get rid of get_type_info icall, use a separate icall for
18924         each type property to avoid needless memory allocations. Fixes #51514.
18925
18926         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
18927         to avoid needless binary searches.
18928
18929         * class.c (class_compute_field_layout): Move the initialization of
18930         field->def_value to mono_class_vtable ().
18931
18932         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
18933         non-corlib types.
18934
18935         * object.c (mono_object_allocate): Make it inline.
18936
18937         * object.c (mono_object_allocate_spec): Make it inline.
18938         
18939 2003-12-02  Dick Porter  <dick@ximian.com>
18940
18941         * locales.c (create_NumberFormat): NumberFormatInfo construction.
18942         Patch by Mohammad DAMT (mdamt@cdl2000.com).
18943
18944 2003-12-01  Dick Porter  <dick@ximian.com>
18945
18946         * threads.c: Fix signature and call in CreateMutex and
18947         CreateEvent.
18948
18949 2003-12-01  Dick Porter  <dick@ximian.com>
18950
18951         * icall.c: 
18952         * locales.c: Implement string compares and searching
18953
18954         * object.h: Add extra Thread field
18955
18956 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
18957
18958         * reflection.c (fixup_method): Add support for MonoCMethod.
18959
18960 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
18961
18962         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
18963
18964         * reflection.c (assembly_name_to_aname): Allow extra characters in
18965         assembly names. Fixes #51468.
18966
18967 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
18968
18969         * exception.c (mono_exception_from_name_domain): New helper function.
18970
18971         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
18972         exception object in the correct domain.
18973
18974         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
18975         formatting + make a copy a the input data.
18976
18977         * loader.c (mono_get_method_from_token): Methods which contain
18978         native code do not have entries in the ImplMap.
18979
18980         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
18981         Thanks to Gonzalo for spotting this.
18982         
18983         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
18984         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
18985
18986         * assembly.h (mono_assembly_load_from): Split the second part of 
18987         assembly loading into a new public function.
18988
18989         * exception.h (mono_get_exception_bad_image_format): New function.
18990
18991 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
18992
18993         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
18994         Enumerate all modules inside a dynamic assembly. Fixes #51293.
18995         
18996         * icall.c: Add new icall for creating dynamic methods.
18997
18998         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
18999
19000         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
19001
19002         * reflection.c (mono_reflection_create_dynamic_method): New icall to
19003         create a dynamic method.
19004
19005         * reflection.c (resolve_object): New helper function.
19006
19007         * reflection.c: Generalize ReflectionMethodBuilder and the functions
19008         which manipulate it so they can also work on dynamic methods.
19009
19010         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
19011         creating the MonoReflectionMethodAux structure if it is not needed.
19012         
19013         * reflection.h verify.c: Update after changes to object layout.
19014
19015         * reflection.c (method_builder_encode_signature): Fix compilation on
19016         gcc 2.95.x.
19017
19018 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
19019
19020         * appdomain.h: Added support for context static fields. Added static_data
19021           field to MonoAppContext and renamed thread_static_fields to a more
19022           generic special_static_fields in MonoAppDomain, since it can now contain
19023           context static fields.
19024         * domain.c: Updated hashtable name.
19025         * object.c: Replaced field_is_thread_static() for a more generic
19026           field_is_special_static() which also checks for context static attribute.
19027           In mono_class_vtable(), added support for static context fields.
19028         * threads.c: Changed methods that manage thread static fields to more
19029           generic methods so they can be reused both for thread and context static
19030           data.
19031         * threads.h: Declared some new methods.
19032
19033 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
19034
19035         * reflection.h: Update after changes to the managed types.
19036
19037         * reflection.c (encode_custom_modifiers): New helper function.
19038
19039         * reflection.c (method_encode_signature): Emit custom modifiers.
19040
19041         * reflection.c (field_encode_signature): Emit custom modifiers.
19042
19043 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
19044
19045         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
19046
19047         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
19048         implementation.
19049
19050         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
19051         icall.
19052
19053         * object.c (mono_field_get_value_object): New function.
19054
19055         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
19056         specific.
19057
19058 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
19059
19060         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
19061         return a preallocated out-of-memory exception instance.
19062
19063         * object.c (out_of_memory): Use the new function.
19064
19065         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
19066         flag is before the custom modifiers. Fixes #49802.
19067
19068 2003-11-16  Martin Baulig  <martin@ximian.com>
19069
19070         * class.c (mono_class_is_open_constructed_type): Implemented the
19071         MONO_TYPE_GENERICINST case.
19072
19073 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
19074
19075         * assembly.c (mono_assembly_fill_assembly_name): New function to
19076         fill out the MonoAssemblyName structure.
19077         (mono_assembly_open): Use the new function.
19078
19079         * icall.c (fill_reflection_assembly_name): New helper function.
19080
19081         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
19082         new function.
19083
19084         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
19085
19086 2003-11-15  Martin Baulig  <martin@ximian.com>
19087
19088         * class.c (mono_class_is_open_constructed_type): New public
19089         function; checks whether a type is an open constructed type,
19090         ie. whether it still contains type parameters.
19091         (mono_class_inflate_generic_type): If we're a type parameter and
19092         the inflated type is also a MONO_TYPE_(M)VAR, return the original
19093         type.
19094
19095         * class.h (MonoGenericInst): Added `guint32 is_open'.
19096
19097         * loader.c (method_from_methodspec): Check whether we're an open
19098         or closed constructed type and set `ginst->is_open'.
19099
19100         * reflection.c (mono_reflection_bind_generic_parameters): Check
19101         whether we're an open or closed constructed type and set
19102         `ginst->is_open'.
19103         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
19104         from open constructed types.
19105
19106 2003-11-15  Martin Baulig  <martin@ximian.com>
19107
19108         * reflection.c (mono_reflection_bind_generic_parameters): If we're
19109         a generic instance (instead of a generic type declaration) with
19110         unbound generic parameters, bind them to our actual types.
19111
19112 2003-11-14  Martin Baulig  <martin@ximian.com>
19113
19114         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
19115
19116         * reflection.c (mono_reflection_bind_generic_parameters): If we're
19117         an interface type, populate `res->interfaces' with instantiated
19118         versions of all the interfaces we inherit.
19119
19120 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
19121
19122         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
19123         when MONO_PATH is set but doesn't contain the install dir.
19124
19125 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19126
19127         * icall.c:
19128         (ves_icall_Type_GetInterfaces): don't return an interface twice when
19129         it's also implemented in base classes. Fixes bug #50927.
19130
19131 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
19132
19133         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
19134         if this method is called from a finalizer. Fixes #50913.
19135
19136 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
19137
19138         * threads.c: Implement VolatileRead/VolatileWrite
19139
19140         * icall.c: Add new icalls for VolatileRead/VolatileWrite
19141
19142 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
19143
19144         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
19145         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
19146         2.95.3.
19147
19148         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
19149         from Peter Ross (pro@missioncriticalit.com).
19150         
19151 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
19152
19153         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
19154
19155 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
19156
19157         * assembly.c (mono_assembly_load_references): Disable check because it
19158         triggers on older corlibs which lots of people have.
19159
19160 2003-11-12  Jackson Harper  <jackson@ximian.com>
19161
19162         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
19163         load corlib.dll if mscorlib.dll is not found.
19164         * assembly.h: Remove corlib name define.
19165         * class.c:
19166         * domain.c:
19167         * image.c: Change corlib name to mscorlib.
19168         
19169 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
19170
19171         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
19172
19173 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
19174
19175         * appdomain.h: Added loader_optimization here to sync with the C#
19176         code, and add disallow_binding_redirects field.
19177
19178 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
19179
19180         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
19181
19182         * reflection.c (mono_image_build_metadata): Fix crash on modules
19183         with no types.
19184
19185         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
19186
19187         * icall.c (ves_icall_get_method_info): Return callingConvention as
19188         well.
19189
19190         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
19191         namespaces from the EXPORTEDTYPE table as well.
19192
19193         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
19194         from all modules inside the assembly.
19195         
19196 2003-11-11  Martin Baulig  <martin@ximian.com>
19197
19198         * reflection.c (mono_reflection_bind_generic_parameters): Make
19199         this work for interfaces.
19200
19201 2003-11-11  Martin Baulig  <martin@ximian.com>
19202
19203         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
19204
19205 2003-11-11  Martin Baulig  <martin@ximian.com>
19206
19207         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
19208         "MonoInflatedMethod" and "MonoInflatedCtor".
19209
19210 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
19211
19212         * reflection.c (resolution_scope_from_image): Use the assembly table
19213         from the manifest module, since other modules don't have it.
19214
19215         * debug-helpers.c (mono_type_full_name): New helper function.
19216
19217         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
19218
19219         * image.c (mono_image_load_file_for_image): New public function which
19220         is a replacement for the load_file_for_image in class.c.
19221
19222         * assembly.c (mono_assembly_load_module): A wrapper for the function
19223         above which does assembly association and reference loading too.
19224
19225         * class.c (mono_class_from_name): Call mono_assembly_load_module.
19226
19227 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19228
19229         * appdomain.c: not all of the attributes for the full assembly name
19230         are required and the order doesn't matter. Fixes bug #50787.
19231
19232 2003-11-10  Dick Porter  <dick@ximian.com>
19233
19234         * locales.c: Use platform-endian UTF16
19235
19236 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
19237
19238         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
19239         
19240 2003-11-10  Martin Baulig  <martin@ximian.com>
19241
19242         * metadata.c
19243         (mono_metadata_load_generic_params): Make this actually work.
19244
19245         * reflection.c (mono_reflection_bind_generic_parameters): If our
19246         parent is a generic instance, pass all the `types' to it, no
19247         matter whether it has the same number of type parameters or not.
19248
19249 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
19250
19251         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
19252
19253         * assembly.c (mono_assembly_load_references): Move the image<->assembly
19254         assignment code to this function so it gets called recursively for all
19255         modules.
19256
19257         * image.c (load_modules): Remove the assembly assignment since it is
19258         now done by mono_assembly_load_references.
19259         
19260         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
19261         Add 'module' argument.
19262         (mono_module_get_types): New helper function.
19263         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
19264
19265 2003-11-08  Martin Baulig  <martin@ximian.com>
19266
19267         * class.c (mono_class_inflate_generic_method): Interface method
19268         don't have a header.
19269
19270         * reflection.c (mono_image_get_methodspec_token): Take an
19271         additional `MonoGenericInst *' argument instead of reading it from
19272         the header; this is necessary to support interfaces.
19273         (mono_image_create_token): Pass the `MonoGenericInst *' from the
19274         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
19275         (inflated_method_get_object): Take an additional `MonoGenericInst *'
19276         argument.
19277
19278         * reflection.h (MonoReflectionInflatedMethod): Added
19279         `MonoGenericInst *ginst'.
19280
19281 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
19282
19283         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
19284
19285 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
19286
19287         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
19288
19289 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
19290
19291         * reflection.c 
19292         (reflection_methodbuilder_from_method_builder):
19293         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
19294         initialize a ReflectionMethodBuilder structure.
19295         (mono_image_get_methodbuilder_token):
19296         (mono_image_get_ctorbuilder_token): New functions to emit memberref
19297         tokens which point to types in another module inside the same assembly.
19298
19299         * reflection.c: Use the new helper functions.
19300         
19301         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
19302
19303         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
19304         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
19305
19306         * reflection.c (resolution_scope_from_image): Emit a moduleref if
19307         neccesary.
19308
19309         * reflection.c (mono_image_build_metadata): Emit metadata only for the
19310         current module. Emit the manifest only for the main module.
19311
19312         * reflection.c (mono_image_create_token): Add assertion when a 
19313         memberref needs to be created.
19314
19315         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
19316
19317         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
19318         larger buffer for the custom attribute blob. Fixes #50637.
19319         
19320 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19321
19322         * threadpool.c: notify listener on async processing handles after
19323         invoking the async callback. Thanks to Zoltan.
19324
19325 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
19326
19327         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
19328         avoid code duplication.
19329
19330         * reflection.h (MonoDynamicImage): New type which is currently unused,
19331         but will be used through the ref.emit code in place of 
19332         MonoDynamicAssembly.
19333
19334         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
19335         object layout.
19336
19337         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
19338         a MonoDynamicImage instead of just a MonoImage.
19339         
19340         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
19341         icalls to ModuleBuilder but keep their semantics, so they will work
19342         with moduleb->assemblyb. This will change later.
19343         
19344 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
19345
19346         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
19347         object layout.
19348
19349         * reflection.c (mono_image_build_metadata): Avoid creation of a default
19350         main module, since it is now done by the managed code.
19351
19352 2003-11-03  Martin Baulig  <martin@ximian.com>
19353
19354         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
19355         `ginst->klass' here.
19356         (method_encode_methodspec): Don't use the `ginst->generic_method's
19357         klass if it's a generic instance, use `ginst->klass' in this case.
19358
19359 2003-11-03  Martin Baulig  <martin@ximian.com>
19360
19361         * reflection.c (mono_image_get_generic_method_param_info):
19362         Removed, use mono_image_get_generic_param_info() instead.
19363         (mono_image_get_type_info): Write the GenericParam table before
19364         the Method table.  This is neccessary because in the GenericParam
19365         table, type parameters of the class (ie. '!0' etc.) must come
19366         before the ones from its generic methods (ie. '!!0' etc).
19367
19368 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
19369
19370         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
19371
19372 2003-11-02  Martin Baulig  <martin@ximian.com>
19373
19374         * reflection.c (create_generic_typespec): Take a
19375         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
19376         the generic parameters from it.
19377
19378 2003-11-02  Martin Baulig  <martin@ximian.com>
19379
19380         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
19381         instead of a `MonoClassField *' since we just need the type.
19382         (create_generic_typespec): New static function.  Creates a
19383         TypeSpec token for a generic type declaration.
19384         (mono_image_get_generic_field_token): New static function.
19385         (mono_image_create_token): If we're a FieldBuilder in a generic
19386         type declaration, call mono_image_get_generic_field_token() to get
19387         the token.
19388
19389 2003-11-02  Martin Baulig  <martin@ximian.com>
19390
19391         * reflection.h
19392         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
19393         `MonoReflectionGenericInst *declaring_type' and
19394         `MonoReflectionGenericInst *reflected_type' fields.
19395
19396         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
19397         `MonoReflectionGenericInst *declaring_type' and a
19398         `MonoReflectionGenericInst *reflected_type' argument instead of a
19399         single `MonoReflectionGenericInst *type' one.  Set
19400         `res->declaring_type' and `res->reflected_type' from them.
19401         (mono_reflection_inflate_field): Likewise.      
19402
19403 2003-11-02  Martin Baulig  <martin@ximian.com>
19404
19405         * class.c (mono_class_setup_vtable): Don't store generic methods
19406         in the vtable.  
19407
19408 2003-11-02  Martin Baulig  <martin@ximian.com>
19409
19410         * reflection.h (MonoReflectionGenericInst): Added
19411         `MonoReflectionType *declaring_type'.
19412
19413         * reflection.c (mono_reflection_bind_generic_parameters): Use
19414         `if (tb->parent)' instead of `klass->parent'.
19415
19416 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
19417
19418         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
19419         with an empty ASSEMBLY table.
19420
19421         * reflection.c (mono_image_build_metadata): Avoid using the same loop
19422         variable in the inner and outer loops.
19423
19424 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
19425
19426         * metadata.h (mono_metadata_make_token): Put parentheses around macro
19427         argument.
19428
19429         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
19430         
19431         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
19432         icalls. Instead, do everything in managed code. This is needed since
19433         it is hard to restore the original domain etc. in unmanaged code in the
19434         presence of undeniable exceptions.
19435
19436         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
19437         New icalls to push and pop appdomain refs.
19438
19439 2003-10-31  Martin Baulig  <martin@ximian.com>
19440
19441         * class.c (inflate_generic_type): Renamed to
19442         mono_class_inflate_generic_type() and made it public.
19443
19444         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
19445         New interncall.
19446
19447         * loader.c (mono_field_from_memberref): Also set the retklass for
19448         typespecs.
19449
19450         * fielder.c (mono_image_get_inflated_field_token): New static
19451         method; creates a metadata token for an inflated field.
19452         (mono_image_create_token, fixup_method): Added support for
19453         "MonoInflatedField".
19454         (fieldbuilder_to_mono_class_field): New static function.
19455         (mono_reflection_inflate_field): New public function.
19456
19457         * reflection.h
19458         (MonoReflectionGenericInst): Added `MonoArray *fields'.
19459         (MonoReflectionInflatedField): New typedef.     
19460
19461 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
19462
19463         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
19464         for Solaris and other platforms without s6_addr16
19465
19466 2003-10-30  Martin Baulig  <martin@ximian.com>
19467
19468         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
19469         argument instead of two.
19470         (mono_class_inflate_generic_signature): Likewise.
19471         (inflate_generic_header): Likewise.
19472         (mono_class_inflate_generic_method): Likewise.  In addition, if
19473         `ginst->klass' is set, it becomes the new `method->klass'.
19474
19475         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
19476         field.
19477
19478         * reflection.c (encode_generic_method_sig): Write a 0xa as the
19479         first byte. [FIXME]
19480         (method_encode_methodspec): If we have generic parameters, create
19481         a MethodSpec instead of a MethodRef.
19482         (fixup_method): Added support for "MonoInflatedMethod" and
19483         "MonoInflatedCtor".
19484         (mono_image_create_token): Added support for "MonoInflatedMethod"
19485         and "MonoInflatedCtor".
19486         (inflated_method_get_object): New static function; returns a
19487         managed "System.Reflection.MonoInflatedMethod" object.
19488         (mono_reflection_bind_generic_method_parameters): Return a
19489         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
19490         (mono_reflection_inflate_method_or_ctor): Likewise.
19491         (mono_image_get_generic_method_param_info): Initialize unused
19492         fields to zero.
19493         (mono_image_get_generic_param_info): Likewise.
19494
19495         * reflection.h (MonoReflectionInflatedMethod): New public
19496         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
19497         "S.R.MonoInflatedCtor" classes.
19498
19499         * loader.c (method_from_memberref): If we're a TypeSpec and it
19500         resolves to a generic instance, inflate the method.
19501
19502 2003-10-28  Dick Porter  <dick@ximian.com>
19503
19504         * object.c (mono_runtime_run_main): Convert command-line arguments
19505         into utf8, falling back to the user's locale encoding to do so.
19506
19507 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
19508
19509         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
19510         at this time.
19511
19512         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
19513
19514         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
19515         up icalls at method definition time. Partially fixes #33569.
19516
19517 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
19518
19519         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
19520         marshalling of arrays. Fixes #50116.
19521
19522         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
19523
19524         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
19525         points to a vtable in the dying appdomain.
19526
19527         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
19528         listeners into unmanaged code inside the lock.
19529
19530         * object.c (mono_class_vtable): Turn off typed allocation in non-root
19531         domains and add some comments.
19532
19533 2003-10-25  Martin Baulig  <martin@ximian.com>
19534
19535         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
19536
19537         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
19538
19539         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
19540         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
19541         currently parsing.  Create the generic class and store it in
19542         `generic_inst->klass' before parsing the type arguments.  This is
19543         required to support "recursive" definitions; see mcs/tests/gen-23.cs
19544         for an example.
19545         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
19546         to support recursive typespec entries.
19547
19548         * class.c (mono_class_setup_parent): If our parent is a generic
19549         instance, we may get called before it has its name set.
19550         (mono_class_from_generic): Splitted into
19551         mono_class_create_from_generic() and mono_class_initialize_generic().
19552
19553 2003-10-25  Martin Baulig  <martin@ximian.com>
19554
19555         * icall.c (ves_icall_Type_BindGenericParameters): Return a
19556         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
19557         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
19558         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
19559
19560         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
19561         (create_typespec): Likewise.
19562         (mono_reflection_bind_generic_parameters): Return a
19563         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
19564         (mono_reflection_inflate_method_or_ctor): New public function.
19565
19566         * reflection.h (MonoReflectionGenericInst): New typedef.        
19567
19568 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
19569
19570         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
19571         inside the domain lock. Fixes #49993.
19572         
19573         * object.c (mono_class_vtable): When typed allocation is used, 
19574         allocate vtables in the GC heap instead of in the mempool, since the
19575         vtables contain GC descriptors which are used by the collector even
19576         after the domain owning the mempool is unloaded.
19577
19578         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
19579
19580         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
19581         reflect what it does. Also invalidate mempools instead of freeing
19582         them if a define is set.
19583
19584         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
19585         of the appdomain.
19586         
19587         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
19588         hold the finalizable objects in this domain.
19589
19590         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
19591         appdomain.
19592
19593         * appdomain.c (mono_domain_set): New function to set the current
19594         appdomain, but only if it is not being unloaded.
19595
19596         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
19597         appdomain which is being unloaded.
19598         
19599         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
19600         unloading of the root appdomain.
19601
19602         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
19603         icall to execute a method in another appdomain. Intended as a 
19604         replacement for InternalSetDomain, which can confuse the code 
19605         generation in the JIT.
19606
19607         * appdomain.c (mono_domain_is_unloading): New function to determine
19608         whenever an appdomain is unloading.
19609
19610         * appdomain.c (mono_domain_unload): New function to correctly unload
19611         an appdomain.
19612
19613         * assembly.c (mono_assembly_load_references): Check that an assembly
19614         does not references itself.
19615
19616         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
19617         domain manually, it asks the finalizer thread to do it, then waits for
19618         the result. Also added a timeout.
19619
19620         * icall.c: Register the new icalls.
19621
19622         * threads.h threads.c: Export the mono_gc_stop_world and 
19623         mono_gc_start_world functions.
19624         
19625         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
19626         function to fill out the mempool with 0x2a.
19627
19628 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
19629
19630         * reflection.h (MonoReflectionMethodAux): New structure to store
19631         information which is rarely used, thus is not in the MonoMethod
19632         structure.
19633
19634         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
19635         store the aux info.
19636
19637         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
19638         and marshalling info into the aux structure.
19639
19640         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
19641         from the aux structure.
19642
19643         * loader.c (mono_method_get_param_names): Retrieve the param names from
19644         the aux structure.
19645         
19646 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
19647
19648         * exception.h exception.c: Add AppDomainUnloadedException && fix 
19649         warning.
19650
19651 2003-10-21  Dick Porter  <dick@ximian.com>
19652
19653         * socket-io.c
19654         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
19655         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
19656
19657 2003-10-21  Martin Baulig  <martin@ximian.com>
19658
19659         * reflection.c (mono_reflection_bind_generic_parameters):
19660         `klass->parent' is NULL for interfaces.
19661
19662 2003-10-21  Martin Baulig  <martin@ximian.com>
19663
19664         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
19665
19666 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
19667
19668         * exception.c (mono_exception_from_name_msg): New helper function for
19669         creating exceptions and initializing their message field.
19670
19671         * exception.c: Simplify functions using the new helper.
19672
19673         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
19674         New function.
19675
19676         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
19677         mono_raise_exception, since otherwise gcc doesn't generate the function
19678         epilog for raise_exception, confusing the stack unwinding in the JIT.
19679         Fixes #45043.
19680
19681         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
19682         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
19683         Fixes #49499.
19684
19685 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19686
19687         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
19688         utf8.
19689
19690 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
19691
19692         * icall.c: Removed GetUninitializedObject method because
19693           AllocateUninitializedClassInstance does the same.
19694
19695 2003-10-18  Martin Baulig  <martin@ximian.com>
19696
19697         * class.c (inflate_generic_signature): Renamed to
19698         mono_class_inflate_generic_signature() and made it public.
19699         (my_mono_class_from_generic_parameter): New static function; if we
19700         don't already have the generic parameter's MonoClass, create a
19701         very simple one which is just used internally in the runtime and
19702         not passed back to managed code.
19703
19704         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
19705
19706         * metadata.h (MonoMethodSignature): Moved the
19707         `MonoGenericParam *gen_params' to the MonoMethodHeader.
19708         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
19709
19710         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
19711         ves_icall_MonoMethod_GetGenericArguments(); this is now an
19712         interncall on the MonoMethod class, not on MethodInfo.
19713         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
19714         calling mono_reflection_bind_generic_method_parameters() directly.
19715
19716         * loader.c (mono_method_get_signature): If this is a MethodSpec;
19717         return the already computed `method->signature'.
19718         (method_from_methodspec): New static function to load a method
19719         from a MethodSpec entry.
19720         (mono_get_method_from_token): Call the new method_from_methodspec()
19721         for MethodSpec tokens.  
19722         (mono_get_method_from_token): If we're a generic method, load the
19723         type parameters.
19724
19725         * reflection.c (mono_image_get_memberref_token): Allow
19726         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
19727         table.
19728         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
19729         (mono_image_create_token): First check whether it's a generic
19730         method (so we'd need to create a MethodSpec), then do the other
19731         two alternatives.
19732         (mono_reflection_bind_generic_method_parameters): Return a
19733         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
19734         called directly from the interncall.
19735
19736 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
19737
19738         * reflection.c (load_public_key): Move loading of the public key
19739         into managed code.
19740
19741         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
19742
19743         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
19744         fields.
19745
19746         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
19747         culture, hash_alg and public_key. Fixes #49555.
19748
19749 2003-10-17  Martin Baulig  <martin@ximian.com>
19750
19751         * class.h (MonoGenericInst): Moved this declaration here and added
19752         `MonoMethod *generic_method'.
19753
19754         * icall.c
19755         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
19756         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
19757
19758         * metadata.c (mono_metadata_type_equal): Two types of
19759         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
19760         index; ie. don't compare the address of the `MonoGenericParam'
19761         structure.
19762         (mono_metadata_load_generic_params): Removed the `MonoMethod
19763         *method' argument.
19764
19765         * metadata.h (MonoGenericInst): Moved declaration to class.h.
19766         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
19767
19768         * reflection.c (method_encode_signature): Encode the number of
19769         generic parameters.
19770         (encode_generic_method_sig): New static function.
19771         (method_encode_methodspec): New static function; creates an entry
19772         in the MethodSpec table for a generic method.
19773         (mono_image_get_methodspec_token): New static function.
19774         (mono_image_create_token): Call mono_image_get_methodspec_token()
19775         for generic methods.
19776         (mono_reflection_bind_generic_method_parameters): New public
19777         function.  Instantiates a generic method.
19778
19779 2003-10-16  Martin Baulig  <martin@ximian.com>
19780
19781         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
19782         *gen_params' here from MonoMethodHeader.
19783
19784         * metadata.c (mono_metadata_parse_method_signature): If we have
19785         generic parameters, initialize `method->gen_params' and then set
19786         the correct `type->data.generic_param' in all the parameters.
19787
19788 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
19789
19790         * threads.c (mono_threads_get_default_stacksize): New function to 
19791         return the default stacksize.
19792
19793         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
19794         termination of the finalizer thread, since the previous method had
19795         race conditions. Fixes #49628.
19796
19797         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
19798         as for the other managed threads.
19799
19800 2003-10-16  Martin Baulig  <martin@ximian.com>
19801
19802         * class.c (inflate_generic_signature): Copy `generic_param_count'
19803         and `gen_params'.
19804
19805         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
19806         New interncall.
19807
19808         * metadata.c (mono_metadata_parse_method_signature): Actually set
19809         the `method->generic_param_count' here.
19810         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
19811
19812 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
19813
19814         * object.h: Add a new field to TypedRef to simplify the implementation
19815         of the REFANY opcodes in the JIT.
19816
19817         * icall.c: Make use of the new field.
19818
19819         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
19820         dynamically.
19821
19822 2003-10-15  Martin Baulig  <martin@ximian.com>
19823
19824         * class.c (mono_class_from_gen_param): Renamed to
19825         mono_class_from_generic_parameter() and moved most of the
19826         functionality from mono_reflection_define_generic_parameter()
19827         here; ie. we create a "real" class here.
19828         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
19829         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
19830         previously been called.
19831
19832         * class.h (MonoGenericParam): Moved the declaration of this struct
19833         here from metadata.h and added `MonoMethod *method'.
19834
19835         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
19836         interncall.
19837
19838         * loader.c (mono_get_method_from_token): If we have any generic
19839         parameters, call mono_metadata_load_generic_params() to read them
19840         from the MONO_TABLE_GENERICPAR.
19841
19842         * metadata.c (mono_metadata_load_generic_params): Added
19843         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
19844
19845         * metadata.h (MonoMethodSignature): Replaced
19846         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
19847         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
19848
19849         * reflection.c (mono_reflection_define_generic_parameter): Moved
19850         most of the functionality into the new
19851         mono_class_from_generic_parameter(); set the `method' field if
19852         we're a method parameter.       
19853
19854 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
19855
19856         * marshal.c (emit_struct_conv): if native size is 0
19857         emit no code.
19858
19859 2003-10-14  Martin Baulig  <martin@ximian.com>
19860
19861         * icall.c: The generics API has changed in the spec since it was
19862         added to System.Type; these modifications make it match the spec
19863         again.
19864         (ves_icall_Type_GetGenericParameters): Renamed to
19865         `ves_icall_Type_GetGenericArguments'.
19866         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
19867         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
19868         `ves_icall_MonoType_get_HasGenericArguments'.
19869         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
19870         `ves_icall_MonoType_get_IsGenericParameter'.
19871         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
19872         this is no interncall anymore.
19873         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
19874         `ves_icall_TypeBuilder_get_IsGenericParameter'.
19875
19876 2003-10-14  Martin Baulig  <martin@ximian.com>
19877
19878         * reflection.c (mono_reflection_bind_generic_parameters): Also
19879         inflate generic methods if we're reading the class from IL.
19880
19881 2003-10-13  Martin Baulig  <martin@ximian.com>
19882
19883         * reflection.c (mono_reflection_define_generic_parameter): This
19884         method isn't called directly from the icall anymore; take a
19885         `MonoReflectionAssemblyBuilder *' so we can use this for type and
19886         method generic parameters.
19887         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
19888         (method_builder_encode_signature): Encode generic parameters.
19889         (mono_image_get_method_info): Write generic params to the
19890         MONO_TABLE_GENERICPARAM table.
19891
19892         * reflection.h (MonoReflectionMethodBuilder): Added
19893         `MonoArray *generic_params'.
19894
19895         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
19896
19897         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
19898         wrapper for mono_reflection_define_generic_parameter().
19899         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
19900
19901 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
19902
19903         * marshal.h: Add missing function to fix build.
19904
19905         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
19906         the SetLastError pinvoke attribute.
19907
19908         * marshal.c (mono_marshal_set_last_error): New helper function called
19909         by the generated code.
19910         
19911         * marshal.c (mono_mb_emit_branch): New helper function.
19912
19913         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
19914
19915         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19916         classes as parameters and return values of delegates. Fixes #29256. 
19917
19918 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
19919
19920         * locales.c: use gint32 in non HAVE_ICU case
19921
19922 2003-10-11  Martin Baulig  <martin@ximian.com>
19923
19924         * mono-debug.c (mono_debug_add_method): Added a workaround for
19925         bug #48591.
19926
19927 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
19928
19929         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
19930         delegates passed to native code must use the STDCALL calling 
19931         convention. Fixes #35987.
19932
19933 2003-10-10  Martin Baulig  <martin@ximian.com>
19934
19935         * class.c (inflate_generic_type): If we're inflating for a generic
19936         type instance (and not for a generic method), return
19937         MONO_TYPE_MVAR unchanged.
19938
19939 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19940
19941         * string-icalls.c: Join ignores null strings in the source array.
19942         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
19943         * threads.c: GetAvailableTheads is slightly more accurate.
19944
19945 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
19946
19947         * threads.h threads.c : add mono_threads_set_default_stacksize
19948         and pass default to CreateThread calls.
19949
19950 2003-10-09  Dick Porter  <dick@ximian.com>
19951
19952         * icall.c:
19953         * locales.h:
19954         * locales.c: Internal calls for constructing CultureInfo and
19955         related objects from libicu (if its available.)
19956
19957 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
19958
19959         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
19960
19961 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19962
19963         * threadpool.c: added an argument to async_invoke_thread that is the
19964         item to process, pass the MonoAsyncResult to the thread start function
19965         when creating a new thread. This way we don't need to acquire any lock
19966         when we're creating a new thread. Readded a semaphore for faster
19967         response times (instead of that Sleep i added).
19968
19969 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
19970
19971         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
19972         get daylight change dates better on Windows, fix handling
19973         of platforms without tm_gmtoff.
19974
19975 2003-10-06  Martin Baulig  <martin@ximian.com>
19976
19977         * class.c (inflate_generic_method): Renamed to
19978         mono_class_inflate_generic_method() and made public.
19979         (mono_class_init): Don't inflate the generic methods here.
19980         (mono_class_from_generic): Added `gboolean inflate_methods'
19981         argument.  Inflate the methods here.
19982
19983         * loader.c (mono_method_get_param_names): Ignore instances of
19984         generic types for the moment.
19985
19986         * reflection.c (fixup_method): Added support for inflated methods.
19987         (mono_image_create_token): Use mono_image_get_methodref_token()
19988         for inflated methods.
19989         (mono_custom_attrs_from_param): Ignore instances of generic types
19990         for the moment.
19991         (mono_reflection_bind_generic_parameters): New public function.
19992         Moved all the functionality from
19993         ves_icall_Type_BindGenericParameters() here and added support for
19994         dynamic types.
19995         (mono_reflection_define_generic_parameter): Initialize
19996         `klass->methods' here.
19997
19998         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
19999         functionality into mono_reflection_define_generic_parameter().
20000         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
20001         TypeBuilder, return that TypeBuilder.
20002
20003 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20004
20005         * appdomain.c: removed mono_delegate_semaphore.
20006
20007         * threadpool.c:
20008         (mono_thread_pool_add): moved hash table creation inside and the thread 
20009         creation outside of the critical region.
20010         (mono_thread_pool_finish): removed obsolete code.
20011         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
20012         continue or exit the thread depending on the queue.
20013
20014 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
20015
20016         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
20017         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
20018         handle more bool marshalling options
20019
20020 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
20021
20022         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
20023         arrays of structs. Also add a more descriptive error message when
20024         a structure member is marshalled as LPArray.
20025
20026 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
20027
20028         * marshal.c (mono_marshal_get_native_wrapper): Add support for
20029         marshalling arrays of complex types. Fixes #29098. Also remove an
20030         usused and incomplete function.
20031
20032 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
20033
20034         * gc.c: report heap_size - free_bytes as total memory allocated
20035         (bug#49362).
20036
20037 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
20038
20039         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
20040         fix timezone handling problems on Windows.
20041         
20042         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
20043         asserts when the year is outside the range handled by ms the functions.
20044
20045         * class.c (setup_interface_offsets): If the class is an interface,
20046         fill out its interface_offsets slot.
20047
20048 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20049
20050         * threadpool.c: mark threadpool threads as background.
20051
20052 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
20053
20054         * decimal.c - define DECINLINE to nothing if not using GCC
20055
20056 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
20057
20058         * assembly.c: More refcount fixes.
20059
20060 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20061
20062         * string-icalls.c: if we're not trimming, return the same string.
20063         When not splitting, don't create a new string.
20064
20065 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20066
20067         * image.c:
20068         (mono_image_open): increment the ref_count inside the critical section.
20069
20070 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
20071
20072         * image.c (mono_image_open): Fix reference counting bug.
20073
20074 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
20075
20076         * marshal.c (mono_marshal_type_size) struct alignment changed for 
20077         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
20078         64bits. Avoid leak in mono_marshal_get_native_wrapper when
20079         mono_lookup_pinvoke_call throws.        
20080
20081 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
20082
20083         * reflection.c (mono_reflection_parse_type): Fix #49114.
20084
20085         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
20086         temporary workaround for cygwin header problem.
20087
20088         * object.c (mono_object_isinst): Synchronize this with the code
20089         generated by the JIT for casts.
20090
20091 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
20092
20093         * reflection.c (encode_type): Fix #38332.
20094
20095 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
20096
20097         * marshal.c (mono_marshal_method_from_wrapper): New function to return
20098         the original method from the wrapper method.
20099
20100 2003-09-25  Martin Baulig  <martin@ximian.com>
20101
20102         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
20103         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
20104         (ves_icall_Type_get_IsGenericInstance): New interncall.
20105
20106 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
20107
20108         * object.c: fix cast warning in big endian code.
20109
20110 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
20111
20112         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
20113         
20114 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20115
20116         * assembly.c: don't call check_env from mono_assembly_load. It's
20117         already done once in mono_assemblies_init and may cause headaches when
20118         multiple threads are loading assemblies.
20119
20120 2003-09-19  Martin Baulig  <martin@ximian.com>
20121
20122         * reflection.c (mono_reflection_define_generic_parameter): Don't
20123         allocate `klass->methods', set `klass->flags' to
20124         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
20125
20126 2003-09-18  Martin Baulig  <martin@ximian.com>
20127
20128         * class.c (mono_class_init): Don't create `class->methods' if it's
20129         already initialized.
20130
20131         * metadata.c (mono_metadata_load_generic_params): Make this
20132         actually work.
20133
20134         * reflection.c (mono_reflection_define_generic_parameter): Set
20135         parent class and interfaces from the constraints.
20136
20137         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
20138         to keep this struct in sync with the declaration in TypeBuilder.cs.
20139
20140 2003-09-17  Martin Baulig  <martin@ximian.com>
20141
20142         * metadata.h (MonoType): Replaced the data's `int type_param'
20143         field with `MonoGenericParam *generic_param'.
20144         (MonoGenericParam): Added `MonoClass *klass'.
20145
20146         * class.c (mono_class_from_gen_param): Removed the
20147         `MonoImage *image' and `int type_num' arguments.
20148
20149         * metadata.c (mono_metadata_parse_generic_param): New static
20150         method; creates a MonoGenericParam which just contains the index.
20151         (do_mono_metadata_parse_type): Call
20152         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
20153         MONO_TYPE_MVAR.
20154
20155         * reflection.c (mono_image_typedef_or_ref): Generic type
20156         parameters may be in the same assembly, but never use a typedef
20157         for them.
20158         (mono_reflection_define_generic_parameter): We're now creating a
20159         "real" class for the type parameter; it's now safe to call
20160         mono_class_from_mono_type() on the class'es type, it'll do the
20161         right thing.
20162
20163 2003-09-16  Martin Baulig  <martin@ximian.com>
20164
20165         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
20166         `symfile->range_entry_size' and `symfile->class_entry_size' here;
20167         the `symfile' data structure must be fully initialized before it
20168         gets added to the table.
20169
20170 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
20171
20172         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
20173
20174         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
20175         class init trampolines.
20176
20177 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
20178
20179         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
20180         to the built-in profiler to turn off time and allocation profiling
20181         respectively.
20182
20183 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
20184
20185         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
20186         g_direct_equal.
20187
20188         * debug-helpers.c (mono_method_full_name): Print the wrapper type
20189         in human readable form.
20190
20191 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
20192
20193         * reflection.c icall.c: Fixed warnings.
20194
20195         * image.c (load_class_names): Use a temporary hash table to hold the
20196         namespaces in order to avoid doing many string comparisons.
20197
20198         * image.h: Fix typo.
20199
20200         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
20201         Pass NULL instead of g_direct_equal to the GHashTable constructor 
20202         since the NULL case is short-circuited inside g_hash_table_lookup, 
20203         leading to better performance.  
20204
20205         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
20206         obtain the first custom attribute for a given index. Depends on the
20207         CustomAttribute table being sorted by the parent field.
20208
20209         * reflection.c (mono_custom_attrs_from_index): Use the new function 
20210         for better performance.
20211
20212 2003-09-07  Martin Baulig  <martin@ximian.com>
20213
20214         * class.c (mono_class_init): If we're a generic instance, inflate
20215         all our methods instead of loading them from the image.
20216         (mono_class_from_generic): Set `class->methods = gklass->methods'.
20217
20218 2003-09-07  Martin Baulig  <martin@ximian.com>
20219
20220         * mono-debug-debugger.c: Added support for constructors.
20221
20222 2003-09-06  Martin Baulig  <martin@ximian.com>
20223
20224         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
20225         New interncall.
20226
20227         * reflection.c (mono_reflection_setup_generic_class): Call
20228         ensure_runtime_vtable() to create the vtable.
20229
20230 2003-09-05  Martin Baulig  <martin@ximian.com>
20231
20232         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
20233         MONO_TYPE_MVAR.
20234
20235 2003-09-04  Martin Baulig  <martin@ximian.com>
20236
20237         * reflection.c (mono_reflection_define_generic_parameter): Generic
20238         parameters start with zero.
20239
20240 2003-09-04  Martin Baulig  <martin@ximian.com>
20241
20242         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
20243
20244         * reflection.h (MonoReflectionGenericParam): New typedef.
20245         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
20246         the generic parameters from the managed TypeBuilder.
20247
20248         * reflection.c (mono_reflection_define_generic_parameter): New function.
20249         (mono_reflection_create_runtime_class): Encode generic parameters.
20250         (mono_reflection_setup_generic_class): New function; this is
20251         called after adding adding all generic params to the TypeBuilder.
20252         (encode_type): Added MONO_TYPE_VAR.
20253
20254 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
20255
20256         * class.h class.c (mono_class_needs_cctor_run): Moved this method
20257         here from the JIT.
20258
20259         * assembly.h assembly.c: Moved the AOT loading code into an assembly
20260         load hook.
20261
20262 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
20263
20264         * reflection.h reflection.c class.h class.c: Delete duplicate 
20265         definition of mono_type_get_name () from reflection.c and export the
20266         one in class.c.
20267
20268         * class.c: Class loading fixes from Bernie Solomon 
20269         (bernard@ugsolutions.com).
20270
20271         * reflection.c: Endianness fixes from Bernie Solomon 
20272         (bernard@ugsolutions.com).
20273         
20274 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
20275
20276         * assembly.h assembly.c: Define a file format version for AOT
20277         libraries.
20278         
20279         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
20280
20281         * appdomain.h (MonoJitInfo): New field to determine whenever the
20282         code is domain neutral.
20283         
20284 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
20285
20286         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
20287
20288 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
20289
20290         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
20291         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
20292         Avoid caching the result since strings must be domain specific. Fixes
20293         #48050.
20294
20295 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
20296
20297         * marshal.c (mono_marshal_init): Make this callable multiple times
20298         since it is hard to find a correct place to call it.
20299
20300         * object.c (mono_runtime_class_init): Execute static constructors in
20301         the correct appdomain.
20302
20303         * image.c (build_guid_table): Handle the case when multiple images have
20304         the same GUID.
20305
20306 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20307
20308         * icall.c: added a couple of icalls for System.Web.
20309
20310 2003-08-28  Martin Baulig  <martin@ximian.com>
20311
20312         * icall.c (ves_icall_Type_BindGenericParameters): Use
20313         `klass->generic_inst' instead of `&klass->byval_arg' in the
20314         mono_type_get_object() call.  The returned type must be
20315         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
20316
20317 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
20318
20319         * NOTES: New file.
20320
20321         * object.c (mono_class_proxy_vtable): Make it thread safe.
20322
20323         * pedump.c: Fix warning.
20324
20325         * object.c appdomain.h: Get rid of metadata_section. 
20326         It is no longer needed and it was causing deadlocks with domain->lock.
20327
20328         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
20329
20330 2003-08-26  Martin Baulig  <martin@ximian.com>
20331
20332         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
20333
20334 2003-08-26  Martin Baulig  <martin@ximian.com>
20335
20336         * pedump.c (main): Call mono_metadata_init(),
20337         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
20338         and mono_loader_init().
20339
20340 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
20341
20342         * loader.h: Add missing include to fix build.
20343
20344         * image.h: mono_image_load_references is no more.
20345
20346         * assembly.c: Reworked assembly loading to make it really thread safe.
20347         After these changes, the assembly returned by mono_assembly_open is
20348         fully initialized, i.e. all its references assemblies are loaded.
20349
20350         * assembly.c (mono_image_load_references): Renamed to 
20351         mono_assembly_load_references, and made private, since clients no
20352         longer need to call it.
20353
20354         * class.c: Removed calls to mono_assembly_load_references, since it was
20355         a source of deadlocks.
20356
20357         * loader.h loader.c class.h class.c: Protect data structures using a 
20358         new lock, the loader lock.
20359
20360         * class.c (mono_class_setup_vtable): Create temporary hash tables and
20361         GPtrArrays only when needed.
20362
20363         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
20364         into empty structures by mcs. Fixes pinvoke7.cs.
20365         
20366         * domain.c (mono_init): Call a new initialization function.
20367
20368         * appdomain.c (mono_runtime_init): Call the new initializer function
20369         of the marshal module.
20370
20371         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
20372         inserted into empty structures by mcs. Fixes pinvoke7.cs.
20373
20374         * marshal.h marshal.c: Added locks around the wrapper caches to make
20375         this module thread safe.
20376
20377         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
20378         this argument. Fixes pinvoke1.exe.
20379
20380 2003-08-25  Lluis Sanchez <lluis@ximian.com>
20381
20382         * object.h: Added call_type field to MonoMethodMessage and the corresponding
20383         enumeration of values. Removed fields to store remote call output values in
20384         MonoAsyncResult. Not needed any more.
20385         * object.c: Initialize call_type and async_result fields in mono_message_init.
20386         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
20387         dispatching the message.
20388         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
20389         async call to finish. To do it use a message with EndInvoke call type.
20390
20391 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
20392
20393         * loader.h loader.c (mono_method_hash_marhal_info): New function which
20394         determines whenever a method has marshalling info.
20395
20396 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20397
20398         * assembly.c: fix the build on windows.
20399
20400 2003-08-22 Lluis Sanchez <lluis@ximian.com>
20401
20402         * object.cs: Fixed bug #47785.
20403
20404 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
20405
20406         * string-icalls.c (StringReplace): If their are no occurances of
20407         the old string found return a reference to the supplied
20408         string. This saves some memory and matches MS behavoir.
20409         
20410 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20411
20412         * socket-io.c: fixed compilation for systems that define AF_INET6
20413         and don't define SOL_IP/SOL_IPV6.
20414
20415 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
20416
20417         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
20418         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
20419
20420         * rawbuffer.c rawbuffer.h: Make this module thread safe.
20421
20422         * domain.c: Make this module thread safe.
20423
20424         * domain.c (mono_init): Call new initialization function.
20425
20426         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
20427         reference types too. Fixes #38812.
20428
20429         * image.c (mono_image_init): Fixed warnings.
20430
20431         * class.c (mono_class_from_typeref): Handle assembly load failure
20432         correctly.
20433
20434         * appdomain.c (add_assemblies_to_domain): Handle the case when
20435         the references of an assembly are not yet loaded.
20436
20437         * metadata.c image.c assembly.c: Moved initialization of global
20438         variables to a separate function called at startup since lazy 
20439         initialization of these variables is not thread safe.
20440         
20441         * image.c assembly.c: Made this module thread safe by adding locks in 
20442         the appropriate places.
20443
20444         * domain.c (mono_init): Call the new initialization functions of the
20445         three modules.
20446
20447 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
20448
20449         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
20450           make a direct call. It is proxy's work to make the call asynchronous.
20451           mono_delegate_end_invoke(): If the targe is a proxy, just collect
20452           the return values.
20453         * object.cs: mono_method_call_message_new(): read AsyncResult and
20454           state object from parameters list, if this info is requested.
20455         * object.h: Added fields to store remote call output values in
20456           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
20457
20458 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20459
20460         * object.h: add needed fields to MonoThread.
20461         * threads.c, threads.h: allow registering a function to cleanup data
20462         allocated per thread by the JIT.
20463
20464 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20465
20466         * loader.h: portability fix by Bernie Solomon
20467         * <bernard@ugsolutions.com>.
20468
20469 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
20470
20471         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
20472         return a MonoArray. This simplifies the code and also ensures that
20473         the cache allways contains an object reference as a value.
20474
20475         * icall.c (ves_icall_get_parameter_info): Simplified using the new
20476         function.
20477
20478 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20479
20480         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
20481         fixes a problem with byte ordering when getting the address family for
20482         a socket.
20483
20484 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
20485
20486         * .cvsignore: Added monosn.
20487
20488         * reflection.h reflection.c loader.c: Added support for parameter
20489         marshalling to dynamically created types. Fixes #47295.
20490
20491 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20492
20493         * rand.c: remove useless warnings.
20494
20495 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20496
20497         * class.c: implemented ldtoken for methods and fieldrefs.
20498
20499 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20500
20501         * threadpool.c: when mono_async_invoke was called, no one took care of
20502         monitoring the queue. So if the method invoked took some time and we
20503         got new async invoke requests after 500 ms (the thread created waited
20504         that long in WaitForSingleObject), the new async invoke was not called
20505         until the previous one finished.
20506
20507         This is fixed now. Thanks to Totte for helping with it.
20508
20509 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20510
20511         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
20512
20513 2003-08-11  Martin Baulig  <martin@ximian.com>
20514
20515         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
20516
20517 2003-08-06  Martin Baulig  <martin@ximian.com>
20518
20519         * mono-debug-debugger.c: Added support for static fields,
20520         properties and methods.
20521
20522 2003-08-06  Martin Baulig  <martin@ximian.com>
20523
20524         * mono-debug-debugger.c: Don't store the MonoString's vtable to
20525         make this work for applications with multiple application domains.
20526
20527 2003-08-04  Martin Baulig  <martin@ximian.com>
20528
20529         * mono-debug-debugger.c: Completely reworked the type support; the
20530         most important thing is that we're now just using one single
20531         `MonoType' instance per type.
20532
20533 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
20534
20535         * mono-endian.h, mono-endian.c, icall.c: Added icall
20536         ves_icall_System_Double_AssertEndianity to assert double word endianity
20537         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
20538
20539 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20540
20541         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
20542         support, icalls and fixes.
20543
20544 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
20545
20546         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
20547         classes that are a punctuation character in .NET is not the same a
20548         g_unichar_ispunct.
20549
20550 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20551
20552         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
20553
20554 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
20555
20556         * icall.c: Add new MemCopy internalcall.
20557         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
20558         Simplified code; It is not necessary to handle all the cases here,
20559         as the C# code takes care of it.  Only handle the case of the name
20560         resource embedded into the assembly.
20561
20562         Changed signature to return the data pointer and the size of the
20563         data. 
20564
20565 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
20566
20567         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
20568         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
20569
20570 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
20571
20572         * socket-io.c: ignore EINTR error in select.
20573
20574 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
20575
20576         * class.h, class.c: removed unused subclasses field in MonoClass.
20577
20578 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
20579
20580         * icall.c: improve fix of get_base_definition(). If the parent class
20581           doesn't have the mehod, look at the parent of the parent.
20582         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
20583           to check if a parameter is an in or out parameter
20584           (PARAM_ATTRIBUTE_IN is not set by default).
20585           mono_method_return_message_restore(): Use mono_class_value_size to
20586           get the size of a value type. mono_type_stack_size (parameterType)
20587           does not return the correct value if parameterType is byRef.
20588           mono_load_remote_field(), mono_load_remote_field_new(),
20589           mono_store_remote_field(), mono_store_remote_field_new():
20590           raise exception if the remote call returns an exception.
20591
20592 2003-07-28  Martin Baulig  <martin@ximian.com>
20593
20594         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
20595         method.  This is a wrapper around mono_runtime_invoke() which
20596         boxes the instance object if neccessary.
20597
20598 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20599
20600         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
20601         metadata.h, row-indexes.h, verify.c: first cut of generics support.
20602
20603 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20604
20605         * icall.c: disable mcs bug workaround.
20606
20607 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
20608
20609         * object.c (mono_runtime_class_init): Take the metadata_section
20610         mutex before obtaining the domain mutex.
20611
20612         * appdomain.h: Added definition of metadata_section mutex here. 
20613
20614         * object.c: define metadata_mutex here.
20615
20616 2003-07-24  Ravi Pratap  <ravi@ximian.com>
20617
20618         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
20619         fixed.
20620
20621 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
20622
20623         * reflection.c: Fix bug #46669
20624
20625 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20626
20627         * exception.c:
20628         * exception.h:
20629         * icall.c:
20630         * object.h: fill in the type name for TypeLoadException.
20631
20632 2003-07-23  Ravi Pratap  <ravi@ximian.com>
20633
20634         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
20635         relationship between TypeBuilders while compiling corlib) and bug
20636         45993 (Array types returned from the runtime while compiling
20637         corlib were from the loaded corlib).
20638
20639 2003-07-22  Martin Baulig  <martin@ximian.com>
20640
20641         * mono-debug-debugger.c: Reworked the type support a bit more;
20642         distinguish between types and classes.
20643
20644 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
20645
20646         * icall.c: add IsArrayImpl icall.
20647
20648 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
20649
20650         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
20651         initializing real_size only once. Also fix bug #46602.
20652
20653 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
20654
20655         * object.c: Renamed mono_metadata_section to metadata_section.
20656
20657 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
20658
20659         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
20660           empty array if the type is an array. Fixed.
20661           ves_icall_MonoMethod_get_base_definition: if the base method
20662           is abstract, get the MethodInfo from the list of methods of
20663           the class.
20664         * reflection.c: ParameterInfo.PositionImpl should be zero-based
20665           and it was 1-based. Fixed in mono_param_get_objects.
20666
20667 2003-07-20  Martin Baulig  <martin@ximian.com>
20668
20669         * mono-debug.h: Set version number to 31.
20670         (mono_debug_init): Added `MonoDomain *' argument.
20671
20672         * mono-debug-debugger.c: Reworked the type support; explicitly
20673         tell the debugger about builtin types; pass the `klass' address to
20674         the debugger.
20675
20676 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
20677
20678         * image.c: Allow new metadata tables to be loaded without a
20679         warning. Also update the warning message to give the new constant value.
20680                 
20681 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20682
20683         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
20684         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
20685         array type representation changes.
20686
20687 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20688
20689         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
20690         on Environment.Exit () call.
20691
20692 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20693
20694         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
20695         requires a matching corlib.
20696
20697 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
20698
20699         * Changelog: My editor decided to add a CR to each line. Sorry about that.
20700           Committed again without the CRs.
20701         
20702 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
20703
20704         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
20705           getting it from the "this" socket instance. Did not work
20706           if the socket is a subclass of Socket.
20707           Also fixed bug #35371.
20708
20709 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20710
20711         * metadata.c: fixed size for TypedByRef.
20712         * loader.c: when searching for a method, consider the vararg amrker.
20713         * unicode.c, decimal.c: constify some arrays.
20714
20715 2003-07-15  Dick Porter  <dick@ximian.com>
20716
20717         * socket-io.c: Fixed compilation for gcc < 3.2.
20718
20719         Fixed compilation for machines that don't have AF_INET6 (thanks to
20720         Bernie Solomon <bernard@ugsolutions.com> for that part.)
20721
20722         Fixed compile warnings.
20723         
20724         Fixed formatting and line endings.
20725
20726 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
20727
20728         * socket-io.h:
20729         * socket-io.c: Added IPv6 support.
20730
20731 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
20732
20733         * class.c (mono_class_is_assignable_from): New function to implement
20734         the is_assignable_from logic. Used by mono_object_isinst, 
20735         Type::IsAssignableFrom () and the interpreter.
20736
20737         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
20738         Object, even interfaces.
20739         
20740         * object.c (mono_object_isinst): Implement in terms of 
20741         is_assignable_from.
20742
20743         * icall.c (ves_icall_type_is_assignable_from): New icall.
20744
20745 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
20746
20747         * domain.c (foreach_domain): fix compiler warning.
20748
20749 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
20750
20751         * image.c (load_metadata_ptrs): use g_strndup because strndup is
20752         not available on all plattforms
20753
20754 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
20755
20756         * image.h image.c: Store the metadata version string in MonoImage.
20757         * icall.c: New icall to retrieve the image version.
20758         * reflection.c (create_dynamic_image): Fill in the image version field
20759         * reflection.c (build_compressed_metadata): Use the image version
20760         from the image structure.
20761
20762 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20763
20764         * appdomain.c: modified comment.
20765         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
20766         That will be its last iteration when mono_gc_cleanup is called from
20767         mono_runtime_cleanup and before the domain is unloaded.
20768
20769         Fixes bug #45962.
20770
20771 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
20772
20773         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
20774         attributes.
20775
20776 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20777
20778         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
20779         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
20780         Bernie Solomon <bernard@ugsolutions.com>.
20781
20782 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20783
20784         * object.c, object.h: provide mono_object_new_fast() for faster
20785         allocation in some special cases.
20786
20787 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20788
20789         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
20790         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
20791
20792 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20793
20794         * threadpool.c: fix leaks.
20795
20796 2003-07-01  Dick Porter  <dick@ximian.com>
20797
20798         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
20799         using MonoGHashTables.  Fixes threadpool bug posted to list.
20800
20801 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
20802
20803         * image.h, image.c: added support to load an assembly from a byte array.
20804         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
20805         assembly bundle support.
20806
20807 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
20808
20809         * threadpool.c (mono_thread_pool_add): keep a reference to the
20810         AsyncResult to prevent GC
20811
20812 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
20813
20814         * class.c: leak fix.
20815
20816 2003-06-25  Dick Porter  <dick@ximian.com>
20817
20818         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
20819         for the async object, the WaitHandle object will close the handle.
20820         Fixes bug 45321.
20821
20822 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20823
20824         * class.c: in mono_array_class_get (), lookup from the hash with the
20825         same type we insert: this works around a bug in
20826         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
20827         lluis. The real fix will have to wait for after the release.
20828
20829 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20830
20831         * icall.c: fix memory leak when getting type members.
20832
20833 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
20834
20835         * reflection.c: added more pubtoken special cases.
20836
20837 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20838
20839         * class.c: handle field offset correctly when class size
20840         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
20841
20842 2003-06-20  Martin Baulig  <martin@ximian.com>
20843
20844         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
20845         *image' field.
20846
20847 2003-06-20  Martin Baulig  <martin@ximian.com>
20848
20849         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
20850
20851 2003-06-20  Martin Baulig  <martin@ximian.com>
20852
20853         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
20854         just distinguish between variables in registers and variables at
20855         an offset relative to a register.
20856
20857 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20858
20859         * icall.c: #ifdef out latest changes until mcs is fixed.
20860
20861 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20862
20863         * icall.c: return members in metadata order.
20864
20865 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20866
20867         * icall.c: avoid infinite loop in GetTimeZoneData.
20868
20869 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20870
20871         * icall.c: added Marshal.Prelink/All icalls.
20872
20873 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
20874
20875         * object.c, object.h: fix warnings and do some overflow checking
20876         when creating arrays.
20877
20878 2003-06-17  Dick Porter  <dick@ximian.com>
20879
20880         * file-io.h:
20881         * file-io.c: File attributes need to be tweaked slightly when
20882         passed from the managed to the w32 world.
20883
20884 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
20885         * profiler.h profiler-private.h profiler.c: Rework last patch
20886         based on suggestion by Paolo.
20887         
20888 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
20889
20890         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
20891         instruction level coverage data collection.
20892         * profiler.h profiler.c (: Added new callback function which can be
20893         used by the profiler to limit which functions should have coverage
20894         instrumentation.
20895         * profiler.c (mono_profiler_load): Call g_module_build_path to
20896         generate the file name of the profiler library.
20897
20898 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20899
20900         * profiler.c, profiler.h, profiler-private.h: added basic block 
20901         coverage profiling API.
20902
20903 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
20904
20905         * reflection.c (mono_reflection_create_runtime_class): Add support
20906         for events in dynamically generated code.
20907
20908         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
20909         not allocated.
20910
20911 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20912
20913         * icall.c: when getting timezone info, return reasonable values if we
20914         can't get the actual data.
20915
20916 2003-06-14  Dick Porter  <dick@ximian.com>
20917
20918         * threads.c (start_wrapper): Remove the reference to the thread
20919         object in the TLS data, so the thread object can be finalized.
20920         This won't be reached if the thread threw an uncaught exception,
20921         so those thread handles will stay referenced :-( (This is due to
20922         missing support for scanning thread-specific data in the Boehm GC
20923         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
20924
20925 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
20926
20927         * reflection.c: ensure streams and tables are first allocated with
20928         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
20929
20930 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20931
20932         * icall.c: fixed GetElementType for byrefs (bug# 44792).
20933
20934 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
20935
20936         * reflection.c (mono_reflection_create_runtime_class): Add support for
20937         properties to dynamically created classes.
20938         * reflection.c: Fix a few places where non-MonoObjects were inserted
20939         into the tokens hashtable.
20940
20941 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
20942
20943         * object.c: some support to handle out of memory exceptions.
20944
20945 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
20946
20947         * marshal.c (mono_marshal_get_native_wrapper): support reference
20948         return types
20949
20950 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20951
20952         * object.h, object.c: more portability stuff from Bernie Solomon.
20953         Unexport mono_object_allocate(). Added mono_object_unbox ().
20954         Set exitcode when an unhandled exception is thrown.
20955
20956 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
20957
20958         * marshal.c (mono_marshal_get_native_wrapper): use custom
20959         marshaler for return types.
20960
20961 2003-06-10  Dick Porter  <dick@ximian.com>
20962
20963         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
20964         ip_mreq is available
20965
20966 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
20967
20968         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
20969         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
20970         by Bernie Solomon <bernard@ugsolutions.com>.
20971
20972 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
20973
20974         * gc.c (mono_gc_init): Avoid error message on shutdown when
20975         GC_DONT_GC=1 is used.
20976
20977         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
20978         New icall to return the GUID of a module.
20979
20980 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20981
20982         * class.c: ensure instance size always includes the parent's size
20983         even whem class size is set explicitly (fixes bug#44294).
20984
20985 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20986
20987         * profiler.h, profiler.c: made the simple profiler thread-safe,
20988         get more accurate timing info. Allow the loading of an
20989         externally-developed profiler module.
20990
20991 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
20992
20993         * marshal.c (mono_marshal_get_native_wrapper): improved
20994         class/byref arguments.
20995         (mono_marshal_get_native_wrapper): better string marshaling support.
20996
20997 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20998
20999         * class.c: ensure .pack and .size are handled correctly and
21000         simplified layout of static fields.
21001
21002 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21003
21004         * appdomain.c
21005         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
21006
21007         * loader.c (mono_lookup_pinvoke_call): look for modules in the
21008         current directory (fix bug 44008)
21009
21010 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
21011
21012         * marshal.c (mono_marshal_get_native_wrapper): started support for
21013         custom marshalers.
21014         (mono_delegate_to_ftnptr): consider marshalling specifications
21015
21016 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21017
21018         * reflection.c, reflection.h: emit custom marshal info.
21019
21020 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21021
21022         * object.c: free the GError.
21023         * icall.c: added CloseEvent_internal.
21024         * threads.[ch]:
21025         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
21026         call.
21027
21028 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
21029
21030         * loader.c (mono_method_get_signature): Add support for dynamic
21031         assemblies.
21032
21033 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21034
21035         * reflection.c: fixed bug #43905.
21036
21037 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21038
21039         * class.c, domain.c, icall.c, metadata.h, object.h: support for
21040         handling TypedReference and ArgIterator.
21041         * loader.c, loader.h: added function to get signature at call site.
21042
21043 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21044
21045         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
21046         data readonly. Buglets and warning fixes. Some MethodSpec support.
21047
21048 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21049
21050         * class.h, class.c, object.c: remove relative numbering support.
21051
21052 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
21053
21054         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
21055         free the string, until we get a chance to fix Gtk#
21056
21057 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21058
21059         * marshal.c: revert last patch.
21060
21061 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21062
21063         * icall.c: updates for new mono_class_vtable() not calling
21064         the type constructor anymore.
21065
21066 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21067
21068         * object.h, object.c: separate vtable creation from type
21069         initialization. Make running the .cctor thread safe.
21070
21071 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
21072
21073         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
21074
21075 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
21076
21077         * loader.c (mono_get_method): consider calling convention
21078
21079 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
21080
21081         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
21082         to return the invisible global type for a module.
21083
21084         * reflection.c (mono_image_build_metadata): Emit global fields too.
21085
21086 2003-05-20  Peter Williams  <peterw@ximian.com>
21087
21088         * loader.c (mono_lookup_internal_call): Add a few newlines.
21089
21090 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
21091
21092         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
21093         literal strings.
21094
21095         * appdomain.c (set_domain_search_path): Recalculate search path when
21096         AppDomainSetup.PrivateBinPath changes.
21097
21098         * object.c (mono_class_compute_gc_descriptor): It turns out some
21099         parts of the class libs (like System.Thread) holds pointers to
21100         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
21101         to treat native int a pointer type here.
21102         
21103 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
21104
21105         * appdomain.h, domain.c: add hashtable for jump target resolution.
21106
21107 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
21108
21109         * reflection.h reflection.c icall.c: Added new icalls 
21110         GetManifestResourceInfoInternal, GetModulesInternal and support
21111         infrastructure.
21112
21113 2003-05-16  Dick Porter  <dick@ximian.com>
21114
21115         * icall.c:
21116         * file-io.h:
21117         * file-io.c: Implement System.IO.MonoIO::GetTempPath
21118
21119 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
21120
21121         * object.c: mono_store_remote_field: little fix to previous patch.
21122
21123 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
21124
21125         * class.c: add constructors to array classes.
21126         * icall.c: special case array construction for InternalInvoke (),
21127
21128 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
21129
21130         * class.h class.c reflection.c object.c: Added support for field
21131         defaults in dynamically generated classes.
21132
21133 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21134
21135         * reflection.c: properly encode charset for ddlimport.
21136
21137 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21138
21139         * threads.c: allow compiling without GC.
21140
21141 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21142
21143         * appdomain.h, object.c, object.h, threads.c, threads.h: added
21144         handling of thread static data.
21145
21146 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21147
21148         * reflection.h, reflection.c: added mono_custom_attrs_free ().
21149
21150 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
21151
21152         * class.c (mono_array_class_get): always set the serializable flags
21153         (mono_array_class_get): always set the SEALED attribute for array types
21154
21155 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
21156
21157         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
21158         attributes (fix for bug 42021).
21159
21160 2003-05-12  Dick Porter  <dick@ximian.com>
21161
21162         * gc.c: Don't run finalizers when the finalizer thread is
21163         finishing up, because the default domain has already been
21164         destroyed.
21165
21166 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
21167
21168         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
21169         value is null, we should throw an exception.   This is slightly
21170         different than the other conventions used for the constructor.
21171
21172 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21173
21174         * socket-io.c: fixed windows build.
21175
21176 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21177
21178         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
21179
21180 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
21181
21182         * object.c (mono_string_new_wrapper): Compatibility fix for MS
21183         compilers.
21184
21185 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
21186
21187         * class.c (mono_class_layout_fields): Add experimental GC aware
21188         auto layout facility. Requires class library changes to work correctly.
21189
21190         (mono_class_setup_vtable): Avoid overriding explicit interface
21191         method implementations. Fixes iface3.exe test.
21192
21193         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
21194         object reference.
21195         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
21196         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
21197
21198         * metadata.h: Add new type classification macro which determines
21199         whenever the type holds an object reference.
21200
21201 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
21202
21203         * marshal.c (mono_marshal_get_native_wrapper): cleanups
21204
21205 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
21206
21207         * gc.c (finalizer_thread): Work around a GC bug.
21208
21209 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
21210
21211         * marshal.c (emit_struct_conv): allow unions
21212
21213         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
21214
21215 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
21216
21217         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
21218
21219 2003-05-06  Martin Baulig  <martin@ximian.com>
21220
21221         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
21222
21223 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21224
21225         * socket-io.c:
21226         (Select_internal): allow NULLs, don't create arrays if not needed.
21227         Coupled with Socket.cs changes.
21228
21229         * threadpool.c:
21230         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
21231         register a finalizer for it that will close the semaphore handle. This
21232         fixes the leak and make Lupus' test run with > 4080 loops.
21233
21234 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
21235
21236         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
21237         Jerome Laban (bug #42287)
21238
21239 2003-05-02  Martin Baulig  <martin@ximian.com>
21240
21241         * debug-mono-symfile.h
21242         (MonoSymbolFile): Moved declaration into mono-debug.h.
21243         (MonoDebugMethodJitInfo): Likewise.
21244         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
21245         argument.
21246         (_mono_debug_address_from_il_offset): Take a
21247         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
21248
21249         * mono-debug.h
21250         (MonoDebugDomainData): New struct.
21251         (mono_debug_get_domain_data): New function.
21252         (mono_debug_add_method): Take an additional `MonoDomain *'
21253         argument.
21254         (mono_debug_source_location_from_address): Likewise.
21255         (mono_debug_il_offset_from_address): Likewise.
21256         (mono_debug_address_from_il_offset): Likewise.
21257
21258 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
21259
21260         * reflection.c: one more check for null type in custom attrs.
21261
21262 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21263
21264         * reflection.c: avoid warning (comparison is always false due to limited
21265         range of data type).
21266
21267 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21268
21269         * icall.c: throw an exception in Type.GetField if the argument 'name'
21270         is NULL.
21271
21272 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
21273
21274         * reflection.c: fixed handling of enums in named arguments to custom
21275         attributes (bug #42123).
21276
21277 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21278
21279         * reflection.c: use the right array element type and handle
21280         a null for a Type argument, too.
21281
21282 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
21283
21284         * reflection.c: handle arrays as arguments to custom attributes.
21285
21286 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
21287
21288         * reflection.c: handle a string value in a custom attr
21289         ctor that takes an object.
21290
21291 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
21292
21293         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
21294         (fix bug #42063)
21295
21296 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
21297
21298         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
21299
21300 2003-04-27  Martin Baulig  <martin@ximian.com>
21301
21302         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
21303         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
21304         MONO_DEBUGGER_EVENT_BREAKPOINT.
21305         (mono_breakpoint_trampoline_code): Removed.
21306         (mono_debugger_event_handler): The last argument is now a
21307         `guint32'.
21308         (mono_debugger_insert_breakpoint_full): Removed the
21309         `use_trampoline' argument.
21310         (mono_debugger_method_has_breakpoint): Likewise.
21311         (mono_debugger_trampoline_breakpoint_callback): Renamed to
21312         mono_debugger_breakpoint_callback(); take the method and
21313         breakpoint number as arguments.
21314
21315 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21316
21317         * metadata.c: fix off by one when loading parameters attributes.
21318
21319 2003-04-24  Martin Baulig  <martin@ximian.com>
21320
21321         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
21322
21323 2003-04-24  Martin Baulig  <martin@ximian.com>
21324
21325         * mono-debug-debugger.c: Moved all code which interacts with the
21326         Mono Debugger here.
21327
21328         * debug-mono-symfile.c: This code now just deals with the symbol
21329         file itself, the debugger code is now in mono-debug-debugger.c.
21330
21331 2003-04-23  Martin Baulig  <martin@ximian.com>
21332
21333         * mono-debug.c (mono_debug_source_location_from_il_offset):
21334         New method; like mono_debug_source_location_from_address(), but
21335         takes an IL offset instead of a machine address.
21336
21337 2003-04-23  Martin Baulig  <martin@ximian.com>
21338
21339         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
21340         `line' field; this is now computed by the debugger.
21341
21342 2003-04-23  Martin Baulig  <martin@ximian.com>
21343
21344         * mono-debug.[ch]: New files.  This is the new debugging interface.
21345
21346         * mono-debug-debugger.[ch]: New files.  Moved all code which
21347         interacts with the Mono Debugger here.
21348
21349 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
21350
21351         * domain.c (mono_init): initialize mono_defaults.monitor_class
21352
21353 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
21354
21355         * reflection.c (method_encode_code): Add a spicy exception to help
21356         future compiler authors.
21357
21358 2003-04-21  Martin Baulig  <martin@ximian.com>
21359
21360         * icall.c
21361         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
21362         Make this work with relative pathnames; g_filename_to_uri() needs
21363         an absolute filename.
21364
21365 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
21366
21367         * icall.c: Track name changes in Object and ValueType.
21368
21369 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
21370
21371         * metadata.c (mono_type_stack_size): size should be a multiple of
21372         sizeof (gpointer)
21373
21374 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21375
21376         * gc.c:
21377         (internal_domain_finalize): moved into mono_domain_finalize. No need
21378         to create another thread because the finalizers will be run in the
21379         finalizer thread.
21380         
21381         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
21382         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
21383         to be run (MS does this too).
21384
21385 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
21386
21387         * object.c (mono_class_compute_gc_descriptor): Update comment.
21388
21389         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
21390
21391         * image.h: Add synchronized wrapper cache.
21392
21393         * image.c (do_mono_image_open): Initialize cache.
21394
21395         * reflection.c (create_dynamic_mono_image): Initialize cache.
21396
21397 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21398
21399         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
21400         ves_icall_System_Buffer_ByteLengthInternal.
21401
21402 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21403
21404         * reflection.c: setup klass->nested_in earlier. Allow
21405         a dash in the assembly name.
21406
21407 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
21408
21409         * metadata.c (mono_type_to_unmanaged): dont access
21410         type->data.klass for MONO_TYPE_OBJECT
21411         (mono_type_to_unmanaged): consider System.Delegate class
21412
21413 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
21414
21415         * class.c: just setup supertypes in the proper place instead of
21416         initializing the full element class for arrays.
21417
21418 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21419
21420         * class.c: ensure the element class of arrays is initialized.
21421         Setup the supertype info for array classes, too.
21422
21423 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
21424
21425         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
21426
21427 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21428
21429         * Makefile.am: re-added -m option when running cygpath. This way,
21430         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
21431         separator.
21432         * mono-config.c: same codepath for locating mono config file for WIN32
21433         and the rest.
21434         * assembly.c: if mono_assembly_setrootdir is called, don't override
21435         the value set.
21436
21437 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21438
21439         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
21440         MONO_ASSEMBLIES variable.
21441
21442 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21443
21444         * icall.c: added Assembly::GetNamespaces() icall.
21445
21446 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21447
21448         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
21449
21450 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
21451
21452         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
21453         * object.c: fixed bug in the construction of vtable for proxies
21454
21455 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
21456
21457         * object.c (mono_array_new): Mark mono_array_new as an icall.
21458
21459 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21460
21461         * class.c: fixed test for public method when overriding interfaces.
21462         Closes bug #40970.
21463
21464 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21465
21466         * appdomain.h, domain.c: added mono_domain_foreach() to
21467         be able to access the currently loaded appdomains.
21468         * object.c: make string interning work across sppdomains.
21469         Mark some functions for use as icalls.
21470
21471 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
21472
21473         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
21474
21475         * reflection.h reflection.c: Allocate long living data using 
21476         GC_MALLOC_ATOMIC so the collector does not need to scan it.
21477
21478         * reflection.c: Double the allocation size in streams instead of
21479         increasing it, to prevent unneccesary copying on large assemblies.
21480         
21481         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
21482         creation if the assembly does not have the Run flag set.
21483
21484 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21485
21486         * class.h: avoid the C++ keywords in header files (Jerome Laban
21487         spotted and fixed this).
21488
21489 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21490
21491         * object.c:
21492         (mono_unhandled_exception): fill in the arguments for the
21493         UnhandledException event. Only trigger that event for the default
21494         domain (as MS does).
21495
21496 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
21497
21498         * object.c: Improve typed allocation stuff based on suggestions from
21499         Paolo. Also turn it on if the GC library supports it.
21500
21501 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
21502
21503         * object.c object.h class.h: Added experimental typed allocation
21504         facility using the interfaces in gc_gcj.h.
21505
21506         * os/gc_wrapper.h: Added new include files.
21507         
21508 2003-04-03  Martin Baulig  <martin@ximian.com>
21509
21510         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
21511         which is not yet enabled by default.
21512
21513         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
21514         functions.
21515         (mono_gc_lock, mono_gc_unlock): New static functions.
21516
21517         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
21518         functions; stop/start the world for the garbage collector.  This
21519         is using the windows API; we need to complete the SuspendThread()/
21520         ResumeThread() implementation in the io-layer to make this work on Unix.
21521         (mono_gc_push_all_stacks): New public function; tells the garbage
21522         collector about the stack pointers from all managed threads.
21523
21524 2003-04-03  Martin Baulig  <martin@ximian.com>
21525
21526         * object.h (MonoThread): Added `gpointer stack_ptr'.
21527
21528         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
21529
21530 2003-04-03  Martin Baulig  <martin@ximian.com>
21531
21532         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
21533
21534 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
21535
21536         * reflection.c (typebuilder_setup_fields): Initialize field.first and
21537         field.last.
21538
21539 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
21540
21541         * loader.c (mono_lookup_internal_call): Report the corlib that is
21542         out of sync.
21543
21544 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
21545
21546         * icall.c (ves_icall_type_GetTypeCode): fixed check for
21547         System.DBNull (it's class not valuetype).
21548
21549 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21550
21551         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
21552         if the array method was already assigned a token (fixes bug#40646).
21553
21554 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
21555
21556         * reflection.c (mono_reflection_get_type): Attempt type resolve even
21557         if no assembly is given.
21558
21559 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
21560
21561         * metadata.h: Added the new tables.
21562
21563         * row-indexes.h: Added definitions for new tables.
21564
21565         * metadata.c: Add schemas for new tables, and add support for
21566         computing the sizes of them.
21567
21568         * class.c: Update for handling the new type cases.
21569
21570 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
21571
21572         * metadata.h (MONO_TYPE_IS_VOID): new macro
21573
21574 2003-03-31  Martin Baulig  <martin@ximian.com>
21575
21576         * threads.h (MonoThreadCallbacks): Added `thread_created'.
21577
21578         * threads.c (mono_thread_new_init): Call `thread_created' in the
21579         mono_thread_callbacks.
21580
21581 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
21582
21583         * loader.h: added marshalbyrefobject_class to mono_defaults
21584         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
21585         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
21586           generation of output parameters.
21587           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
21588         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
21589           contextbound and the target object belongs to the context of the caller.
21590         * object.h: added context and unwrapped_server variables in MonoRealProxy.
21591         * object.c: Implemented support for interfaces and abstract classes
21592           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
21593           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
21594
21595 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
21596
21597         * class.h class.c (mono_class_is_subclass_of): New function.
21598         
21599         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
21600         routines for most common case (calls from ArrayList::ToArray).
21601
21602         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
21603         routine so programs which call Environment::Exit() can be profiled.
21604
21605         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
21606         Added MONO_ARCH_SAVE_REGS.
21607
21608         * icall.c (ves_icall_type_is_subtype_of): Use new function.
21609
21610 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
21611
21612         * blob.h: Add a couple of new MonoType types definitions.
21613
21614         * tabledefs.h: Add a couple of new call convs.
21615
21616 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
21617
21618         * reflection.h (MonoReflectionDynamicAssembly): track changes in
21619         the layout of the class.
21620
21621         * reflection.c (alloc_table): double the size on overflow to avoid
21622         unnecessary copying.
21623
21624         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
21625         avoid filling out metadata tables and blobs. Also set mb->ilgen to
21626         null so it can be garbage collected.
21627         
21628 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
21629
21630         * reflection.c (mono_reflection_get_type): Return the resolved type
21631         only if it is in the assembly we searched.
21632
21633         * reflection.c (ensure_runtime_vtable): Initialize method slots.
21634
21635         * class.c (mono_class_setup_vtable): Set the slot of the overriding
21636         method.
21637
21638 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21639
21640         * appdomain.c:
21641         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
21642         the right one is 'file:///blah', but MS allows it.
21643         * assembly.c:
21644         (mono_assembly_open): allow 'file://blah'
21645
21646         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
21647
21648 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
21649
21650         * socket-io.c: fixes bug #40310.
21651
21652 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
21653
21654         * reflection.c (mono_reflection_parse_type): handle deeply nested
21655         types correctly.
21656
21657         * reflection.c (mono_image_create_token): Use unique token values
21658         since they will be put into a hash table.
21659
21660         * class.c (mono_class_setup_vtable): If a method occurs in more than
21661         one place in the vtable, and it gets overriden, then change the
21662         other occurances too.
21663
21664         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
21665         object as return type.
21666
21667 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
21668
21669         * icall.c: Deleted "ToString" implementation for double and float
21670         because they are full implemented in managed code.
21671
21672 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21673
21674         * reflection.c, reflection.h: implemented and exported functions
21675         to retrieve info about custom attributes.
21676
21677 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21678
21679         * appdomain.c: moved Uri handling to assembly.c
21680         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
21681         work when using a file Uri in *nix and windows.
21682
21683         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
21684         GetReferencedAssemblies.
21685
21686 2003-03-18  Dick Porter  <dick@ximian.com>
21687
21688         * icall.c: Rename a couple of internal calls
21689
21690         * threads.c: Set the thread state to Stopped when a thread exits.
21691         Fixes bug 39377.
21692
21693 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
21694
21695         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
21696         New icall.
21697
21698         * object.c (mono_class_vtable): fix warning.
21699
21700 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
21701
21702         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
21703
21704         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
21705         memory.
21706         (method_encode_clauses): Create exception info structures in the right
21707         order.
21708         (mono_reflection_setup_internal_class): Initialize supertypes field.
21709
21710         * class.c object.c: Handle interfaces which implement other interfaces 
21711         correctly.
21712
21713         * class.h class.c: Move the supertypes array initialization code into 
21714         a separate function so it can be used for dynamic types too. Also call
21715         it earlier, in mono_class_init(), since it can be used before the
21716         type is initialized.
21717
21718 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21719
21720         * Makefile.am:
21721         * assembly.c:
21722         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
21723
21724         * appdomain.c:
21725         * appdomain.h:
21726         * marshal.c:
21727         * object.c: remove warnings.
21728
21729 2003-03-13  Martin Baulig  <martin@ximian.com>
21730
21731         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
21732         (MonoDebugLexicalBlockEntry): New types.
21733
21734         * debug-mono-symfile.c
21735         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
21736
21737 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21738
21739         * process.c: ret can be any non-zero value accroding to MS doc.
21740
21741 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
21742
21743         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
21744         fixing a warning for a miss-used prototype, would have cause
21745         random memory corruption.
21746
21747 2003-03-07  Martin Baulig  <martin@ximian.com>
21748
21749         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
21750         getting really annoying ....
21751
21752 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
21753
21754         * reflection.c (fixup_method): added support for array methods.
21755
21756 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21757
21758         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
21759         (pointed out by Michael Adams).
21760
21761 2003-03-04  Dick Porter  <dick@ximian.com>
21762
21763         * icall.c: Temporarily reverted the Double and Single ToString()
21764         change, because it broke nunit.
21765
21766 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
21767
21768         * object.h, threads.h: make include files compatible with C++
21769         (patch by Jerome Laban <jlaban@wanadoo.fr>).
21770
21771 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
21772
21773         * icall.c: Erased ToString helper functions for Double and Single.
21774         Now, that implementations ar all in managed code (Double and Single
21775         Formatters).
21776
21777 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
21778
21779         * appdomain.c: Added method for initializing the default context of
21780         a domain. Added internal call for getting the default context.
21781         * appdomain.h: Added context variable in MonoDomain struct.
21782         * domain.c: mono_domain_set also sets the default context of the domain
21783         * icall.c: Mapped internal method InternalGetDefaultContext.
21784         * object.c: mono_object_get_virtual_method returns always a remoting
21785         wrapper if the object is a transparent proxy.
21786         mono_runtime_invoke_array: when creating an object by calling the
21787         constructor, if the created object is a proxy, then the constructor should
21788         be called using the a remoting wrapper.
21789
21790 2003-03-03  Dick Porter  <dick@ximian.com>
21791
21792         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
21793         variable so it compiles on solaris.  Problem spotted by
21794         Christopher Taylor <ct@cs.clemson.edu>
21795
21796 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21797
21798         * appdomain.c:
21799         (get_info_from_assembly_name): don't leak value.
21800
21801         * icall.c:
21802         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
21803         result.
21804
21805 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
21806
21807         * assembly.c: export mono_image_load_references ().
21808         * class.c: handle function pointers. mono_class_from_name() now
21809         supports nested type names directly.
21810
21811 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
21812
21813         * reflection.h reflection.c: Encode already created dynamic methods 
21814         and fields correctly as a DEF instead of a REF.
21815
21816         * reflection.c: Get rid of the force_ref argument to 
21817         mono_image_typedef_or_ref since it was wrong in the first place.
21818
21819         * string-icalls.c: add error checking to string constructors according
21820         to the MSDN docs.
21821
21822         * reflection.c: Emit types in the order their TypeBuilders were 
21823         created. Previously, a new table index was assigned to each type before
21824         the tables were emitted. This was wrong because the signature blob
21825         might already refer to a type by its original table index.
21826
21827 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
21828
21829         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
21830         change.
21831         
21832 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21833
21834         * Makefile.am: make assemblies dir have \ instead of / on windows.
21835
21836 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
21837
21838         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
21839         iterate over the NESTEDCLASS table using a linear search since the
21840         table is not guaranteed to be sorted by the secondary key.
21841
21842         * class.c (mono_class_create_from_typedef): fixed up call to
21843         mono_metadata_nesting_typedef.
21844         
21845 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
21846
21847         * marshal.c (mono_string_to_byvalstr): clear the memory as
21848         suggested by Jerome Laban <jlaban@wanadoo.fr>
21849
21850 2003-02-26  Dick Porter  <dick@ximian.com>
21851
21852         * process.c: Cope with padding in .rsrc blocks
21853
21854 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
21855
21856         * metadata.h: reverted the filter_len change, it breaks reflection
21857         
21858 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
21859
21860         * metadata.h: added a new field to store the filter_len
21861         
21862
21863 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21864
21865         * reflection.c: handle custom attributes for types and members
21866         created with Reflection.Emit (bug#38422).
21867
21868 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
21869
21870         * reflection.c: define RTSpecialName automatically for constructors for
21871         compatibility with MS.NET.
21872
21873         * reflection.c (mono_reflection_create_runtime_class): initialize
21874         nested_in field of dynamically created classes.
21875
21876 2003-02-22  Martin Baulig  <martin@ximian.com>
21877
21878         * debug-mono-symfile.h: Incremented version number.
21879
21880 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
21881
21882         * object.h icall.c process.c: fix warnings.
21883
21884 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
21885
21886         * appdomain.h appdomain.c:
21887         (mono_domain_try_type_resolve): split the 
21888         name_or_tb argument into a name and a tb argument.
21889         (mono_domain_has_type_resolve): new function to check whenever the
21890         application has registered a TypeResolve event handler.
21891         
21892         * icall.c reflection.h reflection.c: move the type resolve logic into
21893         mono_reflection_get_type () so it will be invoked when 
21894         Assembly::GetType () is called.
21895
21896         * reflection.c:
21897         (mono_reflection_get_type): renamed to get_type_internal.
21898         (mono_reflection_get_type): fixed type name generation so it works 
21899         for nested types too.
21900         (mono_reflection_get_type): call has_type_resolve () to avoid the 
21901         costly type name generation if there is no resolve event handler.
21902
21903 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21904
21905         * class.c, image.c: load exported types from file references.
21906
21907 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
21908
21909         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
21910           used to cache the managed methods used to create proxies and make 
21911           remote invocation of methods.
21912         * class.h: Added in MonoVTable a flag to indicate that a class needs 
21913           to be remotely created.
21914         * object.c: Modified the method mono_class_vtable(). It now initializes 
21915           the remote flag of the vtable. Modified mono_object_new_specific(), 
21916           so now it checks the remote flag.
21917         * icall.c: Added a couple of internal methods, one for enabling instance 
21918           creation interception for a type, and one for creating objects bypassing
21919           the remote check.
21920
21921 2003-02-18  Martin Baulig  <martin@ximian.com>
21922
21923         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
21924         New interncall to get a method's metadata token.
21925
21926         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
21927         New interncall for the debugger.
21928
21929 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
21930
21931         * class.c (mono_class_setup_vtable): allocate supertype array
21932
21933 2003-02-18  Martin Baulig  <martin@ximian.com>
21934
21935         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
21936
21937 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21938
21939         * reflection.c:
21940         (assembly_name_to_aname): jump over unknown properties (i've found
21941         something like: 'type, assembly, version=xxx, custom=null, public...',
21942         so now will ignore custom=null and still get the rest of the values).
21943
21944 2003-02-17  Dick Porter  <dick@ximian.com>
21945
21946         * threads.c: Have Thread.Start() wait for a semaphore to signal
21947         that the thread has set up all its local data.  This fixes bug
21948         34323, where Abort() raced the new thread's TLS data.
21949
21950         Also removes the handle_store() call from start_wrapper, because
21951         threads are now always created suspended and there is no longer a
21952         race between the parent and child threads to store the info.
21953
21954 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
21955
21956         * image.c: explain the #- heap issue in a message, hopefully
21957         avoiding FAQs on mono-list.
21958
21959 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21960
21961         * icall.c:
21962         (GetEntryAssembly): if the domain has not invoked
21963         AppDomain.ExecuteAssembly yet, return the assembly of the default
21964         AppDomain.
21965
21966 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
21967
21968         * class.c (mono_ldtoken): make it work in dynamic assemblies.
21969
21970 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21971
21972         * metadata.c, reflection.c: simple speedup to type hash
21973         and equals code.
21974
21975 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
21976
21977         * image.c, image.h, class.c, assembly.c: move module loading
21978         to MonoImage. When loading metadata, consider alignemnet from
21979         the start of metadata, not from the metadata address in memory.
21980
21981 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
21982
21983         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
21984         AssemblyBuilder objects. Factored out custom attribute creation into
21985         a separate function.
21986         (create_custom_attr): new function to create custom attributes.
21987
21988 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
21989
21990         * Makefile.am: Got tired of typing the full pathname to pedump.
21991         Until there is another option, am installing this.
21992
21993 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
21994
21995         * class.c (class_compute_field_layout): always set field->parent 
21996         (mono_ldtoken): use mono_defaults.fieldhandle_class;
21997
21998 2003-02-11  Dick Porter  <dick@ximian.com>
21999
22000         * threads-types.h:
22001         * monitor.c: Rewrote Monitor, making lock much faster and
22002         Pulse/Wait work as specified.  Also uses much fewer handles, and only
22003         creates them as needed.
22004
22005         * exception.c: Added SynchronizationLockException
22006
22007         * threads.c: Deleted old Monitor implementation.  The new one is
22008         in a new file.
22009
22010 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
22011
22012         * class.c: handled TypedReference type code. Set the correct size for
22013         class data. Setup interface_offsets for interface classes, too.
22014
22015 2003-02-09  Martin Baulig  <martin@ximian.com>
22016
22017         * debug-mono-symfile.h: Reflect latest symbol writer changes.
22018
22019 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
22020
22021         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
22022         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
22023         * object.c: fixed mono_object_get_virtual_method () for interfaces.
22024         * verify.c: check for code that runs after the end of the method.
22025
22026 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
22027
22028         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
22029         "System.Math::Round2".
22030         * sysmath.h: Added Floor, Round and Round2 definitions.
22031         * sysmath.c: Modified certain functions that were not 100% compliant
22032         with MS.NET (math precision) and added the implementation of Floor,
22033         Round and Round2.
22034
22035 2003-02-07  Martin Baulig  <martin@ximian.com>
22036
22037         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
22038
22039 2003-02-07  Martin Baulig  <martin@ximian.com>
22040
22041         * debug-mono-symfile.c: Reflected latest symwriter changes.
22042         (mono_debug_create_mono_symbol_file): Removed.
22043         (mono_debug_open_mono_symbol_file): Take an argument which
22044         specifies whether to create a dynamic symbol file.
22045
22046 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
22047
22048         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
22049
22050 2003-02-05  Martin Baulig  <martin@ximian.com>
22051
22052         * reflection.c (mono_image_build_metadata): Make this public,
22053         protect it against being called multiple times, don't create
22054         resources and don't build the compressed metadata here.
22055         (mono_image_create_pefile): Do this here.
22056
22057         * icall.c
22058         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
22059
22060 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22061
22062         * socket-io.c: fixed bug #36322.
22063
22064 2003-02-06  Piers Haken <piersh@friskit.com>
22065
22066         * appdomain.[ch]:
22067         * class.h:
22068         * debug-mono-symfile.c:
22069         * icall.c:
22070         * loader.c:
22071         * mono-config.c:
22072         * monosn.c:
22073         * reflection.c:
22074         * socket-io.c: warning cleanups
22075
22076 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
22077
22078         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
22079         function. works like remoting invoke, but does a check for the Proxy first.
22080
22081 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
22082
22083         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
22084
22085 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
22086
22087         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
22088         array of pointers.
22089         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
22090         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
22091
22092         * object.c (mono_store_remote_field_new): used by the new jit
22093         instead of mono_store_remote_field
22094         (mono_load_remote_field_new): used by the new jit
22095         instead of mono_load_remote_field
22096
22097 2003-02-05  Patrik Torstensson
22098
22099         * appdomain.c: changed unload to take the domain id instead
22100         of domain
22101         
22102         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
22103
22104
22105 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22106
22107         * appdomain.c: don't look for assemblies in ApplicationBase if
22108         PrivateBinPathProbe is set.
22109
22110 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22111
22112         * object.c: make the first argument in main_args contain the absolute
22113         path to the assembly. Fixes bug #37511.
22114
22115 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22116
22117         * icall.c: get correct UTC offset for countries not using daylight
22118         time saving. Fixes bug #30030.
22119
22120 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22121
22122         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
22123         and 1 are the family).
22124
22125 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
22126
22127         * icall.c (ves_icall_InternalExecute): removed wrong assertion
22128
22129         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
22130
22131 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
22132
22133         * reflection.c: added support for SignatureHelper tokens, which is
22134         needed by the Calli opcode.
22135
22136         * reflection.h: track changes to SignatureHelper class.
22137
22138         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
22139
22140 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22141
22142         * appdomain.c: fixed loading assemblies from PrivateBinPath.
22143
22144 2003-02-03  Patrik Torstensson
22145         * appdomain.[c|h], domain.c : 
22146          - Added support for getting a domain via domain id
22147          - Support for setting and getting domain from System.AppDomain 
22148            (used in cross appdomain channel)
22149          - Added support for get/set for a MonoAppContext on a thread 
22150            (Context class in System.Runtime.Remoting.Contexts),
22151          - Removed hack in Get/SetData and ExecuteAssembly.
22152         
22153         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
22154         the managed world to get control when a proxy is created.
22155
22156         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
22157         
22158 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
22159
22160         * icall.c
22161         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
22162         Populate the codebase field as well.
22163
22164 2003-02-02  Martin Baulig  <martin@ximian.com>
22165
22166         * debug-mono-symfile.c
22167         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
22168         (mono_debug_symfile_add_method): Allow interncalls.
22169
22170 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22171
22172         * icall.c: throw parse exception if strtod fails or the string is empty.
22173
22174 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
22175
22176         * marshal.c: handle object type separately from defined
22177         class types.
22178
22179 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
22180
22181         * marshal.c: handle NATIVE_LPSTR for strings when it's
22182         explicitly specified.
22183
22184 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
22185
22186         * reflection.c, reflection.h, icall.c: setup the reflection
22187         handle cache for ModuleBuilders and AssemblyBuilders.
22188
22189 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
22190
22191         * reflection.c (reflection_methodbuilder_to_mono_method): set
22192         pinvoke flag
22193
22194 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22195
22196         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
22197
22198 2003-01-29  Dick Porter  <dick@ximian.com>
22199
22200         * threads.c: No need for the fake_thread kludge now that Thread
22201         doesn't run a class constructor
22202         
22203 2003-01-29  Dick Porter  <dick@ximian.com>
22204
22205         * threads.c: Use g_direct_hash instead of the rather bogus
22206         g_int_hash
22207
22208 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
22209
22210         * marshal.c (mono_marshal_get_native_wrapper): add check for null
22211         (fix pinvoke12.exe)
22212         (mono_marshal_get_struct_to_ptr): generate valid IL code
22213         (mono_marshal_get_ptr_to_struct): generate valid IL code
22214         (*): correctly set sig->pinvoke, we need to memdup the signature
22215         to do that
22216
22217 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
22218
22219         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
22220         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
22221
22222 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
22223
22224         * profiler.c: provide more callers information.
22225
22226 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
22227
22228         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
22229
22230         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
22231
22232         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
22233
22234 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
22235
22236         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
22237         exception instead of going into an infinite loop on dates which it 
22238         can't yet handle.
22239
22240         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
22241         out-of-range exception if needed.
22242
22243         * class.c (mono_class_setup_vtable): allow a virtual method to provide
22244         an implementation for an interface method and to override an inherited
22245         method at the same time. 
22246         Imagine a scenario when a virtual method is used to override a
22247         virtual abstract method in a parent class, and this same method 
22248         provides an implementation for an method inherited from an interface. 
22249         In this case, the interface resolution code will set im->slot, which 
22250         means that the virtual method override pass will skip this method 
22251         which means a pointer to the abstract method inherited from the parent
22252         will remain in the vtable of this non-abstract class.
22253
22254         * class.c: (mono_class_setup_vtable): continue search for a real 
22255         method if only an abstract method is found.     
22256
22257 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
22258
22259         * reflection.c: add size to encoding for ByValStr and ByValArray
22260         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
22261
22262 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
22263
22264         * class.c (mono_class_setup_vtable): pass the override info as an
22265         argument.
22266
22267         * class.c (mono_class_setup_vtable): set the slot of overriding methods
22268         correctly.
22269         
22270         * reflection.c (ensure_runtime_vtable); add support for method 
22271         overrides.
22272         
22273 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
22274
22275         * reflection.c (resolution_scope_from_image): Hack to work to work with
22276         dynamic assemblies.
22277
22278         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
22279         added a 'force_ref' argument to force this function to allways return 
22280         a TypeRef. This is needed by mono_image_get_memberref_token ().
22281         
22282 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
22283
22284         * reflection.c (mono_image_get_type_info): interfaces really don't have
22285         a parent.
22286
22287         * reflection.c (mono_image_basic_init): fill out missing fields of
22288         image structure.
22289
22290         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
22291         dynamic assemblies. This is required so dynamic assemblies show up in
22292         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
22293         Type::GetType() etc. This is consistent with MS behaviour.
22294
22295         * image.c image.h reflection.c: add newly created classes to the name 
22296         cache so mono_class_get () will find them.      
22297
22298 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
22299
22300         First part of changes to get IKVM.NET running under mono.
22301         
22302         * appdomain.h, appdomain.c: added new function 
22303         mono_domain_try_type_resolve() which will emit TypeResolve events. 
22304         This function will call AppDomain::DoTypeResolve to do the actual work.
22305
22306         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
22307         moved existing code dealing with dynamic tokens to a new function 
22308         called mono_reflection_lookup_dynamic_token (). This function will 
22309         raise TypeResolve events when appropriate. Since reflection.c is not 
22310         part of libmetadata, a new hook function called 
22311         mono_lookup_dynamic_token() is added to class.c which will call this.
22312
22313         * assembly.h assembly.c: make the invoke_load_hook function public,
22314         so it can be called for dynamic assemblies.
22315
22316         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
22317
22318         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
22319         type isn't found.
22320
22321         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
22322         MonoGHashTable, since it contains pointers to objects which the GC 
22323         needs to track.
22324
22325         * assembly.c (search_loaded): remove unused variable.
22326         
22327 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
22328
22329         * object.c: fixed issue exposed by gcc-generated IL programs
22330         that use RVA data for pointers.
22331
22332 2003-01-25  Martin Baulig  <martin@ximian.com>
22333
22334         * threads.c (start_wrapper): Moved the initialization of
22335         `start_func' above the mono_new_thread_init() call to which we
22336         pass it as argument.
22337
22338 2003-01-24  Martin Baulig  <martin@ximian.com>
22339
22340         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
22341         the MonoThread pointer.
22342
22343 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
22344
22345         * icall.c: Rename `PowImpl' to Pow.
22346
22347 2003-01-23  Dick Porter  <dick@ximian.com>
22348
22349         * threads.c (start_wrapper): Create a Thread object if needed, so
22350         the Main() thread can do the class initialisation in a subthread
22351         that has been set up to allow managed code execution.
22352
22353         Pass the thread ID instead of the MonoThread pointer to the thread
22354         start and attach callbacks.  This change is required, because the
22355         jit thread start callback must be called _before_ the Thread
22356         object can be created.
22357         
22358         (mono_thread_init): Removed much object creation code that is no
22359         longer needed.  No managed code is called from here now.
22360
22361         * object.c (mono_runtime_exec_managed_code): Create a subthread
22362         for Main, and call back to the runtime to use it.
22363         Set the exit code when Main exits.
22364
22365         * gc.c: Make sure domain finalisation happens in a subthread.
22366         Re-enable threaded GC, fixing bug 31333 (again).
22367
22368         * environment.c: System.Environment internall calls (so far just
22369         ExitCode is here, the others are still in icall.c)
22370
22371         * appdomain.c (mono_runtime_cleanup): All threads running managed
22372         code should have finished before mono_runtime_cleanup() is
22373         reached, so no need to clean up threads.
22374
22375 2003-01-22  Martin Baulig  <martin@ximian.com>
22376
22377         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
22378         `gpointer func' arguments.      
22379         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
22380         but added `MonoThread *thread' argument.
22381         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
22382
22383         * threads.c (mono_new_thread_init): Added `gpointer func' argument
22384         and pass it to the mono_thread_start_cb callback.
22385         (mono_install_thread_callbacks): New public function to install a
22386         set of callbacks which are set by the debugger.
22387         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
22388
22389 2003-01-22  Martin Baulig  <martin@ximian.com>
22390
22391         * Makefile.am: Install debug-mono-symfile.h.
22392
22393 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
22394
22395         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
22396
22397 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
22398
22399         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
22400         * class.c (mono_ptr_class_get): correctly set access levels of pointers
22401         (mono_array_class_get): correctly set access levels of arrays
22402
22403 2003-01-20      Patrik Torstensson
22404         * image.h (MonoAssemblyName): changed major, minor, build, revision
22405         from signed to unsigned.
22406
22407 2003-01-20  sean kasun <skasun@azstarnet.com>
22408
22409         * reflection.c (load_cattr_value): Now this handles
22410         MONO_TYPE_SZARRAY.  Fixes bug #35629
22411
22412 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
22413
22414         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
22415         integer value
22416
22417 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22418
22419         * decimal.c: fixed bug #26056.
22420
22421 2003-01-17  Martin Baulig  <martin@ximian.com>
22422
22423         * gc.c: Raise an ExecutionEngineException instead of using g_error().
22424
22425 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22426
22427         * exception.[ch]:
22428         (mono_get_exception_type_initialization): new function.
22429
22430         * object.c: throw a TypeInitializationException when an exception is
22431         thrown invoking the class constructor.
22432
22433 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22434
22435         * reflection.c: fixed attribute reading.
22436
22437 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22438
22439         * icall.c:
22440         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
22441         provided, look for the type in the calling assembly and then in
22442         mscorlib; if the assembly name is provided, only try that one.
22443
22444 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
22445
22446         * object.c: register the vtable before there is a chance it's
22447         queried again recursively.
22448
22449 2003-01-13  Duncan Mak  <duncan@ximian.com>
22450
22451         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
22452         gc-internal.h. 
22453         
22454 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
22455
22456         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
22457
22458 2003-01-11  Martin Baulig  <martin@ximian.com>
22459
22460         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
22461         this to 20 for the release.
22462
22463 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
22464
22465         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
22466
22467         * loader.c (mono_method_get_marshal_info): bug fix
22468
22469         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
22470         structures with explicit layout
22471
22472 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22473
22474         * profiler.c: made the output more readable (and sorted). 
22475         Added caller information for the allocation profiler.
22476
22477 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
22478
22479         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
22480
22481 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22482
22483         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
22484         to get value types.
22485         
22486 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
22487
22488         * object.c, profiler.h, profiler.c, profiler-private.h:
22489         Added object allocation profiler.
22490
22491 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
22492
22493         * reflection.h, reflection.c: handle global methods.
22494         Compress blob entries.
22495
22496 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
22497
22498         * marshal.c: fix compilation.
22499
22500 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
22501
22502         * loader.c (mono_method_get_marshal_info): impl.
22503
22504         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
22505
22506 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22507
22508         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
22509         for reference types.
22510
22511 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
22512
22513         * loader.c: fixed off by one error in loaded parameter names.
22514
22515 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
22516
22517         * marshal.c (mono_marshal_get_icall_wrapper): like
22518         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
22519         instead of a MonoMethod.
22520
22521 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22522
22523         * decimal.c: fixed bug #36537.
22524
22525 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
22526
22527         * marshal.c: throw a missing method exception if a
22528         P/Invoke method is not found.
22529
22530 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22531
22532         * icall.c: allow a null this for constructors.
22533
22534 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
22535
22536         * icall.c: raise the proper exceptions if the arguments to the
22537         internal Invoke are incorrect.
22538
22539 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
22540
22541         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
22542
22543 2003-01-03  Martin Baulig  <martin@ximian.com>
22544
22545         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
22546
22547 2002-12-31  Martin Baulig  <martin@ximian.com>
22548
22549         * debug-mono-symfile.c: Completely rewrote the type section.
22550         Instead of using individual malloc()ed fields, we use one big
22551         continuous memory area and offsets into this area.
22552         See the comments in the source code for details.
22553
22554 2002-12-30  Martin Baulig  <martin@ximian.com>
22555
22556         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
22557
22558 2002-12-30  Martin Baulig  <martin@ximian.com>
22559
22560         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
22561         line number table in this data blob instead of using an external
22562         pointer.
22563
22564 2002-12-28  Martin Baulig  <martin@ximian.com>
22565
22566         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
22567
22568 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
22569
22570         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
22571         as a boxed return type.
22572
22573 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
22574
22575         * appdomain.c
22576         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
22577         g_build_filename to properly get separators on the filename created.
22578
22579         * object.h: Small change, introduce MonoMarshalByRefObject to
22580         track the layout of that structure in the C# universe as we make
22581         changes there.
22582
22583 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
22584
22585         * object.c: removed assert to allow static fields on interfaces.
22586         * loader.c: a TypeSpec may be used for any type, not just arrays.
22587
22588 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22589
22590         * class.c, class.h: added mono_class_array_element_size ().
22591         Ignore static methods in interfaces.
22592
22593 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22594
22595         * threads.c: fixed the build under cygwin.
22596
22597 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
22598
22599         * reflection.c: handle nullref constants. Allocate keys for
22600         reflection handles with the GC.
22601
22602 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22603
22604         * threads.c, threads.h: added mono_thread_get_abort_signal()
22605         to get a suitable signal for thread abort.
22606
22607 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22608
22609         * metadata.c: fix handling of ExportedType table.
22610
22611 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22612
22613         * icall.c: added WriteWindowsDebugString internal call.
22614
22615 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22616
22617         * reflection.h: added fields to match C# implementation.
22618
22619 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22620
22621         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
22622
22623 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
22624
22625         * gc.h, gc-internal.h: Rename header for GC internal calls to
22626         gc-internal.h from gc.h as to not clash with Boehm GC having its
22627         header installed as <gc.h> in outside include paths.
22628         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
22629         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
22630
22631 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22632
22633         * icall.c: assign minor, build and revision in FillName.
22634
22635 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
22636
22637         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
22638         Added support for running code generated by Reflection.Emit.
22639
22640 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22641
22642         * appdomain.c: check for NULL argument in LoadFrom.
22643
22644 2002-12-10  Dick Porter  <dick@ximian.com>
22645
22646         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
22647
22648 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22649
22650         * appdomain.c: fix buglet when building exe file name.  Handle full
22651         assembly name (needed after latest changes to AssemblyName).
22652         * image.c:
22653         (mono_image_close): free some hashtables.
22654
22655 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
22656
22657         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
22658         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
22659         on some systems (redhat 7.3) 
22660
22661 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
22662
22663         * threads.c: delete the critical section of a sync block,
22664         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
22665
22666 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
22667
22668         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
22669
22670 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22671
22672         * appdomain.[ch]: handle the assembly preload event to try loading the
22673         assemblies using the paths we have in the current domain.
22674
22675         * assembly.[ch]: created an assembly preload hook that is called to try
22676         loading the assembly by other means that the ones provided here.
22677
22678         * domain.c: initialize the domain search path.
22679
22680         From now on, assemblies (TODO: except corlib and System) are loaded
22681         according to these rules when using mono_assembly_load ():
22682
22683                 1. It tries to load the assembly from the ApplicationBase
22684                 of the current domain appending .dll and .exe (TODO: have to
22685                 try loading from name/name.dll and name/name.exe).
22686
22687                 2. It tries the search path specified in PrivateBinPath for the
22688                 current domain (if any).
22689
22690                 3. Previous behavior.
22691
22692 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
22693
22694         * icall.c: implemented GetInterfaceMap() related icall.
22695         * domain.c, loader.h: load MethodInfo in mono_defaults.
22696
22697 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22698
22699         * gc.c: disable the finalizer thread for now, untill all the issues
22700         with it are resolved.
22701
22702 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22703
22704         * string-icalls.c: handle embedded nulls in string ctor when the
22705         length is specified.
22706
22707 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
22708
22709         * class.c: look for explicit interface implementation in parent
22710         classes, too.
22711
22712 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
22713
22714         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
22715
22716 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
22717
22718         * gc.c: protect handles with a critical section.
22719
22720 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22721
22722         * icall.c:
22723         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
22724         parameters. If no assembly specified, try getting the type from all
22725         the assemblies in the current domain, else, load the assembly and get
22726         the type from it.
22727
22728 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22729
22730         * marshal.c: applied patch from Aleksey Demakov that fixes
22731         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
22732
22733 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22734
22735         * icall.c: fixed get_location.
22736
22737 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
22738
22739         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
22740         declarations to make it work with older gcc. 
22741
22742         * loader.c (mono_get_method): set signature->pinvoke for native calls
22743
22744 2002-11-20  Dick Porter  <dick@ximian.com>
22745
22746         * threads.c (mono_thread_init): Set the main thread's handle
22747
22748 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
22749
22750         * gc.c: allow compilation without GC support. Changed to match the
22751         mono coding style.
22752
22753 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22754
22755         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
22756
22757 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
22758
22759         * reflection.c: set a public key token on the core assemblies.
22760
22761 2002-11-18  Dick Porter  <dick@ximian.com>
22762
22763         * threads.c: Split out some thread initialisation so that other
22764         files can set the start callback function.
22765
22766         * gc.c: Run finalisers in a separate thread, to avoid stack
22767         overflow.  Fixes bug 31333.
22768
22769         * appdomain.c: Set up GC finalisation thread.
22770
22771         * reflection.c: 
22772         * object.c: 
22773         * domain.c: Use gc.h macros for GC_malloc
22774         
22775 2002-11-15  Dick Porter  <dick@ximian.com>
22776
22777         * threadpool.c: 
22778         * threads.c:
22779         * appdomain.c: Removed mono_runtime_init_with_attach(),
22780         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
22781         merging the extra parameter with the existing function.  Removed
22782         unneeded code in mono_thread_attach().
22783
22784 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
22785
22786         * image.c (mono_image_loaded_by_guid): a method to get loaded
22787         images by guid. 
22788         (load_metadata_ptrs): we store the guid as string.
22789
22790 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
22791
22792         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
22793
22794         * metadata.c (mono_guid_to_string): imported method form Zoltan
22795         Varga (slightly modified)
22796
22797         * assembly.c (mono_assembly_open): load precompiled code
22798
22799         * loader.h (MonoMethod): we store the method token for use in the
22800         aot compiler. 
22801
22802 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22803
22804         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
22805         the hook function called when an assembly is loaded.
22806         
22807         * domain.c: Modified file.
22808         (mono_domain_assembly_load): removed hash table insertion of assemblies.
22809
22810         Fixes bug #33196.
22811
22812 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
22813
22814         * reflection.c: Map PEFileKind to the value expected by the WinNT
22815         image loader. 
22816
22817 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22818
22819         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
22820         Read until the buffer is filled completely.
22821
22822 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22823
22824         * icall.c: implemented MonoType.InternalGetEvent ().
22825
22826 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22827
22828         * appdomain.c: implemented InitAppDomainSetup. Delayed
22829         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
22830         the entry_assembly.
22831
22832         * assembly.c: base_dir is now an absolute path ending with
22833         G_DIR_SEPARATOR.
22834
22835         * icall.c: modified get_location according to the above changes.
22836
22837         * object.c: init AppDomain.SetupInformation for the default domain after
22838         we have the entry assembly.
22839
22840         * domain.c: when unloading a domain, setup = NULL.
22841
22842 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
22843
22844         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
22845
22846 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
22847
22848         * object.h, object.c: introduced mono_object_get_virtual_method ()
22849         to lookup the method invoked on an object when a callvirt is done on
22850         a method.
22851         * icall.c: make MethodInfo::Invoke() always do a virtual call.
22852
22853 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22854
22855         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
22856         current domain when loaded an assembly and failed to load it.
22857
22858         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
22859
22860 2002-10-31  Dick Porter  <dick@ximian.com>
22861
22862         * icall.c: 
22863         * file-io.h: 
22864         * file-io.c: Return the error status in a parameter, as the
22865         GetLastError() value has long since been blown away if we try and
22866         look it up in a subsequent internal call invocation.  Delete the
22867         GetLastError() internal call, because it's useless.
22868
22869 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
22870
22871         * class.[ch]: added cast_class to fix bug 29517
22872
22873 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
22874
22875         * marshal.c: create valid IL code in the filter clause:
22876         the new JIT is less forgiving:-)
22877
22878 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22879
22880         * icall.c: removed get_property internal call.
22881
22882 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
22883
22884         * appdomain.h domain.c: Added an ID to appdomains.
22885         
22886         * threads.c threads.h icall.c: Implement icall
22887         Thread:GetDomainID(), and remove unused icall 
22888         CurrentThreadDomain_internal.
22889
22890 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22891
22892         * icall.c: Don't recurse through the base types in GetConstructor.
22893         Fixes bug #32063. 
22894
22895 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
22896
22897         * mempool.h, mempool.c: added mono_mempool_empty() and
22898         mono_mempool_stats().
22899
22900 2002-10-23  Dick Porter  <dick@ximian.com>
22901
22902         * file-io.c: 
22903         * file-io.h: 
22904         * icall.c: Added MonoIO.GetFileType internal call
22905
22906 2002-10-17  Dick Porter  <dick@ximian.com>
22907
22908         * appdomain.c (mono_runtime_cleanup): Don't signal the async
22909         delegate semaphore before waiting for all threads to finish,
22910         because new threads can also call async delegates.  Fixes bug
22911         32004.
22912
22913         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
22914         of 3 seconds, in case another async job is queued.  (This part is
22915         needed because the bug fix reintroduced the 3s exit lag.)  This
22916         makes the mono_runtime_shutdown flag superfluous.
22917
22918 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22919
22920         * reflection.c: include ehader size in method section headers.
22921         Really check for suplicated modules entries.
22922
22923 2002-10-17  Martin Baulig  <martin@gnome.org>
22924
22925         * debug-mono-symfile.c: Added back support for locals.
22926
22927 2002-10-14  Martin Baulig  <martin@gnome.org>
22928
22929         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
22930         MONO_TYPE_VOID.
22931
22932 2002-10-14  Martin Baulig  <martin@gnome.org>
22933
22934         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
22935         mono_class_get() instead of looking in the class cache. 
22936
22937 2002-10-13  Martin Baulig  <martin@gnome.org>
22938
22939         * debug-mono-symfile.c: Set version number to 28, include the
22940         signature in method names.
22941
22942 2002-10-13  Martin Baulig  <martin@gnome.org>
22943
22944         * debug-mono-symfile.h: Set version number to 27.
22945
22946 2002-10-11  Martin Baulig  <martin@gnome.org>
22947
22948         * gc.c: Don't register/unregister NULL pointers as disappearing links.
22949
22950 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22951
22952         * metadata.c, metadata.h: added helper function to allocate signatures.
22953
22954 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22955
22956         * icall.c: added internal call to get the location of machine.config.
22957
22958 2002-10-08  Martin Baulig  <martin@gnome.org>
22959
22960         * debug-mono-symfile.c: Ignore classes with a pending init for the
22961         moment.
22962
22963 2002-10-03  Dick Porter  <dick@ximian.com>
22964
22965         * threads.c: Freebsd pthread_t is a pointer
22966
22967 2002-10-03  Dick Porter  <dick@ximian.com>
22968
22969         * socket-io.c: Implemented GetHostName_internal
22970
22971 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22972
22973         * mono-config.c:
22974         (mono_config_parse_file): don't leak the text.
22975
22976 2002-10-02  Martin Baulig  <martin@gnome.org>
22977
22978         * debug-mono-symfile.c: Added support for methods.
22979
22980 2002-10-01  Martin Baulig  <martin@gnome.org>
22981
22982         * debug-mono-symfile.c: Don't emit methods and line numbers for
22983         the dynamic symbol file, just write the type table.  We can easily
22984         have an external helper program which creates a symbol file for an
22985         IL file.        
22986
22987 2002-10-01  Dick Porter  <dick@ximian.com>
22988
22989         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
22990         Only add the handle to the cleanup array when we're about to
22991         launch the thread.  Bug 31425 deadlocked when the test was run on
22992         mono under w32.
22993
22994 2002-10-01  Martin Baulig  <martin@gnome.org>
22995
22996         * debug-mono-symfile.c: Added support for properties.
22997
22998 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22999
23000         * reflection.c: unaligned store fix from Mark Crichton
23001         <crichton@gimp.org>.
23002
23003 2002-09-27  Martin Baulig  <martin@gnome.org>
23004
23005         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
23006         New interncall.
23007
23008 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
23009
23010         * assembly.h, assembly.c: use a sane API to hook into the assembly
23011         loading process instead of a useless special-purpouse hack
23012         (ngen needs a hook, too, for example).
23013
23014 2002-09-27  Dick Porter  <dick@ximian.com>
23015
23016         * threads.c (mono_thread_init): Call GetCurrentProcess() so
23017         io-layer can set up some process handle info.  Not needed on w32,
23018         but doesn't hurt either.
23019
23020         * process.c: Pass the program name in the second parameter to
23021         CreateProcess, so the path is searched.  Include the working
23022         directory. Implemented process name, process enumeration, and some
23023         process detail internal calls.
23024         
23025         * icall.c: Added internal calls for process lookup, and some
23026         process details
23027
23028 2002-09-26  Martin Baulig  <martin@gnome.org>
23029
23030         * assembly.c (mono_install_open_assembly_hook): New global
23031         function to install a function to be invoked each time a new
23032         assembly is loaded.
23033         (mono_assembly_open): Run this callback function if set.
23034
23035         * debug-mono-symfile.c: Put back line numbers for the dynamic
23036         symbol file and also record the .il file as source file.  This
23037         allows us to install the temporary symbol file as `file.dbg' just
23038         like a compiler-generated one.
23039
23040 2002-09-26  Nick Zigarovich <nick@chemlab.org>
23041
23042         * Corrected typo in gc.c (BOHEM vs BOEHM).
23043
23044 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23045
23046         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
23047         GetProperties. Also avoid calling g_slist_length in GetProperties and
23048         GetMethods.
23049
23050 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
23051
23052         * reflection.c: avoid unaligned stores (bug spotted by
23053         Mark Crichton  <crichton@gimp.org>).
23054
23055 2002-09-25  Martin Baulig  <martin@gnome.org>
23056
23057         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
23058         instead of guint64 for addresses and added prologue/epilogue info.
23059
23060 2002-09-25  Martin Baulig  <martin@gnome.org>
23061
23062         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
23063         store line number info.  For the dynamic symbol file, we only need
23064         to provide the JIT generated dynamic line number info for the dynamic
23065         symbol file.
23066
23067 2002-09-25  Martin Baulig  <martin@gnome.org>
23068
23069         * debug-mono-symfile.h: Incremented version number.
23070
23071 2002-09-24  Martin Baulig  <martin@gnome.org>
23072
23073         * class.c (mono_debugger_class_init_func): New global function
23074         pointer variable.
23075         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
23076         call it.
23077
23078         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
23079         function.  This is called via the mono_debugger_class_init_func
23080         hook to add all types to the dynamic type table.
23081         (ves_icall_MonoDebugger_GetType): New interncall to get a class
23082         from its metadata token.
23083
23084         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
23085         New interncall for the debugger.
23086
23087 2002-09-24  Nick Drochak <ndrochak@gol.com>
23088
23089         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
23090         before using it in case it is null.
23091         
23092 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
23093
23094         * metadata.c: allow custom modifiers in local var signatures
23095         (bug spotted by Zoltan Varga).
23096
23097 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
23098
23099         * class.c: deal with the <Module> class that may have a NULL vtable.
23100         Eliminate warnings.
23101
23102 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23103
23104         * image.c, image.h: more strong name helpers.
23105         * monosn.c: more work: convert pem keys to cryptoapi format.
23106
23107 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
23108
23109         * string-icalls.c: speedup IndexOf.
23110
23111 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23112
23113         * icall.c: updates from Zoltan.2.Varga@nokia.com.
23114
23115 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23116
23117         * icall.c: cleanup: use mono_object_domain ().
23118
23119 2002-09-23  Martin Baulig  <martin@gnome.org>
23120
23121         * debug-mono-symfile.c: Improved type support.
23122
23123 2002-09-22  Martin Baulig  <martin@gnome.org>
23124
23125         * debug-mono-symfile.c: Added support for reference types and strings.
23126
23127 2002-09-22  Martin Baulig  <martin@gnome.org>
23128
23129         * debug-mono-symfile.c: Started to work on the type table.
23130
23131 2002-09-21  Martin Baulig  <martin@gnome.org>
23132
23133         * debug-mono-symfile.c: Largely reworked the symbol table format.
23134         The symbol table is now incrementally updated each time a new
23135         method is added.  We're now also using our own magic and version
23136         so that you don't need to recompile all your classes if the
23137         dynamic table changes.
23138         (mono_debug_update_mono_symbol_file): Removed.
23139         (mono_debug_symfile_add_method): New function to add a method.
23140
23141 2002-09-21  Martin Baulig  <martin@gnome.org>
23142
23143         * icall.c
23144         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
23145         New interncall.
23146
23147         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
23148         New interncall to get a method from its metadata token.
23149
23150 2002-09-21  Martin Baulig  <martin@gnome.org>
23151
23152         * debug-mono-symfile.c: Create type table.
23153
23154 2002-09-20  Martin Baulig  <martin@gnome.org>
23155
23156         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
23157
23158 2002-09-20  Martin Baulig  <martin@gnome.org>
23159
23160         * debug-mono-symfile.c: Provide information about params and locals.
23161
23162 2002-09-20  Martin Baulig  <martin@gnome.org>
23163
23164         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
23165         New interncall.
23166
23167         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
23168         interncall to get a method from its metadata token.
23169
23170 2002-09-20  Martin Baulig  <martin@gnome.org>
23171
23172         * debug-mono-symfile.c: Added a few checks for method->header
23173         being non-NULL.  This should never happen, but for the moment
23174         let's use a g_warning() rather than a g_assert().
23175
23176 2002-09-19  Mark Crichton  <crichton@gimp.org>
23177
23178         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
23179         even if support for it isn't present.  Added an #ifdef to fix this.
23180
23181         * socket-io.c: Added checks back for Solaris support.
23182
23183 2002-09-19  Martin Baulig  <martin@gnome.org>
23184
23185         * debug-mono-symfile.c (read_string, write_string): Reflect latest
23186         changes in the symbol file format.
23187
23188 2002-09-18  Martin Baulig  <martin@gnome.org>
23189
23190         * debug-mono-symfile.c: Set version number to 21.
23191
23192 2002-09-18  Dick Porter  <dick@ximian.com>
23193
23194         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
23195         on netbsd.  Fixes bug 30051.
23196
23197 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23198
23199         * reflection.c:
23200         (set_version_from_string): little fix.
23201
23202 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23203
23204         * monosn.c, Makefile.am: added strong name utility.
23205         * reflection.h, reflection.c: implemented delayed signing,
23206         locale, version and hash id assembly attributes.
23207
23208 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
23209
23210         * loader.c, metadata.c: load param attributes in signatures.
23211
23212 2002-09-16  Martin Baulig  <martin@gnome.org>
23213
23214         * debug-mono-symfile.c: Added string table with all method names.
23215
23216 2002-09-14  Martin Baulig  <martin@gnome.org>
23217
23218         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
23219         fast method lookup.
23220
23221 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
23222
23223         * reflection.c: record the public key token of referenced assemblies.
23224
23225 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
23226
23227         * image.c, image.h: added functions to get the strong name and the
23228         public key of an assembly.
23229         * pedump.c: use them.
23230
23231 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
23232
23233         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
23234
23235 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
23236
23237         * marshal.c (mono_marshal_get_managed_wrapper): Added
23238         MONO_TYPE_BOOLEAN 
23239
23240 2002-09-11  Martin Baulig  <martin@gnome.org>
23241
23242         * gc.c: Call GC_unregister_disappearing_link() on all links when
23243         finalizing them, this is necessary to aviod a crash in boehm's
23244         finalize handler.
23245
23246 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23247
23248         * gc.c: handle GetTarget for finalized objects spotted and fixed by
23249         nick@chemlab.org.
23250
23251 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
23252
23253         * icall.c: implemented MonoType::Module.
23254         * reflection.c, reflection.h: mono_module_get_object () from
23255         Tomi Pakarinen <tomi.pakarinen@welho.com>.
23256
23257 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
23258
23259         * icall.c: ignore overridden methods in GetMethods ().
23260         Fix for FieldInfo::SetValue().
23261         * object.c: handle float/double in runtime invoke.
23262
23263 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
23264
23265         * object.c: allow a constructor to be called again on an object.
23266
23267 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23268
23269         * class.h, class.c: move field layout code to it's own function and
23270         export it. Get an interface id earlier. Move fields in MonoClass
23271         so they are more cache friendly and align the bitfields.
23272         * loader.c: temporary handle get_param_names() for a runtime method.
23273         * reflection.c, reflection.h: more code to handle runtime creation of
23274         types.
23275
23276 2002-09-09  Martin Baulig  <martin@gnome.org>
23277
23278         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
23279         signature with the pinvoke field being set for the actual call.
23280
23281 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
23282
23283         * icall.c: removed some unused icalls. Start of map of glib charsets
23284         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
23285
23286 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
23287
23288         * debug-helpers.c: break infinite loop (found and fixed by
23289         Holger Arnold <harnold@gmx.de>).
23290
23291 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
23292
23293         * icall.c: target may be null in create_delegate.
23294
23295 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23296
23297         * marshal.c: handle a boolean return type.
23298
23299 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23300
23301         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
23302
23303 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
23304
23305         * gc.c: fix weakreferences.
23306
23307 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
23308
23309         * icall.c: added icall to get default codepage.
23310
23311 2002-09-03  Dick Porter  <dick@ximian.com>
23312
23313         * threads.h: 
23314         * threads.c: Use MonoThread instead of MonoObject where
23315         apropriate.
23316
23317         Store running thread objects in a hash table, so that we have all
23318         the info to hand when waiting for them to finish
23319         (means we don't need OpenThread() any more, so mingw builds should
23320         be fully functional again.)
23321
23322         * verify.c:
23323         * object.h: Added thread ID to MonoThread
23324
23325 2002-09-03  Martin Baulig  <martin@gnome.org>
23326
23327         * icall.c (System.Reflection.Assembly::get_location): New interncall.
23328
23329 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23330
23331         * icall.c: fixed leak in get_temp_path. Thanks lupus.
23332
23333 2002-09-03  Martin Baulig  <martin@gnome.org>
23334
23335         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
23336         argument to store the end address of the disassembled instruction.
23337
23338         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
23339         here from debug-symfile.h.
23340         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
23341         JIT into this struct.
23342         (MonoSymbolFile): Added `char *image_file' field.
23343         (MonoDebugGetMethodFunc): Removed.
23344         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
23345         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
23346         (mono_debug_find_method): New method.
23347
23348         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
23349         create a full symbol file.
23350         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
23351         and static symbol files.
23352         (mono_debug_find_method): The symbol file keeps an internal method hash,
23353         call this to get a MonoDebugMethodInfo from a MonoMethod.
23354
23355         * debug-symfile.[ch]: Removed.
23356
23357 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
23358
23359         * image.c (do_mono_image_open): Remove linker version check.
23360
23361 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
23362
23363         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
23364         wrappers for instance methods.
23365         
23366 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23367
23368         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
23369
23370 2002-08-28  Dick Porter  <dick@ximian.com>
23371
23372         * Makefile.am: Export HOST_CC for w32 builds
23373
23374 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
23375
23376         * file-io.c process.c: MonoString are null terminated, no
23377         need for mono_string_to_utf16() anymore.
23378
23379 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23380
23381         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
23382
23383 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
23384
23385         * icall.c, reflection.h: speedup System.MonoType.
23386
23387 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
23388
23389         * reflection.c: allow null as the value of a string argument in
23390         custom attributes constructors.
23391
23392 2002-08-27  Martin Baulig  <martin@gnome.org>
23393
23394         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
23395         `trampoline_address' field.
23396
23397 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
23398
23399         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
23400         check (fixes bug #29486) 
23401
23402 2002-08-27  Martin Baulig  <martin@gnome.org>
23403
23404         * debug-mono-symfile.c: Changed the file format in a way that allows us
23405         open it read-only and to use a specially malloced area for all the
23406         dynamic data.  We can now also generate a symbol file on-the-fly if we're
23407         debugging IL code and there is no MCS generated symbol file for it.
23408
23409 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
23410
23411         * object.c: added a define for a good string and array
23412         creation speedup (not enabled by default because we need to deal with
23413         the synch stuff).
23414
23415 2002-08-26  Martin Baulig  <martin@gnome.org>
23416
23417         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
23418         function to create a dynamic symbol file.  This is used by the
23419         debugger to create a symbol file for IL code on-the-fly.
23420
23421 2002-08-26  Martin Baulig  <martin@gnome.org>
23422
23423         * loader.c (mono_lookup_pinvoke_call): Include the error message
23424         from g_module_error() in the error message.
23425
23426 2002-08-24  Martin Baulig  <martin@gnome.org>
23427
23428         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
23429         function to update the symbol file.  The symbol file is mmap()ed
23430         writable, but private.  This allows us to install the symbol file
23431         together with the assembly.
23432
23433 2002-08-24  Martin Baulig  <martin@gnome.org>
23434
23435         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
23436         but they can read the new symbol file format which mcs is now creating.
23437
23438         * debug-symfile.c (mono_debug_find_source_location): Moved to
23439         debug-mono-symfile.c; this is now operating on the new symbol file.
23440
23441 2002-08-23  Martin Baulig  <martin@gnome.org>
23442
23443         * debug-helpers.c (mono_method_desc_from_method): New function to get
23444         a MonoMethodDesc from a MonoMethod.
23445
23446 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
23447
23448         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
23449         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
23450
23451 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
23452
23453         * string-icalls.[ch]: make helper methods static.
23454
23455 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23456
23457         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
23458         types to it and to SetValueInternal.
23459
23460         * object.c: Moved handle_enum label to its proper place. This was the
23461         f... bug! ;-)
23462
23463         This time i compiled mcs and gtk-sharp and they both work.
23464
23465 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23466
23467         * icall.c: reverted partially my previous patch until 
23468         object.c:set_value handles enums correcly.
23469
23470 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23471
23472         * icall.c:
23473         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
23474         (ves_icall_System_Environment_get_MachineName): removed warning when
23475         compiling under cygwin.
23476
23477 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
23478
23479         * object.c: fixed field_get_value() for reference types.
23480
23481 2002-08-22  Dick Porter  <dick@ximian.com>
23482
23483         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
23484         Don't free a buffer while it's still needed.  Patch from Jonathan
23485         Liger <Jonathan.liger@wanadoo.fr>
23486
23487 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
23488
23489         * icall.c (ves_icall_System_Environment_get_Platform): Add new
23490         internal call.
23491
23492 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
23493
23494         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
23495         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
23496
23497         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
23498         we call unmanaged code which throws exceptions.
23499
23500 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23501
23502         * appdomain.h: added per-domain entry_assembly.
23503         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
23504         arguments.
23505         * icall.c: Assembly::GetEntryAssembly icall.
23506         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
23507         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
23508
23509 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23510
23511         * appdomain.h, gc.c: added mono_domain_finalize ().
23512
23513 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23514
23515         * object.c:
23516         (mono_print_unhandled_exception): changed g_warning by g_printerr
23517         because g_log has a 1024 characters limit (yeah, i got a big stack
23518         trace). Don't print exception name, that should be in ToString 
23519         returned string.
23520
23521 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23522
23523         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
23524         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
23525
23526 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23527
23528         * object.c:
23529         (mono_print_unhandled_exception): after previous commit, i realized
23530         that MS calls ToString on the exception. I changed this function to
23531         do that. This way we get stack_trace for free.
23532
23533 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23534
23535         * object.c:
23536         (mono_print_unhandled_exception): invoke Message property instead of
23537         getting 'message' field from Exception. Don't allocate memory for
23538         'trace' and 'message' if not needed.
23539
23540 2002-08-18  Dick Porter  <dick@ximian.com>
23541
23542         * unicode.c: Fix asserts to match Encoder.cs checks
23543
23544 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23545
23546         * marshal.c: fix unaligned store issue and a few wrong
23547         opcode argument types.
23548
23549 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23550
23551         * icall.c: added GetUninitializedObjectInternal internal call.
23552
23553 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
23554
23555         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
23556         to the right domain.
23557
23558 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
23559
23560         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
23561
23562         * class.c (class_compute_field_layout): set blittable to false for Strings
23563
23564         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
23565
23566 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23567
23568         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
23569         first chunk of code to create types at runtime. Code to
23570         handle ReflectedType/DeclaringType. Make reflection handles
23571         domain specific.
23572
23573 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
23574
23575         * class.c: set correct name in arrays.
23576
23577 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
23578
23579         * appdomain.c (mono_domain_transfer_object): make it work with
23580         valuetypes. bug fixes.
23581
23582 2002-08-12  Dick Porter  <dick@ximian.com>
23583
23584         * object.h: Rename some parameters to avoid c++ keywords (Patch
23585         from Joseph Wenninger <kde@jowenn.at>)
23586
23587 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
23588
23589         * icall.c: added icall to implement Assembly.GetFile*.
23590
23591 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23592
23593         * reflection.h, reflection.c: code to embed managed resources.
23594
23595 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
23596
23597         * class.c: move all the type size stuff into
23598         class_compute_field_layout().
23599
23600 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23601
23602         * class.c: ensure enums have always the correct instance size.
23603         * unicode.c: remove wrong assert.
23604
23605 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
23606
23607         * assembly.c: fix mem corruption issue.
23608         * image.h, image.c: added mono_image_get_resource () to access
23609         managed resources.
23610         * icall.c: implemented Assembly.EntryPoint property and some
23611         Managed Resources related internalcalls.
23612
23613
23614 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
23615
23616         * image.c, image.h: impemented mono_image_get_entry_point ().
23617         * appdomain.c: use mono_image_get_entry_point.
23618
23619 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23620
23621         * reflection.c: support the object type argument when loading
23622         custom attributes.
23623
23624 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
23625
23626         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
23627         String as return type.
23628
23629 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
23630
23631         * reflection.c: fix encoding of named args for custom attrs to match
23632         the ms implementation. Read them back when instantiating custom
23633         attributes.
23634
23635 2002-08-02  Radek Doulik  <rodo@ximian.com>
23636
23637         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
23638         by Dietmar as quick fix
23639         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
23640         16 as stack size, used on more places as quick fix before Dietmar
23641         will fix it properly
23642
23643 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23644
23645         * object.h, object.c: added accessors for fields and properties.
23646
23647 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23648
23649         * class.c, class.h: made mono_class_get_field_from_name ()
23650         loop on parent types.
23651         Added mono_class_get_property_from_name ().
23652
23653 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
23654
23655         * class.c, class.h: move the code to setup the type vtable in its own
23656         function so that it can be reused also for types created at runtime.
23657         Eliminate the "class" identifier from the header file.
23658         * reflection.c: setup the vtable for enums so that we can create
23659         objects for use in SetConstant ().
23660
23661 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
23662
23663         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
23664         instead of the delegate itself as this pointer (bug #28383)
23665
23666 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
23667
23668         * marshal.c (mono_marshal_get_managed_wrapper): added return type
23669         conversions.
23670
23671 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
23672
23673         * loader.c: don't set the pinvoke bit on icalls.
23674
23675 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
23676
23677         * debug-helpers.c (mono_method_full_name): only print a number to
23678         indicate wrapper type (so that the output is more readable in traces).
23679
23680 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
23681
23682         * class.c (mono_class_init): include method override patch from Paolo
23683
23684 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
23685
23686         * icall.c: fixed GetTypeCode().
23687
23688 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
23689
23690         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
23691         use real delegate invoke function to make it work with multicast
23692         delegates (fix bug# 28291).
23693
23694 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
23695
23696         * object.c: load constant strings.
23697
23698 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
23699
23700         * reflection.c: no magic numbers.
23701         * tabledefs.h: security action enum.
23702
23703 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
23704
23705         * assembly.c: fix possible memory corruption.
23706
23707 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
23708
23709         * reflection.h, reflection.c: added support for linking resources.
23710         * verify.c: check we have an updated corlib.
23711
23712 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
23713
23714         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
23715         string arrays.
23716         (mono_marshal_string_array): null terminate unmanaged string arrays.
23717         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
23718
23719 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
23720
23721         * icall.c: Type.GetType () can now return also types from the
23722         calling assembly.
23723
23724 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
23725
23726         * loader.h, loader.c: stack walking support.
23727         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
23728         GetCallingAssembly.
23729
23730 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
23731
23732         * marshal.c: added optimisations for blittable types 
23733
23734         * class.c (mono_array_class_get): do not set blittable attribute on arrays
23735         (mono_class_setup_mono_type): set blittable attribute for single
23736         and double.
23737
23738         * marshal.c (mono_string_utf8_to_builder): impl.
23739         (mono_string_builder_to_utf8): impl.
23740         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
23741
23742 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
23743
23744         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
23745         (mono_marshal_get_managed_wrapper): impl. byref types
23746
23747 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23748
23749         * icall.c:
23750         (search_method): don't display debug message. 
23751
23752 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
23753
23754         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
23755
23756 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
23757
23758         * appdomain.c: set the missing filename when throwing exception.
23759
23760 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
23761
23762         * metadata.c (mono_type_size): code cleanup
23763         (mono_type_stack_size): removed some test code
23764
23765 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
23766
23767         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
23768         mono_get_exception_file_not_found now.
23769
23770         * exception.c (mono_exception_from_name_two_strings): New version
23771         that will call a constructor with two string arguments. 
23772         (mono_get_exception_file_not_found): New helper routine, used to
23773         report file-not-found errors.
23774
23775 2002-07-20  Dick Porter  <dick@ximian.com>
23776
23777         * process.h:
23778         * process.c: Pass file handles to CreateProcess
23779         
23780         * icall.c:
23781         * file-io.h:
23782         * file-io.c: Implemented CreatePipe
23783
23784 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
23785
23786         * metadata.c (mono_get_param_info): set alignment for value types
23787
23788 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23789
23790         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
23791         Constify mono_domain_assembly_open().
23792         * loader.c: handle null namespace in icalls.
23793
23794 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
23795
23796         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
23797         (emit_str_to_ptr_conv): marshal object as structs
23798
23799         * metadata.c (mono_type_to_unmanaged): marshal object as structs
23800
23801         * marshal.c (mono_marshal_get_runtime_invoke): support value types
23802
23803 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
23804
23805         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
23806         (mono_marshal_get_native_wrapper): we an now return value types
23807
23808 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
23809
23810         * verify.c: more checks implemented.
23811
23812 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
23813
23814         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
23815         (fix bug #27695)
23816         (mono_marshal_get_native_wrapper): allow byref arguments
23817         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
23818         impl. PtrToStringXXX methods
23819         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
23820         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
23821         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
23822         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
23823         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
23824
23825 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23826
23827         * reflection.c: fix buglet in parsing an assembly name.
23828
23829 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
23830
23831         * marshal.c (emit_ptr_to_str_conv): first impl.
23832
23833 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
23834
23835         * object.c, class.h: cache the vtable in the class as suggested by
23836         vargaz@freemail.hu (Zoltan Varga).
23837
23838 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23839
23840         * class.h, loader.c: added mono_field_from_token().
23841         * verify.c: first cut of type checking code.
23842
23843 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
23844
23845         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
23846
23847 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
23848
23849         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
23850         (fix bug #27782)
23851         (mono_marshal_get_remoting_invoke): impl.
23852         (mono_delegate_begin_invoke): impl.
23853         (mono_mb_emit_save_args): impl.
23854         (mono_delegate_end_invoke): impl.
23855         (mono_marshal_get_delegate_begin_invoke):
23856         (mono_marshal_get_delegate_end_invoke):
23857         (mono_marshal_get_delegate_invoke): generate a special name for
23858         those methods (including the signature) and associate them whith
23859         the delegate class. 
23860
23861 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23862
23863         * reflection.[ch]: 
23864         (mono_reflection_type_from_name): now it has a MonoImage parameter
23865         which is used as the default image to search the type in. If the image
23866         is NULL or getting the type from it fails, it defaults to corlib.
23867
23868         * icall.c: changed 1 call to mono_reflection_type_from_name to match
23869         new parameter.
23870
23871 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
23872
23873         * reflection.c: update the parameter table index.
23874
23875 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
23876
23877         * domain.c: don't include the mark byte in the string hash.
23878
23879 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
23880
23881         * icall.cs: icall for Type.GetTypeCode ().
23882         * verify: a couple of fixes and disabled local initialization checks.
23883
23884 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
23885
23886         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
23887
23888         * debug-helpers.c (mono_method_full_name): print the type of the
23889         runtime wrapper
23890
23891         * metadata.c (mono_signature_hash): a hash function for signatures
23892         (mono_signature_hash): better hash algorithm
23893
23894         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
23895
23896         * debug-helpers.c (mono_method_full_name): this can now generate
23897         method names with signatures
23898
23899         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
23900         method dont have this pointers.
23901
23902 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
23903
23904         * reflection.c: fixup typebuilder tokens.
23905         * image.c: fix buglet.
23906         * marshal.h: remove whitespace.
23907         * metadata.h, metadata.c: reinstate code that was removed.
23908         * verify.c: handle catch directives and fix another couple of bugs.
23909
23910 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
23911
23912         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
23913         (mono_marshal_get_native_wrapper): make it comp. with the old code
23914         (mono_marshal_get_native_wrapper): support boolean
23915         (mono_marshal_get_managed_wrapper): support more types
23916
23917 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
23918
23919         * class.c (class_compute_field_layout): compute class->blittable attribute.
23920
23921 2002-07-09  Dick Porter  <dick@ximian.com>
23922
23923         * threads.c: Make the thread cleaning up cope with threads that
23924         call ExitThread()
23925
23926 2002-07-08  Radek Doulik  <rodo@ximian.com>
23927
23928         * reflection.c (method_encode_code): use non-translated values to
23929         compute finally_start, this fixes exception handling on ppc, yay!
23930
23931         * decimal.h (struct signscale): fix endianess
23932
23933 2002-07-07  Radek Doulik  <rodo@ximian.com>
23934
23935         * reflection.c: swap box_val and not val
23936
23937 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
23938
23939         * reflection.c, reflection.h: handle full assembly info in type name.
23940         Handle Type arguments when loading custom attributes.
23941         * icall.c: updated to use new mono_reflection_type_from_name () method.
23942
23943 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23944
23945         * loader.c:
23946         (method_from_memberref): also print assembly name when method not found.
23947
23948 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23949
23950         * icall.c:
23951         (ves_icall_TypeGetProperties): fixed bug #27473. 
23952
23953 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23954
23955         * reflection.c: display image name and token when cannot find the
23956         .ctor for an attribute.
23957
23958 2002-07-05  Martin Baulig  <martin@gnome.org>
23959
23960         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
23961
23962 2002-07-04  Dick Porter  <dick@ximian.com>
23963
23964         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
23965         compile on mingw.  This will cause mingw builds to not wait for
23966         subthreads to terminate after the main thread does.  I've lodged a
23967         bug with the mingw developers for them to wrap OpenThread().
23968
23969 2002-07-03  Dick Porter  <dick@ximian.com>
23970
23971         * threads.c: Store thread IDs instead of handles, because
23972         GetCurrentThread() returns a pseudohandle and therefore stores
23973         useless values.  mono_thread_cleanup() continues checking the
23974         array of threads until it is empty, to cope with subthreads
23975         spawning new threads after the main thread has finished.
23976
23977         * profiler.h:
23978         * profiler.c:
23979         * profiler-private.h: Pass the thread ID to thread profiler
23980         functions, instead of a handle
23981
23982 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
23983
23984         * verify.c: fixes to make it more usable.
23985         * pedump.c: added --verify code to verify IL code in an assembly.
23986
23987 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
23988
23989         * reflection.c: turn errors into warnings to allow compiling corlib.
23990
23991 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
23992
23993         * reflection.c: add special cases to compile corlib.
23994
23995 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
23996
23997         * reflection.c: handle properties with only a set method.
23998
23999 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24000
24001         * opcodes.h: add enum with opcodes in opval order.
24002
24003 2002-07-01  Dick Porter  <dick@ximian.com>
24004         
24005         * object.h:
24006         * object.c (mono_runtime_run_main): Removed unneeded argument
24007
24008 2002-06-28  Martin Baulig  <martin@gnome.org>
24009
24010         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
24011
24012 2002-06-27  Dick Porter  <dick@ximian.com>
24013
24014         * threads.c: Store the handle in both the parent thread and in the
24015         subthread, to minimise the time between starting a new thread and
24016         storing its ID.
24017
24018 2002-06-26  Dick Porter  <dick@ximian.com>
24019
24020         * appdomain.c (mono_runtime_cleanup): Close the socket library
24021         after all the threads have finished, not before
24022
24023 2002-06-26  Martin Baulig  <martin@gnome.org>
24024
24025         * debug-symfile.c (mono_debug_find_source_location): Added
24026         `guint32 *line_number' argument.  If it's not NULL, store the line number
24027         there and return the file name without the line number.
24028
24029 2002-06-25  Dick Porter  <dick@ximian.com>
24030
24031         * icall.c:
24032         * process.h:
24033         * process.c: Process forking and other support functions
24034
24035 2002-06-25  Dick Porter  <dick@ximian.com>
24036
24037         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
24038         things dont happen when the image is closed.
24039         (mono_image_lookup_resource): Walk the resource section looking
24040         for a particular entry
24041
24042         * cil-coff.h: PE resource section decoding
24043
24044 2002-06-25  Dick Porter  <dick@ximian.com>
24045         
24046         * assembly.h:
24047         * assembly.c: 
24048         (mono_assembly_foreach): Accessor functions to walk the list of
24049         loaded assemblies
24050         (mono_assembly_set_main):
24051         (mono_assembly_get_main): Process methods need to know which
24052         assembly is the "main" one
24053
24054         * object.c (mono_runtime_run_main): Record the main assembly
24055
24056         * debug-helpers.c: Fix typo
24057
24058 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
24059
24060         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
24061         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
24062
24063 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24064
24065         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
24066
24067 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
24068
24069         * image.c (do_mono_image_open): Initialize reference count,
24070         otherwise we leak the MonoImage.
24071
24072 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
24073
24074         * reflection.c: small tweak to handle self-hosting.
24075
24076 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
24077
24078         * reflection.c: fix type name parse code.
24079
24080 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24081
24082         * reflection.c: break out of the loop.
24083         * image.c: special case corlib.
24084
24085 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24086
24087         * reflection.c: add all the custom attrs at the end to ensure the
24088         ctors have been properly initialized when the attributes are defined
24089         in the current assembly.
24090
24091 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
24092
24093         * reflection.c: handle correctly multiple-nested types.
24094
24095 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
24096
24097         * row-indexes.h: fix typos.
24098         * reflection.c: adjust for typos and fix method_def_or_ref
24099         encoding in MethodImpl table.
24100
24101 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24102
24103         * reflection.c: fix entry point patching (thanks Serge!).
24104
24105 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
24106
24107         * verify.c: add check for System.Exception
24108
24109 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
24110
24111         * image.c, class.c: minifix for code just c&p'ed.
24112         * reflection.c: warning fix.
24113         * object.h, loader.h, domain.c: load also StringBuilder.
24114
24115 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
24116
24117         * marshal.h, marshal.c: some support code to handle complex marshaling.
24118
24119 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24120
24121         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
24122         Better signatures with vtable error dump.
24123
24124 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
24125
24126         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
24127
24128 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
24129
24130         * icall.c (ves_icall_Type_GetField): impl.
24131
24132 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24133
24134         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
24135         to retrieve a marshal description blob for a field or param.
24136
24137 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
24138
24139         * reflection.h, reflection.c: change order of nested type emission
24140         to avoid table corruption. The NestedTypes table is sorted.
24141         * icall.c: change order of GetConstructor results to workaround mcs bug.
24142
24143 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24144
24145         * reflection.h, reflection.c: handle field and param marshal
24146         information.
24147
24148 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
24149
24150         * icall.c, marshal.c marshal.h: more Marshal class implementation.
24151
24152 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24153
24154         * reflection.c: fix call convention.
24155
24156 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24157
24158         * reflection.h, reflection.c: mono_image_get_memberref_token()
24159         takes a type instead of a class, now. Added
24160         mono_image_get_array_token() to create tokens for the special
24161         multi-dim array methods.
24162
24163 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24164
24165         * assembly.c: handle modules (no assembly table). Split
24166         loading references in its own function.
24167         * class.c: handle moduleref resolution scope.
24168         * image.c, image.h: cache module name in image.
24169
24170 2002-06-07  Martin Baulig  <martin@gnome.org>
24171
24172         * reflection.c (mono_image_get_type_info): Only add a class layout entry
24173         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
24174
24175 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24176
24177         * icall.c: more signature fixes that used uint instead of int.
24178
24179 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24180
24181         * reflection.c: fixed signature of field refs.
24182
24183 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24184
24185         * class.c, reflection.c: handle typerefs of nested types
24186         (both on read and when writing files).
24187
24188 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
24189
24190         * icall.c: fix method signatures that tried to workaround the previous
24191         typo, d'oh!
24192
24193 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
24194
24195         * debug-helpers.c: fix typo.
24196
24197 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
24198
24199         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
24200         rewrote the PE/COFF writing code (our programs are understood by the
24201         ms runtime, now).
24202
24203 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
24204
24205         * gc.c, gc.h, icall.c: weakreference support.
24206
24207 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24208
24209         * Makefile.am, mono-config.c: use $(sysconfdir).
24210
24211 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24212
24213         * icall.c: changed default precision of Double.ToString() to 15.
24214         Fixed memory leak. Unified with Single.ToString.
24215
24216 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
24217
24218         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
24219
24220 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
24221
24222         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
24223         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
24224         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
24225         and myself.
24226
24227 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24228
24229         * debug-symfile.c, sysmath.c: yet more compilation fixes.
24230
24231 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24232
24233         * reflection.c, socket-io.c: more compilation fixes.
24234
24235 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24236
24237         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
24238         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
24239         unicode.c: warning and compiler compatibility fixes.
24240
24241 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24242
24243         * class.h, metadata.c: fixed warnings/compilation errors.
24244
24245 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24246
24247         * Makefile.am, mono-config.c, mono-config.h: configuration file
24248         support routines.
24249         * loader.c, loader.h: make Dll mapping configurable at runtime in the
24250         config file. Export methods to insert and lookup mappings.
24251
24252 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
24253
24254         * reflection.c: handle types and boxed objects in custom attr
24255         constructors.
24256
24257 2002-05-30  Martin Baulig  <martin@gnome.org>
24258
24259         * debug-symfile.c
24260         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
24261
24262 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
24263
24264         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
24265         to lookup the implmap row for a P/Invoke method.
24266         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
24267         P/Invoke method from the runtime on an as needed basis.
24268
24269 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
24270
24271         * metadata.c (mono_metadata_parse_signature): impl.
24272
24273 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24274
24275         * class.c: handle .pack directive.
24276
24277 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
24278
24279         * object.c: initialize static fields with RVA data.
24280
24281 2002-05-25  Martin Baulig  <martin@gnome.org>
24282
24283         * debug-symfile.c
24284         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
24285
24286 2002-05-24  Martin Baulig  <martin@gnome.org>
24287
24288         * debug-symfile.c
24289         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
24290         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
24291         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
24292
24293 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
24294
24295         * object.c: special case string ctros in invoke.
24296         * gc.c: silly whitespace changes.
24297
24298 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
24299
24300         * threadpool.[ch]: impl. a threadpool that can
24301         be used by mint and mono.
24302
24303 2002-05-22  Martin Baulig  <martin@gnome.org>
24304
24305         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
24306         The first argument is now a `MonoReflectionModuleBuilder *', the return
24307         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
24308         `methods' field to get the method builder.  The `token' argument is the
24309         unfixed token.
24310
24311         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
24312         invalid characters instead of g_assert_not_reached()ing.  This seems
24313         to be the behaviour of mscorlib.
24314
24315 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
24316
24317         * object.c (mono_runtime_invoke_array): applied patch from Rachel
24318         Hestilow to fix bug #25104
24319
24320 2002-05-21  Martin Baulig  <martin@gnome.org>
24321
24322         * debug-symfile.c (mono_debug_find_source_location): New function.
24323         Looks up an IL offset in the line number table and returns the source
24324         location as a string.
24325
24326 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24327
24328         * icall.c:
24329         (mono_double_ToStringImpl): changed %f by %g until we have something
24330         better.
24331
24332 2002-05-21  Nick Drochak  <ndrochak@gol.com>
24333
24334         * icall.c : Use different name for Math.Pow's icall.  Needed to check
24335         parameters first in C#.
24336
24337 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24338
24339         * icall.c, reflection.h: added icall to get info about an event.
24340
24341 2002-05-20  Radek Doulik  <rodo@ximian.com>
24342
24343         * object.c (mono_value_box): don't use memcpy for boxing on BIG
24344         endian
24345         (mono_value_box): don't use memcpy for small sizes on
24346         architectures with unaligned access
24347
24348 2002-05-20  Martin Baulig  <martin@gnome.org>
24349
24350         * reflection.c (mono_reflection_setup_internal_class): Don't crash
24351         if `tb->parent == NULL'.
24352         (mono_reflection_create_internal_class): New function.  This is
24353         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
24354         for enum types.
24355
24356         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
24357         New interncall.
24358
24359 2002-05-19  Martin Baulig  <martin@gnome.org>
24360
24361         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
24362         argument to get the length, don't default to the array length.
24363
24364 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
24365
24366         * assembly.c (mono_assembly_setrootdir): New function used to
24367         override the MONO_ASSEMBLIES directory.
24368
24369 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24370
24371         * icall.c: ValueType_GetHashCode() initialize local var.
24372
24373 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24374
24375         * reflection.c: sort custom attributes table.
24376
24377 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24378
24379         * reflection.c: support named args in custom attributes (write support).
24380
24381 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
24382
24383         * reflection.c: fix finally position calculation.
24384
24385 2002-05-15  Radek Doulik  <rodo@ximian.com>
24386
24387         * reflection.c: fixed endianess at many places
24388
24389         * icall.c (ves_icall_InitializeArray): comment out debug msg
24390
24391 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
24392
24393         * object.c (mono_unhandled_exception): new function to handle
24394         unhandled exceptions.
24395         (mono_unhandled_exception): call the UnhandledException event.
24396         (mono_runtime_delegate_invoke): impl.
24397
24398 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
24399
24400         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
24401         returns the RVA, not the direct pointer to the data. Handle the case
24402         when the class size is fixed.
24403
24404 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
24405
24406         * reflection.c: fix some endianess issues.
24407
24408 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
24409
24410         * object.c (mono_runtime_invoke): is now able to catch exceptions.
24411
24412         * threads.c (mono_thread_init): added a callback which is invoked
24413         at thread start.
24414
24415 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
24416         
24417         * icall.c: make GetHashCode return non-negative values.
24418
24419 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
24420
24421         * object.c, icall.c, gc.c: revert to address-based hashcode.
24422
24423 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
24424
24425         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
24426
24427 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24428
24429         * icall.c, class.c: special case <Module>.
24430
24431 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
24432
24433         * icall.c: fix bug in GetNow().
24434
24435 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
24436
24437         * object.c (mono_runtime_class_init): make sure that we call all
24438         static class constructors.
24439
24440 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24441
24442         * reflection.c: sort methodsemantics table.
24443
24444 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
24445
24446         * reflection.h, reflection.c: honour init locals setting.
24447
24448 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
24449
24450         * icall.c: copied Double ToStringImpl for Single ToStringImpl
24451
24452 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
24453
24454         * reflection.c: support ContructorBuilders in attribute blob creation.
24455
24456 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24457
24458         * reflection.c: some changes to build a binary that can be run
24459         directly in windows.
24460
24461 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
24462
24463         * loader.c: print a big message when an icall can't be found.
24464
24465 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24466
24467         * string-icalls.c: fix bug 24248.
24468
24469 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
24470
24471         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
24472         icall.c, reflection.h: separate assembly loading by pathname and by
24473         assembly name. Use the MONO_PATH env var to search for assemblies.
24474
24475 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
24476
24477         * assembly.c, image.h: add some support for assemblies
24478         with multiple modules.
24479         * class.c, class.h: export mono_class_from_typeref().
24480         * loader.c: remove duplicated code and use mono_class_from_typeref(),
24481         instead.
24482
24483 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24484
24485         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
24486         documentation says (the ECMA one is correct).
24487
24488 2002-05-02  Dick Porter  <dick@ximian.com>
24489
24490         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
24491         Don't name the synchronisation mutex.
24492
24493 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
24494
24495         * rand.c
24496         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
24497         Make the prototypes match.
24498         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
24499         Same.
24500
24501         * icall.c
24502         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
24503         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
24504         all systems have tm.tm_zone, so use strftime() with %Z to print
24505         the timezone abreviation into a temp string.
24506
24507         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
24508         rather than mono_array_addr() on a MonoString on Big Endian
24509         machines.
24510
24511 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
24512
24513         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
24514         fix bug 24041
24515
24516 2002-04-30  Dick Porter  <dick@ximian.com>
24517
24518         * socket-io.c: Cope with SOCKET being an integer rather than a
24519         pointer now.
24520
24521         * threads.c: Added Thread_free_internal, to deal with thread
24522         handle cleanup.  Moved calls to handle_store() and handle_remove()
24523         to start_wrapper(), so each can only be called once.  Allocate
24524         synchronisation blocks with GC_malloc(), and use GC finalisation
24525         to close the handles.
24526
24527         * icall.c: added System.Threading.Thread::Thread_free_internal
24528
24529 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
24530
24531         * icall.c: support Environment.Exit, CommandLineArgs().
24532
24533 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
24534
24535         * object.c, object.h: added mono_runtime_run_main () and
24536         mono_runtime_get_main_args () for use in System.Environment.
24537
24538 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24539
24540         * gc.c: fix thinko, enable actual finalization since the jit is now
24541         fixed.
24542
24543 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24544
24545         * gc.c, object.c: take into account that an object may be offset wrt the address
24546         returned by GC_malloc().
24547
24548 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
24549
24550         * image.c: handle files without entries in the assembly table (modules).
24551
24552 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
24553
24554         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
24555         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
24556         allowed to be null when it's System.Object class setup.
24557
24558 2002-04-27  Martin Baulig  <martin@gnome.org>
24559
24560         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
24561         if `tb->parent == NULL' rather than crashing.
24562
24563 2002-04-28  Nick Drochak  <ndrochak@gol.com>
24564
24565         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
24566         calling acos() where asin() should have been called.
24567
24568 2002-04-26  Martin Baulig  <martin@gnome.org>
24569
24570         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
24571         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
24572         there's a subdirectory called `System', but we don't want to read that
24573         subdirectory as an assembly.
24574
24575 2002-04-25  Martin Baulig  <martin@gnome.org>
24576
24577         * debug-symfile.c: Reflect latest MonoString changes.
24578
24579 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24580
24581         * rand.c, rand.h: instance method icalls need to have an explicit
24582         this pointer as first argument in the C implementation.
24583
24584 2002-04-25  Nick Drochak <ndrochak@gol.com>
24585
24586         * icall.c: Fix typo in map for GetNonZeroBytes
24587
24588 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
24589
24590         * string-icalls.c : String does now passes unit tests without any 
24591         errors, the following changes has been made:
24592         
24593         Implemented replace methods.
24594         Renaming of methods to (try) follow the standard.
24595         Fixed compare ordinal
24596         Made all memory allocated directly to function instead of via icall function.
24597         Small performance fix in is_in_array function
24598                         
24599  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
24600
24601         c (mono_string_Internal_ctor_charp_int_int):
24602         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
24603         sindex < 0, throw ArgumentOutOfRangeException instead of
24604         ArgumentNullException.
24605
24606         Added new check for length == 0, however
24607         I need to make it return String.Empty from the C code.
24608         
24609         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
24610         that calculate the length for us here.
24611         
24612         (mono_string_Internal_ctor_sbytep_int_int): Replaced
24613         mono_string_new_utf16 with mono_string_new, since value is utf8.
24614
24615 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24616
24617         * object.c: register the object for finalization if needed.
24618         Allocate one more char in the string for the terminating 0 char.
24619
24620 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
24621
24622         * class.c, class.h, image.c: check if a type implemenst a destructor.
24623         Use the proper key for array class lookups.
24624         * icall.c: register the icalls in the System.GC class.
24625         * gc.c, gc.h: GC-related functions and icalls.
24626
24627 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24628
24629         * icall.c:
24630         * socket-io.c:
24631         * unicode.c: free some strings gotten from mono_string_to_utf8 and
24632         changed a couple of free () by g_free ().
24633
24634         * decimal.c: one-liner in the comments for decimal2string ().
24635
24636 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
24637
24638         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
24639
24640 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
24641
24642         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
24643         * object.c (mono_runtime_invoke_array) : handle null in params
24644
24645 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
24646
24647         * string-icalls.c: fixed bug in split (one off bug)
24648
24649 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
24650
24651         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
24652         * icalls.c: added String::Equals as internal method
24653
24654 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
24655
24656         * threads.c: fixed bug in the double interlocked functions
24657
24658 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
24659
24660         * threads.c: implemented all of the new interlocked icalls.
24661         * string-icalls.c: fix a bug in insert.
24662         * icalls.c: added the icalls for interlocked, removed old string functions.
24663         
24664 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24665
24666         * loader.c: fix off-by-one error when reading argument names.
24667
24668 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24669
24670         * profiler.c: win32 counter implementation (untested).
24671         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
24672         (the latter needs testing and more complete impl. from win32 folks).
24673
24674 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
24675
24676         * object.c: mono_array_new_full workaround mono_array_class_get
24677         problem.
24678
24679 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
24680
24681         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
24682         * object.h (mono_string_chars): Changed casting type.
24683
24684 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
24685
24686         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
24687                            method signatures to use gunichar2 instead of gint16.
24688
24689 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
24690
24691         * object.h, object.c: domain-specific versions of mono_object_new and
24692         mono_array_new.
24693
24694 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
24695
24696         * object.c: changed String layout
24697
24698         * string-icalls.c (mono_string_Internal_ctor_chara): added
24699         internal string constructors.
24700
24701 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
24702
24703         * threads.c: pass 'this' to the thread start routine.
24704
24705 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24706
24707         * string-icalls.c: fix IndexOf and LastIndexOf. Now
24708         InternalCompareStr don't call twice mono_string_cmp_char for the last
24709         character. Improved performance in mono_string_cmp_char.
24710
24711 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
24712
24713         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
24714         code into its own library: libmonoruntime.
24715
24716 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
24717
24718         * object.h, object.c: changed array format so that szarrays do not
24719         require a bounds structure.
24720         * icall.c, appdomain.c: support for new szarray format.
24721
24722 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
24723
24724         * metadata.c: compare also the retuns type when comparing signatures:
24725         we didn't do this as an optimization since really overloaded methods
24726         must differ also in the arguments, but this doesn't work with
24727         low-level IL code (or when using explicit conversion operators: see
24728         bug#23498 for an example).
24729
24730 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
24731
24732         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
24733
24734 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
24735
24736         * icall.c: make MonoType::GetElementType its own icall.
24737
24738 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24739
24740         * icall.c: remove MonoMethod_get_Name().
24741         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
24742         object.
24743
24744 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
24745
24746         * string-icalls.c: optimized a few methods.
24747
24748 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
24749
24750         * icall.c: added all new string internal calls
24751         * string-icalls.c: added, new string internal call implementation.
24752         * object.c: added mono_string_new_size for allocating a string a size
24753
24754 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
24755
24756         * object.c (mono_object_isinst): use the same code as in the
24757         optimized x86 version.
24758
24759 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24760
24761         * profiler.c: TSC-based timer code (faster and more accurate).
24762         Not hooked up in configure, yet (set USE_X86TSC to 1).
24763
24764 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
24765
24766         * profiler.c, profiler.h: track time spent compiling methods.
24767         * threads.c: track thread creation/destruction.
24768
24769 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
24770
24771         * profiler.c, profiler.h, profiler-private.h: profiling interface
24772         and sample implementation. Moved here so that it can be used also by
24773         the jit.
24774
24775 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
24776
24777         * reflection.c, reflection.h: keep types and other handles separate in
24778         the hash tables for referred tokens. Add guid for modules.
24779
24780 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
24781
24782         * assembly.c: fix bugs found with valgrind.
24783         * metadata.h, metadata.c: added mono_metadata_guid_heap().
24784
24785 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
24786
24787         * threads: added icall support for getting current domain for
24788                    the thread.
24789  
24790 2002-04-13  Martin Baulig  <martin@gnome.org>
24791
24792         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
24793         (MonoDebugVarInfo): Added `index' field for register based addresses.
24794         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
24795         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
24796         `MonoDebugVarInfo *params' and `guint32 this_offset' with
24797         `MonoDebugVarInfo *this_var'.
24798
24799         * debug-symfile.c (relocate_variable): New static function to write
24800         a location description for a local variable or method parameter.
24801
24802 2002-04-12  Martin Baulig  <martin@gnome.org>
24803
24804         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
24805         stack offset and begin/end scope address of a local variable.
24806         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
24807         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
24808         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
24809
24810         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
24811         Added new relocation types for start/end scope of a local variable.
24812
24813 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24814
24815         * object.h: add mono_object_domain() macro.
24816         * reflection.c: handle typespecs.
24817         * icall.c: MonoMethod::get_Name() implementation.
24818
24819 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24820
24821         * icall.c: String::GetHashCode() icall implementation.
24822
24823 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24824
24825         * icall.c: String::IndexOfAny icall.
24826         * object.c, object.h: make array->max_length more useful.
24827         Intrduced mono_object_class() and mono_string_length() macros.
24828
24829 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24830
24831         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
24832         instead of g_unichar_isdigit.
24833
24834 2002-04-11  Nick Drochak  <ndrochak@gol.com>
24835
24836         * icall.c: Implement a simple Double.ToString().
24837
24838 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24839
24840         * appdomain.h: only io-layer.h is supposed to be included.
24841         * icall.c: explicitly import environ. Fix warning.
24842
24843 2002-04-10  Nick Drochak  <ndrochak@gol.com>
24844
24845         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
24846                 return true even if it's not Daylight Savings time.
24847                 Only return false for the case where the function isn't
24848                 implemented for a plaform (read Windows).
24849
24850 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24851
24852         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
24853         data with a mutex.
24854
24855 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
24856
24857         * mempool.c (mono_mempool_alloc): only use g_malloc when
24858         absolutely necessary.
24859
24860 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
24861
24862         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
24863
24864         * class.c (mono_class_vtable): use domain mempool to allocate vtable
24865         (mono_class_proxy_vtable): use domain mempool
24866
24867 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
24868
24869         * appdomain.h, appdomain.c: split initialization that requires the
24870         execution engine support into mono_runtime_init().
24871
24872 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
24873
24874         * class.c (mono_class_init): don't include vtable inside MonoClass
24875         to save some memory, gather some statistics.
24876         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
24877
24878 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
24879
24880         * icall.c: internalcall implementation for ValueType.Equals().
24881
24882 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
24883
24884         * object.c (mono_message_init): moved 
24885         (mono_runtime_exec_main): new arch. independent impl.
24886         (mono_runtime_invoke_array): new method - like
24887         mono_runtime_invoke, but you can pass an array of objects.
24888         (mono_remoting_invoke): new arch. independent impl.
24889         (mono_message_invoke): new arch. independent impl.
24890         (mono_runtime_class_init): new arch. independent impl.
24891         (mono_runtime_object_init): new arch. independent impl.
24892
24893 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24894
24895         * metadata.c, object.c, reflection.c: documented the exported
24896         functions.
24897
24898 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
24899
24900         * icall.c: simpler code to pass the assembly builder data to corlib.
24901         Implement GetNestedTypes() internalcall.
24902
24903 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
24904
24905         * class.c: warn if a type can't be loaded.
24906
24907 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
24908
24909         * image.h: typedef MonoImageOpenStatus
24910         * types.h: removed unused file
24911         
24912 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
24913
24914         * icall.c: Enum_ToObject accepts enum value arguments.
24915
24916 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
24917
24918         * class.c: move initialization of properties, events and nested
24919         classes, so that they happen for interfaces, too.
24920
24921 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24922
24923         * icall.c: cleanup some ugly casts in Array_SetValue*.
24924
24925 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24926
24927         * icall.c: the values array fro enums is of the correct type, now.
24928         Implement (correctly) getFullName instead of assQualifiedName for
24929         MonoType.
24930         * reflection.h, reflection.c: added mono_type_get_name ().
24931
24932 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24933
24934         * assembly.c, image.h: for each MonoImage, record from wich assembly
24935         it was loaded.
24936         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
24937         Make Type.Assembly work.
24938
24939 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
24940
24941         * debug-symfile.h: use char* instead of gpointer to avoid
24942         unnecessary casts.
24943
24944         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
24945
24946         * icall.c (ves_icall_InternalExecute): impl. FielSetter
24947         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
24948
24949 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
24950
24951         * icall.c (mono_message_init): impl. (code cleanup)
24952         (ves_icall_InternalExecute): impl. FieldGetter
24953
24954         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
24955         defined we call all (non-static)methods through the vtable. 
24956
24957 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
24958
24959         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
24960         finalizer even though the memory is still referenced (and the chunk of
24961         memory is not freed).
24962
24963 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
24964
24965         * assembly.c: fix brokeness.
24966
24967 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
24968
24969         * class.c: kill some warnings. Check explicit interface method
24970         implementation also without considering the namespace.
24971         Load also literal strings in static class data.
24972
24973 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
24974
24975         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
24976         (default_assembly_name_resolver): Make the resolver take the
24977         "base" directory where the assembly was originally defined, so we
24978         can load DLLs that are in the same directory as the assembly that
24979         is being referenced.
24980
24981 2002-03-28  Dick Porter  <dick@ximian.com>
24982
24983         * file-io.h: 
24984         * file-io.c:
24985         * socket-io.c: 
24986         * unicode.h: 
24987         * unicode.c: Warning cleanups
24988
24989 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
24990
24991         * object.h, reflection.h: use the correct type instead of MonoObject.
24992
24993 2002-03-28  Martin Baulig  <martin@gnome.org>
24994
24995         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
24996         (mono_debug_update_symbol_file): Initialize classes if necessary.
24997
24998 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
24999
25000         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
25001         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
25002
25003 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
25004
25005         * assembly.h: fix function prototype.
25006         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
25007         * mono-endian.h: use const cast.
25008
25009 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
25010
25011         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
25012
25013 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
25014
25015         * loader.c: don't assert when a typeref can't be loaded, give
25016         a chance to the runtime to trow an exception instead.
25017         * loader.h: fix warning.
25018
25019 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
25020
25021         * class.c (mono_class_proxy_vtable): added proxy support
25022
25023 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
25024
25025         * icall.c: removed last of PAL calls, added System.Environment
25026         * file-io.h, file-io.c: MonoIO implementation
25027         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
25028
25029 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
25030
25031         * appdomain.c: do not use the byte marker in ldstr table lookup.
25032         * debug-helpers.c: allow two ':' to separate class and method name.
25033         * object.c: allocate arrays bounds with the GC, too.
25034         * verify: add a few more checks.
25035
25036 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
25037
25038         * reflection.c: output also literal strings. Allocate parameter data
25039         with GC_malloc() (thanks, Martin, for catching this!).
25040
25041 2002-03-26  Martin Baulig  <martin@gnome.org>
25042
25043         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
25044         include the `this' offset in the `param_offsets'.
25045
25046 2002-03-25  Martin Baulig  <martin@gnome.org>
25047
25048         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
25049         mono_debug_get_class() function to get the classes. Added new
25050         relocation types for arrays and strings.
25051         (mono_debug_get_class): New static function to search in all
25052         referenced assemblies for a metadata token.
25053
25054         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
25055
25056 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25057
25058         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
25059         hold gc-allocated objects. Make the string heap a stream like the
25060         others. Removed duplicated code when writing stream info.
25061         Added asserts to catch possible buffer overflows. Set the sorted map
25062         for tables that need sorting. Added some documentation.
25063
25064 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
25065
25066         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
25067         for interned strings and vtables.
25068
25069 2002-03-24  Martin Baulig  <martin@gnome.org>
25070
25071         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
25072         it in the array since it was created with g_slist_prepend().
25073
25074 2002-03-24  Martin Baulig  <martin@gnome.org>
25075
25076         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
25077         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
25078         (mono_debug_method_from_token): Renamed to
25079         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
25080         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
25081
25082         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
25083         relocation types.
25084
25085         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
25086
25087 2002-03-24  Martin Baulig  <martin@gnome.org>
25088
25089         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
25090         (mono_debug_method_from_token): New func.
25091
25092         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
25093         New interncall, calls mono_debug_local_type_from_signature().
25094         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
25095         calls mono_debug_method_from_token().
25096
25097 2002-03-23  Martin Baulig  <martin@gnome.org>
25098
25099         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
25100         specifies the number of bytes to be converted, not the array size.
25101         Return the number of chars, not the number of bytes.
25102         (ves_icall_iconv_get_chars): The `byteCount' argument
25103         specifies the number of bytes to be converted, not the array size.
25104
25105 2002-03-23  Martin Baulig  <martin@gnome.org>
25106
25107         * reflection.h (MonoReflectionSigHelper): New type.
25108
25109         * reflection.c (mono_reflection_sighelper_get_signature_local),
25110         (mono_reflection_sighelper_get_signature_local): New functions.
25111
25112         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
25113         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
25114         interncalls.
25115
25116 2002-03-23  Martin Baulig  <martin@gnome.org>
25117
25118         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
25119         is_writeable is set.
25120         (mono_raw_buffer_update): New function to write the modified map
25121         back to disk.
25122
25123         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
25124
25125         * debug-symfile.c (mono_debug_update_symbol_file): Call
25126         mono_raw_buffer_update() when done writing.
25127
25128 2002-03-23  Martin Baulig  <martin@gnome.org>
25129
25130         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
25131
25132         * debug-symfile.c: Added support for arguments and local variables.
25133
25134 2002-03-23  Dick Porter  <dick@ximian.com>
25135
25136         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
25137         protected by ifdefs, hence breaking the w32 build.
25138
25139 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25140
25141         * object.c: implement is_interned() the right way.
25142
25143 2002-03-21  Martin Baulig  <martin@gnome.org>
25144
25145         * debug-symfile.[ch]: New files to handle debugging information
25146         files. There's also support to dynamically update these symbol
25147         files to include machine dependent information.
25148
25149 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
25150
25151         * threads.c (mono_thread_create): new function to create thread
25152         from C
25153
25154 2002-03-20  Martin Baulig  <martin@gnome.org>
25155
25156         * icall.c (ves_icall_InternalInvoke): Create a new object if the
25157         method is a constructor.
25158         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
25159         points to ves_icall_InternalInvoke().
25160
25161 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
25162
25163         * file-io.c: Flush shouldn't throw exceptions.
25164
25165 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
25166
25167         * file-io.c: FileStream flush support; FileSetLength now
25168         restores file pointer.
25169
25170 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
25171
25172         * class.c: set image for pointer classes.
25173
25174 2002/03/19  Nick Drochak <ndrochak@gol.com>
25175
25176         * sysmath.c: Forgot one.
25177
25178 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
25179
25180         * sysmath.c: Avoid redefining existing names.
25181
25182 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
25183
25184         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
25185         handled by runtime as icall rather than dllimport from libm.so
25186         * file-io.c, file-io.h: fixed handle argument type.
25187
25188 2002-03-18  Dick Porter  <dick@ximian.com>
25189
25190         * reflection.c (mono_image_get_type_info): rename interface to
25191         iface, because of "#define interface struct" on windows.
25192
25193 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
25194
25195         * class.c, class.h: rename and export mono_ptr_class_get().
25196         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
25197         * reflection.c, reflection.h, icall.c: better/saner type name
25198         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
25199         method signatures.
25200
25201 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
25202
25203         * class.c (mono_class_init): removed hardcoded GHC_SLOT
25204
25205         * icall.c (ves_icall_InternalInvoke): impl.
25206
25207 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25208
25209         * reflection.c: output the interface map table, too.
25210
25211 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
25212
25213         * class.c (class_compute_field_layout): separate computation of 
25214         static field layout
25215
25216 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
25217
25218         * icall.c: added System.Buffer support.
25219         * file-io.c: moved file icalls from PAL to FileStream.
25220
25221 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
25222
25223         * icall.c (ves_icall_System_Object_GetHashCode): impl.
25224
25225 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
25226
25227         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
25228
25229 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25230
25231         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
25232
25233 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
25234
25235         * debug-helpers.{c,h}: moved here from monograph some useful functions
25236         to locate a method by name/signature in a class or image. Included
25237         also a small and flexible IL disassembler.
25238
25239 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25240
25241         * reflection.c: fixup tokens in methods with small header size, too.
25242
25243 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
25244
25245         * object.c (mono_string_to_utf8): remove assert(!error), instead
25246         print a warning. 
25247
25248 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
25249
25250         * icall.c: update to the new mono_Array_class_get interface.
25251
25252 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
25253
25254         * appdomain.c, object.c: Boehm-GC enable.
25255         * icall.c: make get_data_chunk() support split data requests.
25256         Ensure a class is initialized in more cases. Return only the first
25257         property found in GetProperties() or the compiler gets confused. 
25258         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
25259         * reflection.h, reflection.c: add fixup mechanism for field and method
25260         tokens. Initialize assembly->typeref in a single place. Output
25261         properties after events. Support custom attributes for events, too.
25262         Typo fix for paramter custom attrs.
25263
25264 2002-03-07  Martin Baulig  <martin@gnome.org>
25265
25266         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
25267
25268 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
25269
25270         * class.c (mono_array_class_get): fix. for multi. dim. arrays
25271
25272 2002-03-06  Martin Baulig  <martin@gnome.org>
25273
25274         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
25275         non-zero lower bounds. See testcases #F10-#F13.
25276
25277 2002-03-05  Martin Baulig  <martin@gnome.org>
25278
25279         * exception.c (mono_get_exception_argument_out_of_range): New exception.
25280
25281         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
25282         ves_icall_System_Array_GetValue(), only calculate the absolute array position
25283         here.
25284         (ves_icall_System_Array_SetValue): Likewise.
25285         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
25286         as argument and does the actual work. This function is used when copying a
25287         multi-dimensional array.
25288         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
25289         now do all the widening conversions of value types.
25290         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
25291
25292 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25293
25294         * class.c: remove some magic numbers and use the smbolic names,
25295         instead. Added init_events() to load event info at class init time.
25296         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
25297         and mono_metadata_methods_from_event().
25298         * reflection.h, reflection.c: added support for writing out the evnets
25299         related information.
25300
25301 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
25302
25303         * reflection.h, icall.c: use a different method (GetInterfaces)
25304         to gather interface info and add isbyref, isprimitive and
25305         ispointer to the ves_icall_get_type_info() return value.
25306
25307 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
25308
25309         * class.h: stared adding support for events.
25310         * icall.c: split find_members implementation. Added debug icall to get
25311         the address of an object.
25312         * reflection.c: handle TypeBuilders in mono_type_get_object().
25313
25314 2002-03-01  Martin Baulig  <martin@gnome.org>
25315
25316         * icall.c (ves_icall_System_Array_GetLength): This must throw an
25317         ArgumentOutOfRangeException(), not an ArgumentException().
25318         (ves_icall_System_Array_GetLowerBound): Likewise.
25319         (ves_icall_System_Array_GetValue): Improved argument checking.
25320         (ves_icall_System_Array_SetValue): Improved argument checking.
25321
25322 2002-03-01  Martin Baulig  <martin@gnome.org>
25323
25324         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
25325         called with invalid arguments rather than just dying with g_assert().
25326         (ves_icall_System_Array_SetValue): Likewise.
25327         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
25328         raise a NotImplementedException instead.
25329         (ves_icall_System_Array_GetLength): Added argument checking.
25330         (ves_icall_System_Array_GetLowerBound): Added argument checking.
25331
25332 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
25333
25334         * object.h (mono_assert): new macros mono_assert and
25335         mono_assert_not_reached
25336
25337 2002-02-28  Martin Baulig  <martin@gnome.org>
25338
25339         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
25340         and "System::String::IsInterned" to "System::String::_IsInterned".
25341
25342 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
25343
25344         * icall.c: remove hacks for typebuilder. Added icall to create a
25345         modified type from a tybebuilder.
25346         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
25347         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
25348         to create a backing MonoClass for a TypeBuilder.
25349
25350 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25351
25352         * class.c, class.h: more refactoring of class init.
25353         Export mono_class_setup_mono_type() and mono_class_setup_parent().
25354
25355 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
25356
25357         * marshal.c, marshal.h: start of marshaling interface.
25358
25359 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
25360
25361         * icall.c: fix order in assembly qualified name icall.
25362
25363 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
25364
25365         * class.c: do not free str, since we store it in the hash table.
25366         * reflection.h: add label field to MonoILExceptionInfo.
25367         * reflection.c: handle references to more than one assembly. Handle
25368         case when there isn't a module created in the assembly.
25369
25370 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
25371
25372         * class.c: Fix typo. Start refactoring of class init code.
25373
25374 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
25375
25376         * appdomain.c: exit with 1 on error.
25377         * class.c: we already have the name in MonoClassField.
25378         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
25379         MonoStreamHeader instead of an offset of image->raw_metadata.
25380
25381 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
25382
25383         * appdomain.c (mono_init): Be even more descriptive about the error.
25384
25385 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
25386
25387         * appdomain.c: give the user an informative message when corlib can't
25388         be loaded.
25389
25390 2002-02-26  Martin Baulig  <martin@gnome.org>
25391
25392         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
25393         New icall to get the time zone data.
25394
25395 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25396
25397         * reflection.c: set virtual and raw size of section correctly.
25398         * threads.c: transfer domain information to newly created threads.
25399
25400 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
25401
25402         * class.c: when instancing a class in a domain, load the default
25403         vaules for static fields from the constant table. Fix System.Enum to
25404         not be an enum.
25405         * icall.c: implement Object::GetType() internalcall. Implemented
25406         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
25407         Fixed checking of binding flags in find_members().
25408         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
25409         * reflection.c: handle enumerations when writing to the constant
25410         table. Use a different object cache for types.
25411
25412
25413 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
25414
25415         * object.c (mono_object_isinst): fix for arrays
25416
25417         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
25418
25419 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
25420
25421         * object.c: don't use mprotect ()  and fix intern pool hash table
25422         lookup for big endian systems.
25423
25424 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25425
25426         * icall.c: change type_is_subtype_of () signature.
25427
25428 2002-02-21  Mark Crichton  <crichton@gimp.org>
25429
25430         * rand.c, rand.h: Added random number generator for
25431         System.Security.Cryptography classes.
25432
25433         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
25434
25435         * icall.c: Added System.Security.Cryptography calls.
25436
25437 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
25438
25439         * class.c, icall.c, metadata.c: better support for pointer types.
25440         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
25441         * reflection.c: Add support for getting custom attrs for properties
25442         and simplify some code.
25443
25444 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25445
25446         * icall.c: change getToken () and add custom attribute GetBlob()helper
25447         method.
25448         * reflection.h: add custom attrs array to the reflection builder structures.
25449         * reflection.c: encode and emit custom attributes for all the relevant
25450         reflection objects. Cache fieldref and methodref tokens. Change
25451         mono_image_create_token() interface to take a MonoDynamicAssembly.
25452         More complete custom attributes decoder. Load custom attributes for
25453         Assembly, Field, Method and Constructor objects, too. Make the
25454         returned array an Attribute[] one, not object[]. Added
25455         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
25456         custom attribute constructor.
25457
25458 2002-02-20  Dick Porter  <dick@ximian.com>
25459
25460         * icall.c:
25461         * rawbuffer.c:
25462         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
25463         problem code out for now).
25464
25465 2002-02-19  Radek Doulik  <rodo@ximian.com>
25466
25467         * object.c (mono_ldstr): use hash table to avoid multiple swapping
25468
25469 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
25470
25471         * icall.c: register the GetCustomAttributes method.
25472         * object.c, object.h: add mono_string_new_len ().
25473         * reflection.h, reflection.c: added mono_runtime_invoke(),
25474         mono_install_runtime_invoke(). Added
25475         mono_reflection_get_custom_attrs () to load custom attributes and
25476         create the attribute objects.
25477
25478 2002-02-19  Dick Porter  <dick@ximian.com>
25479         * threads-dummy-types.c:
25480         * threads-dummy-types.h:
25481         * threads-dummy.c:
25482         * threads-dummy.h:
25483         * threads-pthread-types.c:
25484         * threads-pthread-types.h:
25485         * threads-pthread.c:
25486         * threads-pthread.h:  Deleted obsolete files
25487
25488 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
25489
25490         * class.c (mono_class_vtable): runtime init the class when we
25491         allocate static class data.
25492
25493         * icall.c (ves_icall_System_Array_SetValue): check for null values.
25494
25495         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
25496         and String - but we will need generic marshalling support in the
25497         future. 
25498         (mono_init): set the domain name in a ms compatible way
25499
25500         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
25501         String[].
25502
25503 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
25504
25505         * object.c (mono_array_clone): use alloca() instead of g_malloc  
25506         for sizes
25507
25508         * appdomain.c (mono_domain_unload): impl.
25509
25510 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25511
25512         * appdomain.c, object.c: fix intern pool implementation.
25513         * class.c: fix alignment code.
25514
25515 2002-02-16  Radek Doulik  <rodo@ximian.com>
25516
25517         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
25518         and s2 > s1, just copy lower bytes to be compatible with little
25519         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
25520         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
25521
25522         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
25523         force big_endian to be 1 for big endian machines 
25524         (ves_icall_iconv_new_decoder): ditto
25525
25526 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
25527
25528         * socket-io.c (convert_sockopt_level_and_name): If the system
25529         doesn't define SOL_IP or SOL_TCP, get them by hand using
25530         getprotobyname() and caching the values (because this could be a
25531         slow operation).
25532         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
25533         Use the appropriate struct when the system does support it. Ie,
25534         not all systems have struct ip_mreqn so use struct ip_mreq when
25535         appropriate.
25536
25537 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
25538
25539         * reflection.c: handle finally clauses.
25540
25541 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
25542
25543         * socket-io.c: use g_snprintf() instead of snprintf.
25544
25545 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
25546
25547         * reflection.c (mono_param_get_objects): Cast second argument to
25548         mono_method_get_param_names to a const char** to silence the
25549         compiler warning.
25550
25551         * appdomain.c (mono_domain_assembly_open): Put parens around the
25552         truth statement in the for-loop.
25553
25554         * unicode.c (iconv_convert): Got rid of a compiler warning about
25555         int i being unused when the system has a new iconv.
25556         (iconv_get_length): Same.
25557
25558         * image.c (load_class_names): Cast the second argument to
25559         g_hash_table_insert() to char* to hush compiler warnings about the
25560         arg being a const.
25561         (mono_image_open): Same here.
25562
25563         * socket-io.c: Don't conditionally include sys/filio.h or
25564         sys/sockio.h here anymore since we now get them from
25565         io-layer/io-layer.h
25566         (inet_pton): If the system doesn't support inet_aton, implement
25567         using inet_addr and also #define INADDR_NONE if it isn't defined
25568         by the system.
25569
25570 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
25571
25572         * metadata.c, metadata.h: added function to get packing and size info
25573         of a typedef.
25574         * reflection.h, reflection.c: handle field RVA data. Save info about
25575         the table layout if needed. Assign typedef indexes to all the types
25576         before dumping the info about them to avoid forward reference problems.
25577
25578 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
25579
25580         * socket-io.c (convert_sockopt_level_and_name): ifdef
25581         SO_ACCEPTCONN because it is not defined on my system (old debian)
25582
25583 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25584
25585         * opcode.c: use stddef.h to get NULL.
25586
25587 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
25588
25589         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
25590         for FIONBIO, FIONREAD and SIOCATMARK.
25591         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
25592         define INADDR_NONE and besides, inet_addr() is deprecated and
25593         should not be used. Use inet_pton() instead - it also has the
25594         added bonus that it can easily handle IPv6 addresses as well.
25595         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
25596
25597 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
25598
25599         * decimal.c: remove _MSC_VER conditional.
25600
25601 2002-02-13  Dick Porter  <dick@ximian.com>
25602
25603         * socket-io.c: 
25604         * icall.c: Internal calls for Blocking, Select, Shutdown,
25605         GetSocketOption and SetSocketOption
25606
25607 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25608
25609         * assembly.cs: better resolver: use it instead of some kludgy
25610         code.
25611
25612 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
25613
25614         * reflection.c: the best way to speed-up the compiler is to avoid
25615         infinite loops.
25616
25617 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
25618
25619         * class.c (mono_class_vtable): changed the object layout
25620         (obj->vtable->class). 
25621         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
25622
25623 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25624
25625         * assembly.c: look for assemblies in the assembly dir, too.
25626
25627 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25628
25629         * class.c: fix thinko in mono_class_from_type().
25630
25631 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25632
25633         * exception.h, exception.c: added TypeLoadException.
25634         * object.h, object.c: added mono_array_clone ().
25635         * icall.c: handle throwOnError in AssemblyGetType().
25636         Added Array.Clone().
25637         * opcode.h, opcode.c: use a single value for the opcode val.
25638         Compile fix for non-gcc compilers.
25639
25640 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
25641
25642         * opcodes.c, opcodes.h: export interesting info about opcodes.
25643
25644 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
25645
25646         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
25647         icalls. 
25648
25649         * class.c (class_compute_field_layout): set element_class for enums
25650         (mono_class_create_from_typedef): set element_class for normal classes
25651
25652         * icall.c (ves_icall_System_Enum_get_value): impl.
25653
25654         * class.c (mono_class_create_from_typedef): do not set valuetype
25655         flag for System.ValueType and System.Enum
25656
25657 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
25658
25659         * unicode.c (iconv_convert): fix big endian problem.
25660
25661 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25662
25663         * class.c: add asserts if we are ever going to scribble over memory.
25664         * socket-io.c: not all systems have AF_IRDA defined.
25665
25666 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
25667
25668         * class.c (class_compute_field_layout): do not consider static
25669         fields to compute alignment
25670
25671 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
25672
25673         * appdomain.c (mono_appdomain_get): impl.
25674         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
25675
25676 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
25677
25678         * icall.c: ignore "file://" prefix when loading an assembly.
25679
25680 2002-01-23  Dick Porter  <dick@ximian.com>
25681
25682         * socket-io.c:
25683         * icall.c:
25684         * Makefile.am: Added socket support
25685
25686 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
25687
25688         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
25689         code back.  This should return the assemblies that are loaded by
25690         the runtime on behalf of an application domain. 
25691
25692         The current implementation is still broken, it just returns every
25693         assembly loaded, but until we get real applications domain this
25694         will do.
25695
25696 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
25697
25698         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
25699         AppDomain object.
25700
25701 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
25702
25703         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
25704         the mono_class_from_name lookup.
25705         (ves_icall_get_parameter_info): ditto.
25706         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
25707         method.
25708         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
25709
25710 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
25711
25712         * class.c: load also nested classes on class init.
25713         System.ValueType instance methods gets passed boxed
25714         values, unless methods in derived classed that get a pointer to the
25715         data.
25716         * icall.c: use better name parsing code in GetType().
25717         * image.c, image.h: add mono_image_loaded ().
25718         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
25719         * reflection.c, reflection.h: added mono_reflection_parse_type().
25720
25721 2002-01-22  Veronica De Santis <veron78@interfree.it>
25722
25723         * icall.c : Added mapping of internal calls for Manual and Auto reset events
25724         * threads.c : Added the implementation of internal calls for events
25725         * threads.h : Added prototypes of internal calls for events
25726         
25727 2002-01-21  Radek Doulik  <rodo@ximian.com>
25728
25729         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
25730
25731 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
25732
25733         * class.c (mono_class_init): set min_align to 1 (instead of 0)
25734         (mono_class_value_size): use min_align
25735
25736 2002-01-20  Dick Porter  <dick@ximian.com>
25737
25738         * threads.h:
25739         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
25740         so it compiles on w32.
25741
25742 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
25743
25744         * metadata.c (mono_type_stack_size): impl.
25745
25746         * class.c (mono_class_get_field): impl. memberref token
25747
25748 2002-01-16 Veronica De Santis <veron78@@interfree.it>
25749
25750         * icall.h : Added the internal calls mapping for CreateMutex_internal
25751                     and ReleaseMutex_internal.
25752         * threads.h : Added the prototype of mutexes internal calls.
25753         * threads.c : Added the implementations of mutexes internal calls.
25754
25755 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
25756
25757         * metaparse.h: removed unused file.
25758         * reflection.c, reflection.h: added stream_data_align () function 
25759         to align data in streams and keep stream aligned. Add support for
25760         exception support in method headers.
25761
25762 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
25763
25764         * unicode.c: make iconv_convert () return the number of bytess written
25765         in the output buffer.
25766
25767 2002-01-15  Dick Porter  <dick@ximian.com>
25768         * threads.c: Make the runtime's idea of infinite timeouts coincide
25769         with the class library's
25770
25771         Fix a particularly egregious bug in mono_thread_cleanup(). That
25772         code was so utterly bogus it must have been written on a Monday.
25773
25774 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
25775
25776         * reflection.h: add subtypes field to TypeBuilder.
25777         * reflection.c: encode constants for literal fields.
25778         Handle subtypes. Fix user string token (and add a zero byte)
25779         at the end.
25780         
25781 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
25782
25783         * class.c (mono_class_init): bug fix: assign slot numbers for
25784         abstract methods.
25785
25786 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25787
25788         * reflection.c: don't try to output a code RVA for abstract methods.
25789         Small fixes for method header format. Output parameter info to the
25790         ParamDef table. Save method overriding info to MethodImpl table.
25791         Fix property support. Allow typedef.extends to be a type in the
25792         building assembly.
25793         * verify.c: fix off-by-one error.
25794
25795 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
25796
25797         * class.c: fix mono_class_from_mono_type () for szarray types.
25798         Remove unused cache check in mono_class_from_type_spec().
25799         * icall.c: *type_from_name () functions handle simple arrays and byref.
25800         * reflection.c: handle byref and szarray types. Handle methods without
25801         body (gets P/Invoke compilation working). Handle types and fields in
25802         get_token ().
25803         * reflection.h: add rank to MonoTypeInfo.
25804
25805 2002-01-10  Dick Porter  <dick@ximian.com>
25806
25807         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
25808         internal calls
25809
25810 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
25811
25812         * icall.c: initialize class in type_from_handle ().
25813         Loop also in parent classes for get_method ().
25814         * reflection.c: properly encode class and valuetype types.
25815         Start on encoding TypeBuilder types. Handle fieldrefs.
25816         Use correct length when registering a user string.
25817         Handle ConstructorBuilder and MonoMethod in get_token ().
25818         Make mono_type_get_object () aware of cached types.
25819         * object.c: back out change to mono_string_new ().
25820
25821 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
25822         * object.c: mono_string_new should return a NULL when the string 
25823         passed in is NULL -- not try to deference it.
25824         
25825 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
25826
25827         * icall.c: hack to make IsSubType work for TypeBuilders.
25828         * reflection.c: emit constructors before methods.
25829         Retrieve param names in mono_param_get_objects().
25830
25831 2002/01/05  Nick Drochak  <ndrochak@gol.com>
25832
25833         * Makefile.am: fix list of headers and sources so automake 1.5
25834         doesn't complain. Removed \# at end of list.
25835
25836 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
25837
25838         * reflection.c: get token for a method ref. Set return type of
25839         constructor to void.
25840         * loader.c: debug message.
25841         * class.c: typo fix.
25842
25843 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
25844
25845         * icall.c: fix array init with rank > 1. FindMembers
25846         loops in parent class as well.
25847         * image.c: do not insert nested types in name cache.
25848         * reflection.c: warning fix.
25849         * reflection.h: add override method (for interface impl).
25850
25851 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
25852
25853         * metadata.c: fix customattr decoding.
25854
25855 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
25856
25857         * rawbuffer.cs: Added native Win32 implementation, avoids using
25858         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
25859
25860 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
25861
25862         * class.c: make the low-level routines handle the cache.
25863
25864 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
25865
25866         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
25867
25868 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
25869
25870         * class.c: fix mono_array_element_size() for objects.
25871         * class.h, class.c: add properties to MonoClass and load them
25872         at init time.
25873         * icall.c: check with isinst() when assigning a value to an array
25874         instead of requiring the classes to match exactly.
25875         Implemented icall for System.Type::GetType().
25876         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
25877         enums. Handle bindingflags when looking for methods and fields.
25878         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
25879         and mono_metadata_methods_from_property().
25880         * reflection.h, reflection.c: added structures for propreties,
25881         parameters and enums. Implemented mono_property_get_object() and
25882         mono_param_get_objects().
25883
25884 2001-12-18  Dick Porter  <dick@ximian.com>
25885
25886         * file-io.c: Use mono_string_to_utf16() instead of
25887         mono_string_chars()
25888
25889         * object.c: Added mono_string_to_utf16(), which copies the non
25890         NULL-terminated MonoString into a new double-null-terminated
25891         buffer.
25892
25893 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
25894
25895         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
25896
25897 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
25898
25899         * file-io.c: raise exceptions if handle is invalid.
25900
25901 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
25902
25903         * assembly.c: yet another check for mscorlib.
25904         * class.c, class.h: load nesting info for classes.
25905         * icall.c: many new functions to support the Reflection classes.
25906         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
25907         * reflection.h, reflection.c: mono_image_create_token(),
25908         mono_assembly_get_object(), mono_type_get_object(),
25909         mono_method_get_object(), mono_field_get_object(): methods to return
25910         objects that parallel the C representation of assemblies, types,
25911         methods, fields.
25912
25913 2001-12-11  Dick Porter  <dick@ximian.com>
25914
25915         * icall.c:
25916         * file-io.c: Internal calls for file IO.
25917
25918 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
25919
25920         * tabledefs.h: missing FileAttributes.
25921         * verify.h, verify.c: use is_valid_string () to simplify and check for
25922         valid strings more correctly. Fix warnings and speeling.
25923         Check more tables: Filed, File, ModuleRef, StandAloneSig.
25924         Check code: branches, maxstack, method calls.
25925
25926 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
25927
25928         * object.c (mono_object_allocate): removed static, so that the jit
25929         can allocate value types.
25930
25931         * icall.c (ves_icall_System_DateTime_GetNow): impl.
25932
25933 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
25934
25935         * class.c: init enum types right away and register the
25936         token->MonoClass map in mono_class_create_from_typedef ().
25937         * verify.h, verify.c: first cut of the verifier.
25938         * pedump.c: add --verify switch to verify metadata tables.
25939         * tabledefs.h: add some missing enums.
25940
25941 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
25942
25943         * class.c (mono_install_runtime_class_init): impl.
25944         (mono_class_init): renamed mono_class_metadata_init to
25945         mono_class_init, also removed the metadata_inited flag
25946
25947         * object.c (mono_object_isinst): use faster algorithm
25948
25949 2001-11-30  Radek Doulik  <rodo@ximian.com>
25950
25951         * mono-endian.h: reverted last change
25952         added function prototypes
25953
25954         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
25955         add mono-endian.c back
25956
25957         * mono-endian.c: returned back, as Paolo pointed out, it's needed
25958         for unaligned access, I've mistaked it with endianess. I am
25959         sorry.
25960         (mono_read16): fix reverted endianess
25961         (mono_read64): ditto
25962         (mono_read32): ditto
25963
25964 2001-11-30  Dick Porter  <dick@ximian.com>
25965
25966         * exception.c: Implement mono_exception_from_name()
25967
25968 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
25969
25970         * metadata.h, metadata.c: remove params_size and locals_size and their
25971         calculation from the metadata code: they are only usefult to the
25972         interp.
25973
25974 2001-11-29  Radek Doulik  <rodo@ximian.com>
25975
25976         * object.c (mono_ldstr): swap bytes here, it's probably not the
25977         best place, but works for me now, I'll redo it once I know mono
25978         better, also note that I add PROT_WRITE and don't reset back, also
25979         note that it's only affects big endians, so x86 should be OK
25980
25981         * mono-endian.h (read16): use just glib macros for both endians
25982
25983         * mono-endian.c: removed as glib macros are used in in
25984         mono-endian.h so we don't need to care about endianess for read
25985         macros as glib does that for us already
25986
25987 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
25988
25989         * class.h, class.h: take minimum alignment into consideration so
25990         that the fields of a class remain aligned also when in an array.
25991
25992 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
25993
25994         * loader.h, loader.c: add mono_method_get_param_names().
25995         * class.c: 0-init class fields.
25996
25997 2001-11-26  Dick Porter  <dick@ximian.com>
25998
25999         * icall.c:
26000         * threads-types.h:
26001         * threads.c: New file that handles System.Threading on all platforms
26002
26003         * object.c: 
26004         * object.h: Remove the synchronisation struct from MonoObject,
26005         replace it with a pointer that gets initialised on demand
26006
26007         * Makefile.am: Replace all the system-specific threading code with
26008         a single file that uses the new wrapper library
26009
26010 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
26011
26012         * class.c, class.h: add mono_install_trampoline() so that the runtime
26013         can register a function to create a trampoline: removes the ugly
26014         requirement that a runtime needed to export arch_create_jit_trampoline.
26015         * object.h, object.c: added mono_install_handler() so that the runtime
26016         can install an handler for exceptions generated in C code (with
26017         mono_raise_exception()). Added C struct for System.Delegate.
26018         * pedump.c: removed arch_create_jit_trampoline.
26019         * reflection.c: some cleanups to allow registering user strings and
26020         later getting a token for methodrefs and fieldrefs before the assembly
26021         is built.
26022         * row-indexes.h: updates and fixes from the new ECMA specs.
26023
26024 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
26025
26026         * class.h, class.c: add enum_basetype field to MonoClass.
26027         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
26028         to get index in the constant table reated to a field, param or
26029         property.
26030         * reflection.h, reflection.c: handle constructors. Set public-key and
26031         version number of the built assembly to 0.
26032         * row-indexes.h: update from new ECMA spec.
26033
26034 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
26035
26036         * class.h, class.c: add a max_interface_id to MonoClass.
26037         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
26038         since it's used to do that. Added mono_type_type_from_obj().
26039         Make GetType() return NULL instead of segfaulting if the type was not
26040         found. Handle simple arrays in assQualifiedName.
26041         * object.h: add a struct to represent an Exception.
26042         * reflection.c: output call convention in method signature.
26043         Add code to support P/Invoke methods and fixed offsets for fields.
26044
26045 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
26046
26047         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
26048         the value.
26049         * icall.c: use mono_array_addr instead of array->vector: fixes the
26050         reflection image writing.
26051         * reflection.c: init call convention byte to 0 in method signature.
26052         Encode the property signature. Don't output property-related methods
26053         twice. Really process the properties for a type (don't cast a field to
26054         a property, my mom always told me that).
26055         Fix 64 bit issues in pointer alignment in a different and more
26056         readable way.
26057
26058 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
26059
26060         * loader.h: Removed type class from MonoDefaults, added monotype
26061
26062         * loader.c: Loaded MonoType, removed loading of Type
26063
26064         * icall.c (my_mono_new_object): Now returns a System.MonoType,
26065         and fills in System.Type._impl with a RuntimeTypeHandle rather
26066         than the actual MonoClass *
26067
26068         (ves_icall_type_from_handle): change from type_class to
26069         monotype_class
26070
26071         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
26072         implemented
26073
26074         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
26075         implemented
26076
26077         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
26078
26079         (ves_icall_System_Reflection_Assembly_GetType): implemented
26080
26081         (ves_icall_System_MonoType_assQualifiedName): implemented
26082
26083         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
26084
26085 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
26086
26087         * assembly.c (mono_assembly_open): Implement a cache for the
26088         assemblies. 
26089
26090         (mono_assembly_close): only destroy the assembly when the last
26091         reference is gone.
26092         
26093 2001-11-09  Dick Porter  <dick@ximian.com>
26094
26095         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
26096
26097 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
26098
26099         * class.c (mono_class_metadata_init): bug fix: compute the right slot
26100
26101 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
26102
26103         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
26104         from Martin Weindel.
26105         * object.h: add mono_string_chars ().
26106
26107 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
26108
26109         * reflection.c (build_compressed_metadata): Eliminates warnings
26110         and uses 64-bit clean code.
26111
26112         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
26113         (mono_type_equal): Change signature to eliminate warnings.
26114
26115 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
26116
26117         * icall.c, loader.c: remove the internalcall array constructors.
26118         Changes to match the new MonoArray structure.
26119         * object.h, object.c: an array object doesn't allocate an extra
26120         vector. Add mono_array_new_full () to create jagged arrays easily.
26121
26122 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
26123
26124         * metadata.h, metadata.c: add mono_metadata_field_info () to
26125         retreive all the info about a field from vairous tables.
26126         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
26127         * class.h, class.c: augment MonoClassField with more info.
26128         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
26129         policy and load a field's RVA if needed.
26130
26131 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
26132
26133         * class.c (mono_class_metadata_init): create a trampoline for all
26134         virtual functions instead of actually compiling them.
26135
26136 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
26137
26138         * class.h, class.c: include name in MonoClassField.
26139         * class.c: fix fundamental type of System.Object and System.String.
26140         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
26141         tokens in ldtoken.
26142         * icall.c: remove internalcalls for the Reflection stuff that is now
26143         done in C# code.
26144         * loader.c: mono_field_from_memberref () implementation.
26145         * mono-endian.c: thinko (s/struct/union/g).
26146         * object.c, object.h: make the mono_string_* prototypes actually use
26147         MonoString instead of MonoObject.
26148         * reflection.c, reflection.h: updates for changes in the reflection
26149         code in corlib: we use C structures that map to the actual C# classes.
26150         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
26151         fat method header if needed and use the info from the ILGenerator for
26152         methods. Handle fields in types. Misc fixes.
26153
26154 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
26155
26156         * class.c (mono_class_metadata_init): bug fix: always allocate
26157         space for static class data
26158
26159 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
26160
26161         * class.c (mono_compute_relative_numbering): use relative
26162         numbering to support fast runtime type checks.
26163
26164 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
26165
26166         * class.c (mono_class_create_from_typeref): added debugging output
26167         to print class name when MonoDummy is returned instead of real class
26168
26169 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
26170
26171         * class.c (mono_class_metadata_init): interface offset table now
26172         contains pointers into the vtable - this is more efficient for the jit
26173
26174 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
26175
26176         * class.c (mono_class_metadata_init): use a temporary vtable (the
26177         old algorithm only worked for the interpreter, but not for the jit)
26178
26179 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
26180
26181         * loader.c (method_from_memberref): use mono_class_get to get the
26182         class of an array instead of using System.Array directly.
26183         (mono_get_method): also add MEMBERREF methods to the method cache
26184         which usefull for arrays.
26185
26186 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
26187
26188         * pedump.c (arch_compile_method): added to compute vtable entry
26189
26190         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
26191         number of interfaces.
26192         
26193         * class.h: merged MonoArrayClass into MonoClass
26194
26195         * class.c (mono_class_create_from_typedef): compute the vtable size and
26196         allocate space to include the vtable inside MonoClass
26197         (mono_class_metadata_init): initialize the vtable
26198
26199 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
26200
26201         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
26202         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
26203         * image.c: endian fixes by Laurent Rioux.
26204         * object.h, object.c: rename MonoStringObject to MonoString and
26205         MonoArrayObject to MonoArray. Change some function names to conform to
26206         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
26207         guint16* as first argument, so don't use char*.
26208         Provide macros to do the interesting things on arrays in a portable way.
26209         * threads-pthread.c: updates for the API changes and #include <sched.h>
26210         (required for sched_yield()).
26211         * icall.c: updates for the API changes above.
26212         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
26213         platforms that need them.
26214
26215 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
26216
26217         * class.c: set the correct type for all the fundamental
26218         type when loading the class.
26219
26220 2001-10-05  Dick Porter  <dick@ximian.com>
26221
26222         * threads-pthread.c (pthread_mutex_timedlock): Simple
26223         compatibility version for C libraries that lack this call.
26224
26225 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26226
26227         * class.c: MonoTypes stored in MonoClass are stored as
26228         fundamental MonoTypes when the class represents a
26229         fundamental type (System.Int32, ...).
26230         The TypeHandle return by ldtoken is a MonoType*.
26231         * icall.c: ves_icall_get_data_chunk () write out all the
26232         PE/COFF stuff. Implement ves_icall_define_method (),
26233         ves_icall_set_method_body (), ves_icall_type_from_handle ().
26234         * image.c: properly skip unknown streams.
26235         * loader.h, loader.c: add type_class to mono_defaults.
26236         * metadata.c, metadata.h: export compute_size () as
26237         mono_metadata_compute_size () with a better interface.
26238         Typo and C&P fixes.
26239         * pedump.c: don't try to print the entry point RVA if there is no entry point.
26240         * reflection.c, reflection.h: many cleanups, fixes, output method
26241         signatures and headers, typedef and typeref info, compress the metadata
26242         tables, output all the heap streams, cli header etc.
26243         * row-indexes.h: typo fixes.
26244
26245 2001-10-04  Dick Porter  <dick@ximian.com>
26246
26247         * object.h: Add a synchronisation mutex struct to MonoObject
26248
26249         * object.c (mono_new_object): Initialise the object
26250         synchronisation mutexes
26251
26252         * icall.c: System.Threading.Monitor internal calls
26253         
26254         * threads-pthread.h:
26255         * threads-pthread.c: System.Threading.Monitor internal calls
26256
26257         * threads-types.h: New file, includes the system-specific thread
26258         structures
26259         
26260         * threads-pthread-types.h:
26261         * threads-pthread-types.c: New files, handle pthread-specific
26262         synchronisation types
26263
26264         * threads-dummy-types.h: 
26265         * threads-dummy-types.c: New files of dummy support for
26266         thread-specific types
26267
26268         * metadata.c:
26269         * image.c:
26270         * pedump.c: include mono-endian.h not endian.h
26271         
26272         * Makefile.am: More threads files.
26273         Name mono-endian.h not endian.h
26274
26275 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
26276
26277         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
26278         stuff and implement a few more bits.
26279         * icall.c: a field needs to be dereferenced twice. Do not use the same
26280         name for two variables in the same scope.
26281         * image.c, image.h: cleanups.
26282
26283 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
26284
26285         * class.c (mono_class_metadata_init): bug fix: compute the right size
26286
26287 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
26288
26289         * icall.c: implemented some of the Reflection internalcalls.
26290         * image.c, image.h: start writing out the PE/COFF image.
26291         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
26292         that does the reverse than decode_blob_size ().
26293         * object.c: use mono_metadata_encode_value (). Move here
26294         temporary implementation of mono_string_to_utf8 ().
26295         * rawbuffer.c: make malloc_map static.
26296
26297 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26298
26299         * metadata.c: fix type comparison for arrays.
26300         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
26301         Added a couple of new classes to monodefaults.
26302         * icall.c: added a couple of Reflection-related internalcalls.
26303         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
26304         Added a byval_arg MonoType to MonoClass.
26305
26306 2001-09-28  Dick Porter  <dick@ximian.com>
26307
26308         * icall.c:
26309         * threads-pthread.h: 
26310         * threads-pthread.c: Implemented internal calls for
26311         LocalDataStoreSlot operations.  Applied mutexes around all shared
26312         data.  Reworked the thread creation and Start() operations to
26313         avoid a race condition.
26314         
26315         * threads-dummy.h:
26316         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
26317
26318 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
26319
26320         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
26321
26322 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
26323
26324         * class.c, loader.c: warn and return NULL instead of erroring out.
26325         * icall.c: added System.AppDomain::getCurDomain().
26326         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
26327
26328 2001-09-25  Dick Porter  <dick@ximian.com>
26329
26330         * threads-pthread.h:
26331         * threads-pthread.c: Implemented timed thread joining and added
26332         System.Threading.Thread::Join_internal internal call
26333
26334         * icall.c: Added System.Threading.Thread::Join_internal internal call
26335
26336         * threads-dummy.h:
26337         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
26338
26339 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
26340
26341         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
26342         mono_string_intern () to implement the semantics of the ldstr opcode
26343         and the interning of System.Strings.
26344         * icall.c: provide hooks to make String::IsIntern and String::Intern
26345         internalcalls.
26346
26347 2001-09-23  Dick Porter  <dick@ximian.com>
26348
26349         * threads-dummy.c: 
26350         * threads-dummy.h: New files of dummy threading routines
26351
26352         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
26353         support code based on system specifics
26354
26355         Rename PTHREAD_LIBS to THREAD_LIBS
26356         
26357 2001-09-23  Dick Porter  <dick@ximian.com>
26358
26359         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
26360         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
26361         internal calls.
26362         (mono_thread_init): Set up a Thread object instance to return when
26363         the main thread calls Thread.CurrentThread
26364         (mono_thread_cleanup): Wait for all subthreads to exit
26365
26366         * icall.c: New internal calls for System.Threading.Thread::Sleep
26367         (including Schedule) and CurrentThread
26368
26369         * threads.h: New file, to insulate thread-specific stuff from the
26370         rest of the code
26371
26372 2001-09-21  Dick Porter  <dick@ximian.com>
26373
26374         * threads-pthread.h: 
26375         * threads-pthread.c: New file, for handling pthreads-style
26376         threading support.  Start() now starts a new thread and executes
26377         the ThreadStart delegate instance.
26378
26379         * icall.c: Added the internalcall for
26380         System.Threading.Thread::Start_internal
26381
26382         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
26383
26384 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
26385
26386         * loader.c: work around the different signatures for delegates
26387         constructors csc generates in compiled code vs the ones compiled in mscorlib.
26388
26389 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
26390
26391         * class.h, class.c: add mono_class_get_field_from_name ().
26392         * *: Fix C comments and other ANSI C issues.
26393
26394 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
26395
26396         * endian.h, assembly.c: fix some endianness issues.
26397
26398 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
26399
26400         * loader.h, load.c: add delegate_class to mono_defaults.
26401         Handle runtime provided methods in mono_get_method ().
26402
26403 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
26404
26405         * loader.c (mono_get_method): use pinvoke for internal call
26406
26407         * icall.c: use pinvoke for internal call
26408
26409         * loader.c (method_from_memberref): set the method name
26410
26411 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
26412
26413         * metadata.c: help the compiler generate better code for
26414         mono_class_from_mono_type ().
26415
26416 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
26417
26418         * class.c (mono_class_metadata_init): delayed computing of the
26419         class size to mono_class_metadata_init ()
26420
26421 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
26422
26423         * class.c, class.h: add an interfaces member to MonoClass.
26424         * image.c, image.h: add assembly_name field to MonoImage
26425         from the assembly table.
26426         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
26427
26428 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
26429
26430         * class.c: Handle Array in mono_class_from_mono_type ().
26431         * metadata.c, pedump.c: some endian fixes.
26432
26433 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
26434
26435         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
26436         * metadata.c: fix small problem introduced with the latest commit.
26437
26438 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
26439
26440         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
26441         We don't need a MonoMetadata pointer anymore to compare signatures in
26442         mono_metadata_signature_equal (), update callers.
26443         Reduced memory usage an number of allocations for MonoMethodHeader and
26444         MonoMethodSignature.
26445
26446 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
26447
26448         * metadata.c: added compare for szarray.
26449
26450 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
26451
26452         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
26453         and add a couple more types to it and mono_defaults. Give an hint on
26454         classes that need implementing in our corlib and are referenced
26455         in mscorlib.
26456
26457 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
26458
26459         * class.h, class.c: keep track if a class is also an Enum.
26460         * loader.c: Implement a couple more types for use in libffi
26461         marshalling. Gives better diagnostics when failing to dlopen
26462         a library. Set method->klass for P/Invoke methods, too.
26463
26464 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
26465
26466         * class.c, class.h: add a MonoType this_arg to MonoClass that
26467         represents a pointer to an object of the class' type that
26468         can be used by the interpreter and later the type cache.
26469         Add best guess alignment info for valuetype objects.
26470
26471 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
26472
26473         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
26474         into MonoType: one less level of indirection and allocation and
26475         simplifies quite a bit of code. Added cache for MonoTypes that are
26476         used frequently, so that we don't need to allocate them all the time.
26477
26478 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
26479
26480         * class.c (mono_class_create_from_typedef): System.Enum is also a
26481         value type, although it does not derive from System.ValueType
26482         (maybe a bug in the ms compiler?)
26483
26484         * metadata.c (mono_type_size): return the right size for value types
26485
26486         * loader.c (mono_get_method): only initialize method header if not abstract
26487
26488         * class.c (mono_class_from_mono_type): use mono_default values. 
26489
26490 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
26491
26492         * *: use MonoClass pointers instead of <type_tokens>
26493         
26494         * class.h: new flag: metadata_inited.
26495
26496         * class.c (mono_class_metadata_init): impl.
26497         (mono_class_instance_size): impl.
26498         (mono_class_data_size): impl.
26499
26500 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26501
26502         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
26503         MonoClass now has the name and name_space fields. 
26504         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
26505         mono_get_method () takes and optional MonoClass as argument.
26506         Removed mono_typedef_from_name() and added mono_class_token_from_name()
26507         instead that takes advantage of a map from class names to typedef
26508         tokens in MonoImage.
26509
26510 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
26511
26512         * metadata.c: zero is not a valid alignment boundary.
26513         Merge MONO_TYPE_VOID in default decoding code.
26514
26515 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
26516
26517         * image.h: merged MonoMetadata into MonoImage
26518
26519         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
26520         identify the type of elements.
26521
26522 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
26523
26524         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
26525         * cil-coff.h: split MonoMSDOSHeader and add size info.
26526         * image.c: add some consistency checks.
26527         * metadata.c: fix row size computation: one programmer
26528         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
26529         add explanation for the locator routine.
26530         Fix decoding of size in method header.
26531         
26532 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
26533
26534         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
26535         (g_concat_dir_and_file): Bring g_concat_dir_and_file
26536         function from gnome-libs.  This uses the right path separator
26537         based on the OS, and also works around a bug in some systems where
26538         a double slash is not allowed. 
26539         (default_assembly_name_resolver): Use g_concat_dir_and_file
26540         (mono_assembly_open): ditto.
26541
26542 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
26543
26544         * metadata.c (mono_metadata_signature_equal): impl.
26545
26546         * *: void is now a realy MonoType (instead of using NULL)
26547         
26548         * metadata.c (do_mono_metadata_parse_type): use
26549         mono_metadata_parse_type to parse void value.
26550
26551 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
26552
26553         * metadata.c, metadata.h: in the signature and method header store
26554         only the space required for holding the loca vars and incoming arguments.
26555
26556 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
26557
26558         * metadata.c (do_mono_metadata_parse_type): treat void like any
26559         other type (instead of assigning NULL);
26560
26561 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
26562
26563         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
26564
26565 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
26566
26567         * image.c (do_mono_image_open): added a cache for arrays.
26568
26569 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
26570
26571         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
26572         decode a single column from a row in a metadata table and changes
26573         to take advantage of it in the typedef locator (gives a nice speed up).
26574         Store offset info for function params.
26575
26576 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
26577
26578         * image.h (MONO_IMAGE_IS_CORLIB): removed 
26579
26580 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
26581
26582         * assembly.c: how could mono_assembly_close () had ever worked?
26583         * metadata.c, metadata.h: provide offset info for local vars.
26584         Implement mono_type_size () to take care of alignment as well
26585         as size (it was mono_field_type_size in cli/class.c before).
26586
26587 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
26588
26589         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
26590
26591         * assembly.h (CORLIB_NAME): set to corlib.dll
26592
26593         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
26594
26595 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
26596
26597         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
26598         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
26599         tokentype.h: massive namespace cleanup.
26600
26601 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
26602
26603         * metadata.h, metadata.c: decode exception clauses when parsing method header.
26604
26605 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
26606
26607         * metadata.c (mono_metadata_free_type): added check for type !=
26608         NULL (void) before calling mono_metadata_free_type()
26609
26610 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
26611
26612         * metadata.h, row_indexes.h: added header with enumerations to use
26613         to index in the columns from tables in metadata and to decode coded
26614         tokens: we should start using this instead of embedding magic numbers
26615         all over the code.
26616
26617 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
26618
26619         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
26620         Move metadata_t info from cli_image_info_t to MonoImage, where
26621         it's easily accessible. Changed all the uses accordingly.
26622         Added the method and class caches to MonoImage.
26623         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
26624         and mono_metadata_decode_value () signature to be more consistent
26625         with the other parse functions (and simplify code). Taken advantage
26626         of zero-length array allocation with GCC. Removed reduntant (and
26627         wrong) MonoFieldType struct and use MonoParam instead. Changed
26628         mono_metadata_parse_field_type () to use common code for parsing.
26629         Added mono_metadata_typedef_from_field () and
26630         mono_metadata_typedef_from_method () to lookup a typedef index from a
26631         field or method token.
26632         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
26633
26634 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
26635
26636         * metadata.c (mono_metadata_parse_field_type): Implement. 
26637         (do_mono_metadata_parse_type): Split engine from
26638         mono_metadata_parse_type, so that we can create smaller structures
26639         for things that just have one pointer to the MonoType (look at
26640         the MonoFieldType)
26641
26642 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
26643
26644         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
26645         as Jan Gray found out, it is incorrect. 
26646
26647 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
26648
26649         * assembly.c: Implement asssembly loading.  This loads an image
26650         and loads all the referenced assemblies.  Come to think of it, we
26651         could always do lazy loading of the assemblies. 
26652
26653         * image.c (mono_image_open): Keep loaded images in a hashtable.
26654
26655         * image.h (MonoImage): Add reference count.
26656
26657 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
26658
26659         * assembly.c (mono_assembly_open): Keep track of the file name in
26660         case the assembly has no ASSEMBLY table.
26661
26662         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
26663         from get.c here.
26664
26665 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
26666
26667         * metadata.c, metadata.h: decode local vars in method header
26668         parse function. Change callers accordingly.
26669
26670 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
26671
26672         * metadata.h, cil-coff.h: protect against multiple inclusion.
26673         Added some new structures to hold information decoded from metadata:
26674         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
26675         and relevant decoding/free functions.
26676         * metadata.c: implement decoding functions. Add warning for out of bounds
26677         index in mono_metadata_locate(). Implement mono_get_method () to retreive
26678         all the info about a method signature and invocation. Remove check on
26679         uninitialized local var in parse_mh() and fix memory leak.
26680
26681 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
26682
26683         * metadata.h: More macros.
26684
26685         * tokentype.h: New file.
26686
26687 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
26688
26689         * assembly.c: added a consistency check and initialize
26690         some structures with g_new0().
26691         * metadata.c: fixed a couple more bugs in table size computation
26692         and add other checks for out-of bound access to metadata.
26693
26694 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
26695
26696         * metatada.c: fix bugs computing table sizes. Spew a
26697         warning when index in string heap is out of bounds.
26698
26699 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
26700
26701         * metadata.h: Add a couple of macros to manipulate tokens. 
26702
26703 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
26704
26705         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
26706         cli_section_tables).
26707
26708 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
26709
26710         * metadata.c (mono_metadata_user_string): New function, provides
26711         access to the UserString heap. 
26712
26713 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
26714
26715         * metadata.c: Add inline documentation.
26716
26717 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
26718
26719         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
26720         files. 
26721
26722 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
26723
26724         * typeattr.h: New file, TypeAttribute flags. 
26725
26726 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
26727
26728         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
26729         mono_assembly_ensure_section): Section loading code.
26730         (load_section_tables): Load the sections.
26731
26732         * mono/metadata/metadata.c (mono_metadata_locate_token,
26733         mono_metadata_locate): Functions to locate the information
26734         definition given a token or a table and an index.
26735         (mono_metadata_compute_table_bases): New.
26736         (compute_size): New function to compute the sizes of the various
26737         tables.
26738
26739         * mono/metadata/metadata.h: Finish listing the different index
26740         types. 
26741
26742         * mono/metadata/pedump.c: Improve to dump new information.
26743
26744 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
26745
26746         * mono/metadata/metadata.c: Entered all the tables matching
26747         Beta2. 
26748
26749         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
26750
26751
26752