2005-03-01 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
1 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
2
3         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4         managed code. Fixes #73012.
5
6         * metadata.h (MonoMarshalSpec): Add elem_mult field.
7
8         * metadata.c reflection.c: Load/Emit elem_mult as well.
9         
10         * metadata.h (MonoMarshalSpec): Add comment.
11
12         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
13
14         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
15         num_elem to -1 if not given.
16
17         * object-internals.h (MonoReflectionMarshal): Add has_size field.
18
19         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
20         given values.
21
22 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
23
24         * null-gc.c (mono_gc_free_fixed): Was not compilable.
25
26 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
27
28         * reflection.c (encode_marshal_blob): Encode param_num field as well.
29
30         * object-internals.h (MonoReflectionMarshal): Add param_num field.
31
32 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
33
34         * object.c: generalized the reference bitmap creation
35         and added hooks for the new GC.
36         * class-internals.c: removed the gc_bitmap field from MonoClass.
37
38 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
39
40         * domain.c: help the compiler to produce better code
41         in mono_jit_info_table_find ().
42
43 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
44
45         * object.c: make all allocations look typed.
46
47 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
48
49         * socket-io.c: load Mono.Posix if it's not loaded already
50         (fixes bug#73033).
51
52 2005-02-24  Martin Baulig  <martin@ximian.com>
53
54         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
55         * reflection.c (dup_type): Likewise.
56
57 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
58
59         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
60         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
61
62 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
63
64         * domain.c, threads.c, object-internals.h: make the critical thread
65         local vars use the fast access mode (even when we're compiled in
66         a lib). Provide accessors to be used by the jit during codegen.
67
68 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
69
70         * appdomain.c: Changed hook functios behavior to include
71         support for the reflection only assemblies. Some icalls were changed
72         to support the mentioned assemblies too. Signatures of static methods
73         try_assembly_resolve and real_load now have an additional parameter:
74         refonly.
75
76         * assembly.c: General changes to mono_assembly_ methods to support
77         reflection only api. Functions mono_assembly_open, mono_assembly_load,
78         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
79         suffix, to support an additional gbool parameter to specify whether
80         the assembli is reflection only or not. Created some new hook functions 
81         to add support for reflection only assemblies. Signatures of static 
82         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
83         have now an additional parameter: refonly.
84
85         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
86         indicating whether the assembly is reflection only or not.
87
88         * exception.c: Add mono_get_exception_invalid_operation.
89
90         * icall.c: Throw an InvalidOperationException when trying to invoke
91         a property/method/event, or trying to set/get the value of a field.
92         Also add an icall to retrieve the ref_only flag to the
93         MonoReflectionAssembly.
94
95 2005-02-23  Chris Toshok  <toshok@ximian.com>
96
97         Part of fix for #72827.
98         * mono-debug.c (mono_debug_add_method): add lexical block data to
99         the info we write.  Kind of a hack at the moment - we copy the
100         lexical block info from the MonoDebugMethodInfo to the
101         MonoDebugMethodJitInfo here, before writing it.
102         (mono_debug_read_method): read the lexical block info.
103
104         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
105
106         * debug-mono-symfile.h: add lexical block support.
107
108         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
109         support.
110
111 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
112
113         * loader.c (mono_lookup_pinvoke_call): Fix warning.
114
115         * object.c (mono_runtime_free_method): Call mono_free_method () and
116         put the TODOs there.
117
118         * loader.c (mono_free_method): Free up most memory allocated for 
119         dynamic methods.
120
121 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
122
123         * reflection.c: properly flag a Type argument to a
124         named custom attr value (bug #72248).
125
126 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
127
128         * reflection.c: reduce code duplication in named custom
129         attribute encoding.
130
131 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
132
133         * reflection.c: properly encode custom attrs of type object
134         (bug #72649).
135
136 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
137
138         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
139
140 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
141
142         * socket-io.c: load System.dll if it's not loaded already
143         (bug #72850 and #70477).
144
145 2005-02-21  Martin Baulig  <martin@ximian.com>
146
147         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
148         generic instances.
149
150 2005-02-21  Martin Baulig  <martin@ximian.com>
151
152         * reflection.c (mono_image_build_metadata): We also need to
153         "fixup" the MethodImpl table after we computed the final method
154         indices.  Call fixup_methodimpl() to do that.
155         (fixup_methodimpl): New private method.
156
157 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
158
159         * assembly.c: special case mscorlib.dll (bug#72536),
160         patch from Carlos Alberto Cortez.
161
162 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
163
164         * threads-types.h threads.c: Fix build bustage.
165
166         * threads.c: Use a union for long<->double conversions.
167
168         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
169         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
170
171         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
172         containing the checkpoint call with NOT_TAKEN.
173         
174         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
175         checkpoint before pushing the arguments, so they won't have to be
176         spilled to stack.
177
178 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
179
180         * domain.c, assembly.c, domain-internals.h: make some data
181         const and relocation-free.
182
183 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
184
185         * object.c, appdomain.c, class-internals.h: introduce the
186         MonoClassRuntimeInfo structure to hold the info needed to
187         use a class at runtime. Made mono_class_vtable() lock-free
188         for all the appdomains.
189
190 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
191
192         * metadata-internals.h, image.c: introduce a per-image mempool to
193         be used for memory that has the same lifetime as the image.
194
195 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
196
197         * domain.c: In mono_init_internal(), instead of selecting the first
198         runtime version supported by an executable, get a list of all
199         supported versions and select the one for which an mscorlib exists
200         (since even if the runtime supports a given version, it doesn't mean
201         that the framework for that version is installed).
202         Modified get_runtimes_from_exe to support this behavior.
203         In supported_runtimes, added information about additional system
204         assembly versions.
205         
206         * assembly.c: Added support for more than one system assembly version
207         per runtime version. Updated the assembly list.
208         In mono_assembly_remap_version, removed the initial version check,
209         since we don't know to which version we need to compare until we
210         get the version set on which the assembly is based.
211         Moved the code for loading corlib into the new method
212         mono_assembly_load_corlib(), so it can be used by the initialization
213         code.
214         
215         * domain-internals.h: Updated data structures and added declaration
216         for mono_assembly_load_corlib.
217
218 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
219
220         * reflection.c (resolve_object): Fix the creation of the signature in 
221         the SignatureHelper case.
222
223         * assembly.c (mono_assembly_remap_version): Fix binary search.
224         
225 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
226  
227         * class.c: Added inheritance check when a method is overloaded (from a
228         virtual method or when implementing an interface) and when a class is
229         inherited. Added functions to set a failure for a class and to 
230         retreive the exception from a failure.
231         * class-internals.h: Added fields to MonoClass to keep the exception
232         information status for inheritance (or other exceptions) to be thrown
233         later (i.e. not at load time).
234         * object.c: Throw the inheritance SecurityException when a type is to 
235         be created with either class or method inheritance violations.
236         * reflection.c|h: Fix when getting declsec from a class. Removed 
237         unrequired code for class. Improved sanity in parameter naming.
238         * security-manager.c|h: Added functions to check for class and method
239         inheritance.
240
241 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
242
243         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
244         and has_finalize in dynamic types as well.
245
246 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
247
248         * culture-info-table.h : fixed currency format for en-GB (and so on).
249
250 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
251
252         * gc.c: ensure the GC handles never have 0 as a value.
253
254 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
255
256         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
257         a pointer to a struct to unmanaged code. Fixes #72625.
258
259 2005-02-16  Martin Baulig  <martin@ximian.com>
260
261         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
262
263 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
264
265         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
266
267 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
268
269         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
270
271         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
272         UnmanagedFunctionPointerAttribute, use it for determining calling convention
273         etc. Fixes #71471.
274
275         * reflection.c (mono_custom_attrs_get_attr): New helper function.
276
277         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
278
279 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
280
281         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
282         changes to make the current context a field in MonoThread.
283
284 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
285
286         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
287         the last change.
288         
289         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
290         extracted from mono_marshal_get_native_wrapper.
291
292         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
293         to create wrappers around native functions.
294
295         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
296         delegates for arbitrary function pointers. Fixes #71472.
297
298 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
299
300         * threads.c: cleaned up the code a little.
301
302 2005-02-15  Martin Baulig  <martin@ximian.com>
303
304         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
305         the data table.
306
307         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
308         allocate larger chunks if needed.
309
310 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
311
312         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
313         in by mistake.
314
315 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
316
317         * domain.c: keep the domains in an array and ensure the domain ids
318         are kept small, so they can be used as indexes to domain-specific data
319         with a small memory overhead.
320
321 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
322
323         * icall.c: Handle byref types in Type icalls. Fixes #72544.
324
325 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
326
327         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
328
329 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
330
331         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
332
333         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
334         values.
335
336         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
337         
338 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
339
340         * domain-internals.h: add the hashtable here.
341
342         * class-internals.h: Remove `info' from MonoMethod
343
344         * domain.c: Add a new hashtable, jit_trampoline_hash
345
346 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
347
348         * object.c: don't set the value of static fields
349         (fixes bug#72494).
350
351 2005-02-11  Martin Baulig  <martin@ximian.com>
352
353         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
354         (mono_debug_add_method): Silently ignore the method if it's too big.
355         (mono_debug_add_type): Likewise.
356
357 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
358
359         * threads.c, appdomain.c: remove #ifdefs from the code.
360
361 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
362
363         * metadata-internals.h: Added flags to MonoAssembly to cache the most
364         common security informations. This allows us to stay in unmanaged code
365         when doing LinkDemand and it's special cases (except for the first 
366         time for initialization). The flags a very much used with --security.
367         * reflection.c|h: Added code to get declarative security attributes 
368         for LinkDemand and InheritanceDemand. This required to refactor the
369         existing code for Demand.
370         * security-manager.c|h: Added new method fields for the special cases
371         of LinkDemand.
372
373 2005-02-10  Martin Baulig  <martin@ximian.com>
374
375         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
376         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
377
378 2005-02-10  Martin Baulig  <martin@ximian.com>
379
380         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
381         debugging code; this is almost a complete rewrite.
382
383         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
384
385 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
386
387         * domain.c, object.h: expose mono_string_equal () and 
388         mono_string_hash ().
389         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
390         it's implemented in managed code.
391
392 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
393
394         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
395         lo leak objects between appdomains.
396
397 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
398
399         * assembly.c: old compilers compilation fix from 
400         robertj@gmx.net (Robert Jordan).
401
402 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
403
404         * class-internals.h: Little reminder for the future.
405
406         * debug-helpers.c: Fix up wrapper_type_names
407
408 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
409
410         * image.c, metadata-internals.h: when loading an image from a file,
411         mmap all of it and use the same codepaths as when using a
412         in-memory image: the code is simpler and we use less memory
413         (both writable and readonly).
414
415 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
416
417         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
418         API to alloc runtime data structures that need to be tracked by the
419         GC and contain pointers.
420         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
421         make the code more readable and eventually use a different GC.
422
423 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
424
425         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
426         for out arguments.
427         
428 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
429
430         * object.c: In release_type_locks(), don't release the cctor lock
431         if it has already been released. This fixes a crash in the
432         thread5 test.
433
434 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
435
436         * gc.c, marshal.c, icall.c: register a delegate for finalization
437         only when the native function pointer has been allocated for it.
438
439 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
440
441         * object.c: cleaned up some code, allocate objects that are
442         pointer free with the atomic malloc variant. Allocate memory
443         for static data from the mempool if it's pointer-free.
444         Allocate the bounds array at the end of the array data, when needed.
445         * object-internals.h, object.h: move a private function in a private
446         header.
447         * class.c: handle missing case in tracking references in fields.
448
449 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
450
451         * class.c, class-internals.h: keep track if a type has
452         reference fields in either the instance or static fields.
453
454 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
455
456         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
457         and renamed to MonoRuntimeInfo. Added fields to store the expected
458         framework assembly version. Changed mono_get_framework_version and
459         mono_get_runtime_version for a single mono_get_runtime_info method.
460         
461         * assembly.c: Added method to remap system assembly versions to the
462         current executing runtime version. Removed old mapping code.
463         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
464         
465         * icall.c, reflection.c: Track api changes.
466
467 2005-02-06  Miguel de Icaza  <miguel@novell.com>
468
469         * loader.c (method_from_memberref): Improve error reporting,
470         produce the class name instead of the typeref/typedef index. 
471
472 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
473
474         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
475
476 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
477
478         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
479         stdcall and charset name mangling.  Reorganize the code and add
480         some tracing stuff.
481
482 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
483
484         * monodiet.c: More iters!
485
486         * marshal.c: Iter usage.
487
488         * icall.c: Iter usage.
489
490         * object.c: Use iters.
491
492         * debug-helpers.c: More iters
493
494 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
495
496         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
497         under win32.
498
499 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
500
501         * mono-debug-debugger.c: use iters
502
503         * class.c, class-internals.h: mono_class_setup_events is static
504         now
505
506         * All callers: use iters
507
508 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
509
510         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
511         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
512
513 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
514
515         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
516
517         * marshal.h: Add prototypes for ldfld/stfld_remote.
518
519         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
520         this is called during startup.
521         
522 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
523
524         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
525         MonoThreadsSync struct private in monitor.c. Changed the way
526         MonoThreadsSync is allocated so it's faster and there is no
527         need to keep track of it with a finalizer and it uses less memory.
528         This also finally allows us to allocate mono objects as ptrfree when
529         there are no reference fields.
530
531 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
532
533         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
534         disappearing link to the GC interface and use them to simplify
535         the gchandles code.
536
537 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
538
539         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
540         stfld_remote which call mono_load/store_field_new. This allows methods
541         calling ldfld/stfld wrappers to be AOTed.
542
543         * console-io.c: Include sys/filio.h under solaris.
544         
545         * console-io.c: Include curses.h if needed correctly.
546
547 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
548         
549         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
550         method->klass as well.
551
552         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
553
554         * class.c (mono_class_init): Switch on lazy initialization of 
555         methods.
556
557         * class.c (mono_class_get_finalizer): Handle the case when the 
558         finalizer is inherited.
559
560 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
561
562         * console-io.c: <curses.h> is needed by term.h on solaris.
563
564 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
565
566         * icall.c, class-internals.h, monodiet.c, class.c: Remove
567         mono_class_setup_properties where possible. Remove this ftn from
568         the header file, and make it static.
569
570 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
571
572         * loader.c: Add missing setup_... call.
573
574         * class.c: Add missing setup_... calls.
575
576         * class.c (mono_class_init): Switch on lazy initialization of 
577         the generic vtable.
578         
579         * class.c (mono_class_init): Fix generics broken by the recent changes.
580
581         * monodiet.c (handle_type): Add missing setup_... calls.
582
583         * class.c: Back out garbage in previous patch.
584         
585         * class.c: Add missing setup_... calls.
586
587         * class.c (mono_class_get_method_from_name_flags): Avoid calling
588         mono_class_setup_methods () if possible.
589
590         * class-internals.h (MonoClass): Add 'has_cctor' flag.
591
592         * class-internals.h (MonoCachedClassInfo): New structure.
593
594         * class.c: Initialize properties and events fields of MonoClass lazily.
595
596         * class.c: Add infrastructure for lazily initializing the methods and
597         vtable fields of MonoClass. Not yet used.
598
599         * class.c (mono_class_get_finalizer): New helper function.
600
601         * class.c: Add infrastructure for loading some class related data from
602         an AOT file.
603
604         * object.c: Add infrastructure for initializing the vtable from data
605         in the AOT file.
606
607         * gc.c (run_finalize): Use mono_class_get_finalizer ().
608
609         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
610         appropriate initialization function before accessing parts of the
611         MonoClass structure.
612
613         * marshal.c: Fix warnings.
614         
615         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
616
617         * mono-debug-debugger.c (get_exception_message): Use 
618         mono_class_get_method_from_name_flags ().
619
620 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
621
622         * reflection.c, appdomain.c: Replace a few manual searches that
623         Zoltan missed. (Paolo approved this part of my initial patch).
624
625 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
626
627         * profiler.c: disable recording statistical events at report time.
628
629 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
630
631         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
632         to byteswap arrays of enum values, too (bug #72080).
633
634 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
635
636         * appdomain.c (set_domain_search_path): Allow this to be called if
637         domain->setup is not yet set.
638
639         * loader.c (mono_method_get_index): New helper function.
640
641         * loader.c reflection.c: Use mono_method_get_index ().
642
643         * class.c (mono_class_get_method_from_name_flags): New helper method.
644
645         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
646         this.
647
648         * class.c (mono_class_get_cctor): New helper method.
649
650         * string-icalls.c object.c class.c marshal.c reflection.c: Use
651         mono_class_get_method () to look up methods.
652
653 2005-02-01  Miguel de Icaza  <miguel@novell.com>
654
655         * console-io.c: Fix the build, this should work on Windows.
656
657 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
658
659         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
660         be set to null to keep things valid
661
662 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
663
664         * icall.c: added Console 2.0 icalls.
665         * Makefile.am: added console-io.[ch]
666         * console-io.[ch]: internal calls for Console 2.0 API.
667
668 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
669
670         * class.c: make sure we consider all the interfaces
671         when calculating max_interface_id (bug found by
672         Jeroen Frijters running ikvm).
673
674 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
675
676         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
677         valuetype fields to null.
678
679         * object.c (set_value): Ditto. Fixes #71669.    
680
681 2005-01-31  Martin Baulig  <martin@ximian.com>
682
683         * metadata.c (mono_metadata_has_generic_params): New public
684         function; checks whether something is a generic method.
685
686 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
687
688         * appdomain.c: fix infinite recursion when adding assemblies.
689
690 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
691
692         * object.c: Fix small typo to return all items for Environment.
693         GetCommandLineArgs.
694
695 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
696
697         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
698         reflection.c: more domain and assembly-unload related fixes
699         and memory leaks plugs.
700
701 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
702
703         * 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.
704
705 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
706
707         * loader.c (mono_method_signature): Make this method lazy
708         (mono_get_method_from_token): Don't computate the signature here.
709
710         Doing this saves quite a bit of memory. I got 90 kb on starting up
711         monodoc. It should also save some disk reads on startup.
712
713         * *: MonoMethod->signature might be NULL now. You *MUST* use
714         mono_method_signature.
715
716 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
717
718         * object.c (mono_runtime_get_main_args): Return an array from the
719         current domain here. Fixes #71938.
720
721 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
722
723         * monitor.c: formatting changes to comply with the
724         mono coding style and remove #ifdefs from the code.
725
726 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
727
728         * metadata.c, private.h: remove some unneeded data
729         and use a more compact representation for table schemas.
730
731 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
732
733         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
734         to get a better distribution in hash tables.
735         * *.c: use mono_aligned_addr_hash() where appropriate.
736         * assembly.c: make var static.
737
738 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
739
740         * domain-internals.h: Put MonoJitInfo on a diet.
741
742         * domain.c: Fix a warning.
743
744 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
745
746         * gc.c: rework the gc handles code to reuse handles
747         when freed.
748
749 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
750
751         * domain.c: fixed long standing bug in mono_string_equal() which
752         was brought to light with the ldstr changes.
753
754 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
755
756         * reflection.c: Remove warning by adding missing include for marshal.h
757
758 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
759
760         * domain.c, object.c: change the ldstr_table to hold
761         MonoString* as keys: makes the runtime isinterned lookup
762         faster and simplifies memory management.
763
764 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
765  
766         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
767         possible to add imperative security checks before calling the icall.
768         * reflection.c: Return security attributes on the original MonoMethod
769         (and not the wrapped one). This fix permissions on icalls.
770
771 2005-01-25  Dick Porter  <dick@ximian.com>
772
773         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
774         the check for mktime() support actually test the mktime() return
775         value.  "Fixes" bug 71682, though the output is still different to
776         MS.
777
778 2005-01-25  Martin Baulig  <martin@ximian.com>
779
780         * class.c (mono_class_is_assignable_from): Make this work for
781         generic instances.
782
783 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
784
785         * marshal.c (mono_string_utf8_to_builder)
786         (mono_string_builder_to_utf16): We might not have ownership of the
787         string. In thise case, we need to create a new buffer.
788
789         * object-internals.h (mono_stringbuilder_capacity): sb->str might
790         be null, in which case, use the default capacity.
791
792 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
793
794         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
795         GC events to the profiler.
796
797 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
798
799         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
800         if you don't want the GC to run.
801
802 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
803
804         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
805         start providing a GC API and keeping different implementations in
806         their own file.
807         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
808
809 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
810
811         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
812         mmap rather than allocating a huge buffer.
813         (mono_debug_close_mono_symbol_file): Free the buffer allocated
814         above.
815
816 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
817
818         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
819         and CheckExecutionRights.
820         * reflection.c|h: Keep the index of the declarative security to be 
821         used, instead of the pointer, when AOT compiler is used. Also add 
822         class initialization when requesting demands.
823         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
824         CheckExecutionRights. Both properties are now FALSE by default, and
825         unmodifiable, unless the --security option is used.
826
827 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
828
829         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
830         reflection.c: properly refcount images and assemblies, many leaks fixed.
831
832 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
833
834         * threadpool.c: increase the timeout for threads in the thread pool to
835         10s.  Fixes bug #67159.
836
837 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
838
839         * class-internals.h: Sun's compiler insists on explicit
840         signed on bit fields to handle then correctly.
841
842 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
843
844         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
845         Make the size of the array fit only the number of invalid path
846         chars that we have.
847
848         * class.c (_mono_class_get): Improve the error reporting when a
849         class referenced is not found, to assist debugging. 
850
851 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
852
853         * threads.c: fix off-by-one error.
854         * domain.c: free data allocated in the domain.
855
856 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
857
858         * reflection.c (mono_method_body_get_object): Fill out exception info
859         as well.
860
861         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
862         structure.
863         
864 2005-01-19  Martin Baulig  <martin@ximian.com>
865
866         * loader.c (mono_get_method_constrained): Make this work again.
867
868 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
869
870         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
871         guint16 to match the managed side.
872
873         * reflection.c (mono_reflection_body_get_object): Fill out local
874         variables array.
875
876         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
877         as well.
878
879         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
880         'local_var_sig_token'.
881
882 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
883
884         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
885         System.Drawing.
886
887         * reflection.c (mono_method_body_get_object): Handle abstract and
888         runtime methods.
889
890 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
891
892         * marshal.c, loader.c, class-internals.h, reflection.c:
893         store the emthod data for a wrapper in an array instead of a list.
894
895 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
896
897         * marshal.c: change the code to allocate memory more
898         conservatively for method wrappers.
899
900 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
901
902         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
903         fields from MonoClass to the marshal info structure where they belong.
904
905 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
906
907         * class.c, object.c, class-internals.h, marshal.c: rearrange
908         some fields and tweak some types to lower memory usage.
909
910 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
911
912         * threads.c (signal_thread_state_change): Handle the case when the
913         target thread is the current thread.
914
915         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
916
917         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
918         emit_ptr_to_object_conv. 
919
920         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
921         marshalling. Fixes #71352.
922
923 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
924
925         * metadata.h, blob.h: move table enum to blob.h so it can be included
926         in any header.
927         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
928         cut the size of MonoImage/MonoDynamicImage.
929
930 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
931
932         * profiler.c (mono_profiler_install_simple): Fix default arguments.
933
934 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
935
936         * reflection.c, reflection.h, icall.c: add a function to check
937         if an attribute type is defined for a metadata object.
938
939 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
940
941         * object-internals.h: Added some needed fields from StringBuilder class.
942         * marshal.c: Set the maxCapacity when creating a StringBuilder.
943
944 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
945
946         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
947         threads before shutting down the runtime.
948
949         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
950
951 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
952
953         * object-internal.h, threads.c: implement stacksize and 
954         parameterized thread start functionality (requires
955         matching corlib). Marked broken code for later removal.
956
957 2005-01-12  Martin Baulig  <martin@ximian.com>
958
959         * class-internals.h (MonoGenericClass): Moved the `initialized'
960         flag to MonoDynamicGenericClass, removed `init_pending'.
961         (MonoGenericInst): Added `is_reference' flag.
962
963 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
964
965         * reflection.c (mono_image_create_pefile): Only set the pe_offset
966         inside the MSDOS header. Fixes #71201.
967
968         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
969         gc thread.
970         (mono_domain_finalize): Ditto.
971
972 2005-01-12  Martin Baulig  <martin@ximian.com>
973
974         * class.c (mono_get_shared_generic_class): Use the cache for
975         non-dynamic generic classes.
976
977         * class-internals.h (mono_class_create_generic_2): Removed
978         function prototype, this function is now static inside class.c.
979
980         * class.c (mono_class_create_generic_2): Made this static, only
981         call it from mono_class_init() and mono_class_setup_parent().
982         (collect_implemented_interfaces_aux): Call mono_class_init() on
983         the interfaces we collect.
984         (mono_class_setup_vtable): Call mono_class_init (class->parent).
985
986 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
987
988         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
989         it a real thread handle.
990
991         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
992         MonoJitExceptionInfo, since each catch clause needs its own variable.
993         
994 2005-01-11  Dick Porter  <dick@ximian.com>
995
996         * image.c (mono_pe_file_open): New variant on mono_image_open()
997         that does not set up the CLI metadata; used for FileVersionInfo so
998         it can get the data for windows binaries too.
999         
1000         * process.c (process_read_string_block): Don't read off the end of
1001         the StringTable block.
1002
1003         These both fix bug 70766.
1004
1005 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
1006
1007         * gc.c: set some fields to NULL at GC cleanup time.
1008         * threads.c: if we quit the main thread, call exit ().
1009
1010 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
1011
1012         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
1013
1014 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
1015
1016         * threads.h, threads.c, object.c: added accessor and settor for
1017         main_thread. Handle it specially when exiting from it: wait
1018         for other foreground threads to exit.
1019
1020 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
1021
1022         * process.c, verify.c: remove some bloat.
1023
1024 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
1025
1026         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
1027         the calling convention to cdecl under win32.
1028
1029 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
1030
1031         * object.c (mono_object_get_size): New function to get the size of
1032         an object instance.
1033
1034         * profiler.c (simple_allocation): Use above.
1035
1036 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
1037
1038         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
1039         ves_icall_System_AppDomain_getRootDomain (as it's not required to
1040         get an appdomain by it's id and we can't assume the root's id is 0).
1041         * domain-internals.h: Change the function prototype to match.
1042         * icall.c: Change the icall table for AppDomain.
1043
1044 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
1045
1046         * locales.c (string_invariant_compare_char): Only compute
1047         GUnicodeTypes in the case where we need them.  Test for ordinality
1048         first and return if so.
1049
1050         From the commit:
1051
1052                 /*
1053                  * FIXME: here we must use the information from c1type and c2type
1054                  * to find out the proper collation, even on the InvariantCulture, the
1055                  * sorting is not done by computing the unicode values, but their
1056                  * actual sort order.
1057                  */
1058
1059 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
1060
1061         * loader.c: for P/Invoke methods, allow the "Internal" shared
1062         library name to refer to the calling process symbol namespace.
1063
1064 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
1065
1066         * Makefile.am: Add the security manager to the build.
1067         * security-manager.c|h: New. Initialization of the security manager.
1068
1069 2005-01-07  Dick Porter  <dick@ximian.com>
1070
1071         * threads.c: 
1072         * monitor.c: Update thread state during Monitor and WaitHandle
1073         waits.  Fixes bug 71031.
1074
1075 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
1076
1077         * reflection.c (property_encode_signature): Correctly handle when the
1078         property has no methods.
1079
1080 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
1081
1082         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
1083         
1084         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
1085         fields from mb, not rmb. Fixes #71017.
1086
1087         * marshal.c (emit_ptr_to_str_conv): Add support for 
1088         ByValTStr -> string conversion. Fixes #71015.
1089
1090         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
1091
1092         * mempool.c (mono_mempool_contains_addr): New helper function.
1093
1094 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
1095
1096         * metadata.c (mono_metadata_compute_size): Fix size calculation of
1097         HasSematics encoded fields.
1098         
1099         * metadata.c (mono_type_to_unmanaged): Improve error message for 
1100         invalid string marshalling.
1101
1102         * metadata.c: Fix warnings.
1103         
1104 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
1105
1106         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
1107         profiler support.
1108
1109 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
1110
1111         * domain.c object.c domain-internals.h: Revert part of r38077 since the
1112         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
1113         tests.
1114
1115 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
1116
1117         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
1118         so methods containing these can be AOTed.
1119
1120 2005-01-03  Martin Baulig  <martin@ximian.com>
1121
1122         * loader.c (find_method): Removed the hack for generic instances.
1123         (method_from_memberref): If our parent is a generic instance, pass
1124         its generic type definition to find_method() and then inflate the
1125         method.
1126         (mono_get_method_constrained): Pass the generic type definition to
1127         find_method() and inflate the method later.
1128
1129         * class-internals.h (MonoStats): Added `generic_class_count'.
1130
1131         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
1132         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
1133
1134         * reflection.c (mono_custom_attrs_from_params): Don't ignore
1135         generic type definitions.
1136
1137 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
1138
1139         * loader.c icall.c: Fix warnings.
1140
1141 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
1142
1143         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
1144         blittable types. Fixes #70864.
1145
1146 2004-12-29  Martin Baulig  <martin@ximian.com>
1147
1148         * icall.c
1149         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
1150
1151         * reflection.c (mono_method_get_object): Create a
1152         "System.Reflection.MonoGenericMethod" for inflated methods; don't
1153         call mono_get_inflated_method().
1154
1155         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
1156
1157 2004-12-27  Martin Baulig  <martin@ximian.com>
1158
1159         * class-internals.h (MonoMethod): Added `is_inflated' flag.
1160         (MonoMethodInflated): Added `inflated' field.
1161
1162         * class.c (mono_class_inflate_generic_method): Don't really
1163         inflate the method here; just set the `is_inflated' flag in the
1164         MonoMethod.
1165         (mono_class_get_inflated_method): Actually inflate the method here
1166         if it's not already inflated; we use the MonoMethodInflated's new
1167         `inflated' field as a cache.
1168
1169 2004-12-26  Martin Baulig  <martin@ximian.com>
1170
1171         * class.c
1172         (inflate_generic_class): Moved some code out of inflate_generic_type().
1173         (mono_class_inflate_generic_method): If we're already inflated,
1174         inflate the context and use the declaring method; ie. make sure
1175         the declaring method of an inflated method is always the generic
1176         method definition.
1177         (mono_class_create_from_typedef): Create
1178         `class->generic_container->context->gclass'.
1179
1180 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
1181
1182         * metadata-internals.h, marshal.c, reflection.c: More
1183         MonoGHashTable->GHashTable.
1184
1185         * domain-internals.h, class.c: Change MonoGHashTable's into
1186         GHashTables for some cases where no gc stuff is used
1187
1188         All users: update apis
1189
1190 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
1191
1192         * metadata.c (builtin_types): Make this `const'. Makes this get
1193         put into the shareable section.
1194         (mono_metadata_init): Casts to make gcc happy.
1195
1196 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
1197
1198         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
1199
1200 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
1201
1202         * icall.c: Added an internal call to retrieve the position and length
1203         of assembly-level declarative security attributes (RequestMinimum, 
1204         RequestOptional and RequestRefuse). This is used by the Assembly class
1205         to re-create the corresponding permission sets.
1206
1207 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
1208
1209         * marshal.c: fix the stelemref wrapper to be type correct
1210         (and faster).
1211
1212 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
1213
1214         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
1215         to do key & 0x7fffffff. Hashtable already does this. It just
1216         results in longer code.
1217
1218 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
1219
1220         * appdomain.c: Bump corlib version.
1221         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
1222         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
1223         * reflection.c|h: Add functions to get declarative security infos
1224         (blob position and length) for assemblies, classes and methods.
1225
1226 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
1227
1228         * reflection.c: sort the constant table (bug #70693).
1229
1230 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
1231
1232         * object-internals.h, threads.c, domain.c: add accessors for
1233         the MonoThread and MonoDomain tls keys.
1234
1235 2004-12-18  Martin Baulig  <martin@ximian.com>
1236
1237         * class.c (inflate_generic_type): If we're inflating a generic
1238         instance, set `ngclass->context->container = context->container';
1239         ie. the container we inflated into.
1240
1241         * metadata.c (mono_metadata_parse_generic_param): Reflect above
1242         inflate_generic_type() changes.
1243
1244 2004-12-17  Martin Baulig  <martin@ximian.com>
1245
1246         * class-internals.h
1247         (MonoGenericClass): Replaced `MonoType *generic_type' with
1248         `MonoClass *generic_class'.  Removed `dynamic_info'; if
1249         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
1250         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
1251
1252 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
1253
1254         * exception.c (mono_exception_from_token): New helper function.
1255
1256 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
1257
1258         * assembly.c (mono_assembly_load_with_partial_name): Call 
1259         mono_assembly_loaded before invoking the preload hooks. Fixes
1260         #70564.
1261
1262         * object-internals.h (MonoThread): Change culture_info and 
1263         ui_culture_info into an array.
1264
1265         * threads.c: Cache culture info objects from more than one appdomain.
1266
1267         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
1268         current UI culture.
1269
1270 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
1271
1272         * threads.h threads.c appdomain.c: Clear the culture_info field of
1273         all threads during unloading if they point to an object in the dying
1274         appdomain.
1275
1276 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
1277
1278         * culture-info.h (TextInfoEntry): New struct
1279         * object-internals.h: sync with managed
1280         * locales.c: fill the `text_info_data' field
1281         * culture-info-tables.h: update
1282
1283 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
1284
1285         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
1286         collector.
1287
1288 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
1289
1290         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
1291         (ves_icall_ModuleBuilder_getMethodToken): Ditto
1292
1293 2004-12-12  Martin Baulig  <martin@ximian.com>
1294
1295         * mono-debug-debugger.c (write_type): If we're an enum and the
1296         builtin types have already been initialized, call mono_class_init().
1297
1298 2004-12-11  Martin Baulig  <martin@ximian.com>
1299
1300         * metadata.c (mono_metadata_load_generic_params): Added
1301         `MonoGenericContainer *parent_container' argument; automatically
1302         compute `container->is_method'; pass the correct owner to
1303         get_constraints().      
1304
1305         * reflection.c (compare_genericparam): Sort the GenericParam table
1306         according to increasing owners. 
1307
1308 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
1309
1310         * profiler.c: allow disabling the default profiler.
1311
1312 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
1313
1314         * decimal.c, icall.c: allow disabling System.Decimal support.
1315
1316 2004-12-09  Marek Safar <marek.safar@seznam.cz>
1317
1318         * reflection.c: Add support for null attribute arguments.
1319
1320 2004-12-09  Martin Baulig  <martin@ximian.com>
1321
1322         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
1323         names to get rid of compiler warnings.
1324
1325 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
1326
1327         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
1328         mono_marshal_load_type_info (). Fixes #69625.
1329         (mono_marshal_get_ptr_to_struct): Likewise.
1330
1331 2004-12-08  Martin Baulig  <martin@ximian.com>
1332
1333         * mono-debug.h: Bumped version number to 47.
1334
1335         * mono-debug-debugger.c
1336         (mono_debugger_event_handler, mono_debugger_event): Take two
1337         guint64 arguments insteed of a gpointer and a guint32.  
1338
1339 2004-12-08  Martin Baulig  <martin@ximian.com>
1340
1341         * debug-mono-symfile.h
1342         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
1343         `address' to `native_offset'.
1344
1345 2004-12-08  Martin Baulig  <martin@ximian.com>
1346
1347         * class.c (mono_class_create_from_typespec): Only inflate if we
1348         either have `context->gclass' or `context->gmethod'.
1349
1350 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
1351
1352         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
1353
1354         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
1355
1356         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
1357
1358         * reflection.c (mono_assembly_get_object): Remove the workaround put
1359         in for the release.
1360         
1361         * appdomain.c: Use the corlib_internal field from MonoAssembly.
1362
1363         * appdomain.c: Bump corlib version.
1364
1365         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
1366         be visible in other appdomains.
1367
1368 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
1369
1370         * threads.c: Interlocked inc and dec for longs were messed up,
1371         use a KISS based impl for this. Fixes 70234
1372
1373 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
1374
1375         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
1376
1377 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1378
1379         * icall.c: fix to follow policy not to allow struct
1380         arguments in icalls.
1381
1382 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1383
1384         * process.c: make the patch that handles spaces in file paths work
1385         on mono/windows too.
1386
1387 2004-12-06  Martin Baulig  <martin@ximian.com>
1388
1389         * class.c (mono_class_create_generic): Call
1390         mono_class_setup_supertypes() if we're dynamic.
1391         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
1392
1393 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
1394
1395         * object-internals.h: Add new fields to MonoThread.
1396
1397         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1398
1399         * icall.c threads-types.h threads.c: Add new icalls.
1400
1401         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
1402
1403         * object-internals.h (MonoReflectionAssembly): Sync object layout with
1404         managed side.
1405
1406         * appdomain.c: Bump corlib version.
1407
1408         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
1409         internal assemblies. Fixes #69181.
1410
1411 2004-12-05  Martin Baulig  <martin@ximian.com>
1412
1413         * class.c (mono_class_inflate_generic_signature): Make this a
1414         no-op if `context' is NULL or we don't have any type parameters;
1415         also copy `sentinelpos'.        
1416
1417 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
1418
1419         * image.c: Add unbox_wrapper_cache.
1420
1421         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
1422
1423         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
1424         function generator.
1425         
1426         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
1427         Fixes #70173.
1428
1429         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
1430         
1431 2004-12-04  Martin Baulig  <martin@ximian.com>
1432
1433         * loader.c (mono_method_get_signature_full): New public function;
1434         like mono_method_get_signature(), but with an additional
1435         `MonoGenericContext *' argument.
1436
1437         * class.c (mono_class_inflate_generic_signature): Formerly known
1438         as inflate_generic_signature(); make this public.
1439
1440 2004-12-04  Martin Baulig  <martin@ximian.com>
1441
1442         * metadata.c
1443         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
1444         instead of a `MonoGenericContainer *'.  
1445         (mono_metadata_parse_array_full): Likewise.
1446         (mono_metadata_parse_signature_full): Likewise.
1447         (mono_metadata_parse_method_signature_full): Likewise.
1448         (mono_metadata_parse_generic_inst): Likewise.
1449         (mono_metadata_parse_generic_param): Likewise.
1450         (mono_metadata_parse_mh_full): Likewise.
1451         (mono_type_create_from_typespec_full): Likewise.
1452
1453 2004-12-03  Martin Baulig  <martin@ximian.com>
1454
1455         * class-internals.h (MonoGenericContainer): Replaced the
1456         `MonoGenericContext * pointer with a `MonoGenericContext'
1457         structure and made it the first element.
1458
1459 2004-12-03  Martin Baulig  <martin@ximian.com>
1460
1461         * class.c
1462         (inflate_generic_type): Set the `context->container' when creating
1463         a new MonoGenericContext.
1464         (mono_class_inflate_generic_method): Likewise.
1465         (mono_class_create_from_typespec): Just use `context->container'
1466         to get the container.
1467
1468         * loader.c (method_from_methodspec): Set `context->parent' from
1469         `context->container' - and if that's a method container, use its
1470         parent.  Also set the `context->container' when creating a new
1471         MonoGenericContext.
1472         (mono_get_method_from_token): Use just `context->container' to get
1473         the container.
1474
1475         * metadata.c (do_mono_metadata_parse_generic_class): Also set
1476         `gclass->context->container'.
1477
1478         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
1479         the `context->container' when creating a new MonoGenericContext.
1480
1481 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
1482
1483         * reflection.c (compare_genericparam): Sort params with identical
1484         owner by their number. Fixes gen-111 on sparc.
1485
1486 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
1487
1488         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
1489         around the domain changes.
1490
1491         * appdomain.c (mono_domain_unload): Handle the case when the thread
1492         calling Unload is itself being aborted during unloading. Fixes #70022.
1493
1494         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
1495
1496         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
1497         checkpoint_func as an icall so it gets a wrapper.
1498         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
1499         in the cross-appdomain wrappers too.
1500
1501         * threads.c (mono_thread_has_appdomain_ref): Make this public.
1502
1503         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
1504
1505         * reflection.c: Fix some memory leaks.
1506         
1507 2004-12-02  Martin Baulig  <martin@ximian.com>
1508
1509         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
1510
1511         * metadata.c (generic_class_cache): New static hashtable.
1512         (mono_metadata_lookup_generic_class): New public method.
1513
1514 2004-12-02  Martin Baulig  <martin@ximian.com>
1515
1516         * class.c (mono_class_create_from_typedef): Call
1517         mono_class_setup_parent() and mono_class_create_mono_type() before
1518         parsing the interfaces.
1519
1520 2004-12-02  Martin Baulig  <martin@ximian.com>
1521
1522         * metadata.c (generic_inst_cache): New static hashtable.
1523         (mono_metadata_lookup_generic_inst): New public function.
1524         (mono_metadata_inflate_generic_inst): New public function.
1525         (mono_metadata_parse_generic_inst): New public function.
1526         (do_mono_metadata_parse_generic_class): Use the new
1527         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
1528         since this'll also use the cache.
1529
1530         * reflection.c (mono_reflection_bind_generic_method_parameters):
1531         Use mono_metadata_lookup_generic_inst() to use the new cache.
1532
1533         * class.c (inflate_mono_type): Use
1534         mono_metadata_inflate_generic_inst() to inflate a generic
1535         instance; this'll also use the new cache.
1536
1537         * loader.c (method_from_methodspec): Use
1538         mono_metadata_parse_generic_inst() and
1539         mono_metadata_inflate_generic_inst() rather than parsing it
1540         manually, so we can use the new cache.
1541
1542 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
1543
1544         * threads.c (wait_for_tids): Do not incorrectly free threads when 
1545         the wait times out.
1546
1547 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1548
1549         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
1550         iter->args based on whether parameters are passed in registers (i.e.
1551         MONO_ARCH_REGPARMS is defined)
1552
1553 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
1554
1555         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
1556         the exception message. Fixes #70070.
1557         (method_from_methodspec): Fix warnings.
1558
1559 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1560
1561         * process.c: (complete_path) return the path quoted
1562
1563 2004-12-01  Martin Baulig  <martin@ximian.com>
1564
1565         * class-internals.h (MonoGenericInst): New structure.
1566         (MonoGenericClass): Replaced `type_argc', `type_argv' and
1567         `is_open' with `MonoGenericInst *inst'.
1568         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
1569         `is_open' with `MonoGenericInst *inst'.
1570
1571 2004-11-30  Martin Baulig  <martin@ximian.com>
1572
1573         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
1574
1575         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
1576         to `generic_class_cache'.
1577
1578         * metadata.c
1579         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
1580         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
1581         (mono_generic_inst_is_valuetype): Renamed to
1582         mono_generic_class_is_valuetype().
1583
1584         * class-internals.h
1585         (MonoGenericInst): Renamed to MonoGenericClass.
1586         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
1587         (MonoClass): Renamed `generic_inst' to `generic_class'.
1588         (MonoGenericContext): Renamed `ginst' to `gclass'.
1589
1590         * object-internals.h
1591         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
1592
1593         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
1594         mono_reflection_generic_class_initialize().
1595
1596         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
1597         now known as "System.Reflection.MonoGenericClass".
1598         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
1599
1600 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
1601
1602         * class-internals.h: Added a flag field to MonoClass to cache the
1603         declarative security attributes actions associated with the class.
1604         * domain-internals.h: Added booleans to MonoJitInfo to cache the
1605         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
1606         applicable to the JITted method.
1607         * reflection.c|h: Added functions to extract (as flags) which security
1608         actions are available (declaratively) for a method, class or assembly.
1609         * metadata.c|h: Added functions to search the declarative security
1610         table in the metadata.
1611         
1612 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
1613
1614         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
1615         EXPORTEDTYPES are already in the class name cache, so there is no
1616         need to add extra code here to look at them. Just removes a bit of
1617         cruft.
1618
1619         (ves_icall_System_Environment_get_TickCount): No need for #if
1620         WINDOWS. We already have the code in io-layer.
1621
1622 2004-11-28  Martin Baulig  <martin@ximian.com>
1623
1624         * loader.c
1625         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
1626         Fixes gen-112.cs.
1627
1628 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
1629
1630         * assembly.c (do_mono_assembly_open): Instead of having a
1631         conditional WITH_BUNDLE, incorporate support for bundles here, by
1632         having a global `bundles' variable holding a pointer to the actual
1633         bundles. 
1634
1635         (mono_register_bundled_assemblies): New API call used by the
1636         bundle code. 
1637
1638         See mkbundle.1 for details.
1639         
1640 2004-11-27  Martin Baulig  <martin@ximian.com>
1641
1642         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
1643         the vtable for generic methods.
1644
1645 2004-11-26  Martin Baulig  <martin@ximian.com>
1646
1647         * metadata.c
1648         (mono_metadata_generic_method_hash): New public function.
1649         (mono_metadata_generic_method_equal): Likewise.
1650
1651         * class-internals.h
1652         (MonoGenericContainer): Added `GHashTable *method_hash'.
1653
1654         * reflection.c (ReflectionMethodBuilder): Added
1655         `MonoGenericContainer *generic_container'.
1656         (reflection_methodbuilder_to_mono_method): Don't create a new
1657         MonoGenericContainer each time we're called.
1658         (mono_reflection_bind_generic_method_parameters): Use
1659         `container->method_hash' to cache the results so we don't create a
1660         different method if we're called several times with the same
1661         arguments.
1662
1663         * loader.c (method_from_methodspec): Use the new
1664         `container->method_hash' here, too.
1665
1666 2004-11-26  Martin Baulig  <martin@ximian.com>
1667
1668         * class.c (inflate_generic_signature): Correctly compute
1669         `res->has_type_parameters'.
1670         (mono_class_vtable): Use the `has_type_parameters' flag to
1671         determine whether we're a generic method.
1672
1673         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
1674
1675 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
1676
1677         * object.c (mono_runtime_run_main): Fix a small memory leak.
1678
1679 2004-11-25  Martin Baulig  <martin@ximian.com>
1680
1681         * class.c (set_generic_param_owner): Fixed the loop.
1682
1683 2004-11-25  Martin Baulig  <martin@ximian.com>
1684
1685         * object.c (mono_class_vtable): Don't create any JIT wrappers for
1686         generic methods.
1687
1688 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
1689
1690         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
1691         names. Fixes #69787.
1692
1693 2004-11-24  Martin Baulig  <martin@ximian.com>
1694
1695         * class.c (mono_class_create_generic_2): If we don't have a
1696         `ginst->parent', inflate `gklass->parent' to get our parent.
1697
1698 2004-11-24  Martin Baulig  <martin@ximian.com>
1699
1700         * reflection.c (compare_genericparam): Correctly sort the
1701         GenericParam table; fixes #69779.
1702
1703 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
1704
1705         * reflection.c: When writing a PE file, don't create a huge
1706         buffer in memory. Just write the arrays we have to the file.
1707         This reduces memory usage.
1708
1709         * metadata-internals.h: MonoDynamicStream pefile is no longer used
1710         globally.
1711
1712 2004-11-17  Martin Baulig  <martin@ximian.com>
1713
1714         * class.c (mono_class_init): Don't setup `class->parent' for
1715         dynamic instances; moved this to mono_class_generic_2().
1716         (mono_class_create_generic): Also set `klass->inited' for dynamic
1717         generic instances.
1718         (mono_class_create_generic_2): Don't do anything for dynamic
1719         generic instances.  Set `klass->parent' here and also call
1720         mono_class_setup_parent() here. 
1721
1722         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
1723         `MonoType *parent' argument; set `ginst->parent' before calling
1724         mono_class_create_generic_2(), so we set the correct parent.
1725
1726 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
1727
1728         * reflection.c: allow getting attributes from ModuleBuilder
1729         (used by ikvm).
1730
1731 2004-11-17  Martin Baulig  <martin@ximian.com>
1732
1733         * class.c (mono_class_create_from_typedef): If a type parameter is
1734         inherited from an outer class, set its owner to that class.
1735
1736 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
1737
1738         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
1739           for (int*) written size. This fixes bug #69592.
1740
1741 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
1742
1743         * icall.c: Added IsAuthenticodePresnet internal call.
1744         * image.c|h: New function that check a MonoImage for an Authenticode
1745         signature in the certificate PE data directory.
1746         * security.c|h: New internal call to ask the runtime if an 
1747         Authenticode signature seems referenced in the PE header.
1748
1749 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
1750
1751         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
1752
1753         * reflection.c (mono_image_create_pefile): Free the assembly streams
1754         after writing out the assembly file.
1755
1756         * object.c (mono_runtime_run_main): Fix small memory leak.
1757
1758         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
1759         property access modifiers. Fixes #69389.
1760
1761 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
1762
1763         * domain.c, object.c, object-internals.h, domain-internals.h,
1764         object.h, marshal.c: keep dynamic code info per domain.
1765
1766 2004-11-15  Martin Baulig  <martin@ximian.com>
1767
1768         * class.c (mono_type_get_name_recurse): Put type arguments in
1769         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
1770         see bug #68387.
1771
1772 2004-11-15  Martin Baulig  <martin@ximian.com>
1773
1774         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
1775         (mono_class_setup_vtable): When computing `the_cname' for a
1776         generic instance, don't include the namespace since we'd otherwise
1777         add it twice.
1778
1779 2004-11-15  Martin Baulig  <martin@ximian.com>
1780
1781         * class.c (mono_class_create_generic): Changed return type to void.
1782         (mono_class_create_generic_2): New public function; setup
1783         `class->method', `class->field' and `class->interfaces' here
1784         instead of in mono_class_init().
1785
1786         * class.h (mono_class_create_generic): Moved to class-internals.h.
1787
1788 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
1789
1790         * reflection.c (mono_image_create_pefile): take a file HANDLE.
1791         rather than writing to memory, write to this file. Right now,
1792         we are just writting into a buffer, and copying that. However
1793         we can avoid the buffer later.
1794
1795         (mono_dynamic_stream_reset): new function
1796
1797         * icall.c, object-internals.h: update for the above.
1798
1799 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
1800
1801         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
1802         have been using gc'd memory. First it is slower, unlikely
1803         the comment in the source code said, secondly, it increases
1804         our footprint to do it in the gc.
1805
1806         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
1807         the method so that it does not have to copy to managed code.
1808
1809 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
1810
1811         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
1812
1813 2004-11-12  Martin Baulig  <martin@localhost>
1814
1815         * reflection.c (mono_image_create_token): Allow generic method
1816         definitions here, since they may appear in an `.override'; see
1817         gen-98/gen-99 for an example.
1818
1819 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
1820
1821         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
1822         #69365.
1823
1824         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
1825         descriptive.
1826
1827 2004-11-11  Martin Baulig  <martin@ximian.com>
1828
1829         * class.c (mono_class_setup_vtable): In an explicit interface
1830         implementation, the method name now includes the arity.
1831
1832 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
1833
1834         * object.c (mono_array_full_copy): Fix warning.
1835
1836 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
1837
1838         * appdomain.c: Removed look_for_method_by_name(). Use the new method
1839         mono_class_get_method_from_name() instead.
1840         
1841         * class-internals.h: Added two new types of wrappers. 
1842         Added MonoRemotingTarget enum. Added new trampoline function type, which
1843         takes an additional MonoRemotingTarget value as parameter, so it is
1844         possible to request a trampoline for a specific target.
1845         
1846         * class.c: Added new mono_class_get_method_from_name() method.
1847         
1848         * class.h: In MonoRemoteClass, we can have now to vtables, one for
1849         general remoting sinks and one specific for cross domain calls.
1850         
1851         * debug-helpers.c: Added new wrapper names.
1852         
1853         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
1854         of a remote class.
1855         
1856         * image.c: Porperly delete value objects form the remoting invoke hashtable.
1857         
1858         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
1859         with several other methods (mono_marshal_get_xappdomain_dispatch,
1860         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
1861         and others) can generate a fast remoting wrapper for cross domain calls.
1862         More information can be found in docs/remoting.
1863         Other changes: Removed mono_find_method_by_name, and used
1864         mono_class_get_method_from_name instead.
1865         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
1866         is stored in the remoting invoke hashtable.
1867         
1868         * marshal.h: published the new method for getting the xdomain wrapper,
1869         and also added a method for getting the adequate wrapper for a given
1870         method and target.
1871         
1872         * object-internals.h, object.c: Added a couple of methods for capying and
1873         cloning arrays.
1874         Modified mono_install_remoting_trampoline, which takes the new remoting
1875         trampoline that has a remoting target as parameter.
1876         mono_class_proxy_vtable now also takes a remoting target as parameter, and
1877         will return the most suitable vtable for the target.
1878         Added mono_remote_class_vtable, which returns the vtable of a remote class
1879         (which can be the normal remoting vtable or the xdomain vtable).
1880         
1881         * threads.c: the xdomain invoke and dispatch wrappers must also be
1882         protected against interruptions.
1883
1884 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1885
1886         * icall.c: use memmove in BlockCopyInternal when the source and
1887         destination arrays are the same.
1888
1889 2004-11-09  Martin Baulig  <martin@ximian.com>
1890
1891         * class-internals.h (MonoGenericContainer): Removed `method' and
1892         `signature', replaced them with `is_method' and `is_signature'
1893         flags.  Added `context'.
1894
1895         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
1896         instead of a `MonoGenericContainer *'.
1897
1898         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
1899         for dynamic type parameters.
1900         (mono_metadata_load_generic_params): Setup `container->context'.
1901
1902         * reflection.c (mono_reflection_setup_generic_class): Setup
1903         `tb->generic_container->context'.
1904         (do_mono_reflection_bind_generic_parameters): Use
1905         mono_class_inflate_generic_type() to correctly inflate types,
1906         rather than using our own hack just for MONO_TYPE_VAR.
1907
1908 2004-11-09  Martin Baulig  <martin@ximian.com>
1909
1910         * class.c (mono_class_inflate_generic_method): Small fix; don't
1911         crash here.
1912
1913         * icall.c
1914         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
1915         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
1916         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
1917         (ves_icall_Type_BindGenericParameters): Likewise.
1918         (ves_icall_Type_get_IsGenericInstance): Likewise.
1919         (ves_icall_Type_GetGenericParameterPosition): Likewise.
1920         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
1921         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1922         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1923
1924 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
1925
1926         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
1927         assembly versions and public key tokens. Fixes #69113.
1928
1929 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
1930
1931         * metadata.c: fix bug introduced with the type cache changes
1932         on 2004-11-06.
1933
1934 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
1935
1936         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
1937         the MonoClass pointer instead of the token in exception clauses.
1938         * reflection.c: updates for the above and make the code not depend
1939         on the structure of MonoExceptionClause.
1940
1941 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
1942
1943         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
1944         Add support for dynamic assemblies. Fixes #69114.
1945
1946         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
1947
1948 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
1949
1950         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
1951         since most only those methods use it. the code member of
1952         MonoMethodPInvoke was dead, so that can be removed too. Also,
1953         remove inline_count (again, not used), and move slot so that it
1954         can share bits with some other flags. This saves 8 bytes in the
1955         structure and gives us about 50 kb back for mcs helloworld.cs
1956
1957         * *.[ch]: Do naming changes for the above.
1958
1959         * loader.c (mono_method_get_header): Lazily init the header
1960         on first access.
1961         (mono_get_method_from_token): don't init the header here
1962         (mono_free_method): the header may never be allocated
1963
1964         Overall, this saves 150 kb of unmanaged allocations
1965         for mcs helloworld.cs. That accounts for 10% of the unmanaged
1966         memory at runtime.
1967         
1968         * loader.c, loader.h (mono_method_get_header): new accessor.
1969
1970         * *.[ch]: use the above method. Prepares us to lazily load
1971         the header.
1972
1973         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
1974         three warnings, which are actual bugs (see 69206).
1975
1976         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
1977         unused. Saves a cool 4 bytes / method.
1978
1979 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
1980
1981         * metadata.c (builtin_types): Add types for System.Object here.
1982         (mono_metadata_parse_type_full): Cache MonoType*'s that are
1983         for a class or valuetype from klass->this_arg or klass->byval_arg.
1984
1985         On mcs for a hello world, this gets us down from 21836 MonoType's
1986         to 14560.
1987
1988         (mono_metadata_free_type): Account for the above change.
1989
1990 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
1991
1992         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
1993         exception instead of asserting if name is null.
1994         (ves_icall_System_AppDomain_GetData): Ditto.
1995
1996 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
1997
1998         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
1999         EnumBuilder.
2000
2001         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
2002         Return NULL when the domain does not have entry_assembly set.
2003
2004         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
2005         Add a 'resource_modules' argument.
2006         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
2007
2008         * reflection.c (mono_reflection_create_runtime_class): Move setting
2009         of wastypebuilder here, so mono_get_type_object () returns a MonoType
2010         for enums too.
2011
2012         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
2013         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
2014         Throw an ArgumentNullException if 'ptr' is null.
2015
2016         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
2017         assemblies here. Fixes #69020.
2018
2019 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
2020
2021         * reflection.c (build_compressed_metadata): Fix the previous patch for
2022         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
2023         the stack.
2024
2025 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
2026
2027         * assembly.c (mono_assembly_names_equal): Allow a match if one of
2028         the cultures is false. Fixes #69090.
2029
2030         * reflection.c (build_compressed_metadata): Fix invalid memory read 
2031         detected by valgrind.
2032         
2033         * reflection.c (mono_reflection_get_type): Avoid triggering a 
2034         TypeResolve multiple times for the same type. Fixes #65577.
2035
2036 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
2037
2038         * marshal.c: Avoid using ldftn to call managed functions. It is
2039         much slower than just a call.
2040
2041         * reflection.c (mono_module_get_object): free the basename we
2042         allocate here from glib.
2043         
2044         * reflection.c (ensure_runtime_vtable): make sure to free
2045         overrides.  Also, we were allocating an array of MonoMethod not an
2046         array of MonoMethod*.
2047
2048         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
2049
2050         * image.c (mono_image_close): free image->guid here.
2051
2052 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
2053
2054         * reflection.c: Fix some spec conformance issues with the PE file
2055         structures so mcs compiled apps run on the Net 2.0 beta.
2056
2057 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
2058
2059         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
2060         Implement this. Fixes #67264.
2061
2062         * debug-helpers.h debug-helpers.c marshal.c: Move 
2063         mono_find_method_by_name to debug-helpers.c.
2064
2065 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
2066
2067         * object.c (mono_release_type_locks): type_initialization_hash is
2068         a GHashTable.
2069
2070         * reflection.c object.c object-internals.h: Fix warnings.
2071
2072         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
2073         without accessors. Fixes #61561.
2074
2075         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
2076         application base from the root domain if not set. Fixes #65641.
2077         (mono_runtime_init): Fix warning.
2078
2079 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2080
2081         * appdomain.c: call mono_thread_pool_init.
2082         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
2083         of worker threads based on the number of CPUs and the environment
2084         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
2085         for non-windows (windows) systems.
2086
2087 2004-10-27  Chris Toshok  <toshok@ximian.com>
2088
2089         * mono-debug-debugger.c (write_class): don't call mono_class_init
2090         here, as even with the check for (!klass->init_pending), we get
2091         into a situation where we're hitting cycles in class
2092         initialization.  Fixes #68816.
2093
2094 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
2095
2096         * image.c: Avoid overwriting values in the loaded_images_hash when an
2097         assembly is loaded multiple times. Fixes #61152.
2098
2099         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
2100         so multiple satellite assemblies for the same name can be loaded.
2101         Fixes #68259.
2102
2103         * mono_domain_assembly_preload: Actually return the loaded assembly, 
2104         not NULL.
2105
2106         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
2107         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
2108
2109         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
2110         pending finalizers are not invoked after the appdomain has been 
2111         unloaded. Fixes #67862.
2112
2113 2004-10-22  Martin Baulig  <martin@ximian.com>
2114
2115         * mono-debug-debugger.c
2116         (mono_debugger_runtime_invoke): Don't box valuetypes.
2117
2118 2004-10-22  Chris Toshok  <toshok@ximian.com>
2119
2120         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
2121         don't hide private methods.
2122
2123 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
2124
2125         * icall.c: Allows the runtime to "share" (when known) the public key
2126         token of an assembly. This avoid the need to recalculate the token 
2127         (from the public key) in managed code.
2128
2129 2004-10-21  Chris Toshok  <toshok@ximian.com>
2130
2131         * debug-helpers.c (append_class_name): argh, revert last patch.
2132         
2133 2004-10-21  Chris Toshok  <toshok@ximian.com>
2134
2135         * debug-helpers.c (append_class_name): use '+' as the delimiter,
2136         not '/', so that it matches what the debugger uses to look up
2137         methods.
2138
2139 2004-10-21  Martin Baulig  <martin@ximian.com>
2140
2141         * mono-debug-debugger.c (mono_debugger_throw_exception): New
2142         public method; this is called each time an exception is thrown and
2143         allows the debugger to use exception catch points.
2144
2145 2004-10-21  Martin Baulig  <martin@ximian.com>
2146
2147         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
2148         the stack pointer and the exception object in some struct and pass
2149         that to the debugger.
2150
2151 2004-10-21  Chris Toshok  <toshok@ximian.com>
2152
2153         * mono-debug-debugger.c (do_write_class): add instance/static
2154         event support.  We don't expose "raise" or "other" yet.
2155         (event_is_static): new method.
2156
2157 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
2158
2159         * mono-debug-debugger.c
2160         (mono_debugger_handle_exception): Remove
2161         bogus return value for fussy compilers.
2162
2163 2004-10-20  Martin Baulig  <martin@ximian.com>
2164
2165         * mono-debug-debugger.c
2166         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
2167         (mono_debugger_handled_exception): Likewise.
2168
2169 2004-10-20  Martin Baulig  <martin@ximian.com>
2170
2171         * mono-debug-debugger.h (MonoDebuggerEvent): Added
2172         MONO_DEBUGGER_EVENT_EXCEPTION.
2173
2174         * mono-debug-debugger.c (mono_debugger_handle_exception): New
2175         public function to send the debugger a notification for an
2176         exception and inform it about a catch/finally clause.
2177
2178 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
2179
2180         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
2181         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
2182         fix 2.95 build. 
2183
2184         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
2185
2186 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
2187
2188         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
2189         marshalled as [In,Out]. Fixes #58325.
2190
2191 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
2192
2193         * reflection.c (mono_method_body_get_object): Implement some fields.
2194
2195 2004-10-12  Martin Baulig  <martin@ximian.com>
2196
2197         * reflection.c (mono_reflection_bind_generic_parameters): Small
2198         fix, correctly retrieve our parent from a generic instance.
2199
2200 2004-10-12  Martin Baulig  <martin@ximian.com>
2201
2202         * metadata.c (mono_metadata_generic_param_equal): We always have
2203         an owner.
2204
2205         * class.c
2206         (mono_class_from_generic_parameter): We need to have an owner.
2207         (my_mono_class_from_generic_parameter): Likewise.
2208
2209         * reflection.c (mono_reflection_setup_generic_class): Renamed to
2210         mono_reflection_create_generic_class() and added a new
2211         mono_reflection_setup_generic_class().  
2212         (mono_reflection_initialize_generic_param): If we're a nested
2213         generic type and inherited from the containing class, set our
2214         owner to the outer class.
2215
2216 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
2217
2218         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
2219
2220         * reflection.c (mono_method_body_get_object): New function to create
2221         a MethodBody object.
2222
2223         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
2224
2225 2004-10-11  Martin Baulig  <martin@ximian.com>
2226
2227         * metadata.c (_mono_metadata_type_equal): Renamed to
2228         do_mono_metadata_type_equal() and made static.
2229
2230 2004-10-11  Martin Baulig  <martin@ximian.com>
2231
2232         * appdomain.c: Bump corlib version number to 28.
2233
2234 2004-10-10  Martin Baulig  <martin@ximian.com>
2235
2236         * class-internals.h
2237         (MonoGenericInst): Added `MonoGenericContainer *container'.
2238         (MonoGenericMethod): Likewise.
2239         (MonoGenericContext): Likewise.
2240         (MonoGenericParam): Added `MonoGenericContainer *owner'.
2241
2242         * metadata.c
2243         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
2244         (do_mono_metadata_parse_generic_inst): Likewise.
2245         (mono_metadata_parse_type_full): New public method.  This is the actual
2246         mono_metadata_parse_type() implementation - with an additional
2247         `MonoGenericContainer *' argument.
2248         (mono_metadata_parse_array_full): Likewise.
2249         (mono_metadata_parse_signature_full): Likewise.
2250         (mono_metadata_parse_method_signature_full): Likewise.
2251         (mono_metadata_parse_mh_full): Likewise.
2252         (mono_type_create_from_typespec): Likewise.
2253         (mono_metadata_interfaces_from_typedef_full): New public method;
2254         this is similar to the other _full() methods, but we take a
2255         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
2256         (mono_metadata_parse_generic_param): Take an additional
2257         `MonoGenericContainer *' argument and lookup the MonoGenericParam
2258         from that container.
2259         (mono_metadata_generic_param_equal): New static method to compare
2260         two type parameters.
2261         (_mono_metadata_type_equal): New static method; takes an
2262         additional `gboolean signature_only' argument - if true, we don't
2263         compare the owners of generic parameters.
2264         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
2265         with a TRUE argument - do a signature-only comparision.
2266
2267         * loader.c: Use the new _full() methods and pass the
2268         MonoGenericContainer to them.
2269
2270         * object-internals.h (MonoReflectionTypeBuilder): Added
2271         `MonoGenericContainer *generic_container' field.
2272         (MonoReflectionMethodBuilder): Likewise.
2273
2274 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
2275
2276         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
2277         case initial images of dynamic assemblies.
2278
2279         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
2280
2281         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
2282
2283         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
2284         length of event->other array.
2285         (typebuilder_setup_events): Ditto.
2286
2287         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
2288         'assembly_by_name' and add an 'assemblies' list.
2289
2290         * assembly.h assembly.c: Add a new search hook for determining whenever
2291         an assembly is already loaded. Use this instead of searching in the
2292         loaded_assemblies list.
2293
2294         * domain.c appdomain.c: Implement the new search hook so loaded 
2295         assemblies are now scoped by appdomain. Fixes #67727.
2296
2297 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
2298
2299         * threads.c (mono_thread_attach): Initialize synch_lock field so
2300         mono_thread_detach works again.
2301
2302         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
2303         'lib' too. Fixes #63130.
2304
2305 2004-10-06  Jackson Harper  <jackson@ximian.com>
2306
2307         * culture-info-tables.h: regenerated.
2308
2309 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
2310
2311         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
2312         implemented by other interfaces in the result. Fixes #65764.
2313         
2314         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
2315         Handle unloadable modules without crashing.
2316
2317         * image.c (load_modules): Revert the previous patch since modules must
2318         have a fixed index inside the array.
2319         
2320         * image.c (load_modules): Don't include native modules in the modules
2321         array.
2322
2323 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
2324
2325         * reflection.h: Add param_defaults field.
2326
2327         * reflection.c: Add support for parameter defaults in dynamic methods.
2328         Fixes #64595.
2329
2330         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
2331         an empty string when a type has no namespace. Fixes #64230.
2332
2333 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
2334
2335         * tabledefs.h: Added "internal" security actions to support non-CAS
2336         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
2337         Note: they do not seems to be used anymore in 2.0 (new metadata format)
2338
2339 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
2340
2341         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
2342         constructor of abstract class. Fixes #61689.
2343
2344 2004-10-04  Martin Baulig  <martin@ximian.com>
2345
2346         * class-internals.h (MonoGenericContainer): New type.
2347         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
2348         `MonoGenericContainer *generic_container'.
2349         (MonoClass): Replaced `gen_params' and `num_gen_params' with
2350         `MonoGenericContainer *generic_container'.
2351
2352         * metadata.c (mono_metadata_load_generic_params): Return a
2353         `MonoGenericContainer *' instead of a `MonoGenericParam *';
2354         removed the `num' argument.
2355
2356 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
2357
2358         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
2359         for dynamic images.
2360
2361         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
2362         machine fields.
2363
2364         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
2365
2366         * reflection.c: Save pe_kind and machine values into the generated
2367         image file.
2368
2369         * appdomain.c: Bump corlib version number.
2370
2371         * object-internals.h: Reorganize layout of LocalBuilder.
2372
2373         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
2374         New helper function.
2375
2376         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
2377         created MonoType for dynamic types. Fixes #66180.
2378
2379 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
2380
2381         * threadpool.c: the ares hashtable needs a critical section around it.
2382         this prevents some nasty segfaults
2383
2384 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
2385
2386         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
2387         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
2388         bug 67324).
2389         
2390 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
2391
2392         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
2393         
2394 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
2395
2396         * image.c: Always canonicalize image file names, to avoid loading
2397         the same assembly twice when referenced using a relative path.
2398
2399 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
2400
2401         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
2402
2403         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
2404
2405         * marshal.c: Fix warnings.
2406
2407 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
2408
2409         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
2410         attempting to marshal the delegate_trampoline as the method_addr.
2411         This patch has a static hashtable of marshalled delegates so that 
2412         we can map delegate_trampoline addresses back to delegates.  This
2413         allows a delegate passed to managed code to be passed back into native
2414         code.  Fixes #67039
2415
2416 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
2417
2418         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
2419
2420         * reflection.c (method_encode_code): Align method headers properly.
2421         Fixes #66025.
2422
2423 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
2424
2425         * marshal.c: In the runtime invoke wrapper, reset the abort
2426         exception if it is cached. This avoids the automatic rethrowal of 
2427         the exception after the catch of the wrapper. Also check for pending
2428         interruptions before calling the managed method. This is done using
2429         the new method emit_thread_force_interrupt_checkpoint, since the
2430         normal checkpoint method is ignored when running the invoke wrapper.
2431         * object.c: If the abort exception is rethrown, set the abort_exc
2432         field of the thread, so it will be rethrown aftere every catch.
2433         * threadpool.c: Only run an interruption checkpoint if what has been
2434         requested is a stop of the thread (aborts will be ignored).
2435         * threads.c: By default, a thread will now never be interrumped while
2436         running the runtime invoke wrapper (this ensures that runtime_invoke
2437         will always return to the caller if an exception pointer is provided).
2438         There is a new special method mono_thread_force_interruption_checkpoint()
2439         to force an interruption checkpoint even if running a protected
2440         wrapper, which is used by the same runtime invoke wrapper to do a check
2441         at a safe point.
2442
2443 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
2444
2445         * object.c, object-internals.h: Implemented mono_release_type_locks,
2446         which releases the cctor locks held by a thread.
2447         * threads.c, threads.h: In thread_cleanup, release cctor locks held
2448         by a thread. Added mono_thread_exit() method to be used to safely stop
2449         a thread.
2450
2451 2004-09-28  Raja R Harinath  <rharinath@novell.com>
2452
2453         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
2454         Move null check before dereference.  Avoid indexing beyond the end
2455         of the 'modules' array.
2456
2457 2004-09-28  Raja R Harinath  <rharinath@novell.com>
2458
2459         * metadata-internals.h (MonoImage): Add module_count field.
2460         * image.c (load_modules): Set image->module_count.
2461         (mono_image_load_file_for_image): Use image->module_count.
2462         * reflection.c (mono_image_load_module): Append to image->modules array 
2463         of dynamic assembly.
2464         (mono_module_get_object): Fix loop to actually increment index.
2465         Use image->module_count.
2466         * assembly.c (mono_assembly_load_references): Use image->module_count.
2467         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2468         Likewise.
2469
2470 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
2471
2472         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
2473         Avoid assert on generic types.
2474
2475 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
2476
2477         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
2478
2479         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
2480
2481         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
2482         function to convert a MarshalSpec structure to its managed counterpart.
2483
2484         * reflection.c: Fix warnings.
2485         
2486         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
2487         field.
2488
2489         * icall.c (mono_create_icall_signature): Fix build.
2490
2491 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
2492
2493         * icall.c: Add MakePointType icall.
2494
2495         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
2496         warnings.
2497
2498 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2499
2500         * threadpool.c: reuse allocated slots in the queue.
2501
2502 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
2503
2504         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
2505
2506         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
2507
2508         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
2509         previous change.
2510
2511         * tabledefs.h: Add constants for pinvoke attributes BestFit and
2512         ThrowOnUnmappableChar.
2513
2514         * icall.c (ves_icall_Type_GetPacking): New icall.
2515
2516 2004-09-24  Martin Baulig  <martin@ximian.com>
2517
2518         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
2519
2520 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2521
2522         * appdomain.c:
2523         (mono_domain_set): allow setting a domain that is being unloaded.
2524         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
2525         being unloaded.
2526
2527 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
2528
2529         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
2530         the GetCustomAttributes icall.
2531
2532 2004-09-23  Martin Baulig  <martin@ximian.com>
2533
2534         * object-internals.h (MonoReflectionGenericParam): Replaced
2535         'has_ctor_constraint', `has_reference_type' and `has_value_type'
2536         with `guint32 attrs'.
2537
2538 2004-09-23  Martin Baulig  <martin@ximian.com>
2539
2540         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
2541
2542 2004-09-23  Martin Baulig  <martin@ximian.com>
2543
2544         * object-internals.h (GenericParameterAttributes): New enum.
2545
2546 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
2547
2548         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
2549         
2550         * class.c (init_events): Fill out event->other field.
2551
2552         * class.c: Fix warnings.
2553
2554         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
2555
2556 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
2557
2558         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
2559         walk which doesn't supply the IL offset.
2560
2561 2004-09-22  Martin Baulig  <martin@ximian.com>
2562
2563         * reflection.c (mono_reflection_setup_internal_class): If we're
2564         System.ValueType, System.Object or System.Enum, set
2565         `klass->instance_size' and create the vtable.
2566         (mono_reflection_create_internal_class): If we're an enum type,
2567         get the base class from our current corlib.
2568
2569 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
2570
2571         * reflection.h (MonoResolveTokenError): New type.
2572
2573         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
2574         icall.
2575
2576         * icall.c: Add an 'error' argument to the ResolveToken icalls.
2577
2578 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
2579
2580         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
2581         Support also calling constructors, but only for already allocated objects.
2582
2583 2004-09-17  Geoff Norton <gnorton@customerdna.com>
2584
2585         * reflection.c (type_get_qualified_name): If the klass is null
2586         return the typename to avoid a NullRefEx.
2587         (encode_cattr_value): Get the qualified name of the boxed type,
2588         not the underlying enumtype.  Fixes #62984.
2589
2590 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
2591
2592         * marshal.c: Fix problems with previous checkin.
2593
2594 2004-09-21    <vargaz@freemail.hu>
2595
2596         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
2597         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
2598
2599         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
2600
2601 2004-09-21  Geoff Norton <gnorton@customerdna.com>
2602
2603         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
2604         should only return a type for pointers, arrays, and passbyref types.
2605         Fixes bug #63841.
2606
2607 2004-09-21  Martin Baulig  <martin@ximian.com>
2608
2609         * domain.c (mono_debugger_check_runtime_version): New public
2610         function.
2611
2612         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
2613
2614 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
2615
2616         * reflection.c: Added missing sort to the declarative security 
2617         attributes table. MS implementation stops seeing the attributes if the
2618         token number regress in the table (as shown by ildasm and permview).
2619
2620 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
2621
2622         * object-internals.h (MonoReflectionModule): Add 'token' field.
2623         
2624         * reflection.c (mono_reflection_get_token): Add support for Module
2625         and Assembly.
2626         (mono_module_get_object): Set 'token' field.
2627         (mono_module_file_get_object): Set 'token' field.
2628
2629         * icall.c: Add new Assembly and Module icalls.
2630
2631         * appdomain.c: Bump corlib version.
2632
2633 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
2634
2635         * loader.h loader.c class.h class.c: Add helper functions for obtaining
2636         tokens of metadata objects.
2637
2638         * reflection.h reflection.c (mono_reflection_get_token): New function
2639         to obtain the token of a metadata object.
2640
2641         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
2642
2643 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
2644
2645         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
2646         
2647         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
2648
2649 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
2650
2651         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
2652         * object-internals.h: Added 3 MonoArray* members to MonoReflection
2653         AssemblyBuilder to access the permissions set in the class lib.
2654         * reflection.c: Added security attributes encoding step in 
2655         mono_image_build_metadata.
2656         * tabledefs.h: Added new security actions defined in 2.0:
2657         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
2658
2659 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
2660
2661         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
2662         macro parameter.
2663
2664 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
2665  
2666         * locales.c: nullify the ICU_collator member of CompareInfo when it is
2667           finalized. There where random SIGSEVs at program termination, when
2668           an object being finalized was trying to do a string comparison and
2669           the current culture was already finalized.
2670  
2671 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2672
2673         * threads.c: call thread_cleanup before finishing the thread if we get
2674         there.
2675
2676 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
2677
2678         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
2679         assemblies from the parent. Fixes #65665.
2680
2681 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
2682
2683         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
2684         modifiers.
2685
2686 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
2687
2688         * reflection.h: add prototype for mono_get_dbnull_object
2689         * reflection.c: add prototypes for get_default_param_value_blobs 
2690         and mono_get_object_from_blob for fussier compilers
2691
2692 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
2693  
2694         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
2695         false deadlock checks in class initialization.
2696  
2697 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
2698
2699         * image.c (mono_image_addref): Fix comment.
2700
2701         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
2702         possible.
2703
2704 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
2705
2706         * reflection.c (mono_param_get_objects): Modified to return
2707         ParameterInfo.DefaultValue object.
2708
2709         (get_default_param_value_blobs):
2710         (mono_get_object_from_blob):
2711         (mono_get_dbnull_object): New helper routines. 
2712
2713         * object.c (mono_get_constant_value_from_blob): New helper routine
2714         carved out from get_default_field_value ()
2715
2716         * object-internals.h (mono_get_constant_value_from_blob): Added
2717         function declaration.
2718
2719 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
2720
2721         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
2722         referenced assemblies. Fixes #62135.
2723
2724         * exception.h exception.c (mono_get_exception_file_not_found2): New
2725         helper function.
2726
2727 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
2728
2729         * class.h class.c: Add mono_type_get_underlying_type ().
2730
2731 2004-09-09  Geoff Norton <gnorton@customerndna.com>
2732
2733         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
2734         Fix GetTypes() to support dynamically created assemblies.
2735
2736 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
2737
2738         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
2739         
2740         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
2741         previous patch.
2742
2743         * reflection.h reflection.c loader.c: Allow dynamic construction of
2744         pinvoke methods. Fixes #65571.
2745         
2746         * reflection.c (mono_reflection_get_type): Revert previous change since
2747         it causes regressions.
2748
2749 2004-09-08  Martin Baulig  <martin@ximian.com>
2750
2751         * class.c (class_compute_field_layout): Don't call
2752         mono_class_layout_fields() for open generic instances.
2753
2754 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
2755         * threads.c appdomain.c: fix typo in GC macro
2756
2757 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2758
2759         * threads.c: don't call mono_thread_detach() in start_wrapper(),
2760         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
2761
2762 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
2763
2764         * image.c (mono_image_close): Applied patch from 
2765         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
2766         assembly is loaded multiple times from data.
2767         
2768         * image.c (mono_image_open): Fix warning.
2769
2770 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2771
2772         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
2773         once. Fixes #58334.
2774         
2775         * reflection.c (mono_reflection_create_runtime_class): Initialize
2776         klass->nested_classes. Fixes #61224.
2777
2778 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
2779
2780         * threads.c: sched_yield() on exit, to allow threads to quit.
2781
2782 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2783
2784         * object.c (mono_unhandled_exception): Remove leftover debug code.
2785
2786 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
2787
2788         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
2789
2790 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2791
2792         * marshal.c (emit_marshal_array): Really null terminate string arrays.
2793         
2794         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
2795
2796 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2797
2798         * marshal.c (emit_marshal_array): Null terminate string arrays.
2799         
2800         * marshal.c (raise_auto_layout_exception): Fix warning.
2801
2802         * reflection.c (mono_param_get_objects): Initialize the default value
2803         with DBNull.Value, not null. Fixes #62123.
2804
2805 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
2806
2807         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
2808         throw an exception with a cute explanation.
2809
2810 2004-09-06  Dick Porter  <dick@ximian.com>
2811
2812         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
2813         Close the new process's thread handle, as we don't use it.  The
2814         handle stays around forever otherwise.
2815
2816 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2817
2818         * object.c (arith_overflow): Fix warning.
2819
2820         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
2821         calling conventions in method refs. Fixes #65352.
2822
2823         * reflection.c: Fix warnings.
2824
2825 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
2826
2827         * icall.c: Add a new icall for Array.Clear
2828
2829 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
2830
2831         * object.c: When allocating an array, we have to throw
2832         an overflow exception if any of the lengths are < 0.
2833
2834 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2835
2836         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
2837         properly. Also move implementation of string array marshalling to 
2838         managed code. Fixes #42316.
2839
2840 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2841
2842         * assembly.c: provide more information when loading an assembly fails.
2843
2844 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2845
2846         * filewatcher.c: don't expect the development fam package to be
2847         installed.
2848
2849 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
2850
2851         * marshal.c: Make a copy of the signature cookie since it will be
2852         freed by the caller.
2853         
2854         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
2855
2856         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
2857
2858         * metadata.c (mono_metadata_free_marshal_spec): New function to free
2859         marshal specs.
2860
2861         * marshal.c: More refactoring.
2862         
2863         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
2864         smaller functions.
2865
2866 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
2867
2868         * object.c: In mono_message_invoke, fill the output parameter array after
2869           calling the managed method (it was done before the call). This fixes
2870           bug #59299.
2871
2872 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
2873
2874         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
2875         as well.
2876
2877 2004-09-02  Martin Baulig  <martin@ximian.com>
2878
2879         * class.c (mono_class_instance_size): Don't allow generic type
2880         definitions or open generic instances.
2881         (mono_class_array_element_size): If we're a value type, call
2882         mono_class_instance_size() on the original class.
2883
2884         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
2885         handle generic instances.
2886
2887         * mono-debug-debugger.c (write_type): Handle generic instances
2888         like classes.
2889
2890 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
2891
2892         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
2893         the allocation request fails. Fixes #65089.
2894
2895         * object.c (mono_runtime_free_method): Do not call mono_free_method.
2896         
2897         * object.c (mono_runtime_free_method): New function to free a dynamic
2898         method.
2899
2900         * marshal.c (mono_delegate_free_ftnptr): New function to free the
2901         delegate trampoline.
2902
2903         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
2904         with hasthis as dynamic,
2905
2906         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
2907
2908         * domain.c (mono_jit_info_table_remove): New function to remove an
2909         entry from the jit info table.
2910
2911         * class-internals.h (MonoMethod): Add 'dynamic' field.
2912
2913         * loader.c: Fix warnings.
2914
2915 2004-09-01  Martin Baulig  <martin@ximian.com>
2916
2917         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
2918         instead of mono_debugger_lock() because the latter one is a no-op
2919         unless running in the debugger.
2920
2921 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
2922
2923         * class.c (class_compute_field_layout): Classes with auto-layout or
2924         reference fields are not blittable.
2925         
2926 2004-09-01  Dick Porter  <dick@ximian.com>
2927
2928         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
2929         mono_image_get_filename() to get the assembly location.
2930
2931         * icall.c:
2932         * metadata.h: Fix compile warnings
2933
2934 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
2935
2936         * class.c (class_compute_field_layout): System.Object is blittable.
2937
2938         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
2939         as in/out. Fixes #59909.
2940
2941 2004-09-01  Martin Baulig  <martin@ximian.com>
2942
2943         * metadata.h (MONO_TYPE_ISREFERENCE): Call
2944         mono_metadata_generic_inst_is_valuetype() if we're a generic
2945         instance to check whether our underlying type is a reference type.
2946
2947 2004-09-01  Martin Baulig  <martin@ximian.com>
2948
2949         * metadata.c (mono_type_size): If we're a generic instance, call
2950         mono_class_value_size() for value types.
2951
2952 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
2953
2954         * marshal.c: Implement more custom marshalling functionality. Fixes
2955         #64915.
2956
2957 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
2958
2959         * mono-debug.c, debug-mono-symfile.c: add some locking love.
2960
2961 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
2962
2963         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
2964
2965         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
2966
2967         * icall.c: Fix some warnings.
2968
2969         * threads.c (abort_appdomain_thread): Fix unref errors.
2970         (mono_thread_current): Fix THREAD_DEBUG define.
2971
2972 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
2973
2974         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
2975
2976         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
2977
2978 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
2979
2980         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
2981         string arrays.
2982
2983 2004-08-28  Martin Baulig  <martin@ximian.com>
2984
2985         * metadata.c
2986         (mono_metadata_generic_inst_is_valuetype): New public function.
2987
2988         * metadata.h (MONO_TYPE_ISSTRUCT): Call
2989         mono_metadata_generic_inst_is_valuetype() if we're a generic
2990         instance to check whether our underlying type is a valuetype.
2991
2992 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
2993
2994         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
2995         #63768.
2996
2997 2004-08-25  Martin Baulig  <martin@ximian.com>
2998
2999         * loader.c (mono_get_method_from_token): Abstract methods can also
3000         be generic and thus have type parameters.
3001
3002         * metadata-internals.h
3003         (MonoDynamicImage): Added `GPtrArray *gen_params'.
3004
3005         * reflection.c (mono_image_get_generic_param_info): Don't create a
3006         metadata row, just add an entry to the `gen_params' array.
3007         (build_compressed_metadata): Sort the `gen_params' array and then
3008         actually create the metadata.
3009
3010 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3011
3012         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
3013
3014 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
3015
3016         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
3017
3018 2004-08-24  Martin Baulig  <martin@ximian.com>
3019
3020         * class.cs (mono_class_is_subclass_of): Like an interface, a
3021         generic instance also derives from System.Object.
3022
3023 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
3024
3025         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
3026         custom modifiers to be in any order. Fixes #61990.
3027
3028 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
3029
3030         * object.c: Register mono_object_new_fast icall.
3031         
3032         * object.c (mono_class_get_allocation_ftn): Return to calling
3033         mono_object_new_fast, since it seems faster to compute the object 
3034         size in unmanaged code than passing it as a parameter.
3035
3036         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
3037
3038         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
3039         this function with Boehm as the oom handler, so we don't have to check
3040         the result of GC_malloc.
3041
3042         * object.c: Remove checks for oom.
3043
3044         * object.h object.c (mono_class_get_allocation_ftn): New function to
3045         return the icall which can be used to allocate an instance of a given
3046         class. 
3047
3048         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
3049
3050         * class-internals.h: Add 'enabled' field.
3051
3052 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
3053
3054         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
3055
3056 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
3057         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
3058         value 0x0010.
3059
3060 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
3061
3062         * appdomain.c: use the Tls function for appdomain too,
3063         at Zoltan's request. Actually return in mono_context_get
3064
3065         * appdomain.c, profiler.c, threads.c: use __thread
3066
3067 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
3068
3069         * appdomain.c threads.c: Call GC_CreateThread on windows.
3070
3071         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
3072         multiple libraries since this don't work on windows.
3073
3074 2004-08-18  Martin Baulig  <martin@ximian.com>
3075
3076         * class-internals.h
3077         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
3078         MonoMethodHeader.
3079
3080         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
3081         MonoMethodNormal since we also need it for abstract and interface
3082         methods.
3083
3084         * reflection.c
3085         (build_compressed_metadata): Sort the GenericParam table.
3086         (mono_image_create_token): Added `gboolean create_methodspec'
3087         argument; this is false when generating a MethodImpl token.
3088         (reflection_methodbuilder_to_mono_method): Abstract and interface
3089         methods may also have generic parameters.
3090
3091 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
3092
3093         * appdomain.c: thread local alloc
3094
3095 2004-08-17  Martin Baulig  <martin@ximian.com>
3096
3097         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
3098
3099         * icall.c
3100         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
3101         argument.
3102
3103         * class.c (mono_type_get_full_name): New public function.
3104         (mono_type_get_name): Don't include the type arguments.
3105
3106 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
3107
3108         * Makefile.am: Build static versions of libmetadata and libmonoruntime
3109         for inclusion into the mono executable.
3110
3111 2004-08-16  Martin Baulig  <martin@ximian.com>
3112
3113         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
3114         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
3115
3116 2004-08-14  Martin Baulig  <martin@ximian.com>
3117
3118         * class.c (dup_type): Also copy the `byref' field.
3119
3120 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
3121
3122         * reflection.c (create_dynamic_mono_image): Revert the last change 
3123         since it breaks bootstrap.
3124
3125 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
3126
3127         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
3128
3129         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
3130         not free them with g_free.
3131
3132 2004-08-11  Martin Baulig  <martin@ximian.com>
3133
3134         * reflection.c (mono_reflection_setup_internal_class): Also call
3135         mono_class_setup_mono_type() if we already have a `tb->type.type'.
3136
3137 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
3138
3139         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
3140         called during default (first) AppDomain creation. Keep track of
3141         Evidence when loading assemblies.
3142
3143 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3144
3145         * opcodes.c, opcodes.h: reduce runtime relocations.
3146
3147 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
3148
3149         * culture-info.h, locales.c: fixes and chages to sue the new
3150         optimized format of the locale data.
3151         * culture-info-tables.h: regenerated.
3152
3153 2004-08-06  Geoff Norton <gnorton@customerdna.com>
3154         
3155         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
3156
3157 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
3158
3159         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
3160         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
3161         * domain-internals.h: icall declaration.
3162         * icall.c: icall registration.
3163         * object-internals.h: New fields in MonoAssembly for CAS.
3164
3165 2004-08-05  Duncan Mak  <duncan@ximian.com>
3166
3167         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
3168         CEE_LDELEM_ANY.
3169
3170 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3171
3172         * reflection.c: fix to deal with object[] arrays in custom ctors
3173         (bug #62550).
3174
3175 2004-08-05  Martin Baulig  <martin@ximian.com>
3176
3177         * class.c (mono_class_array_element_size): Added support for
3178         generic instances and correctly handle "recursive" types.
3179
3180 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
3181
3182         * assembly.c: Fix warnings.
3183
3184 2004-08-04  Martin Baulig  <martin@ximian.com>
3185
3186         * class.c
3187         (mono_type_get_name_recurse): Added `gboolean include_arity'
3188         argument specifying whether or not we should include the generic
3189         arity in the type name.
3190         (_mono_type_get_name): New static function.
3191         (mono_class_setup_vtable): If we're a generic instance, don't
3192         include the generic arity in the names of explicit method
3193         implementations.        
3194
3195 2004-08-03  Martin Baulig  <martin@ximian.com>
3196
3197         * class.c (mono_type_get_name_recurse): Enclose the generic type
3198         arguments in `<', '>'.
3199
3200 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3201
3202         * gc.c: make GC warning messages use the trace API, they are just
3203         noise to most of the users.
3204
3205 2004-08-03  Martin Baulig  <martin@ximian.com>
3206
3207         * debug-mono-symfile.c (read_string): Correctly read the string.
3208
3209 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
3210
3211         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
3212         
3213         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
3214         icalls.
3215         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
3216
3217 2004-07-30  Martin Baulig  <martin@ximian.com>
3218
3219         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
3220         Reflect latest symbol writer changes.   
3221
3222 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3223
3224         * object.c: always create an object if null is passed
3225         to Invoke() where a valuetype is expected.
3226
3227 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
3228
3229         * marshal.c (mono_marshal_init): make managed
3230         signatures match native ones better for 64bits.
3231
3232 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3233
3234         * appdomain.c: hack to build correctly the private bin path on windows.
3235         Fixes bug #61991.
3236
3237 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
3238
3239         * assembly.c: Load mscorlib from the correct framework directory
3240           (mono/<version>/mscorlib.dll).
3241         * appdomain.h: Added prototypes for new functions.
3242         * internals.h: Added some prototypes.
3243         * domain.c: When initializing the runtime, get from the executable and
3244           the configuration files the runtime version that the app supports.
3245           Added support methods for reading app.exe.config. Added list of versions
3246           supported by the JIT. Added two new methods: mono_init_from_assembly,
3247           which initializes the runtime and determines the required version from
3248           the provided exe file, and mono_init_version, which initializes
3249           the runtime using the provided version.
3250         * icall.c: Get machine.config from version-specific directory.
3251         * reflection.c: When generating an image, embed the version number
3252           of the current runtime.
3253
3254 2004-07-28  Dick Porter  <dick@ximian.com>
3255
3256         * socket-io.c
3257         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
3258         returned sockaddr size before creating the remote address object.
3259         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
3260         61608.
3261
3262 2004-07-28  Dick Porter  <dick@ximian.com>
3263
3264         * locales.c (string_invariant_compare_char): Fix invariant char
3265         compares between upper and lower cases.  Fixes bug 61458.
3266
3267 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
3268         
3269         * marshal.c: actually cache stelem.ref wrappers.
3270         
3271 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
3272
3273         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
3274         sections and remove the mono_cli_rva_map () function.
3275
3276 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3277
3278         * debug-mono-symfile.c: fix one more endianess issue, from a patch
3279         by Geoff Norton (<gnorton@customerdna.com>).
3280
3281 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3282
3283         * class.c: fix class loads for pointer types (typeof(int) !=
3284         typeof(int*)).
3285
3286 2004-07-27  Martin Baulig  <martin@ximian.com>
3287
3288         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
3289         reading the debugging information from an external ".mdb" file.
3290
3291 2004-07-24  Martin Baulig  <martin@ximian.com>
3292
3293         * reflection.c (mono_image_get_type_info): Only write a class
3294         layout entry if we actually have a size or a packing size.
3295
3296 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
3297
3298         * reflection.c (type_get_fully_qualified_name): 
3299         insert cast to get type checking of ?: with non-gcc compilers
3300
3301 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
3302
3303         * rand.c: use g_getenv for both lookups of
3304         MONO_EGD_SOCKET
3305
3306 2004-07-17  Martin Baulig  <martin@ximian.com>
3307
3308         * reflection.c (mono_reflection_bind_generic_method_parameters):
3309         Set `gmethod->reflection_info'.
3310
3311 2004-07-17  Martin Baulig  <martin@ximian.com>
3312
3313         * class.c (mono_class_create_from_typedef): Insert the newly
3314         created class into the hash table before computing the interfaces
3315         since we could be called recursively.
3316
3317 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
3318
3319         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
3320         function to implement stelem.ref in managed code
3321         * class-internals.h, debug-helpers.c: a new wrapper type
3322         for the above.
3323
3324 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3325
3326         * gc.c: allow GC handles to work even when no GC is compiled in.
3327         Fix part of bug #61134 (GetAddrOfPinnedObject).
3328
3329 2004-07-13  Peter Williams  <peter@newton.cx>
3330  
3331         * process.c (complete_path): Make sure we don't attempt to execute
3332         directories.
3333  
3334 2004-07-12  Geoff Norton <gnorton@customerdna.com>
3335
3336         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
3337           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
3338           and will add/subtract the hour if needed
3339
3340 2004-07-12  Martin Baulig  <martin@ximian.com>
3341
3342         * reflection.c (mono_field_get_object): If we have
3343         `field->generic_info', take the attributes from
3344         `field->generic_info->generic_type'.    
3345
3346 2004-07-12  Martin Baulig  <martin@ximian.com>
3347
3348         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
3349         This function must be called before initializing the runtime.
3350         (mono_debug_init_1): New function; call this after initializing
3351         the runtime, but before loading the assembly.  It tells the
3352         debugger to load corlib and the builtin types.
3353
3354         * mono-debug-debugger.c: Did some larger changes in the debugging
3355         code; support recursive class declarations, make sure we actually
3356         add all classes.
3357
3358 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3359
3360         * debug-helpers.c: undo my previous patch and fixed the real issue in
3361         ../mini/exceptions-x86.c
3362
3363 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3364
3365         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
3366         when no HOME env. variable was set and a NullRef was thrown in a .cctor
3367         called from other .cctors.
3368
3369 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
3370
3371         * loader.c: Removed the mono_loader_wine_init hack now that we are
3372         doing a managed version of Windows.Forms.
3373
3374 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
3375
3376         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
3377         threadpool.c, threads.c: remove static data from rootset.
3378
3379 2004-07-09  Dick Porter  <dick@ximian.com>
3380
3381         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
3382         Don't do any more processing if the matched length was 0.  It was
3383         increasing the size of the string before.  Fixes bug 61167.
3384
3385 2004-07-09  Dick Porter  <dick@ximian.com>
3386
3387         * socket-io.h:
3388         * socket-io.c
3389         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3390         Add support for SO_PEERCRED if its available.
3391
3392 2004-07-09  Peter Bartok <pbartok@novell.com>
3393         * loader.c: winelib.exe.so error message is now only displayed if
3394         MONO_DEBUG is set. To help us avoid questions when people are trying
3395         out the new Managed.Windows.Forms.
3396
3397 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
3398
3399         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
3400         for isinst and castclass wrappers.
3401
3402         * class-internals.h icall.c: Move registration and lookup of JIT icalls
3403         to libmetadata from the JIT, so they could be used by the marshalling
3404         code and the interpreter.
3405
3406         * marshal.c: Register marshalling related JIT icalls here instead of
3407         in mini.c. Use CEE_MONO_ICALL instead of the family of 
3408         CEE_MONO_PROC<x> opcodes to call marshalling functions.
3409
3410         * metadata.h: Remove unneeded marshalling conversions.
3411
3412         * opcodes.c: Update for new opcodes.
3413         
3414 2004-07-08  Martin Baulig  <martin@ximian.com>
3415
3416         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
3417         (mono_debug_get_domain_data): Make this function static.
3418
3419 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3420
3421         * gc.c, object.h: add nice GC handle API for embedders.
3422
3423 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
3424
3425         * reflection.c: more changes for the new api
3426
3427         * object.c: When we reflect on a field w/ a constant value, it
3428         will not have a memory location, so we must access metadata. Also,
3429         allow easier reading of strings so that we can read them from
3430         the constant data.
3431
3432         * class.c (mono_class_layout_fields): no need for literal fields here.
3433
3434         * class-internals.h: api changes for const fields
3435
3436         * icall.c (ves_icall_get_enum_info): use new apis for const fields
3437
3438 2004-07-06  Martin Baulig  <martin@ximian.com>
3439
3440         * mono-debug.h: Increment version number to 44.
3441
3442         * mono-debug.c (mono_debug_add_wrapper): The second argument is
3443         now a gpointer, rewrote this whole method.
3444
3445         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
3446         function.  Add information about the wrapper in a new "misc table".
3447
3448         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
3449         for the new misc table.
3450
3451 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
3452
3453         * metadata-internals.h image.c: Add a cache for helper signatures.
3454
3455         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
3456
3457 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
3458
3459         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
3460         delegates from a delegate. Fixes #61033.
3461         
3462         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
3463         marshalling of stringbuilder arrays. Fixes #59900.
3464
3465 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
3466
3467         * icall.c: Add EnumBuilder:setup_enum_type icall.
3468
3469 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
3470
3471         * icall.c: Added a new icall for the property version of
3472         OffsetOfStringData.
3473
3474 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
3475
3476         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
3477         it has a constant size across platforms.
3478
3479         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
3480         stack trace.
3481
3482 2004-06-29  Martin Baulig  <martin@ximian.com>
3483
3484         * mono-debug.c (mono_debug_add_method): Protect the whole function
3485         in mono_debugger_lock(), not just parts of it.
3486
3487 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
3488
3489         * reflection.c: make sure padding bytes in heaps are zeroed.
3490
3491 2004-06-24  David Waite  <mass@akuma.org>
3492
3493         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
3494         image.c, loader.c, locales.c, marshal.c, metadata.c,
3495         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
3496         string-icalls.c, threads.c: change to C90-style comments from C99 /
3497         C++ -style
3498
3499 2004-06-24  Dick Porter  <dick@ximian.com>
3500
3501         * threads.c
3502         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
3503         return createdNew.  Fixes bug 60412.
3504
3505         * threads-types.h: 
3506         * icall.c: Add createdNew parameter to CreateMutex icall
3507
3508 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3509
3510         * reflection.c, object-internals.h: save default value in params.
3511
3512 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3513
3514         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
3515         no need to build a new path combining that with the application base.
3516         Fixes bug #60442.
3517
3518 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
3519
3520         * reflection.c: fixed minor standard compliance issues.
3521
3522 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3523
3524         * reflection.c: fixed issue with encoding some custom attributes
3525         (arrays in properties and fields, bug #60411).
3526
3527 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3528
3529         * reflection.c: fix start address when copying the public key token.
3530
3531 2004-06-23  Martin Baulig  <martin@ximian.com>
3532
3533         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
3534         the `exc' object in a static object to put it into the GC's root set.
3535
3536 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
3537
3538         * reflection.c: make mono_reflection_setup_internal_class ()
3539         callable a second time to setup a new parent class.
3540
3541 2004-06-23  Dick Porter  <dick@ximian.com>
3542
3543         * threads.c: Check for WAIT_IO_COMPLETION return values.
3544
3545 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
3546
3547         * appdomain.c: Removed the g_free on the public key token. Now copy 
3548         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
3549         * assembly.c: Added public key token string value when loading 
3550         assemblies. Fix bug #60439.
3551         * icall.c: Added missing informations (like public key) in 
3552         GetReferencedAssemblies. Fix #60519.
3553         * image.h: Changed definition for public key token from const char*
3554         public_tok_value to guchar public_key_token [17];
3555         * reflection.c: Updated for changes to public key token.
3556
3557 2004-06-22  Lluis Sanchez Gual
3558
3559         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
3560         for the field in base classes.
3561
3562 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3563
3564         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
3565         mark headers as not supported, they are installed only for use by the
3566         debugger.
3567
3568 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
3569
3570         * *.c, *.h: avoid namespace pollution in public headers.
3571
3572 2004-06-21  Martin Baulig  <martin@ximian.com>
3573
3574         * exception.c (mono_get_exception_security): It's in
3575         "System.Security", not in "System".
3576
3577         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
3578         the exception classes.
3579
3580 2004-06-21  Martin Baulig  <martin@ximian.com>
3581
3582         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
3583         Protect the exception object from being finalized.
3584
3585 2004-06-21  Martin Baulig  <martin@ximian.com>
3586
3587         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
3588         public function.
3589
3590 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
3591
3592         * reflection.c: Load the assembly in mono_reflection_type_from_name,
3593         if it was not loaded before. Fix parts of #60439.
3594
3595 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
3596
3597         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
3598         code that was broken since Ben's change: wrappers are now
3599         dependent on the method signature only again.
3600
3601 2004-06-21  Martin Baulig  <martin@ximian.com>
3602
3603         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
3604         added interface support.
3605
3606 2004-06-21  Martin Baulig  <martin@ximian.com>
3607
3608         * class.c (mono_vtable_get_static_field_data): New public method.
3609
3610 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
3611
3612         * filewatcher.c : Windows build fix to be compliant with API changes.
3613
3614 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3615
3616         * class.h, class.c: more accessors.
3617         * metadata.h, metadata.c: prepare for hiding MonoType and
3618         MonoMethodSignature: people should use the accessors from now on
3619         outside of the tree.
3620
3621 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3622
3623         * *.c, *.h: more API cleanups.
3624
3625 2004-06-18  Jackson Harper  <jackson@ximian.com>
3626
3627         * assembly.c: Trace loading assemblies.
3628         * loader.c: Trace loading native libraries.
3629         * mono-config.c: Trace loading config files.
3630         
3631 2004-06-18  Dick Porter  <dick@ximian.com>
3632
3633         * locales.c: Tell ICU the lengths of strings, it can cope with
3634         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
3635
3636 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
3637
3638         * image.c: swapped name/filename;
3639
3640 2004-06-18  Martin Baulig  <martin@ximian.com>
3641
3642         * mono-debug-debugger.c (write_class): Write the parent class at
3643         the end of the header.
3644
3645 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3646
3647         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
3648
3649 2004-06-17  Raja R Harinath  <rharinath@novell.com>
3650
3651         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
3652         (bundle_obj): New conditional define.
3653         (BUILT_SOURCES): Remove.
3654         ($(bundle_srcs)): Make parallel-make safe.
3655         (libmonoruntime_la_LIBADD): Make unconditional.
3656         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
3657         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
3658
3659 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
3660
3661         * culture-info-tables.h: It was inconsistent with the latest
3662           supp info files.
3663
3664 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
3665
3666         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
3667         be loaded.
3668
3669         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
3670         with gcc 2.95.
3671
3672 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3673
3674         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
3675         cleaned up public header threads.h.
3676
3677 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3678
3679         * Makefile.am, *.c, *.h: more API cleanups.
3680
3681 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3682
3683         * Makefile.am: removed monosn from compilation.
3684         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
3685         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
3686         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
3687         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
3688         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
3689         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
3690
3691 2004-06-15  Jackson Harper  <jackson@ximian.com>
3692
3693         * assembly.c: Make locales lower case when searching the GAC for
3694         assemblies. gacutil will always make locales lowercase when
3695         installing so this effectively makes them case insensitive.
3696         
3697 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
3698
3699         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
3700         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
3701           parameter which allows to choose whether the wait can be interrupted or 
3702           not. Also added the method mono_monitor_enter(), which locks the monitor
3703           using an infinite wait and without allowing interruption.
3704           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
3705           interrupted.
3706         * object.h: Added new fields in MonoThread. suspend_event holds the event
3707           used to susped/resume the thread. synch_lock is the lock object to use for
3708           modifying the thread state.
3709         * threads.c: Use the new synch_lock object for locking, instead of "this",
3710           which can generate deadlocks.
3711           Moved thread state change in Thread.Sleep and Thread.Join from managed
3712           to unmanaged code. This avoids a deadlock when the thread was suspended
3713           just after acquiring the thread lock.
3714           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
3715           Implemented Thread.Suspend using an event instead of ThreadSuspend,
3716           which is not fully implemented in the io-layer.
3717         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
3718
3719 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
3720
3721         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
3722         threads-types.h: more API cleanups.
3723
3724 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3725
3726         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
3727         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
3728         threadpool.c, threads.c: first pass at the exported API cleanup.
3729
3730 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
3731
3732         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
3733
3734 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3735
3736         * icall.c: added internalGetHome.
3737
3738 2004-06-14  Dick Porter  <dick@ximian.com>
3739
3740         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
3741         possible to return successfully when '.' or '..' were the only
3742         entries in a directory, but were skipped.  The MonoIOStat was not
3743         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
3744         Fixes bug 59574.
3745
3746 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
3747
3748         * reflection.c: make binaries run on .Net 1.1 by default.
3749
3750 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
3751
3752         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
3753
3754 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
3755
3756         * marshal.c: keep track of struct size with explicit layout
3757         (bug #59979).
3758
3759 2004-06-12  Martin Baulig  <martin@ximian.com>
3760
3761         * mono-debug-debugger.c: Comment out a debugging g_message().
3762
3763 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3764
3765         * reflection.c, reflection.h: do not free custom attrs that are cached.
3766         * icall.c: use braces to make code clearer.
3767
3768 2004-06-11  Martin Baulig  <martin@ximian.com>
3769
3770         * class.h (MonoInflatedField): New type.
3771         (MonoClassField): Replaced `MonoType *generic_type' with
3772         `MonoInflatedField *generic_info'.
3773
3774         * icall.c
3775         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
3776
3777 2004-06-11  Martin Baulig  <martin@ximian.com>
3778
3779         * reflection.c (mono_image_create_method_token): Correctly encode
3780         varargs methods.
3781
3782 2004-06-11  Martin Baulig  <martin@ximian.com>
3783
3784         * metadata.c (mono_metadata_parse_method_signature): When parsing
3785         a MethodDef which has VarArgs, also set sentinelpos if we don't
3786         have any parameters.
3787
3788 2004-06-11  Martin Baulig  <martin@ximian.com>
3789
3790         * verify.c (mono_method_verify): In CEE_CALL, use
3791         mono_method_get_signature() to get the method's signature, unless
3792         we're a PInvoke method.
3793
3794 2004-06-10  Jackson Harper  <jackson@ximian.com>
3795
3796         * assembly.c: Use <path>/lib/mono/gac for the extra paths
3797         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
3798         logical name as the supplied path is just a prefix to the gac not
3799         the direct path to it.
3800         
3801 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
3802
3803         * reflection.c: make the token for a created method match
3804         the token of the MethodBuilder it was created from
3805         (IKVM requires this behaviour now).
3806
3807 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
3808
3809         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
3810         reflection.c, socket-io.c: leak fixes.
3811
3812 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
3813
3814         * icall.c: handle sentinel pos in vararg methods in position different
3815         from 0.
3816
3817 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3818
3819         * culture-info-tables.h: freshly generated.
3820
3821 2004-06-09  Martin Baulig  <martin@ximian.com>
3822
3823         * loader.c (mono_get_method_constrained): Call `mono_class_init
3824         (constrained_class)'.   
3825
3826 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
3827
3828         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
3829         any methods. Fixes #59629.
3830
3831 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3832
3833         * culture-info-tables.h: reflecting locale-builder updates.
3834
3835 2004-06-08  Dick Porter  <dick@ximian.com>
3836
3837         * object.h:
3838         * locales.c: Fixed compile warnings, including a real bug in
3839         CompareInfo_internal_compare.
3840         
3841 2004-06-08  Dick Porter  <dick@ximian.com>
3842
3843         * locales.c
3844         (ves_icall_System_Globalization_CompareInfo_internal_index):
3845         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3846         Double-check the resuls of usearches, because ICU currently
3847         ignores most of the collator settings here.  Fixes bug 59720.
3848         
3849 2004-06-08  Dick Porter  <dick@ximian.com>
3850
3851         * locales.c
3852         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3853         Fix memory leak and segfault-causing typo.  No idea how this one
3854         lasted so long without being noticed.
3855
3856 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
3857
3858         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
3859         any methods. Fixes #59629.
3860
3861 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3862
3863         * assembly.c:
3864         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
3865         own the critical section before). Removed dead code (that's done
3866         in the preload hook).
3867
3868         (mono_assembly_load_with_partial_name): call the preload hook.
3869
3870 2004-06-08  Martin Baulig  <martin@ximian.com>
3871
3872         * metadata.c (mono_metadata_signature_alloc): Default
3873         `sentinelpos' to -1.
3874
3875         * reflection.c (mono_image_get_array_token): Likewise.
3876
3877 2004-06-08  Martin Baulig  <martin@ximian.com>
3878
3879         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
3880
3881         * metadata.c (mono_metadata_parse_method_signature): When parsing
3882         a MethodDef which has VarArgs, set sentinelpos.
3883
3884         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
3885         `gint16' since we're using -1 for non-varargs methods.
3886
3887         * reflection.c
3888         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
3889         (method_encode_signature): Added varargs support.
3890         (method_builder_encode_signature): Likewise.
3891         (mono_image_get_varargs_method_token): New static method.
3892         (mono_image_create_method_token): New public method; this is
3893         called via an icall instead of mono_image_create_token() when
3894         calling a varargs method.       
3895
3896 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
3897
3898         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
3899
3900 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3901
3902         * culture-info-tables.h : Reflecting the latest locale-builder that
3903           fixed empty array representation ({} to {0}).
3904
3905 2004-06-07  Jackson Harper  <jackson@ximian.com>
3906
3907         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
3908         looking up extra gac paths. This allows MONO_GAC_PATH to act
3909         exactly like a prefix.
3910         
3911 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
3912
3913         * reflection.c (mono_reflection_type_from_name): Make a copy of the
3914         type name before modifying it. Fixes #59405.
3915
3916 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3917
3918         * culture-info.h: added fields for "all datetime patterns".
3919         * locales.c: (  ves_icall_System_Globalization_CultureInfo
3920           _construct_datetime_format ()): fill xxx_patterns fields.
3921         * object.h: added fields for "all datetime patterns" to
3922           MonoDateTimeFormatInfo.
3923         * culture-info-tables.h: reflecting locale-builder updates.
3924
3925 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
3926
3927         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
3928         the event has no add and remove methods. Fixes #59629.
3929
3930 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
3931
3932         * object.c: Fixed possible integer overflow when allocating large
3933         strings.
3934
3935 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
3936
3937         * culture-info-tables.h: reflecting locale-builder updates.
3938
3939 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
3940
3941         * culture-info-tables.h: reflecting locale-builder updates.
3942
3943 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
3944
3945         * culture-info-tables.h: reflecting locale-builder updates.
3946
3947 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
3948
3949         * threads.c: Made Thread.Sleep abortable.
3950
3951 2004-06-02  Martin Baulig  <martin@ximian.com>
3952
3953         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
3954
3955         * debug-mono-symfile.h: Bumped symbol file version number to 37.
3956
3957 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
3958
3959         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
3960
3961 2004-05-30  Jackson Harper  <jackson@ximian.com>
3962
3963         * reflection.c: Do not hardcode assembly versions or public key
3964         tokens anymore. All of this except the corlib section was dead
3965         code anyways.
3966         
3967 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
3968
3969         * object.c (mono_runtime_invoke_array): Automatically create boxed
3970         objects for byref valuetypes if needed. Fixes #59300.
3971         
3972         * object.c (mono_method_return_message_restore): Handle 
3973         MONO_TYPE_OBJECT as well.
3974
3975 2004-05-28  Jackson Harper  <jackson@ximian.com>
3976
3977         * reflection.c: The modified type encoding was causing build
3978         problems. Reverted for now.
3979         
3980 2004-05-28  Jackson Harper  <jackson@ximian.com>
3981
3982         * reflection.c/h: Take an assembly ref so that we dont create
3983         fully qualified names when encoding types in the same assembly as
3984         the custom attribute being emitted.
3985         * appdomain.c: Increment version number.
3986         
3987 2004-05-26  Duncan Mak  <duncan@ximian.com>
3988
3989         * icall.c
3990         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3991         Set the full version number (major, minor, build, revision).
3992
3993 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
3994
3995         * marshal.c (emit_struct_conv): increment src/dst after blit
3996         (mono_marshal_get_managed_wrapper,
3997         mono_marshal_get_native_wrapper): make sure we have marshalling
3998         info before marshalling params (info computation affects
3999         blittable)
4000
4001         * class.c (class_compute_field_layout): correctly deal with
4002         blittable
4003         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
4004         value types (as per what windows dows by default)
4005         (mono_class_setup_mono_type): System.ValueType is blittable
4006         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
4007         blittable
4008
4009         * marshal.c (mono_marshal_load_type_info): flag types  as
4010         non-blittable if the native layout doesn't match the managed
4011         layout
4012
4013 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4014
4015         * appdomain.c: don't add stuff in the private search path that is
4016         above the application base. If application base is not set, there's
4017         no private search path.
4018
4019 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
4020
4021         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
4022         byref struct arguments in native->managed marshalling.
4023
4024 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
4025
4026         * marshal.c (mono_marshal_get_runtime_invoke): correctly
4027         cache methods using signature (special case for methods
4028         that are value type or string class)
4029         
4030         * image.c (mono_image_close): clean up allocated GSList's
4031         in runtime_invoke_cache.
4032
4033 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4034
4035         * mono-config.c: set the correct path for mono_cfg_dir on windows when
4036         there's no MONO_CFG_DIR environment variable defined.
4037
4038 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4039
4040         * threads.c: windows version must be >= 0x0500 to include OpenThread.
4041
4042 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
4043
4044         * threadpool.c: Really wait for 500ms after the async call, even if the wait
4045           is interrumped.
4046         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
4047           before waiting for it, and call CloseHandle after the wait to unref it.
4048           This will make sure that handles are not disposed too early.
4049
4050 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4051
4052         * appdomain.c:
4053         * appdomain.h:
4054         * icall.c: removed
4055         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
4056         needed now.
4057
4058         * object.c: se the application_base only for the domain that runs
4059         Main. Fixes bug #59216,
4060
4061 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4062
4063         * appdomain.c:
4064         * object.c: only the domain in which Main is run have
4065         SetupInformation.ConfigurationFile set, so moved a few lines from
4066         appdomain.c to object.c.
4067
4068 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4069
4070         * appdomain.c: we tried to load [name].(dll|exe), but according
4071         to bug #57710, we must also try [culture]/[name].(dll|exe) and
4072         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
4073         There's a test case attached to bug #58922.
4074
4075 2004-05-27  Dick Porter  <dick@ximian.com>
4076
4077         * icall.c:
4078         * file-io.c: Implemented icalls for locking and unlocking regions
4079         in a file.
4080         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
4081         FALSE on error (fixes both compiler warning and real bug.)
4082
4083 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
4084
4085         * culture-info-tables.h: reflecting locale-builder updates.
4086
4087           (Added missing ChangeLog entry for 05/26)
4088
4089 2004-05-27  Jackson Harper  <jackson@ximian.com>
4090
4091         * locales.c: Fix some cut and paste errors.
4092         
4093 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4094
4095         * mono-config.c: set the correct path for config. directory on windows.
4096
4097 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4098
4099         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
4100           on win32.
4101
4102 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
4103
4104         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
4105         from pinvoke functions.
4106         
4107         * marshal.c (mono_ftnptr_to_delegate): Implement this.
4108
4109 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4110
4111         * culture-info-tables.h: reflecting locale-builder updates.
4112
4113 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
4114
4115         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
4116         #59086.
4117
4118 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
4119
4120         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
4121         * icall.c: Modified icalls for RNG.
4122         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
4123         Windows (CryptoAPI).
4124
4125 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
4126
4127         * locales.c: Fix build.
4128
4129 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4130
4131         * culture-info-tables.h: reflecting locale-builder updates.
4132
4133 2004-05-25  Jackson Harper  <jackson@ximian.com>
4134
4135         * locales.c: When creating the current culture use the $LANGs
4136         specific culture. So DateTimeFormat and NumberFormat entries are created.
4137         
4138 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
4139
4140         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
4141         a char array as parameter.
4142
4143 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
4144
4145         * image.c: In mono_image_open(), always use an absolute path name to
4146           look for already loaded images.
4147
4148 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
4149
4150         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
4151         missing in the windows build (like older cygwin include files).
4152
4153 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
4154
4155         * icall.c: Fixed check for possible integer overflow in Buffer_
4156         BlockCopy icall. Replaced comments style // by /* */.
4157
4158 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
4159
4160         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
4161         
4162         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
4163         check after MONO_VTADDR. Fixes pinvoke2.exe.
4164
4165         * marshal.h marshal.c metadata.h: Add beginnings of support for
4166         ftnptr -> delegate marshalling.
4167
4168 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
4169
4170         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
4171         * threads.c: Fix warnings.
4172
4173 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
4174
4175         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
4176         * icall.c: Registered icalls for Suspend and Resume.
4177         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
4178           Thread.Abort.
4179         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
4180         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
4181         * process.c: Use WaitForSingleObjectEx.
4182         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
4183           checkpoints.
4184         * threads.c, threads.h: Make use of new Ex wait methods. Improved
4185           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
4186           for Suspend and Resume. Added new mono_thread_stop, used for stoping
4187           background threads. Added basic support for Abort in Windows.
4188           Start new threads using a managed delegate invoke wrapper. This wrapper
4189           has an interruption checkpoint that is needed since an interruption
4190           can be requested before the thread leaves the unmanaged code that starts 
4191           the thread.
4192         * marshal.c: Added interruption checkpoint after every native call, and
4193           also before managed calls for wrappers called from unmanaged code to
4194           go into managed code.
4195         * object.h: Added new field in MonoThread to keep track of interruption
4196           requests.
4197
4198 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
4199
4200         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
4201         calls.
4202
4203 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4204
4205         * appdomain.c:
4206         * assembly.c:
4207         * gc.c:
4208         * locales.c:
4209         * mono-config.c:
4210         * rand.c: getenv -> g_getenv (windows!)
4211
4212         * process.c: complete_path is also used on non-windows platforms.
4213
4214 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4215
4216         * icall.c: new signature for Process_Start.
4217
4218         * process.[ch]: new signature for Process_Start. If we're on windows
4219         and UseShellExecute is false, we have to search for the program by
4220         ourselves if we don't get a full path.
4221
4222 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
4223
4224         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
4225         marshalling and call CleanUpNativeData if needed. Fixes #58646.
4226
4227 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4228
4229         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
4230         Fixes bug #58373.
4231
4232 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4233
4234         * process.c: use double quotes to quote program name and arguments on
4235         windows. Fixes bug #58575.
4236
4237 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4238
4239         * file-io.c: don't return "." and ".." when using windows Find*File.
4240
4241 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
4242
4243         * marshal.c: Don't pass wrappers to message init because method 
4244         addressed used to lookup metadata. part of remoting[2|3] fix.
4245
4246 2004-05-15  Jackson Harper  <jackson@ximian.com>
4247
4248         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
4249         path is essentially the same as MONO_PATH except that it points to
4250         GACs instead of lib directories.
4251         * loader.h: The user gac is gone so we dont need function to
4252         enable/disable it.
4253         * mono-config.c: user gac option is now gone.
4254         
4255 2004-05-15  Jackson Harper  <jackson@ximian.com>
4256
4257         * culture-info.h: Make defines more consistent, add calendar data
4258         to the culture info table.
4259         * culture-info-tables.h: Add basic calendar data. Basically
4260         everyone gets default gregorian until all the data is
4261         updated.
4262         * locales.c: Use the new consistent defines. Set calendar data for
4263         culture info objects.
4264         * object.h: add a field for calendar data to CultureInfo
4265         
4266 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
4267
4268         * image.c: image->runtime_invoke_cache is keyed on signatures now.
4269         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
4270         a signature.
4271         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
4272         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
4273         an extra param that is the pointer of the method to invoke. The IL for
4274         the invoke method is no longer specific to the method, but to the
4275         signature of the method. Thus, we can share the same code for multiple
4276         methods. This reduces the number of methods that have to be compiled.
4277
4278 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
4279
4280         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
4281
4282         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4283
4284         * icall.c: Optimize Buffer.BlockCopy.
4285
4286 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4287
4288         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
4289         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
4290         quote). Changed them to "MMMM yyyy".
4291
4292 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
4293
4294         * rand.c
4295         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
4296
4297 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
4298
4299         * reflection.h: Updated after changes to managed structures.
4300
4301         * appdomain.c: Bump corlib version.
4302
4303 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4304
4305         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
4306         windows.
4307
4308 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4309
4310         * Makefile.am: link to ../os/libmonoos.la on windows.
4311
4312         * assembly.c:
4313                 -If MONO_DEBUG, warn about non-existing directories in
4314                 MONO_PATH.
4315                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
4316                 compile time variable.
4317                 -Removed init_default_path and call mono_set_rootdir from
4318                 libmonoos.a instead (windows only).
4319
4320         * assembly.h: declare mono_assembly_getrootdir().
4321
4322         * domain.c:
4323         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
4324
4325         * loader.c: s/getenv/g_getenv/
4326
4327 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
4328
4329         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
4330
4331         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
4332
4333         * metadata.h: Add new marshalling conversions.
4334
4335         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
4336         function.
4337
4338         * reflection.c (mono_reflection_get_type): Lookup the type in all
4339         modules of a multi-module assembly. Fixes #58291.
4340
4341 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
4342
4343         * threads.c: Before aborting a background, set the StopRequested
4344         state.  This avoids throwing the Abort exception.
4345         In mono_thread_manage, don't continue with the shutdown until all
4346         aborted threads have actually stopped.
4347
4348 2004-05-10  Jackson Harper  <jackson@ximian.com>
4349
4350         * locales.c: Remove the modifier from culture names.
4351         
4352 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4353
4354         * Makefile.am: monosn is not installed any more. It has been deprecated
4355         in favor of sn.
4356
4357 2004-05-07  Jackson Harper  <jackson@ximian.com>
4358
4359         * locales.c
4360         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
4361         Fix array construction, add bailout if the length is 0.
4362
4363 2004-05-07  Dick Porter  <dick@ximian.com>
4364
4365         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
4366         machine doesn't have a DNS entry.  Patch by Urs Muff
4367         (umuff@quark.com), fixes bug 57928.
4368
4369 2004-05-06  Jackson Harper  <jackson@ximian.com>
4370
4371         * reflection.c: Handle null PublicTokens properly. alloc mem for
4372         assembly names culture so we dont crash when freeing it.
4373         
4374 2004-05-06  Jackson Harper  <jackson@ximian.com>
4375
4376         * assembly.c: Check the usergac when loading with partial names.
4377         
4378 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
4379
4380         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
4381         does nothing for now (not required for Linux/Windows) but the class
4382         library can call it (and a newer or modified runtime could need it).
4383         * icall.c: Registred icall.
4384
4385 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4386
4387         * loader.c: prints a message on module loading error we set MONO_DEBUG
4388         environment variable.
4389
4390 2004-05-05  Jackson Harper  <jackson@ximian.com>
4391
4392         * appdomain.c: Handle PublicKeyToken=null properly.
4393         
4394 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
4395
4396         * environment.c|h: Added icall ves_icall_System_Environment_
4397         GetOSVersionString to get the current OS version as a string.
4398         * icall.c: Registred icall.
4399
4400 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
4401
4402         * object.c: in mono_object_get_virtual_method(), take into account that
4403         non-virtual methods don't have a slot in the vtable. Check needed when
4404         the object is a proxy.
4405
4406 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
4407
4408         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
4409         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
4410
4411         * object.c (mono_class_compute_gc_descriptor): Fix warning.
4412
4413         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
4414         passed when a valuetype is expected.
4415
4416         * object.c (mono_unhandled_exception): Only set the exit code if the
4417         exception happens in the main thread. Fixes thread5.exe.
4418
4419         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
4420         invalid names. Fixes #58047.
4421
4422 2004-05-03  Jackson Harper  <jackson@ximian.com>
4423
4424         * assembly.c: This line was committed accidently and is unneeded.
4425         
4426 2004-05-03  Jackson Harper  <jackson@ximian.com>
4427
4428         * icall.c: Add new icall for Assembly::LoadWithPartialName
4429         * assembly.c/.h: new function that probes the GAC to load partial
4430         assembly names by Paolo Molaro.
4431         
4432 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4433
4434         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
4435         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
4436         (type_get_fully_qualified_name): Added PublicKeyToken when building a
4437         full type name.
4438
4439 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4440
4441         * appdomain.c: fixed check for 'neutral' culture and removed warning.
4442         * reflection.c: fix bug when parsing a full type name and Version is not
4443         the last thing in the string.
4444
4445 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
4446
4447         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
4448         crashes when it is freed.
4449
4450 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4451
4452         * assembly.c: print the compat warning to stderr.
4453
4454 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
4455
4456         * assembly.c (mono_assembly_load_references): Add a compatibility
4457         hack to run old applications that might be still referencing the
4458         3300-based assemblies, only do this for System.xxx.
4459
4460 2004-05-01  Jackson Harper  <jackson@ximian.com>
4461
4462         * appdomain.c: If the culture is neutral we set it to "".
4463         
4464 2004-04-29  Jackson Harper  <jackson@ximian.com>
4465
4466         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
4467
4468 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
4469  
4470         * string-icalls.c: added low overhead function for copying chars
4471         * icall.c: added needed icall for the above function
4472  
4473 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4474
4475         * icall.c: fix return value of get_global_assembly_cache.  Implemented
4476         Environment.GetLogicalDrives.
4477
4478 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
4479
4480         * rand.c: try and talk to egd or prngd
4481         for random bytes if opening devices fail.
4482
4483 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
4484
4485         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
4486         alignment for the type using the native alignment of its members 
4487         instead of using klass->min_align.
4488
4489         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
4490
4491 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4492
4493         * file-io.c:
4494         * socket-io.c: added check for sys/aio.h.
4495
4496 2004-04-28  Dick Porter  <dick@ximian.com>
4497
4498         * threads.c: Don't abort a thread thats already aborting, when
4499         terminating everything.
4500
4501 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4502
4503         * icall.c: added 2 new async calls for Socket.
4504
4505         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
4506         IO on *nix systems.
4507
4508         * threadpool.c: removed unused variable.
4509
4510 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
4511
4512         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
4513
4514 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
4515
4516         * locales.c: put back string_invariant_tolower () and
4517         string_invariant_toupper ().
4518
4519 2004-04-26 David Waite <mass@akuma.org>
4520
4521         * file-io.h:
4522         * socket-io.h:
4523         * threads.h:
4524         * unicode.h: remove comma from end of enumeration declarations
4525
4526 2004-04-26 David Waite <mass@akuma.org>
4527
4528         * debug-mono-symfile.h:
4529         * decimal.c:
4530         * mono_debug.h:
4531         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
4532
4533
4534 2004-04-26  Jackson Harper  <jackson@ximian.com>
4535
4536         * appdomain.c: Increment version number.
4537         
4538 2004-04-26  Jackson Harper  <jackson@ximian.com>
4539
4540         * appdomain.c: Set assembly references public token value when
4541         PublicKeyToken is specified, not the hash_value. Free public token
4542         values when free assembly name data. Previously the public key
4543         token was hex decoded, however we are using hex encoded public key
4544         tokens, so this is not neccasary.
4545         * assembly.c: Lookup assemblies in the gac if their public token
4546         value is set. Add function to allow enabling user gac
4547         lookups. Specify whether or not the assembly was loaded from the
4548         GAC. Compare full assembly names when checking the cache for
4549         assemblies (Temporarily disabled see comment in code). Remove
4550         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
4551         specifies trace-loader they get extra info to stdout on the
4552         loading of assemblies.
4553         * image.h: Add a field for an assembly references public token
4554         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
4555         whether an assembly has been loaded from the GAC.
4556         * image.c: Remove a corlib -> mscorlib name mapping.
4557         * loader.h: Add function to enable/disable the user gac.
4558         * mono-config.c: Check if the usergac is enabled in the config
4559         file.
4560         * icall.c: New icall to determine whether or not an assembly has
4561         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
4562         * tabldefs.h: Add constant for assemblyref flag that specifies a
4563         full public key is used instead of a public token.
4564         * reflection.c: Remove mscorlib -> corlib mappings. Set
4565         PublicTokenValue instead of hash value. This value is a hex
4566         string so it does not need to be expanded.
4567
4568 2004-04-26  Martin Baulig  <martin@ximian.com>
4569
4570         * mono-debug-debugger.c (mono_debugger_initialize): Set
4571         `mono_debugger_initialized' before calling mono_debug_lock().
4572
4573 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
4574
4575         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
4576           InternalToUpper/InternalToLower.
4577         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
4578           removed invariant culture shortcut.  This is now done in managed code.
4579         * locales.c: (string_invariant_toupper/tolower) removed.
4580
4581 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4582
4583         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
4584         Added Poll internal call.
4585
4586         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
4587         call for Poll. Select was too heavy for polling a single socket.
4588
4589         * threadpool.[ch]: added mono_threadpool_cleanup.
4590         * threads.c: use it. Don't use Thread_Abort on windows.
4591
4592 2004-04-23  Martin Baulig  <martin@ximian.com>
4593
4594         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
4595
4596 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
4597
4598         * icall.c: Registred new icalls for key pair protection and added an
4599         icall for Environment.GetFolderPath on Windows.
4600         * security.c|h: Added new icalls for key pair protection.
4601
4602 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4603
4604         * socket-io.c: don't display the non-supported family warning for known
4605         families. Now this is not displayed on windows when checking support
4606         for IPv4/IPv6.
4607
4608 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4609
4610         * class.c: don't display the layout warning for static fields.
4611
4612 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
4613
4614         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
4615         * locales.c, locales.h: Added new icalls for culture-specific
4616         Char.ToLower and Char.ToUpper.
4617
4618 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4619
4620         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
4621         by David Waite.
4622
4623 2004-04-20  Martin Baulig  <martin@ximian.com>
4624
4625         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
4626         of the type name before passing it to mono_reflection_type_from_name().
4627
4628 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
4629
4630         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
4631         encodings here. Fixes #56965.
4632
4633 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
4634
4635         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4636         fix test on strstr result not that I can see anything that
4637         relies on the result.
4638
4639 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
4640
4641         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
4642         Fixes #57081.
4643
4644         * marshal.c (mono_marshal_get_string_encoding): New helper function.
4645
4646         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
4647         function to determine which marshalling to use for strings. Fixes
4648         #56965.
4649
4650         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
4651
4652         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
4653
4654 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
4655
4656         * icall.c: #include mono-config.h
4657
4658 2004-04-15  Jackson Harper  <jackson@ximian.com>
4659
4660         * culture-info-tables.h: Fix date formats for en-US culture.
4661         
4662 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
4663
4664         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
4665         ThreadPool.SetMinThreads.
4666         * threadpool.c: Implemented ThreadPool.GetMinThreads and
4667         ThreadPool.SetMinThreads.
4668
4669 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
4670
4671         * mono-config.c: also load the .config file in the directory
4672         where the assembly was found.
4673
4674 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
4675
4676         * assembly.c: load per-assembly config files.
4677         * icall.c: decrapified code to get the config dir and moved to
4678         mono-config.c.
4679         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
4680         per-assembly config files. When doing a dll map lookup give precedence
4681         to the per-assembly data.
4682
4683 2004-04-14  Martin Baulig  <martin@ximian.com>
4684
4685         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
4686         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
4687         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
4688
4689         * mono-debugger-debugger.c: While the debugger is locked, remember
4690         whether the symbol tables have changes and send one single
4691         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
4692
4693 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
4694
4695         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
4696
4697         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
4698         function.
4699
4700         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
4701         account when marshalling string arrays. Fixes #56965.
4702
4703 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
4704
4705         * icall.c: Add new icalls mapping for security.
4706         * security.c|h: Add internal calls for WindowsIdentity,
4707         WindowsImpersonationContext and WindowsPrincipal.
4708
4709 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
4710
4711         * class.c: Added comment to ensure the System.MonoDummy class
4712         is removed when no longer necessary
4713
4714 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
4715
4716         * appdomain.c: Pass arguments to the bootstraping exceptions to
4717         minimize JITed methods at boot
4718
4719         * metadata.c (mono_exception_from_name_two_strings): Allow for the
4720         second string to be null.
4721
4722         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4723         Change the protocol to minimize the JIT methods at startup.  Now
4724         it Returns the internal codepage, if the value of "int_code_page"
4725         is 1 at entry, and we can not compute a suitable code page
4726         number, returns the code page as a string.
4727
4728 2004-04-13  Jackson Harper  <jackson@ximian.com>
4729
4730         * culture-info-tables.h: Fix number of decimal digits for all
4731         english locales.
4732
4733 2004-04-13  Jackson Harper  <jackson@ximian.com>
4734
4735         * icall.c: Clairfy out of sync error message. It is not always
4736         your corlib that is out of sync.
4737
4738 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
4739
4740         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
4741         properties when only the set accessor is overriden. Fixes #55874.
4742
4743 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
4744
4745         * assembly.c (mono_assembly_load_references): Make this thread safe.
4746         Fixes #56327.
4747
4748 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
4749
4750         * monosn.c: Add missing initialization calls.
4751
4752 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
4753
4754         * locales.c:
4755         ves_icall_System_Globalization_CultureInfo_construct_number_format
4756         Fix g_assert so it compiles on fussier compilers re int/ptr
4757         mismatch
4758
4759 2004-04-08  Dick Porter  <dick@ximian.com>
4760
4761         * socket-io.h:
4762         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
4763         53992.  Also rearrange the code so that the internal calls return
4764         an error value and exceptions are thrown from managed code.
4765
4766         * icall.c: Add type info to the socket icalls.
4767
4768 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4769
4770         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
4771         owes me a beer.
4772
4773 2004-04-07  Martin Baulig  <martin@ximian.com>
4774
4775         * class.c (mono_class_from_generic_parameter): Don't default
4776         `klass->parent' to `mono_defaults.object_type'.
4777
4778 2004-04-07  Martin Baulig  <martin@ximian.com>
4779
4780         * reflection.c (mono_reflection_initialize_generic_parameter): Set
4781         `param->pklass->reflection_info'.       
4782
4783 2004-04-07  Jackson Harper  <jackson@ximian.com>
4784
4785         * culture-info-tables.h: Fix date separator symbol.
4786         
4787 2004-04-07  Martin Baulig  <martin@ximian.com>
4788
4789         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
4790         from System.Type to System.MonoType.
4791
4792 2004-04-07  Martin Baulig  <martin@ximian.com>
4793
4794         * reflection.h
4795         (MonoReflectionGenericParam): Added `has_reference_type' and
4796         `has_value_type' fields.
4797
4798         * reflection.c (mono_image_get_generic_param_info): Encode the
4799         correct flags if we have the `class' or `struct' constraint.
4800
4801 2004-04-07  Martin Baulig  <martin@ximian.com>
4802
4803         * reflection.h
4804         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
4805
4806 2004-04-07  Jackson Harper  <jackson@ximian.com>
4807
4808         * appdomain.c: Revert extra patches, just wanted to bump the
4809         version number.
4810         
4811 2004-04-07  Jackson Harper  <jackson@ximian.com>
4812
4813         * Makefile.am: Add culture-info private headers.
4814         * icall.c: Add new icalls for contructing locales.
4815         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
4816         * locales.h: Declare new culture info construction methods.
4817         * object.h: Add new fields used to avoid the CultureMap to
4818         MonoCultureInfo.
4819         * culture-info.h: Definition of structs used in the culture info
4820         tables.
4821         * culture-info-tables.h: Autogenerated tables that contain culture
4822         info data. This file was generated with the locale-builder tool.
4823         * appdomain.c: Incement corlib version number.
4824         
4825 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
4826
4827         * appdomain.c: (mono_runtime_init) move mono_thread_init
4828         to before mono_object_new calls so critical sections
4829         are initialized before use.
4830
4831 2004-04-07  Martin Baulig  <martin@ximian.com>
4832
4833         * icall.c
4834         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
4835         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
4836         (ves_icall_MonoGenericParam_initialize): Removed.
4837         (monogenericparam_icalls): Removed.
4838         (generictypeparambuilder_icalls): Added new table for
4839         System.Reflection.Emit.GenericTypeParameterBuilder.
4840
4841         * reflection.c
4842         (mono_reflection_define_generic_parameter): Removed.
4843         (mono_reflection_initialize_generic_parameter): This is now called
4844         from GenericTypeParameterBuilder's .ctor.
4845
4846 2004-04-06  Martin Baulig  <martin@ximian.com>
4847
4848         * class.c (mono_class_init): Don't inflate nested classes in a
4849         generic instance.
4850         (mono_type_get_name_recurse): Include the generic arguments for
4851         generic instances and generic type declarations.
4852         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
4853         (_mono_class_get_instantiation_name): Removed.
4854         (mono_class_create_generic): Always use `gklass->name' as our name.
4855
4856         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
4857
4858         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
4859         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
4860         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
4861         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
4862         closed generic methods here.
4863
4864         * reflection.c
4865         (mono_reflection_generic_inst_get_nested_types): Removed.
4866         (inflate_mono_method): Copy the generic parameters from the
4867         MonoMethodHeader into out MonoGenericMethod.
4868
4869 2004-04-06  Martin Baulig  <martin@ximian.com>
4870
4871         * row-indexes.h
4872         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
4873
4874         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
4875
4876         * reflection.c (build_compressed_metadata): If we have any entries
4877         in the GenericParam, MethodSpec or GenericParamConstraint tables,
4878         set the header version to 1.1.
4879
4880 2004-04-06  Martin Baulig  <martin@ximian.com>
4881
4882         * class.c (mono_class_init): If we're a generic instance,
4883         initialize our nested classes, too.
4884         (_mono_class_get_instantiation_name): Deal with the new `!%d'
4885         suffix. 
4886
4887 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4888
4889         * process.c: quote the argument passed to the shell on windows.
4890
4891 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
4892
4893         * threads.c (mono_alloc_special_static_data): Allow this to be
4894         called during startup.
4895
4896 2004-04-02  Martin Baulig  <martin@ximian.com>
4897
4898         * icall.c
4899         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
4900
4901 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
4902
4903         * icall.c: Fix build.
4904
4905 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
4906
4907         * Makefile.am: Added security.c|h.
4908         * icall.c: Added icall for get_UserName;
4909         * security.c: New file for security related icalls. Added function
4910         get_UserName for System.Environment (fix #56144).
4911         * security.h: New. Header file for security.c
4912
4913 2004-04-02  Dick Porter  <dick@ximian.com>
4914
4915         * icall.c: Deleted the icalls that were obsoleted some time ago
4916         by the ICU string code, and which were mixed into the icall
4917         rearranging.  Fixes bug 55969.
4918
4919         * string-icalls.h: 
4920         * string-icalls.c: Deleted the code that those icalls reference.
4921
4922 2004-04-01  Martin Baulig  <martin@ximian.com>
4923
4924         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
4925
4926         * class.c (mono_class_from_generic_parameter): Don't set 
4927         TYPE_ATTRIBUTE_INTERFACE.
4928         (my_mono_class_from_generic_parameter): Likewise.
4929
4930 2004-04-01  Martin Baulig  <martin@ximian.com>
4931
4932         * loader.c (find_method): Added an optional `MonoClass *ic'
4933         argument to search in a specific interface.
4934         (mono_get_method_constrained): New public function.
4935
4936 2004-04-01  Martin Baulig  <martin@ximian.com>
4937
4938         * reflection.c (mono_image_get_generic_field_token): Use the
4939         `handleref' cache here.
4940
4941 2004-04-01  Martin Baulig  <martin@ximian.com>
4942
4943         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
4944
4945         * reflection.c (create_generic_typespec): Use the `typespec' hash
4946         here, not the `typeref' one.    
4947
4948 2004-04-01  Martin Baulig  <martin@ximian.com>
4949
4950         * class.c (mono_class_inflate_generic_type): Moved the
4951         functionality into a new static inflate_generic_type() which
4952         returns NULL if it didn't do anything.  Only increment the
4953         `mono_stats.inflated_type_count' if we actually inflated
4954         something.
4955         (mono_class_get_full): Check the classes type to see whether we
4956         need to inflate it; also inflate MONO_TYPE_(M)VAR.
4957
4958 2004-04-01  Jackson Harper  <jackson@ximian.com>
4959
4960         * reflection.c: Set culture for assembly references.
4961         
4962 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
4963
4964         * reflection.[ch], icall.[ch], Fix support for pinning variables.
4965
4966 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4967
4968         * assembly.c:
4969         (do_mono_assembly_open): the critical section also covers
4970         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
4971
4972 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4973
4974         * threads.c:
4975         (mono_manage_threads): abort the background threads when finishing.
4976         Fixes bug #47232.
4977
4978 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4979
4980         * gc.c: only close the done_event handle if there was no timeout.
4981         C-ified comments.
4982
4983 2004-03-30  Martin Baulig  <martin@ximian.com>
4984
4985         * icall.c (icall_entries): It's called "System.Activator", not
4986         "System.Activation".    
4987
4988 2004-03-30  Martin Baulig  <martin@ximian.com>
4989
4990         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
4991         (mono_class_create_from_typespec): Likewise.
4992
4993 2004-03-30  Martin Baulig  <martin@ximian.com>
4994
4995         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
4996         `has_ctor_constraint' and `initialized'.
4997
4998 2004-03-30  Martin Baulig  <martin@ximian.com>
4999
5000         * reflection.c (encode_new_constraint): New static function to add
5001         the constructor constraint attribute to a type parameter.
5002         (encode_constraints): Call encode_new_constraint() if necessary.
5003
5004         * reflection.h
5005         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
5006
5007         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
5008         
5009 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
5010
5011         * reflection.c, icall.c: add support for pinning variables. 
5012
5013 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
5014
5015         * marshal.c (mono_marshal_get_managed_wrapper):
5016         init bool local with zero rather than null.
5017
5018 2004-03-29  Martin Baulig  <martin@ximian.com>
5019
5020         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
5021         the "official" behavior here.
5022         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
5023
5024 2004-03-29  Martin Baulig  <martin@ximian.com>
5025
5026         * icall.c: Reflect latest API changes.
5027
5028 2004-03-29  Martin Baulig  <martin@ximian.com>
5029
5030         * loader.c (mono_get_method_from_token): Also call
5031         mono_metadata_load_generic_params () for abstract and interface
5032         methods; replace the type arguments in the method signature with
5033         the ones which are loaded from the metadata.
5034
5035 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
5036
5037         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
5038         of the lock is not the current thread. MS.NET don't do it, in spite of
5039         what the documentation says. See bug #56157.
5040
5041 2004-03-28  Martin Baulig  <martin@ximian.com>
5042
5043         * class.c (mono_class_init): Don't call init_properties() and
5044         init_events() for generic instances; set `prop->parent' when
5045         inflating properties.
5046
5047         * reflection.c (mono_generic_inst_get_object): Call
5048         `mono_class_init (ginst->klass)'.
5049         (mono_type_get_object): Only create a MonoGenericInst if your
5050         generic type is a TypeBuilder.
5051         (do_mono_reflection_bind_generic_parameters): Only set
5052         `ginst->is_dynamic' if our generic type is a TypeBuilder.
5053
5054 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
5055
5056         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
5057         Fixes #56091.
5058
5059 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5060
5061         * icall.c: added Kill_internal icall.
5062         * process.[ch]: added Kill_internal icall.
5063
5064 2004-03-25  Martin Baulig  <martin@ximian.com>
5065
5066         * class.h (MonoStats): Added `generic_instance_count',
5067         `inflated_method_count', `inflated_type_count' and
5068         `generics_metadata_size'.       
5069
5070 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5071
5072         * reflection.c: no warnings now.
5073
5074 2004-03-25  Martin Baulig  <martin@ximian.com>
5075
5076         * class.c (mono_class_get_full): New public function; does a
5077         mono_class_get(), but also takes a `MonoGenericContext *'.
5078
5079         * loader.c (mono_field_from_memberref): Renamed to
5080         `field_from_memberref', made static and added `MonoGenericContext *'
5081         argument.
5082         (mono_field_from_token): Added `MonoGenericInst *' argument.
5083         (method_from_memberef): Likewise.
5084         (mono_get_method_from_token): Likewise.
5085         (mono_get_method_full): New public function; does a
5086         mono_get_method(), but also takes a `MonoGenericContext *'.
5087
5088         * verify.c (mono_method_verify): Get the method's generic context
5089         and pass it to mono_field_from_token(), mono_get_method_full() and
5090         mono_class_get_full().
5091
5092 2004-03-25  Martin Baulig  <martin@ximian.com>
5093
5094         * class.c (mono_class_inflate_generic_type): Take a
5095         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
5096         `MonoGenericMethod *'.
5097
5098 2004-03-25  Martin Baulig  <martin@ximian.com>
5099
5100         * loader.h (MonoMethodInflated): Store the MonoGenericContext
5101         instead of the MonoGenericMethod here.
5102
5103 2004-03-25  Martin Baulig  <martin@ximian.com>
5104
5105         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
5106         each time we create a new MonoGenericInst, we also create a new
5107         context which points back to us.
5108
5109         * class.c (inflate_method): Use `ginst->context' instead of
5110         creating a new context.
5111
5112         * loader.c (method_from_memberref): Use
5113         `klass->generic_inst->context' instead of creating a new context.
5114
5115 2004-03-25  Martin Baulig  <martin@ximian.com>
5116
5117         * class.h (MonoGenericContext): New struct.
5118         (MonoGenericMethod): Removed `generic_inst'.
5119
5120         * class.c (mono_class_inflate_generic_method): Take a
5121         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
5122
5123 2004-03-25  Martin Baulig  <martin@ximian.com>
5124
5125         * loader.h (MonoMethodInflated): New typedef.
5126
5127         * metadata.h (MonoMethodSignature): Removed `gen_method', make
5128         `generic_param_count' consume just 30 bits, added `is_inflated'
5129         and `has_type_parameters' flags (one bit each).
5130
5131         * class.c (mono_class_inflate_generic_method): Create a
5132         MonoMethodInflated instead of a MonoMethodNormal and set
5133         `is_inflated' in the method signature.
5134
5135         * class.h (MonoGenericMethod): Removed `generic_method'.
5136
5137 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
5138
5139         * image.c: Make sure the name of a MonoImage is always an absolute path.
5140           This fixes bug #54415.
5141
5142 2004-03-24  Martin Baulig  <martin@ximian.com>
5143
5144         * class.c (mono_class_setup_vtable): If we're a generic instance,
5145         use our generic type's vtable size.
5146
5147 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
5148
5149         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
5150         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
5151         problems.
5152
5153 2004-03-23  Martin Baulig  <martin@ximian.com>
5154
5155         * class.h (MonoDynamicGenericInst): Added `int count_events' and
5156         `MonoEvent *events'.
5157
5158         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
5159         (typebuilder_icalls): Added "get_event_info"; calls
5160         mono_reflection_event_builder_get_event_info(). 
5161
5162         * reflection.c (mono_reflection_generic_inst_initialize): Added
5163         `MonoArray *events'.
5164         (mono_reflection_event_builder_get_event_info): New function.
5165
5166 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
5167
5168         * object.h: add mono_type_initialization_init
5169
5170         * object.c (mono_runtime_class_init): 
5171         implement class constructor synchronization rules
5172         to cope with threading issues.  
5173         add mono_type_initialization_init
5174
5175         * appdomain.c (mono_runtime_init): call 
5176         mono_type_initialization_init
5177
5178         * class.h: removing initializing field from MonoVTable
5179
5180 2004-03-23  Martin Baulig  <martin@ximian.com>
5181
5182         * class.c (my_mono_class_from_generic_parameter): Use
5183         `param->name' if it's not NULL. 
5184
5185 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
5186
5187         * class.c: do not insert non-virtual methods in the vtable.
5188         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
5189         that means the method is non-virtual. This never would have
5190         happened before.
5191
5192 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
5193
5194         * profiler.c: Added lock for accessing coverage_hash.
5195
5196 2004-03-22  Martin Baulig  <martin@ximian.com>
5197
5198         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
5199         `method->method->signature->generic_param_count != 0' to make it
5200         work for interface methods.
5201
5202 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5203
5204         * process.c: quote the string passed to the shell using g_shell_quote.
5205
5206 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5207
5208         * threads.c:
5209         (mono_threads_manage): don't remove the finalizer thread and self
5210         from the threads hash table so that mono_thread_manage can be called
5211         more than once.
5212
5213 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5214
5215         * process.c: quote the arguments when UseShellExecute is true. Fixes
5216         bug #55790.
5217
5218 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5219
5220         * threads.c: set mono_thread_detach as a cleanup routine for every
5221         thread. This way it's always executed upon thread termination, either
5222         aborted or finished normally. No more xsp hangs!
5223
5224 2004-03-17  Martin Baulig  <martin@ximian.com>
5225
5226         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
5227         `int count_nested' and a `MonoType **nested'.
5228
5229         * reflection.c (mono_reflection_bind_generic_parameters): Moved
5230         most of the functionality into a new static
5231         do_mono_reflection_bind_generic_parameters() and don't take a
5232         `MonoType *nested_in' argument any more.  Don't compute nested
5233         types here.
5234         (mono_reflection_generic_inst_get_nested_types): New public method
5235         to get nested types.
5236
5237         * class.c (mono_class_create_generic): Set `klass->nested_in' if
5238         we're a nested class.
5239
5240         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
5241         mono_reflection_generic_inst_get_nested_types() to compute the
5242         nested types.
5243
5244 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
5245
5246         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
5247         descriptive error message under windows.
5248         
5249 2004-03-17  Martin Baulig  <martin@ximian.com>
5250
5251         * class.c (dup_type): Added `const MonoType *original' argument;
5252         copy the attrs from the original type.
5253
5254 2004-03-17  Martin Baulig  <martin@ximian.com>
5255
5256         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
5257         `m->generic_inst_cache' here.
5258
5259 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
5260
5261         * exception.h exception.c: Add stack_overflow_exception.
5262
5263 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5264
5265         * threadpool.c:
5266         (overlapped_callback): call SetEvent *after* invoking the callback.
5267         No need to call CloseHandle.
5268
5269 2004-03-16  Martin Baulig  <martin@ximian.com>
5270
5271         * reflection.c (mono_image_get_fieldref_token): Take a
5272         `MonoReflectionField *' instead of a `MonoClassField *' and a
5273         `MonoClass *'; store the `MonoReflectionField *' in the hash.
5274
5275 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5276
5277         * appdomain.c: don't add the culture to the filename we're looking for
5278         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
5279
5280 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5281
5282         * locales.c: don't ignore symbols when doing case insensitive compares.
5283         Thanks Dick! Fixes bug #54046.
5284
5285         * threads.c: surround 'threads' usage with enter/leave in
5286         mono_thread_manage.
5287
5288 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
5289
5290         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
5291         implicitly marshalled as [Out]. Fixes #55450.
5292
5293         (mono_marshal_get_runtime_invoke): Zero out the result if there is
5294         an exception.
5295
5296 2004-03-16  Martin Baulig  <martin@ximian.com>
5297
5298         * class.c (mono_class_from_generic_parameter): Use the actual
5299         parameter name. 
5300
5301 2004-03-16  Martin Baulig  <martin@ximian.com>
5302
5303         * reflection.c (type_get_signature_size): New static function.
5304         Compues the size of the type in a method signature.
5305         (method_get_signature_size): New static function; calls
5306         type_get_signature_size() to compute the actual size of the
5307         method's signature.
5308         (method_encode_signature): Use method_get_signature_size() to get
5309         the signature's size rather than using `nparams * 10'.
5310
5311 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5312
5313         * file-io.h: define here WapiOverlapped on windows. I don't want the
5314         regular OVERLAPPED one.
5315
5316         * file-io.c:
5317         * threadpool.c: somehow, BindIoCompletionCallback is not found.
5318         Disabling AIO on windows.
5319
5320 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5321
5322         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
5323         bug #55385.
5324
5325 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5326
5327         * appdomain.c: upgraded corlib version.
5328
5329         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
5330         and BeginWrite. Allow opening files for asynchrnous operations.
5331
5332         * file-io.h: new struct that maps FileStreamAsyncResult.
5333         * icall.c: added new icalls.
5334         * process.[ch]: support setting child process environment variables
5335         and use the SHELL or COMSPEC when UseShellExecute is true.
5336
5337         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
5338         callback for async. IO is here and also BindHandle.
5339
5340         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
5341         from here.
5342
5343 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
5344
5345         * reflection.c (create_custom_attr): Allow len == 0.
5346
5347         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
5348         computation on big-endian machines.
5349
5350 2004-03-13  Martin Baulig  <martin@ximian.com>
5351
5352         * class.h (MonoGenericInst): Added `int count_ifaces'.
5353
5354         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
5355         `ginst->count_ifaces' instead `klass->interface_count' since we
5356         may get called before the vtable is created.
5357
5358         * loader.c (mono_method_get_param_names): If we're a generic
5359         instance, return and don't initialize the class.
5360
5361         * reflection.c (mono_reflection_setup_generic_class): Don't call
5362         ensure_runtime_vtable().
5363         (mono_reflection_bind_generic_parameters): Set
5364         `ginst->count_ifaces'.
5365
5366 2004-03-11  Jackson Harper <jackson@ximian.com>
5367
5368         * icall.c:
5369         * unicode.c:
5370         * unicode.h: Remove unused System.Char icalls.
5371         
5372 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
5373
5374         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
5375         code when we P/Invoke the first library in Windows.Forms, instead
5376         of when we first open the assembly.
5377
5378         * assembly.c: Drop the lookup from here.
5379
5380 2004-03-10  Martin Baulig  <martin@ximian.com>
5381
5382         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
5383         class for properties, fields and events.  Finally fixes #54945.
5384
5385 2004-03-10  Martin Baulig  <martin@ximian.com>
5386
5387         * metadata.c (mono_metadata_class_equal): New static function;
5388         checks whether two generic instances or two generic parameters are
5389         equal.
5390         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
5391         compare classes.        
5392
5393 2004-03-10  Martin Baulig  <martin@ximian.com>
5394
5395         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
5396
5397         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
5398         argument and write it into the `reflection_info' field.
5399
5400         * icall.c
5401         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
5402         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
5403
5404 2004-03-09  Jackson Harper  <jackson@ximian.com>
5405
5406         * char-conversions.h: use 8 bits for numeric data its all we need
5407         * icall.c: numeric data is only 8 bits now.
5408
5409 2004-03-09  Martin Baulig  <martin@ximian.com>
5410
5411         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
5412
5413         * class.c (init_properties, init_events): Initialize the new
5414         `parent' field.
5415
5416         * reflection.c (typebuilder_setup_properties): Likewise.
5417         (typebuilder_setup_events): Likewise.
5418
5419         * reflection.h (MonoEventInfo): Replaced `parent with
5420         `declaring_type' and `reflected_type'.
5421
5422         * icall.c (ves_icall_get_property_info): Distinguish between
5423         declaring and reflected type.
5424         (ves_icall_get_event_info): Likewise.
5425
5426 2004-03-09  Martin Baulig  <martin@ximian.com>
5427
5428         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
5429         (ves_icall_Type_GetField): Correctly set field->klass.
5430
5431 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
5432
5433         * loader.h: Fix warning.
5434
5435 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
5436
5437         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
5438         library routine if present.  Notice that it will still continue
5439         executing even if its missing, for those working on the Gtk#
5440         edition of Windows.Forms.
5441
5442         * assembly.c (do_mono_assembly_open): If loading the
5443         System.Windows.Forms call mono_loader_wini_init.
5444
5445 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
5446
5447         * class.h: Added MonoRemoteClass struct.
5448         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
5449         function for MonoStrings.
5450         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
5451         Added internal call for getting the proxy type.
5452         * marshal.c: Get the type of transparent proxies from its remote_class.
5453         Added methods that generate the IL for type checks and casts:
5454         mono_marshal_get_isinst, mono_marshal_get_castclass, 
5455         mono_marshal_get_proxy_cancast.
5456         * marshal.h: Declaration of the previous new methods.
5457         * object.c: Added new moethods for creating and updating MonoRemoteClass
5458         instances: mono_remote_class, mono_upgrade_remote_class, 
5459         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
5460         * verify.c: FIx transparent_proxy_fields layout.
5461         * appdomain.c: Bump corlib version.
5462
5463 2004-03-04  Jackson Harper  <jackson@ximian.com>
5464
5465         * icall.c: Add icall to access char conversion tables.
5466         * char-conversions.h: Character conversion tables.
5467         * Makefile.am: Add char-conversions.h private header file.
5468         
5469 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
5470
5471         * appdomain.c (unload_thread_main): Increase unloading timeout to
5472         10 sec as a temporary workaround for Nant problems.
5473
5474 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
5475
5476         * gc.c: Add checks for GC_enable and GC_disable.
5477
5478         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
5479         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
5480         (bug #54988).
5481         
5482 2004-02-27  Martin Baulig  <martin@ximian.com>
5483
5484         * reflection.c (mono_reflection_bind_generic_parameters): Take a
5485         `MonoReflectionType *' instead of a `MonoType *'.
5486
5487 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
5488
5489         * gc.c (run_finalize): Avoid finalizing the object representing the
5490         finalizer thread.
5491         (finalizer_thread): Fix warning.
5492
5493 2004-02-25  Martin Baulig  <martin@ximian.com>
5494
5495         * class.c (_mono_class_get_instantiation_name): Added `int offset'
5496         argument for nested types.
5497         (mono_class_create_generic): Added support for nested generictypes.
5498
5499         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
5500         `GList *nested'.
5501
5502         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
5503
5504         * reflection.c (method_encode_signature): Increase the minimum
5505         value of `size' from 10 to 11.
5506         (mono_reflection_bind_generic_parameters): Take `int type_argc'
5507         and `MonoType **types' arguments instead of the `MonoArray
5508         *types'; added `MonoType *nested_in'.  Recursively instantiate
5509         nested classes. 
5510
5511 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
5512
5513         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
5514         stack_overflow_ex members which are used by exception handling.
5515
5516         * appdomain.c (mono_runtime_init): Initialize the new members.
5517
5518         * gc.c (mono_gc_enable): New helper function.
5519         * gc.c (mono_gc_disable): New helper function.
5520
5521 2004-02-23  Martin Baulig  <martin@ximian.com>
5522
5523         * icall.c: I must have been really stupid - make it actually work
5524         this time ;-)
5525
5526 2004-02-23  Martin Baulig  <martin@ximian.com>
5527
5528         * loader.c (method_from_memberref): Only inflate the method if
5529         it's in another klass.
5530
5531 2004-02-23  Martin Baulig  <martin@ximian.com>
5532
5533         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
5534         (mono_class_init): If we're a generic instance and an interface,
5535         compute `class->interface_id'; also create `class->interfaces'
5536         here and inflate them.
5537
5538         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
5539         `ginst->is_open'.
5540         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
5541
5542         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
5543
5544 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
5545
5546         * reflection.c (method_encode_code): Improved the error message
5547         generated by the exception.
5548
5549 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5550
5551         * icall.c: Martin did not do what he said in the ChangeLog for
5552         2004-02-18, but put back the changes for properties and events.
5553         Commenting those changes out again and adding comment to bug #54518.
5554         
5555         * process.c: removed warning.
5556
5557 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
5558
5559         * marshal.c (emit_struct_conv): Print an error message instead of
5560         asserting when a type does not have the StructLayout attribute.
5561
5562 2004-02-20  Martin Baulig  <martin@ximian.com>
5563
5564         * reflection.c (mono_type_get_object): Also use the cache for
5565         generic instances.
5566         (mono_reflection_bind_generic_parameters): Always compute
5567         `ginst->ifaces'.        
5568
5569 2004-02-20  Martin Baulig  <martin@ximian.com>
5570
5571         * class.h (MonoGenericMethod): Removed `klass'.
5572
5573         * class.c (mono_class_inflate_generic_method): Added `MonoClass
5574         *klass' argument.
5575
5576 2004-02-20  Martin Baulig  <martin@ximian.com>
5577
5578         * reflection.c (method_encode_methodspec): Actually use the
5579         uninflated signature for the memberref.
5580
5581 2004-02-20  Martin Baulig  <martin@ximian.com>
5582
5583         * class.h (MonoGenericMethod): Removed `declaring'.
5584
5585         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
5586         is NULL, compute it here.
5587
5588 2004-02-20  Martin Baulig  <martin@ximian.com>
5589
5590         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
5591
5592         * metadata.c (mono_metadata_generic_inst_hash): New method.
5593         (mono_metadata_generic_inst_equal): New method.
5594
5595         * reflection.c (mono_reflection_bind_generic_parameters): Use the
5596         `klass->image->generic_inst_cache' cache to avoid creating
5597         duplicate MonoGenericInst's.
5598
5599         * class.c (mono_class_inflate_generic_type): Use the cache.
5600
5601 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5602
5603         * object.c: fixed gc descriptor calculation for embedded valuetypes.
5604
5605 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5606
5607         * icall.c: added Socket.WSAIoctl icall.
5608
5609         * socket-io.[ch]: implemented
5610         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
5611
5612 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
5613
5614         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
5615
5616 2004-02-18  Urs C Muff  <umuff@quark.com>
5617
5618         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
5619         this work on PPC and other big-endian architectures.
5620
5621         * debug-mono-symfile.h: Prepended the names of all the `guint32'
5622         fields with an underscore to make sure they're only accessed by
5623         the read32() macro.
5624
5625 2004-02-18  Martin Baulig  <martin@ximian.com>
5626
5627         * icall.c: Put the klass->refclass changes back for methods and
5628         fields, but not for properties and events.  We're currently not
5629         distinguishing between DeclaringType and ReflectedType for
5630         properties and events, that's what caused the regressions.
5631
5632 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5633
5634         * object.c:
5635         (mono_async_result_new): the handle can be NULL.
5636
5637         * threadpool.c: Use an event instead of a semaphore, don't initialize
5638         it until needed. This saves quite a few semaphores from being created
5639         when using the threadpool.
5640
5641 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
5642
5643         * object.c (mono_string_is_interned_lookup): Fix interning of long
5644         strings. Fixes #54473.
5645
5646         * domain.c (ldstr_equal): Optimize if the two strings are equal.
5647
5648         * icall.c: Revert the klass->refclass changes since they introduce
5649         regressions (bug #54518).
5650
5651 2004-02-18  Martin Baulig  <martin@ximian.com>
5652
5653         * class.c (mono_class_init): If we're a generic instance and don't
5654         come from a TypeBuilder, inflate our members here.
5655         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
5656         (mono_class_create_generic): New public method.
5657         (mono_class_initialize_generic): Removed.
5658         (get_instantiation_name): Renamed to
5659         _mono_class_get_instantiation_name() and made it public.
5660
5661 2004-02-18  Martin Baulig  <martin@ximian.com>
5662
5663         * class.c (mono_class_inflate_generic_type): Clear the new
5664         instance's `nginst->klass' when inflating a generic instance.
5665         (mono_class_is_subclass_of): Added (basic) support for generic
5666         instances.
5667
5668 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
5669
5670         * appdomain.h, domain.c: use a MonoCodeManager instead of a
5671         MonoMempool to hold compiled native code.
5672
5673 2004-02-17  Martin Baulig  <martin@ximian.com>
5674
5675         * class.h (MonoDynamicGenericInst): Added `count_properties' and
5676         `properties'.
5677
5678         * reflection.c (mono_reflection_generic_inst_initialize): Added
5679         `MonoArray *properties' argument.
5680
5681         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
5682
5683 2004-02-17  Martin Baulig  <martin@ximian.com>
5684
5685         * icall.c (ves_icall_Type_GetFields): Renamed to
5686         ves_icall_Type_GetFields_internal() and added a
5687         `MonoReflectionType *rtype' argument; pass it to
5688         mono_field_get_object() to set the field's "reflected" type.
5689         (ves_icall_Type_GetConstructors): Likewise.
5690         (ves_icall_Type_GetEvents): Likewise.
5691         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
5692         argument; pass it to mono_method_get_object() to set the method's
5693         "reflected" type.       
5694
5695 2004-02-17  Martin Baulig  <martin@ximian.com>
5696
5697         * class.h (MonoDynamicGenericInst): New type.
5698         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
5699
5700         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
5701         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
5702         (ves_icall_MonoGenericInst_GetFields): New interncall.
5703
5704         * class.c (mono_class_from_generic): Don't call
5705         mono_class_initialize_generic() if this is a dynamic instance;
5706         ie. it's being created from a TypeBuilder.
5707         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
5708         `class->byval_arg.type'.
5709
5710         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
5711         to `inflate_method' and made static.
5712         (mono_reflection_inflate_field): Removed.
5713         (mono_reflection_generic_inst_initialize): New public method.
5714
5715         * reflection.h (MonoReflectionGenericInst): Removed `methods',
5716         `ctors' and `fields'; added `initialized'.
5717
5718 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
5719
5720         * debug-helpers.c (mono_method_full_name): Fix output for empty
5721         namespaces.
5722
5723 2004-02-12  Martin Baulig  <martin@ximian.com>
5724
5725         * class.h (MonoClassField): Added `MonoType *generic_type'.
5726
5727         * reflection.c (mono_image_get_fieldref_token): Added support for
5728         instantiated generic types.
5729         (field_encode_inflated_field): Removed.
5730         (mono_image_get_inflated_field_token): Removed.
5731         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
5732
5733         * reflection.h (MonoReflectionInflatedField): Removed.
5734
5735 2004-02-12  Martin Baulig  <martin@ximian.com>
5736
5737         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
5738         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
5739
5740         * reflection.c (mono_image_get_methodspec_token): Take a
5741         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
5742         (mono_image_create_token): Check whether we have a
5743         `method->signature->gen_method' and call
5744         mono_image_get_methodspec_token() if appropriate.
5745         (inflated_method_get_object): Removed.
5746         (mono_reflection_bind_generic_method_parameters): Return a
5747         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
5748         (mono_reflection_inflate_method_or_ctor): Likewise.
5749
5750         * reflection.h (MonoReflectionInflatedMethod): Removed.
5751
5752 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
5753
5754         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
5755         for custom valuetype marshalling.
5756
5757         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
5758
5759 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5760
5761         * icall.c: fixed WSAGetLastError_internal name.
5762
5763 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
5764
5765         * threads.c (mono_thread_attach): Allow this to be called multiple
5766         times for a thread.
5767         
5768         * threads.c (build_wait_tids): Do not wait for ourselves.
5769
5770         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
5771         appdomain list is empty.
5772
5773         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
5774         memory returned by mono_string_builder_to_utf16, since it points into
5775         managed memory. Thanks to Bernie Solomon for noticing this.
5776
5777         * icall.c: Add AppDomainSetup icalls.
5778
5779         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
5780
5781         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
5782         types.
5783
5784         * reflection.c (reflection_methodbuilder_to_mono_method): Save
5785         custom attributes to the method_aux struct. Also fix array indexes etc.
5786
5787         * loader.c (mono_method_get_param_names): Make dynamic case work again.
5788         
5789 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
5790
5791         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
5792         (both static and runtime) and reduce startup time.
5793
5794 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
5795
5796         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
5797         AsAny marshalling conversion instead of crashing.
5798
5799         * marshal.c: Fix warnings.
5800
5801 2004-02-09  Martin Baulig  <martin@ximian.com>
5802
5803         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
5804
5805         * reflection.h (MonoReflectionInflatedMethod): Removed the
5806         `declaring' field, it's now in the unmanaged MonoGenericMethod.
5807
5808         * reflection.c (method_encode_methodspec): Removed the `method'
5809         argument; we get it from `gmethod->declaring'.
5810         (inflated_method_get_object): Removed the `declaring' argument.
5811
5812 2004-02-09  Martin Baulig  <martin@ximian.com>
5813
5814         * class.h (MonoGenericMethod): New type.
5815         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
5816         `generic_method'.
5817
5818         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
5819         a `MonoGenericMethod *gen_method' one.
5820
5821         * class.c (mono_class_inflate_generic_type): Take an additional
5822         `MonoGenericMethod * argument.  This is only non-NULL if we're
5823         inflating types for a generic method.   
5824         (mono_class_inflate_generic_signature): Renamed to
5825         inflate_generic_signature() and made static; take a
5826         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5827         (inflate_generic_header): Take a `MonoGenericMethod *' argument
5828         instead of a `MonoGenericInst *' one.
5829         (mono_class_inflate_generic_method): Likewise.
5830
5831         * reflection.c (encode_generic_method_sig): Take a
5832         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5833         (method_encode_methodspec): Likewise.
5834         (inflated_method_get_object): Likewise. 
5835
5836         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
5837         field with a `MonoGenericMethod *gmethod' one.  
5838
5839 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
5840
5841         * class.h (mono_class_has_parent): add parens to expansion
5842         so you can ! this.
5843
5844 2004-02-08  Martin Baulig  <martin@ximian.com>
5845
5846         * image.h (MonoImage): Removed `generics_cache'.
5847
5848         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
5849         instead of a `MonoType *' argument; removed the `inflate_methods'
5850         argument.  Don't inflate methods here.
5851
5852         * loader.c (find_method): If it's a generic instance, call
5853         mono_class_init() on the `sclass->generic_inst->generic_type'.
5854
5855         * metadata.c (mono_type_size): Make this work on uninitialized
5856         generic instances; call it on the `ginst->generic_type's class.
5857
5858         * reflection.c (mono_reflection_bind_generic_parameters): Call
5859         mono_class_from_generic() to create the `ginst->klass'.
5860
5861 2004-02-08  Martin Baulig  <martin@ximian.com>
5862
5863         * class.h (MonoClass): Changed type of `generic_inst' from
5864         `MonoType *' to `MonoGenericInst *'.
5865
5866 2004-02-08  Martin Baulig  <martin@ximian.com>
5867
5868         * icall.c (ves_icall_Type_BindGenericParameters): Just call
5869         mono_type_get_object(), this is now creating a `MonoGenericInst'
5870         for MONO_TYPE_GENERICINST.
5871         (ves_icall_MonoGenericInst_GetParentType): Likewise.
5872         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
5873
5874         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
5875         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
5876         (inflated_method_get_object): Added `MonoClass *refclass' argument.
5877         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
5878         and reflected type.
5879
5880         * reflection.h (MonoReflectionInflatedMethod): Removed
5881         `declaring_type' and `reflected_type'.
5882
5883 2004-02-08  Martin Baulig  <martin@ximian.com>
5884
5885         * class.h (MonoGenericInst): Added `MonoType *parent' and
5886         `MonoType **ifaces'.
5887
5888         * reflection.h (MonoReflectionGenericInst): Removed `klass',
5889         `parent' and `interfaces'.
5890
5891         * reflection.c (mono_reflection_bind_generic_parameters): Take a
5892         `MonoType *' argument and return a `MonoType *'.
5893
5894         * icall.c
5895         (ves_icall_MonoGenericInst_GetParentType): New interncall.
5896         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
5897
5898 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
5899
5900         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
5901         valuetype marshalling.
5902
5903 2004-02-06  Martin Baulig  <martin@ximian.com>
5904
5905         * class.c
5906         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
5907         (my_mono_class_from_generic_parameter): Likewise.
5908
5909 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
5910
5911         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
5912         contents of the symbol files lazily.
5913
5914         * object.h (MonoThread): Add 'name' and 'name_len' fields.
5915
5916         * threads.h threads.c icall.c: New icalls for getting and setting the
5917         threads name.
5918
5919 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
5920
5921         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
5922         Raise an exception when the domain is not found.
5923
5924 2004-02-03  Martin Baulig  <martin@ximian.com>
5925
5926         * reflection.c (mono_image_get_methodspec_token): Use the
5927         uninflated signature; fixes gen-33.
5928
5929 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
5930
5931         * gc.c threads.c: Make the finalizer thread a normal managed thread so
5932         the finalizer code can use thread functionality.
5933
5934         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
5935         the finalizer thread.
5936
5937         * threads.c: Make some functions more robust.
5938
5939         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
5940
5941         * metadata.h: Add new marshalling conventions.
5942
5943         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
5944         stringbuilder marshalling. Fixes #53700.
5945
5946         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
5947
5948         * reflection.c (mono_image_get_type_info): Save declarative security
5949         info.
5950
5951         * reflection.c (mono_image_get_field_info): Handle uninitialized 
5952         unmanaged fields as well.
5953
5954         * appdomain.c: Bump corlib version.
5955
5956 2004-02-01  Martin Baulig  <martin@ximian.com>
5957
5958         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
5959         method type arguments.  
5960
5961 2004-01-30  Duncan Mak  <duncan@ximian.com>
5962
5963         * marshal.h: Add prototype for
5964         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
5965         and
5966         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
5967         fix the build.
5968
5969 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
5970
5971         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
5972         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
5973
5974 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
5975
5976         * marshal.c (mono_marshal_get_native_wrapper): Add support for
5977         custom marshalling of valuetypes.
5978
5979         * marshal.c: Fix some warnings.
5980
5981 2004-01-29  Martin Baulig  <martin@ximian.com>
5982
5983         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
5984         for generic method parameters.
5985
5986         * reflection.c (method_encode_methodspec): Write the uninflated
5987         signature into the methodspec table.
5988         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
5989         is always the uninflated method.
5990         (reflection_methodbuilder_to_mono_method): Copy the generic
5991         parameters from the MethodBuilder into `header->gen_params'.
5992
5993 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
5994
5995         * class.c (mono_class_from_generic_parameter): Fix warning.
5996
5997 2004-01-27  Martin Baulig  <martin@ximian.com>
5998
5999         * class.c (mono_class_from_generic_parameter): Don't create
6000         `klass->methods' here.  
6001
6002 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
6003
6004         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
6005         extension since it does not work with libraries named lib<FOO>.dll.so.
6006
6007 2004-01-25  Martin Baulig  <martin@ximian.com>
6008
6009         * class.c (mono_class_inflate_generic_type): Added support for
6010         MONO_TYPE_GENERICINST.
6011
6012         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
6013         inflate methods on open constructed types.      
6014
6015 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6016
6017         * object.c: fire ProcessExit event in the root AppDomain after running
6018         Main. Fixes bug #53299.
6019
6020 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
6021
6022         * socket-io.c: include the new socket-wrappers.h header.
6023         Use the wrappers instead of the unix socket functions to make the code
6024         more clear.
6025
6026 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
6027
6028         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
6029
6030         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6031         Fixes #22532.
6032
6033 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
6034
6035         * reflection.c (mono_image_create_pefile): Handle the case when the
6036         entry point is not a MethodBuilder.
6037
6038         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6039         field to ReflectionMethod since it is not allways a builder.
6040
6041         * reflection.c (type_get_fully_qualified_name): New helper function to
6042         return the fully qualified name of a type.
6043
6044         * reflection.c (encode_marshal_blob): Always emit the fully qualified
6045         type name for custom marshallers.
6046
6047         * reflection.c (mono_marshal_spec_from_builder): Ditto.
6048
6049         * class.c (mono_class_setup_vtable): If a parent class already 
6050         implements an interface, use the implementing methods from that class.
6051         Fixes #53148.
6052
6053 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6054
6055         * threadpool.c: just return instead of ExitThread to allow for thread
6056         clean up earlier.
6057
6058 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
6059
6060         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
6061         when closing resource modules.
6062
6063         * reflection.c (mono_image_create_pefile): Handle the case when the
6064         entry point is not a MethodBuilder.
6065
6066         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6067         field to ReflectionMethod since it is not allways a builder.
6068
6069 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6070
6071         * marshal.c (mono_marshal_get_managed_wrapper): 
6072         mono_marshal_alloc takes native int so CONV_I
6073         the arg for 64bits.
6074
6075 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
6076
6077         * reflection.c (fixup_cattrs): New function to fixup the methoddef
6078         tokens in the cattr table. Fixes #53108.
6079
6080 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6081
6082         * loader.c: don't trim ".dll" before looking up in the config file.
6083         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
6084
6085 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
6086
6087         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
6088         Return the module which contains the resource as well.
6089         (ves_icall_System_Reflection_Module_Close): New icall.
6090
6091         * appdomain.c: Bump corlib version number.
6092
6093         * image.c (mono_image_addref): New public function.
6094
6095         * assembly.c: Call mono_image_addref.
6096
6097         * reflection.c (mono_module_get_object): Increase reference count of 
6098         the image.
6099
6100         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6101         Fixes #22532.
6102
6103         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
6104         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
6105         proper exceptions on DllImport problems.
6106
6107 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
6108
6109         * class.c, metadata.c: eliminate CSIZE macro.
6110
6111 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
6112
6113         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
6114         * object.h: Added async_callback field in MonoAsyncResult.
6115         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
6116         * verify.c: Added async_callback in MonoAsyncResult layout.
6117
6118 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
6119
6120         * reflection.c (mono_reflection_get_custom_attrs): Add support
6121         for Modules.
6122
6123 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
6124
6125         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
6126         marshalling.
6127         (mono_marshal_method_from_wrapper): Add null pointer check.
6128
6129 2004-01-16  Martin Baulig  <martin@ximian.com>
6130
6131         * debug-mono-symfile.h: Set version number to 36 and reflect
6132         latest symbol writer changes.
6133
6134 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
6135
6136         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
6137         multi-dimensional arrays.
6138         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
6139         (mono_class_from_mono_type): Use bounded_array_class_get.
6140         
6141         * class.c (mono_bounded_array_class_get): New function which takes
6142         a 'bounded' bool argument to distinguish vectors from one dimensional
6143         arrays.
6144
6145         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
6146         bounded_array_class_get if the array has bounds.
6147
6148         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
6149         Search modules loaded using AssemblyBuilder:AddModule as well.
6150
6151 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6152
6153         * appdomain.c: increased corlib version.
6154         * filewatcher.c: removed g_print.
6155         * icall.c:
6156         (get_property_info): only allocate what is actually requested.
6157         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
6158
6159 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6160
6161         * Makefile.am: added filewatcher.[ch]
6162         * filewatcher.[ch]: FileSystemWatcher runtime support.
6163         * icall.c: added new FSW icalls.
6164
6165 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
6166
6167         * string-icalls.c: fix stringbuilder regression as suggested by
6168         Iain McCoy <iain@mccoy.id.au>.
6169
6170 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
6171
6172         * process.c (process_read_stringtable_block): Recognize '007f' as
6173         a language neutral stringtable block.
6174
6175 2004-01-12  Patrik Torstensson
6176
6177         * object.h (MonoStringBuilder) : Changed layout to support our
6178         new stringbuilder class.
6179         * marshal.c: Change marshalling to support the new layout of 
6180         string builder.
6181         * appdomain.c: increased version number because new layout of
6182         string builder.
6183
6184 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
6185
6186         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
6187         assembly name as an string instead of an AssemblyName, since it is
6188         easier to extract info from it.
6189
6190         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
6191         the culture subdirectories too. Fixes #52231.
6192
6193 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6194
6195         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
6196         It takes 2 new parameters with an optional name for the method to look
6197         for and case ignoring info.
6198
6199         * threadpool.c: removed unused variable.
6200
6201 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6202
6203         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
6204         It takes 2 new parameters with an optional name for the property to look
6205         for and case ignoring info.
6206         Fixes bug #52753.
6207
6208 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
6209
6210         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
6211         Fix #52451.
6212
6213 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6214
6215         * appdomain.c:
6216         * assembly.c: escape the uri before passing it to g_filename_from_uri.
6217         Fixes bug #52630.
6218
6219 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
6220
6221         * reflection.c: Add support for more than one unmanaged resource.
6222
6223         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
6224         in field->def_value, as done in all other cases.
6225
6226         * reflection.c (mono_reflection_get_custom_attrs): Add support for
6227         TypeBuilders.
6228
6229         * reflection.c (mono_reflection_create_runtime_class): Remove 
6230         errorneous assignment to klass->element_class, since it is already
6231         done in mono_reflection_setup_internal_class.
6232
6233 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6234
6235         * gc.c: added missing LeaveCriticalSection.
6236         * icall.c: indented a couple of lines.
6237         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
6238         if we call EndInvoke inside a callback. Fixes bug #52601.
6239
6240 2004-01-07  Martin Baulig  <martin@ximian.com>
6241
6242         * mono-debug-debugger.h
6243         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
6244
6245 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
6246
6247         * appdomain.c: Use messages in NotImplementedException.
6248
6249         * exception.c (mono_get_exception_not_implemented): Now this takes
6250         a message argument.
6251
6252         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
6253         exception instead of g_asserting an aborting when something is not
6254         implemented.
6255
6256         Add some inline docs.
6257
6258 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
6259
6260         * reflection.h: Update after changes to object layout.
6261
6262         * reflection.c: Implement saving of unmanaged aka win32 resources.
6263
6264         * appdomain.c: Bump version number.
6265
6266         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
6267         Handle missing domains gracefully.
6268
6269 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
6270
6271         * file-io.c : On Windows, there are much more invalid_path_chars.
6272
6273 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
6274
6275         * class.h, object.c: prepare for GetType () speedup.
6276
6277 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
6278
6279         * profiler.c: workaround for --profile null reference exception on
6280           cygwin. Patch by Patrik Torstensson.
6281
6282 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
6283
6284         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
6285         make work for unaligned access.
6286
6287 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
6288
6289         * class.c: small cleanup (class->fields [i] -> field).
6290         * image.c: check address of metadata is valid.
6291
6292 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
6293
6294         * assembly.h assembly.c (mono_assembly_loaded): New public function to
6295         search the list of loaded assemblies.
6296
6297         * reflection.c (mono_reflection_type_from_name): Use 
6298         mono_assembly_loaded instead of mono_image_loaded.
6299
6300         * reflection.c: Fix warnings.
6301
6302 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
6303
6304         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
6305         is dynamic. This is needed since an assembly can contain both dynamic and
6306         non-dynamic images.
6307
6308         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
6309         assembly->dynamic.
6310
6311         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
6312
6313         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
6314         to store modules loaded using AddModule.
6315
6316         * reflection.c (mono_image_fill_file_table): Generalize this so it works
6317         on Modules.
6318
6319         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
6320
6321         * reflection.c (mono_image_fill_export_table_from_module): New function to
6322         fill out the EXPORTEDTYPES table from a module.
6323
6324         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
6325         into a separate function. Also handle loaded non-dynamic modules.
6326
6327         * reflection.c (mono_image_basic_init): Fix memory allocation.
6328
6329         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6330
6331         * assembly.c (mono_assembly_load_references): Make this public.
6332
6333 2003-12-19  Martin Baulig  <martin@ximian.com>
6334
6335         * class.c (mono_class_initialize_generic): Made this static, take
6336         a `MonoGenericInst *' instead of a `MonoClass *'.
6337         (mono_class_from_generic): Call mono_class_initialize_generic()
6338         unless we're already initialized or being called from
6339         do_mono_metadata_parse_generic_inst().
6340
6341         * class.h (MonoGenericInst): Added `initialized' and
6342         `init_pending' flags.
6343
6344         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
6345         `mono_class_init (gklass)' or mono_class_initialize_generic()
6346         here; set `generic_inst->init_pending' while parsing the
6347         `type_argv'.
6348
6349 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
6350
6351         * locales.c: include string.h for memxxx prototypes
6352
6353 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
6354
6355         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
6356         constructor when accessing literal fields.
6357
6358 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
6359
6360         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6361
6362         * reflection.c (assembly_add_resource_manifest): New function to fill
6363         the MANIFESTRESOURCE table.
6364
6365         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
6366
6367         * reflection.h: Update to changes in class layout.
6368
6369         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
6370         Reenable call to mono_runtime_is_shutting_down ().
6371
6372         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
6373         determine if the runtime is shutting down.
6374
6375 2003-12-16  Jackson Harper <jackson@ximian.com>
6376
6377         * icall.c: comment out call to mono_runtime_is_shutting_down to
6378         fix build.
6379         
6380 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
6381
6382         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
6383         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
6384
6385 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
6386
6387         * reflection.c: move definition of swap_with_size
6388         to before its first call
6389
6390 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
6391
6392         * appdomain.c (mono_runtime_is_shutting_down): New public function.
6393
6394         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
6395         icall.
6396
6397         * object.c: Fix warnings.
6398
6399         * icall.c (ves_icall_Type_Get...): Only consider inherited static
6400         members if FlattenHierarchy is set.
6401
6402         * reflection.c (mono_image_add_decl_security): New function to emit
6403         declarative security.
6404
6405         * reflection.h reflection.c: Add support for declarative security.
6406
6407         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6408         
6409 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
6410
6411         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6412         
6413         * appdomain.c verify.c: Moved corlib version checking into its own
6414         function in appdomain.c since it needs to create vtables etc.
6415
6416 2003-12-13  Patrik Torstensson <p@rxc.se>
6417
6418         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
6419         instead of unwrapped server.
6420
6421 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
6422
6423         * verify.c (check_corlib): Fix field index.
6424
6425 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
6426
6427         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
6428         GetGacPath icall.
6429
6430 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
6431
6432         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
6433         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
6434         cope with sizeof(size_t) != sizeof(guint32).
6435
6436 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6437
6438         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
6439         in case of failure.
6440
6441 2003-12-10  Mark Crichton <crichton@gimp.org>
6442
6443         * icall.c: removed the GetNonZeroBytes.  We now handle this case
6444         in managed code.
6445
6446         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
6447
6448 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
6449
6450         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
6451         marked as deleted.
6452
6453 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
6454
6455         * verify.c (check_corlib): Handle the case when the version field is 
6456         initialized by a static constructor.
6457
6458 2003-12-08  Patrik Torstensson  <p@rxc.se>
6459
6460     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
6461
6462 2003-12-08  Martin Baulig  <martin@ximian.com>
6463
6464         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
6465         a MonoReflectionGenericParameter, also take the parameter index
6466         and name as arguments.
6467         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
6468         (ves_icall_MonoGenericParam_initialize): New interncall.
6469         (ves_icall_Type_make_byref_type): New interncall.
6470
6471         * reflection.h (MonoReflectionGenericParam): Derive from
6472         MonoReflectionType, not just from MonoObject.  Added `refobj' and
6473         `index' fields.
6474
6475         * reflection.c (mono_reflection_define_generic_parameter): Create
6476         and return a new MonoReflectionGenericParam; don't initialize the
6477         constraints here.
6478         (mono_reflection_initialize_generic_parameter): New public method;
6479         initializes the constraints and creates the `param->pklass'.
6480
6481 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
6482
6483         * reflection.h reflection.c: Use the new fields 'num_types', 
6484         'num_fields' and 'num_methods' to track the number of types etc.
6485
6486         * verify.c (check_corlib): Check corlib version number.
6487
6488 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
6489
6490         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
6491         function works on all methods.
6492
6493 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
6494
6495         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
6496         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
6497         the custom_type_info flag of the transparent proxy.
6498         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
6499         objects that supports IRemotingTypeInfo.
6500         * object.h: Added custom_type_info field in transparent proxy.
6501
6502 2003-12-06  Martin Baulig  <martin@ximian.com>
6503
6504         * class.c (mono_class_create_from_generic): Removed.
6505         (mono_class_from_generic): Check `ginst->klass' before doing
6506         anything else.  This is important to fully support "recursive"
6507         generic types.
6508
6509         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
6510         empty `generic_inst->klass' before doing anything else.
6511
6512 2003-12-06  Dick Porter  <dick@ximian.com>
6513
6514         * verify.c: 
6515         * object.h:
6516         * icall.c:
6517         * locales.c: Use C structs to access class fields.  Don't do a
6518         conversion between MonoString and UChar because both are
6519         platform-endian UTF-16.  Compare now takes startindex and count
6520         parameters.  Add a char overload for IndexOf.  Speed up the
6521         invariant string IndexOf.
6522
6523 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
6524
6525         * Makefile.am (monosn_LDADD): Fix parallel build.
6526
6527 2003-12-04  Martin Baulig  <martin@ximian.com>
6528
6529         * icall.c
6530         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
6531         (ves_icall_Type_make_array_type): New interncall.       
6532
6533 2003-12-04  Martin Baulig  <martin@ximian.com>
6534
6535         * locales.c: also change it in the !HAVE_ICU case.
6536
6537 2003-12-04  Dick Porter  <dick@ximian.com>
6538
6539         * icall.c:
6540         * locales.c: construct_compareinfo is now in CompareInfo, not
6541         CultureInfo.
6542
6543 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
6544
6545         * image.c (mono_image_load_file_for_image): Cache loaded images in the
6546         image->files array.
6547
6548         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
6549         table as well.
6550
6551         * assembly.c (mono_assembly_load_references): Only load references
6552         once.
6553
6554         * class.c (mono_class_from_name): Avoid linear search of the 
6555         EXPORTEDTYPE table.
6556
6557         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
6558
6559 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
6560
6561         * image.h (MonoImage): Add 'field_cache' field.
6562
6563         * loader.c (mono_field_from_token): Cache field lookups.
6564         
6565         * reflection.c (mono_module_get_object): Fix name property.
6566
6567         * icall.c (ves_icall_get_enum_info): Update after changes to 
6568         mono_metadata_get_constant_index ().
6569
6570         * icall.c: Get rid of get_type_info icall, use a separate icall for
6571         each type property to avoid needless memory allocations. Fixes #51514.
6572
6573         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
6574         to avoid needless binary searches.
6575
6576         * class.c (class_compute_field_layout): Move the initialization of
6577         field->def_value to mono_class_vtable ().
6578
6579         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
6580         non-corlib types.
6581
6582         * object.c (mono_object_allocate): Make it inline.
6583
6584         * object.c (mono_object_allocate_spec): Make it inline.
6585         
6586 2003-12-02  Dick Porter  <dick@ximian.com>
6587
6588         * locales.c (create_NumberFormat): NumberFormatInfo construction.
6589         Patch by Mohammad DAMT (mdamt@cdl2000.com).
6590
6591 2003-12-01  Dick Porter  <dick@ximian.com>
6592
6593         * threads.c: Fix signature and call in CreateMutex and
6594         CreateEvent.
6595
6596 2003-12-01  Dick Porter  <dick@ximian.com>
6597
6598         * icall.c: 
6599         * locales.c: Implement string compares and searching
6600
6601         * object.h: Add extra Thread field
6602
6603 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
6604
6605         * reflection.c (fixup_method): Add support for MonoCMethod.
6606
6607 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
6608
6609         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
6610
6611         * reflection.c (assembly_name_to_aname): Allow extra characters in
6612         assembly names. Fixes #51468.
6613
6614 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
6615
6616         * exception.c (mono_exception_from_name_domain): New helper function.
6617
6618         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
6619         exception object in the correct domain.
6620
6621         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
6622         formatting + make a copy a the input data.
6623
6624         * loader.c (mono_get_method_from_token): Methods which contain
6625         native code do not have entries in the ImplMap.
6626
6627         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
6628         Thanks to Gonzalo for spotting this.
6629         
6630         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
6631         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
6632
6633         * assembly.h (mono_assembly_load_from): Split the second part of 
6634         assembly loading into a new public function.
6635
6636         * exception.h (mono_get_exception_bad_image_format): New function.
6637
6638 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
6639
6640         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
6641         Enumerate all modules inside a dynamic assembly. Fixes #51293.
6642         
6643         * icall.c: Add new icall for creating dynamic methods.
6644
6645         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
6646
6647         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
6648
6649         * reflection.c (mono_reflection_create_dynamic_method): New icall to
6650         create a dynamic method.
6651
6652         * reflection.c (resolve_object): New helper function.
6653
6654         * reflection.c: Generalize ReflectionMethodBuilder and the functions
6655         which manipulate it so they can also work on dynamic methods.
6656
6657         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
6658         creating the MonoReflectionMethodAux structure if it is not needed.
6659         
6660         * reflection.h verify.c: Update after changes to object layout.
6661
6662         * reflection.c (method_builder_encode_signature): Fix compilation on
6663         gcc 2.95.x.
6664
6665 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
6666
6667         * appdomain.h: Added support for context static fields. Added static_data
6668           field to MonoAppContext and renamed thread_static_fields to a more
6669           generic special_static_fields in MonoAppDomain, since it can now contain
6670           context static fields.
6671         * domain.c: Updated hashtable name.
6672         * object.c: Replaced field_is_thread_static() for a more generic
6673           field_is_special_static() which also checks for context static attribute.
6674           In mono_class_vtable(), added support for static context fields.
6675         * threads.c: Changed methods that manage thread static fields to more
6676           generic methods so they can be reused both for thread and context static
6677           data.
6678         * threads.h: Declared some new methods.
6679
6680 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
6681
6682         * reflection.h: Update after changes to the managed types.
6683
6684         * reflection.c (encode_custom_modifiers): New helper function.
6685
6686         * reflection.c (method_encode_signature): Emit custom modifiers.
6687
6688         * reflection.c (field_encode_signature): Emit custom modifiers.
6689
6690 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
6691
6692         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
6693
6694         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
6695         implementation.
6696
6697         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
6698         icall.
6699
6700         * object.c (mono_field_get_value_object): New function.
6701
6702         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
6703         specific.
6704
6705 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
6706
6707         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
6708         return a preallocated out-of-memory exception instance.
6709
6710         * object.c (out_of_memory): Use the new function.
6711
6712         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
6713         flag is before the custom modifiers. Fixes #49802.
6714
6715 2003-11-16  Martin Baulig  <martin@ximian.com>
6716
6717         * class.c (mono_class_is_open_constructed_type): Implemented the
6718         MONO_TYPE_GENERICINST case.
6719
6720 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
6721
6722         * assembly.c (mono_assembly_fill_assembly_name): New function to
6723         fill out the MonoAssemblyName structure.
6724         (mono_assembly_open): Use the new function.
6725
6726         * icall.c (fill_reflection_assembly_name): New helper function.
6727
6728         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
6729         new function.
6730
6731         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
6732
6733 2003-11-15  Martin Baulig  <martin@ximian.com>
6734
6735         * class.c (mono_class_is_open_constructed_type): New public
6736         function; checks whether a type is an open constructed type,
6737         ie. whether it still contains type parameters.
6738         (mono_class_inflate_generic_type): If we're a type parameter and
6739         the inflated type is also a MONO_TYPE_(M)VAR, return the original
6740         type.
6741
6742         * class.h (MonoGenericInst): Added `guint32 is_open'.
6743
6744         * loader.c (method_from_methodspec): Check whether we're an open
6745         or closed constructed type and set `ginst->is_open'.
6746
6747         * reflection.c (mono_reflection_bind_generic_parameters): Check
6748         whether we're an open or closed constructed type and set
6749         `ginst->is_open'.
6750         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
6751         from open constructed types.
6752
6753 2003-11-15  Martin Baulig  <martin@ximian.com>
6754
6755         * reflection.c (mono_reflection_bind_generic_parameters): If we're
6756         a generic instance (instead of a generic type declaration) with
6757         unbound generic parameters, bind them to our actual types.
6758
6759 2003-11-14  Martin Baulig  <martin@ximian.com>
6760
6761         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
6762
6763         * reflection.c (mono_reflection_bind_generic_parameters): If we're
6764         an interface type, populate `res->interfaces' with instantiated
6765         versions of all the interfaces we inherit.
6766
6767 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
6768
6769         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
6770         when MONO_PATH is set but doesn't contain the install dir.
6771
6772 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6773
6774         * icall.c:
6775         (ves_icall_Type_GetInterfaces): don't return an interface twice when
6776         it's also implemented in base classes. Fixes bug #50927.
6777
6778 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
6779
6780         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
6781         if this method is called from a finalizer. Fixes #50913.
6782
6783 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
6784
6785         * threads.c: Implement VolatileRead/VolatileWrite
6786
6787         * icall.c: Add new icalls for VolatileRead/VolatileWrite
6788
6789 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6790
6791         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
6792         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
6793         2.95.3.
6794
6795         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
6796         from Peter Ross (pro@missioncriticalit.com).
6797         
6798 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
6799
6800         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
6801
6802 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6803
6804         * assembly.c (mono_assembly_load_references): Disable check because it
6805         triggers on older corlibs which lots of people have.
6806
6807 2003-11-12  Jackson Harper  <jackson@ximian.com>
6808
6809         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
6810         load corlib.dll if mscorlib.dll is not found.
6811         * assembly.h: Remove corlib name define.
6812         * class.c:
6813         * domain.c:
6814         * image.c: Change corlib name to mscorlib.
6815         
6816 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6817
6818         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
6819
6820 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
6821
6822         * appdomain.h: Added loader_optimization here to sync with the C#
6823         code, and add disallow_binding_redirects field.
6824
6825 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
6826
6827         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
6828
6829         * reflection.c (mono_image_build_metadata): Fix crash on modules
6830         with no types.
6831
6832         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
6833
6834         * icall.c (ves_icall_get_method_info): Return callingConvention as
6835         well.
6836
6837         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
6838         namespaces from the EXPORTEDTYPE table as well.
6839
6840         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
6841         from all modules inside the assembly.
6842         
6843 2003-11-11  Martin Baulig  <martin@ximian.com>
6844
6845         * reflection.c (mono_reflection_bind_generic_parameters): Make
6846         this work for interfaces.
6847
6848 2003-11-11  Martin Baulig  <martin@ximian.com>
6849
6850         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
6851
6852 2003-11-11  Martin Baulig  <martin@ximian.com>
6853
6854         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
6855         "MonoInflatedMethod" and "MonoInflatedCtor".
6856
6857 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
6858
6859         * reflection.c (resolution_scope_from_image): Use the assembly table
6860         from the manifest module, since other modules don't have it.
6861
6862         * debug-helpers.c (mono_type_full_name): New helper function.
6863
6864         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
6865
6866         * image.c (mono_image_load_file_for_image): New public function which
6867         is a replacement for the load_file_for_image in class.c.
6868
6869         * assembly.c (mono_assembly_load_module): A wrapper for the function
6870         above which does assembly association and reference loading too.
6871
6872         * class.c (mono_class_from_name): Call mono_assembly_load_module.
6873
6874 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6875
6876         * appdomain.c: not all of the attributes for the full assembly name
6877         are required and the order doesn't matter. Fixes bug #50787.
6878
6879 2003-11-10  Dick Porter  <dick@ximian.com>
6880
6881         * locales.c: Use platform-endian UTF16
6882
6883 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
6884
6885         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6886         
6887 2003-11-10  Martin Baulig  <martin@ximian.com>
6888
6889         * metadata.c
6890         (mono_metadata_load_generic_params): Make this actually work.
6891
6892         * reflection.c (mono_reflection_bind_generic_parameters): If our
6893         parent is a generic instance, pass all the `types' to it, no
6894         matter whether it has the same number of type parameters or not.
6895
6896 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
6897
6898         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6899
6900         * assembly.c (mono_assembly_load_references): Move the image<->assembly
6901         assignment code to this function so it gets called recursively for all
6902         modules.
6903
6904         * image.c (load_modules): Remove the assembly assignment since it is
6905         now done by mono_assembly_load_references.
6906         
6907         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
6908         Add 'module' argument.
6909         (mono_module_get_types): New helper function.
6910         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
6911
6912 2003-11-08  Martin Baulig  <martin@ximian.com>
6913
6914         * class.c (mono_class_inflate_generic_method): Interface method
6915         don't have a header.
6916
6917         * reflection.c (mono_image_get_methodspec_token): Take an
6918         additional `MonoGenericInst *' argument instead of reading it from
6919         the header; this is necessary to support interfaces.
6920         (mono_image_create_token): Pass the `MonoGenericInst *' from the
6921         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
6922         (inflated_method_get_object): Take an additional `MonoGenericInst *'
6923         argument.
6924
6925         * reflection.h (MonoReflectionInflatedMethod): Added
6926         `MonoGenericInst *ginst'.
6927
6928 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
6929
6930         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
6931
6932 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
6933
6934         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
6935
6936 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
6937
6938         * reflection.c 
6939         (reflection_methodbuilder_from_method_builder):
6940         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
6941         initialize a ReflectionMethodBuilder structure.
6942         (mono_image_get_methodbuilder_token):
6943         (mono_image_get_ctorbuilder_token): New functions to emit memberref
6944         tokens which point to types in another module inside the same assembly.
6945
6946         * reflection.c: Use the new helper functions.
6947         
6948         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
6949
6950         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
6951         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
6952
6953         * reflection.c (resolution_scope_from_image): Emit a moduleref if
6954         neccesary.
6955
6956         * reflection.c (mono_image_build_metadata): Emit metadata only for the
6957         current module. Emit the manifest only for the main module.
6958
6959         * reflection.c (mono_image_create_token): Add assertion when a 
6960         memberref needs to be created.
6961
6962         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
6963
6964         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
6965         larger buffer for the custom attribute blob. Fixes #50637.
6966         
6967 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6968
6969         * threadpool.c: notify listener on async processing handles after
6970         invoking the async callback. Thanks to Zoltan.
6971
6972 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
6973
6974         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
6975         avoid code duplication.
6976
6977         * reflection.h (MonoDynamicImage): New type which is currently unused,
6978         but will be used through the ref.emit code in place of 
6979         MonoDynamicAssembly.
6980
6981         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6982         object layout.
6983
6984         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
6985         a MonoDynamicImage instead of just a MonoImage.
6986         
6987         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
6988         icalls to ModuleBuilder but keep their semantics, so they will work
6989         with moduleb->assemblyb. This will change later.
6990         
6991 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
6992
6993         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6994         object layout.
6995
6996         * reflection.c (mono_image_build_metadata): Avoid creation of a default
6997         main module, since it is now done by the managed code.
6998
6999 2003-11-03  Martin Baulig  <martin@ximian.com>
7000
7001         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
7002         `ginst->klass' here.
7003         (method_encode_methodspec): Don't use the `ginst->generic_method's
7004         klass if it's a generic instance, use `ginst->klass' in this case.
7005
7006 2003-11-03  Martin Baulig  <martin@ximian.com>
7007
7008         * reflection.c (mono_image_get_generic_method_param_info):
7009         Removed, use mono_image_get_generic_param_info() instead.
7010         (mono_image_get_type_info): Write the GenericParam table before
7011         the Method table.  This is neccessary because in the GenericParam
7012         table, type parameters of the class (ie. '!0' etc.) must come
7013         before the ones from its generic methods (ie. '!!0' etc).
7014
7015 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
7016
7017         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
7018
7019 2003-11-02  Martin Baulig  <martin@ximian.com>
7020
7021         * reflection.c (create_generic_typespec): Take a
7022         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
7023         the generic parameters from it.
7024
7025 2003-11-02  Martin Baulig  <martin@ximian.com>
7026
7027         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
7028         instead of a `MonoClassField *' since we just need the type.
7029         (create_generic_typespec): New static function.  Creates a
7030         TypeSpec token for a generic type declaration.
7031         (mono_image_get_generic_field_token): New static function.
7032         (mono_image_create_token): If we're a FieldBuilder in a generic
7033         type declaration, call mono_image_get_generic_field_token() to get
7034         the token.
7035
7036 2003-11-02  Martin Baulig  <martin@ximian.com>
7037
7038         * reflection.h
7039         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
7040         `MonoReflectionGenericInst *declaring_type' and
7041         `MonoReflectionGenericInst *reflected_type' fields.
7042
7043         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
7044         `MonoReflectionGenericInst *declaring_type' and a
7045         `MonoReflectionGenericInst *reflected_type' argument instead of a
7046         single `MonoReflectionGenericInst *type' one.  Set
7047         `res->declaring_type' and `res->reflected_type' from them.
7048         (mono_reflection_inflate_field): Likewise.      
7049
7050 2003-11-02  Martin Baulig  <martin@ximian.com>
7051
7052         * class.c (mono_class_setup_vtable): Don't store generic methods
7053         in the vtable.  
7054
7055 2003-11-02  Martin Baulig  <martin@ximian.com>
7056
7057         * reflection.h (MonoReflectionGenericInst): Added
7058         `MonoReflectionType *declaring_type'.
7059
7060         * reflection.c (mono_reflection_bind_generic_parameters): Use
7061         `if (tb->parent)' instead of `klass->parent'.
7062
7063 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
7064
7065         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
7066         with an empty ASSEMBLY table.
7067
7068         * reflection.c (mono_image_build_metadata): Avoid using the same loop
7069         variable in the inner and outer loops.
7070
7071 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
7072
7073         * metadata.h (mono_metadata_make_token): Put parentheses around macro
7074         argument.
7075
7076         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
7077         
7078         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
7079         icalls. Instead, do everything in managed code. This is needed since
7080         it is hard to restore the original domain etc. in unmanaged code in the
7081         presence of undeniable exceptions.
7082
7083         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
7084         New icalls to push and pop appdomain refs.
7085
7086 2003-10-31  Martin Baulig  <martin@ximian.com>
7087
7088         * class.c (inflate_generic_type): Renamed to
7089         mono_class_inflate_generic_type() and made it public.
7090
7091         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
7092         New interncall.
7093
7094         * loader.c (mono_field_from_memberref): Also set the retklass for
7095         typespecs.
7096
7097         * fielder.c (mono_image_get_inflated_field_token): New static
7098         method; creates a metadata token for an inflated field.
7099         (mono_image_create_token, fixup_method): Added support for
7100         "MonoInflatedField".
7101         (fieldbuilder_to_mono_class_field): New static function.
7102         (mono_reflection_inflate_field): New public function.
7103
7104         * reflection.h
7105         (MonoReflectionGenericInst): Added `MonoArray *fields'.
7106         (MonoReflectionInflatedField): New typedef.     
7107
7108 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
7109
7110         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
7111         for Solaris and other platforms without s6_addr16
7112
7113 2003-10-30  Martin Baulig  <martin@ximian.com>
7114
7115         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
7116         argument instead of two.
7117         (mono_class_inflate_generic_signature): Likewise.
7118         (inflate_generic_header): Likewise.
7119         (mono_class_inflate_generic_method): Likewise.  In addition, if
7120         `ginst->klass' is set, it becomes the new `method->klass'.
7121
7122         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
7123         field.
7124
7125         * reflection.c (encode_generic_method_sig): Write a 0xa as the
7126         first byte. [FIXME]
7127         (method_encode_methodspec): If we have generic parameters, create
7128         a MethodSpec instead of a MethodRef.
7129         (fixup_method): Added support for "MonoInflatedMethod" and
7130         "MonoInflatedCtor".
7131         (mono_image_create_token): Added support for "MonoInflatedMethod"
7132         and "MonoInflatedCtor".
7133         (inflated_method_get_object): New static function; returns a
7134         managed "System.Reflection.MonoInflatedMethod" object.
7135         (mono_reflection_bind_generic_method_parameters): Return a
7136         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
7137         (mono_reflection_inflate_method_or_ctor): Likewise.
7138         (mono_image_get_generic_method_param_info): Initialize unused
7139         fields to zero.
7140         (mono_image_get_generic_param_info): Likewise.
7141
7142         * reflection.h (MonoReflectionInflatedMethod): New public
7143         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
7144         "S.R.MonoInflatedCtor" classes.
7145
7146         * loader.c (method_from_memberref): If we're a TypeSpec and it
7147         resolves to a generic instance, inflate the method.
7148
7149 2003-10-28  Dick Porter  <dick@ximian.com>
7150
7151         * object.c (mono_runtime_run_main): Convert command-line arguments
7152         into utf8, falling back to the user's locale encoding to do so.
7153
7154 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
7155
7156         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
7157         at this time.
7158
7159         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
7160
7161         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
7162         up icalls at method definition time. Partially fixes #33569.
7163
7164 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
7165
7166         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
7167         marshalling of arrays. Fixes #50116.
7168
7169         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
7170
7171         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
7172         points to a vtable in the dying appdomain.
7173
7174         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
7175         listeners into unmanaged code inside the lock.
7176
7177         * object.c (mono_class_vtable): Turn off typed allocation in non-root
7178         domains and add some comments.
7179
7180 2003-10-25  Martin Baulig  <martin@ximian.com>
7181
7182         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
7183
7184         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
7185
7186         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
7187         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
7188         currently parsing.  Create the generic class and store it in
7189         `generic_inst->klass' before parsing the type arguments.  This is
7190         required to support "recursive" definitions; see mcs/tests/gen-23.cs
7191         for an example.
7192         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
7193         to support recursive typespec entries.
7194
7195         * class.c (mono_class_setup_parent): If our parent is a generic
7196         instance, we may get called before it has its name set.
7197         (mono_class_from_generic): Splitted into
7198         mono_class_create_from_generic() and mono_class_initialize_generic().
7199
7200 2003-10-25  Martin Baulig  <martin@ximian.com>
7201
7202         * icall.c (ves_icall_Type_BindGenericParameters): Return a
7203         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
7204         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
7205         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
7206
7207         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
7208         (create_typespec): Likewise.
7209         (mono_reflection_bind_generic_parameters): Return a
7210         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
7211         (mono_reflection_inflate_method_or_ctor): New public function.
7212
7213         * reflection.h (MonoReflectionGenericInst): New typedef.        
7214
7215 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
7216
7217         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
7218         inside the domain lock. Fixes #49993.
7219         
7220         * object.c (mono_class_vtable): When typed allocation is used, 
7221         allocate vtables in the GC heap instead of in the mempool, since the
7222         vtables contain GC descriptors which are used by the collector even
7223         after the domain owning the mempool is unloaded.
7224
7225         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
7226
7227         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
7228         reflect what it does. Also invalidate mempools instead of freeing
7229         them if a define is set.
7230
7231         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
7232         of the appdomain.
7233         
7234         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
7235         hold the finalizable objects in this domain.
7236
7237         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
7238         appdomain.
7239
7240         * appdomain.c (mono_domain_set): New function to set the current
7241         appdomain, but only if it is not being unloaded.
7242
7243         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
7244         appdomain which is being unloaded.
7245         
7246         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
7247         unloading of the root appdomain.
7248
7249         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
7250         icall to execute a method in another appdomain. Intended as a 
7251         replacement for InternalSetDomain, which can confuse the code 
7252         generation in the JIT.
7253
7254         * appdomain.c (mono_domain_is_unloading): New function to determine
7255         whenever an appdomain is unloading.
7256
7257         * appdomain.c (mono_domain_unload): New function to correctly unload
7258         an appdomain.
7259
7260         * assembly.c (mono_assembly_load_references): Check that an assembly
7261         does not references itself.
7262
7263         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
7264         domain manually, it asks the finalizer thread to do it, then waits for
7265         the result. Also added a timeout.
7266
7267         * icall.c: Register the new icalls.
7268
7269         * threads.h threads.c: Export the mono_gc_stop_world and 
7270         mono_gc_start_world functions.
7271         
7272         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
7273         function to fill out the mempool with 0x2a.
7274
7275 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
7276
7277         * reflection.h (MonoReflectionMethodAux): New structure to store
7278         information which is rarely used, thus is not in the MonoMethod
7279         structure.
7280
7281         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
7282         store the aux info.
7283
7284         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
7285         and marshalling info into the aux structure.
7286
7287         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
7288         from the aux structure.
7289
7290         * loader.c (mono_method_get_param_names): Retrieve the param names from
7291         the aux structure.
7292         
7293 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
7294
7295         * exception.h exception.c: Add AppDomainUnloadedException && fix 
7296         warning.
7297
7298 2003-10-21  Dick Porter  <dick@ximian.com>
7299
7300         * socket-io.c
7301         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
7302         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
7303
7304 2003-10-21  Martin Baulig  <martin@ximian.com>
7305
7306         * reflection.c (mono_reflection_bind_generic_parameters):
7307         `klass->parent' is NULL for interfaces.
7308
7309 2003-10-21  Martin Baulig  <martin@ximian.com>
7310
7311         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7312
7313 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
7314
7315         * exception.c (mono_exception_from_name_msg): New helper function for
7316         creating exceptions and initializing their message field.
7317
7318         * exception.c: Simplify functions using the new helper.
7319
7320         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
7321         New function.
7322
7323         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
7324         mono_raise_exception, since otherwise gcc doesn't generate the function
7325         epilog for raise_exception, confusing the stack unwinding in the JIT.
7326         Fixes #45043.
7327
7328         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
7329         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
7330         Fixes #49499.
7331
7332 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7333
7334         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
7335         utf8.
7336
7337 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
7338
7339         * icall.c: Removed GetUninitializedObject method because
7340           AllocateUninitializedClassInstance does the same.
7341
7342 2003-10-18  Martin Baulig  <martin@ximian.com>
7343
7344         * class.c (inflate_generic_signature): Renamed to
7345         mono_class_inflate_generic_signature() and made it public.
7346         (my_mono_class_from_generic_parameter): New static function; if we
7347         don't already have the generic parameter's MonoClass, create a
7348         very simple one which is just used internally in the runtime and
7349         not passed back to managed code.
7350
7351         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
7352
7353         * metadata.h (MonoMethodSignature): Moved the
7354         `MonoGenericParam *gen_params' to the MonoMethodHeader.
7355         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
7356
7357         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
7358         ves_icall_MonoMethod_GetGenericArguments(); this is now an
7359         interncall on the MonoMethod class, not on MethodInfo.
7360         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
7361         calling mono_reflection_bind_generic_method_parameters() directly.
7362
7363         * loader.c (mono_method_get_signature): If this is a MethodSpec;
7364         return the already computed `method->signature'.
7365         (method_from_methodspec): New static function to load a method
7366         from a MethodSpec entry.
7367         (mono_get_method_from_token): Call the new method_from_methodspec()
7368         for MethodSpec tokens.  
7369         (mono_get_method_from_token): If we're a generic method, load the
7370         type parameters.
7371
7372         * reflection.c (mono_image_get_memberref_token): Allow
7373         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
7374         table.
7375         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
7376         (mono_image_create_token): First check whether it's a generic
7377         method (so we'd need to create a MethodSpec), then do the other
7378         two alternatives.
7379         (mono_reflection_bind_generic_method_parameters): Return a
7380         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
7381         called directly from the interncall.
7382
7383 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
7384
7385         * reflection.c (load_public_key): Move loading of the public key
7386         into managed code.
7387
7388         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
7389
7390         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
7391         fields.
7392
7393         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
7394         culture, hash_alg and public_key. Fixes #49555.
7395
7396 2003-10-17  Martin Baulig  <martin@ximian.com>
7397
7398         * class.h (MonoGenericInst): Moved this declaration here and added
7399         `MonoMethod *generic_method'.
7400
7401         * icall.c
7402         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
7403         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
7404
7405         * metadata.c (mono_metadata_type_equal): Two types of
7406         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
7407         index; ie. don't compare the address of the `MonoGenericParam'
7408         structure.
7409         (mono_metadata_load_generic_params): Removed the `MonoMethod
7410         *method' argument.
7411
7412         * metadata.h (MonoGenericInst): Moved declaration to class.h.
7413         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
7414
7415         * reflection.c (method_encode_signature): Encode the number of
7416         generic parameters.
7417         (encode_generic_method_sig): New static function.
7418         (method_encode_methodspec): New static function; creates an entry
7419         in the MethodSpec table for a generic method.
7420         (mono_image_get_methodspec_token): New static function.
7421         (mono_image_create_token): Call mono_image_get_methodspec_token()
7422         for generic methods.
7423         (mono_reflection_bind_generic_method_parameters): New public
7424         function.  Instantiates a generic method.
7425
7426 2003-10-16  Martin Baulig  <martin@ximian.com>
7427
7428         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
7429         *gen_params' here from MonoMethodHeader.
7430
7431         * metadata.c (mono_metadata_parse_method_signature): If we have
7432         generic parameters, initialize `method->gen_params' and then set
7433         the correct `type->data.generic_param' in all the parameters.
7434
7435 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
7436
7437         * threads.c (mono_threads_get_default_stacksize): New function to 
7438         return the default stacksize.
7439
7440         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
7441         termination of the finalizer thread, since the previous method had
7442         race conditions. Fixes #49628.
7443
7444         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
7445         as for the other managed threads.
7446
7447 2003-10-16  Martin Baulig  <martin@ximian.com>
7448
7449         * class.c (inflate_generic_signature): Copy `generic_param_count'
7450         and `gen_params'.
7451
7452         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
7453         New interncall.
7454
7455         * metadata.c (mono_metadata_parse_method_signature): Actually set
7456         the `method->generic_param_count' here.
7457         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
7458
7459 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
7460
7461         * object.h: Add a new field to TypedRef to simplify the implementation
7462         of the REFANY opcodes in the JIT.
7463
7464         * icall.c: Make use of the new field.
7465
7466         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
7467         dynamically.
7468
7469 2003-10-15  Martin Baulig  <martin@ximian.com>
7470
7471         * class.c (mono_class_from_gen_param): Renamed to
7472         mono_class_from_generic_parameter() and moved most of the
7473         functionality from mono_reflection_define_generic_parameter()
7474         here; ie. we create a "real" class here.
7475         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
7476         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
7477         previously been called.
7478
7479         * class.h (MonoGenericParam): Moved the declaration of this struct
7480         here from metadata.h and added `MonoMethod *method'.
7481
7482         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
7483         interncall.
7484
7485         * loader.c (mono_get_method_from_token): If we have any generic
7486         parameters, call mono_metadata_load_generic_params() to read them
7487         from the MONO_TABLE_GENERICPAR.
7488
7489         * metadata.c (mono_metadata_load_generic_params): Added
7490         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
7491
7492         * metadata.h (MonoMethodSignature): Replaced
7493         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
7494         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
7495
7496         * reflection.c (mono_reflection_define_generic_parameter): Moved
7497         most of the functionality into the new
7498         mono_class_from_generic_parameter(); set the `method' field if
7499         we're a method parameter.       
7500
7501 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
7502
7503         * marshal.c (emit_struct_conv): if native size is 0
7504         emit no code.
7505
7506 2003-10-14  Martin Baulig  <martin@ximian.com>
7507
7508         * icall.c: The generics API has changed in the spec since it was
7509         added to System.Type; these modifications make it match the spec
7510         again.
7511         (ves_icall_Type_GetGenericParameters): Renamed to
7512         `ves_icall_Type_GetGenericArguments'.
7513         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
7514         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
7515         `ves_icall_MonoType_get_HasGenericArguments'.
7516         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
7517         `ves_icall_MonoType_get_IsGenericParameter'.
7518         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
7519         this is no interncall anymore.
7520         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
7521         `ves_icall_TypeBuilder_get_IsGenericParameter'.
7522
7523 2003-10-14  Martin Baulig  <martin@ximian.com>
7524
7525         * reflection.c (mono_reflection_bind_generic_parameters): Also
7526         inflate generic methods if we're reading the class from IL.
7527
7528 2003-10-13  Martin Baulig  <martin@ximian.com>
7529
7530         * reflection.c (mono_reflection_define_generic_parameter): This
7531         method isn't called directly from the icall anymore; take a
7532         `MonoReflectionAssemblyBuilder *' so we can use this for type and
7533         method generic parameters.
7534         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
7535         (method_builder_encode_signature): Encode generic parameters.
7536         (mono_image_get_method_info): Write generic params to the
7537         MONO_TABLE_GENERICPARAM table.
7538
7539         * reflection.h (MonoReflectionMethodBuilder): Added
7540         `MonoArray *generic_params'.
7541
7542         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
7543
7544         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
7545         wrapper for mono_reflection_define_generic_parameter().
7546         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
7547
7548 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
7549
7550         * marshal.h: Add missing function to fix build.
7551
7552         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
7553         the SetLastError pinvoke attribute.
7554
7555         * marshal.c (mono_marshal_set_last_error): New helper function called
7556         by the generated code.
7557         
7558         * marshal.c (mono_mb_emit_branch): New helper function.
7559
7560         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
7561
7562         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
7563         classes as parameters and return values of delegates. Fixes #29256. 
7564
7565 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
7566
7567         * locales.c: use gint32 in non HAVE_ICU case
7568
7569 2003-10-11  Martin Baulig  <martin@ximian.com>
7570
7571         * mono-debug.c (mono_debug_add_method): Added a workaround for
7572         bug #48591.
7573
7574 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
7575
7576         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
7577         delegates passed to native code must use the STDCALL calling 
7578         convention. Fixes #35987.
7579
7580 2003-10-10  Martin Baulig  <martin@ximian.com>
7581
7582         * class.c (inflate_generic_type): If we're inflating for a generic
7583         type instance (and not for a generic method), return
7584         MONO_TYPE_MVAR unchanged.
7585
7586 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7587
7588         * string-icalls.c: Join ignores null strings in the source array.
7589         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
7590         * threads.c: GetAvailableTheads is slightly more accurate.
7591
7592 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
7593
7594         * threads.h threads.c : add mono_threads_set_default_stacksize
7595         and pass default to CreateThread calls.
7596
7597 2003-10-09  Dick Porter  <dick@ximian.com>
7598
7599         * icall.c:
7600         * locales.h:
7601         * locales.c: Internal calls for constructing CultureInfo and
7602         related objects from libicu (if its available.)
7603
7604 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
7605
7606         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
7607
7608 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7609
7610         * threadpool.c: added an argument to async_invoke_thread that is the
7611         item to process, pass the MonoAsyncResult to the thread start function
7612         when creating a new thread. This way we don't need to acquire any lock
7613         when we're creating a new thread. Readded a semaphore for faster
7614         response times (instead of that Sleep i added).
7615
7616 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
7617
7618         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
7619         get daylight change dates better on Windows, fix handling
7620         of platforms without tm_gmtoff.
7621
7622 2003-10-06  Martin Baulig  <martin@ximian.com>
7623
7624         * class.c (inflate_generic_method): Renamed to
7625         mono_class_inflate_generic_method() and made public.
7626         (mono_class_init): Don't inflate the generic methods here.
7627         (mono_class_from_generic): Added `gboolean inflate_methods'
7628         argument.  Inflate the methods here.
7629
7630         * loader.c (mono_method_get_param_names): Ignore instances of
7631         generic types for the moment.
7632
7633         * reflection.c (fixup_method): Added support for inflated methods.
7634         (mono_image_create_token): Use mono_image_get_methodref_token()
7635         for inflated methods.
7636         (mono_custom_attrs_from_param): Ignore instances of generic types
7637         for the moment.
7638         (mono_reflection_bind_generic_parameters): New public function.
7639         Moved all the functionality from
7640         ves_icall_Type_BindGenericParameters() here and added support for
7641         dynamic types.
7642         (mono_reflection_define_generic_parameter): Initialize
7643         `klass->methods' here.
7644
7645         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
7646         functionality into mono_reflection_define_generic_parameter().
7647         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
7648         TypeBuilder, return that TypeBuilder.
7649
7650 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7651
7652         * appdomain.c: removed mono_delegate_semaphore.
7653
7654         * threadpool.c:
7655         (mono_thread_pool_add): moved hash table creation inside and the thread 
7656         creation outside of the critical region.
7657         (mono_thread_pool_finish): removed obsolete code.
7658         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
7659         continue or exit the thread depending on the queue.
7660
7661 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
7662
7663         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
7664         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
7665         handle more bool marshalling options
7666
7667 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
7668
7669         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
7670         arrays of structs. Also add a more descriptive error message when
7671         a structure member is marshalled as LPArray.
7672
7673 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
7674
7675         * marshal.c (mono_marshal_get_native_wrapper): Add support for
7676         marshalling arrays of complex types. Fixes #29098. Also remove an
7677         usused and incomplete function.
7678
7679 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
7680
7681         * gc.c: report heap_size - free_bytes as total memory allocated
7682         (bug#49362).
7683
7684 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
7685
7686         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
7687         fix timezone handling problems on Windows.
7688         
7689         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
7690         asserts when the year is outside the range handled by ms the functions.
7691
7692         * class.c (setup_interface_offsets): If the class is an interface,
7693         fill out its interface_offsets slot.
7694
7695 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7696
7697         * threadpool.c: mark threadpool threads as background.
7698
7699 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
7700
7701         * decimal.c - define DECINLINE to nothing if not using GCC
7702
7703 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
7704
7705         * assembly.c: More refcount fixes.
7706
7707 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7708
7709         * string-icalls.c: if we're not trimming, return the same string.
7710         When not splitting, don't create a new string.
7711
7712 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7713
7714         * image.c:
7715         (mono_image_open): increment the ref_count inside the critical section.
7716
7717 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
7718
7719         * image.c (mono_image_open): Fix reference counting bug.
7720
7721 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
7722
7723         * marshal.c (mono_marshal_type_size) struct alignment changed for 
7724         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
7725         64bits. Avoid leak in mono_marshal_get_native_wrapper when
7726         mono_lookup_pinvoke_call throws.        
7727
7728 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
7729
7730         * reflection.c (mono_reflection_parse_type): Fix #49114.
7731
7732         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
7733         temporary workaround for cygwin header problem.
7734
7735         * object.c (mono_object_isinst): Synchronize this with the code
7736         generated by the JIT for casts.
7737
7738 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
7739
7740         * reflection.c (encode_type): Fix #38332.
7741
7742 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
7743
7744         * marshal.c (mono_marshal_method_from_wrapper): New function to return
7745         the original method from the wrapper method.
7746
7747 2003-09-25  Martin Baulig  <martin@ximian.com>
7748
7749         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
7750         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
7751         (ves_icall_Type_get_IsGenericInstance): New interncall.
7752
7753 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
7754
7755         * object.c: fix cast warning in big endian code.
7756
7757 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
7758
7759         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
7760         
7761 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7762
7763         * assembly.c: don't call check_env from mono_assembly_load. It's
7764         already done once in mono_assemblies_init and may cause headaches when
7765         multiple threads are loading assemblies.
7766
7767 2003-09-19  Martin Baulig  <martin@ximian.com>
7768
7769         * reflection.c (mono_reflection_define_generic_parameter): Don't
7770         allocate `klass->methods', set `klass->flags' to
7771         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
7772
7773 2003-09-18  Martin Baulig  <martin@ximian.com>
7774
7775         * class.c (mono_class_init): Don't create `class->methods' if it's
7776         already initialized.
7777
7778         * metadata.c (mono_metadata_load_generic_params): Make this
7779         actually work.
7780
7781         * reflection.c (mono_reflection_define_generic_parameter): Set
7782         parent class and interfaces from the constraints.
7783
7784         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
7785         to keep this struct in sync with the declaration in TypeBuilder.cs.
7786
7787 2003-09-17  Martin Baulig  <martin@ximian.com>
7788
7789         * metadata.h (MonoType): Replaced the data's `int type_param'
7790         field with `MonoGenericParam *generic_param'.
7791         (MonoGenericParam): Added `MonoClass *klass'.
7792
7793         * class.c (mono_class_from_gen_param): Removed the
7794         `MonoImage *image' and `int type_num' arguments.
7795
7796         * metadata.c (mono_metadata_parse_generic_param): New static
7797         method; creates a MonoGenericParam which just contains the index.
7798         (do_mono_metadata_parse_type): Call
7799         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
7800         MONO_TYPE_MVAR.
7801
7802         * reflection.c (mono_image_typedef_or_ref): Generic type
7803         parameters may be in the same assembly, but never use a typedef
7804         for them.
7805         (mono_reflection_define_generic_parameter): We're now creating a
7806         "real" class for the type parameter; it's now safe to call
7807         mono_class_from_mono_type() on the class'es type, it'll do the
7808         right thing.
7809
7810 2003-09-16  Martin Baulig  <martin@ximian.com>
7811
7812         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
7813         `symfile->range_entry_size' and `symfile->class_entry_size' here;
7814         the `symfile' data structure must be fully initialized before it
7815         gets added to the table.
7816
7817 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
7818
7819         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
7820
7821         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
7822         class init trampolines.
7823
7824 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
7825
7826         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
7827         to the built-in profiler to turn off time and allocation profiling
7828         respectively.
7829
7830 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
7831
7832         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
7833         g_direct_equal.
7834
7835         * debug-helpers.c (mono_method_full_name): Print the wrapper type
7836         in human readable form.
7837
7838 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
7839
7840         * reflection.c icall.c: Fixed warnings.
7841
7842         * image.c (load_class_names): Use a temporary hash table to hold the
7843         namespaces in order to avoid doing many string comparisons.
7844
7845         * image.h: Fix typo.
7846
7847         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
7848         Pass NULL instead of g_direct_equal to the GHashTable constructor 
7849         since the NULL case is short-circuited inside g_hash_table_lookup, 
7850         leading to better performance.  
7851
7852         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
7853         obtain the first custom attribute for a given index. Depends on the
7854         CustomAttribute table being sorted by the parent field.
7855
7856         * reflection.c (mono_custom_attrs_from_index): Use the new function 
7857         for better performance.
7858
7859 2003-09-07  Martin Baulig  <martin@ximian.com>
7860
7861         * class.c (mono_class_init): If we're a generic instance, inflate
7862         all our methods instead of loading them from the image.
7863         (mono_class_from_generic): Set `class->methods = gklass->methods'.
7864
7865 2003-09-07  Martin Baulig  <martin@ximian.com>
7866
7867         * mono-debug-debugger.c: Added support for constructors.
7868
7869 2003-09-06  Martin Baulig  <martin@ximian.com>
7870
7871         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
7872         New interncall.
7873
7874         * reflection.c (mono_reflection_setup_generic_class): Call
7875         ensure_runtime_vtable() to create the vtable.
7876
7877 2003-09-05  Martin Baulig  <martin@ximian.com>
7878
7879         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
7880         MONO_TYPE_MVAR.
7881
7882 2003-09-04  Martin Baulig  <martin@ximian.com>
7883
7884         * reflection.c (mono_reflection_define_generic_parameter): Generic
7885         parameters start with zero.
7886
7887 2003-09-04  Martin Baulig  <martin@ximian.com>
7888
7889         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7890
7891         * reflection.h (MonoReflectionGenericParam): New typedef.
7892         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
7893         the generic parameters from the managed TypeBuilder.
7894
7895         * reflection.c (mono_reflection_define_generic_parameter): New function.
7896         (mono_reflection_create_runtime_class): Encode generic parameters.
7897         (mono_reflection_setup_generic_class): New function; this is
7898         called after adding adding all generic params to the TypeBuilder.
7899         (encode_type): Added MONO_TYPE_VAR.
7900
7901 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
7902
7903         * class.h class.c (mono_class_needs_cctor_run): Moved this method
7904         here from the JIT.
7905
7906         * assembly.h assembly.c: Moved the AOT loading code into an assembly
7907         load hook.
7908
7909 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
7910
7911         * reflection.h reflection.c class.h class.c: Delete duplicate 
7912         definition of mono_type_get_name () from reflection.c and export the
7913         one in class.c.
7914
7915         * class.c: Class loading fixes from Bernie Solomon 
7916         (bernard@ugsolutions.com).
7917
7918         * reflection.c: Endianness fixes from Bernie Solomon 
7919         (bernard@ugsolutions.com).
7920         
7921 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
7922
7923         * assembly.h assembly.c: Define a file format version for AOT
7924         libraries.
7925         
7926         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
7927
7928         * appdomain.h (MonoJitInfo): New field to determine whenever the
7929         code is domain neutral.
7930         
7931 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
7932
7933         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
7934
7935 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
7936
7937         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
7938         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
7939         Avoid caching the result since strings must be domain specific. Fixes
7940         #48050.
7941
7942 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
7943
7944         * marshal.c (mono_marshal_init): Make this callable multiple times
7945         since it is hard to find a correct place to call it.
7946
7947         * object.c (mono_runtime_class_init): Execute static constructors in
7948         the correct appdomain.
7949
7950         * image.c (build_guid_table): Handle the case when multiple images have
7951         the same GUID.
7952
7953 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7954
7955         * icall.c: added a couple of icalls for System.Web.
7956
7957 2003-08-28  Martin Baulig  <martin@ximian.com>
7958
7959         * icall.c (ves_icall_Type_BindGenericParameters): Use
7960         `klass->generic_inst' instead of `&klass->byval_arg' in the
7961         mono_type_get_object() call.  The returned type must be
7962         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
7963
7964 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
7965
7966         * NOTES: New file.
7967
7968         * object.c (mono_class_proxy_vtable): Make it thread safe.
7969
7970         * pedump.c: Fix warning.
7971
7972         * object.c appdomain.h: Get rid of metadata_section. 
7973         It is no longer needed and it was causing deadlocks with domain->lock.
7974
7975         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
7976
7977 2003-08-26  Martin Baulig  <martin@ximian.com>
7978
7979         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
7980
7981 2003-08-26  Martin Baulig  <martin@ximian.com>
7982
7983         * pedump.c (main): Call mono_metadata_init(),
7984         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
7985         and mono_loader_init().
7986
7987 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
7988
7989         * loader.h: Add missing include to fix build.
7990
7991         * image.h: mono_image_load_references is no more.
7992
7993         * assembly.c: Reworked assembly loading to make it really thread safe.
7994         After these changes, the assembly returned by mono_assembly_open is
7995         fully initialized, i.e. all its references assemblies are loaded.
7996
7997         * assembly.c (mono_image_load_references): Renamed to 
7998         mono_assembly_load_references, and made private, since clients no
7999         longer need to call it.
8000
8001         * class.c: Removed calls to mono_assembly_load_references, since it was
8002         a source of deadlocks.
8003
8004         * loader.h loader.c class.h class.c: Protect data structures using a 
8005         new lock, the loader lock.
8006
8007         * class.c (mono_class_setup_vtable): Create temporary hash tables and
8008         GPtrArrays only when needed.
8009
8010         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
8011         into empty structures by mcs. Fixes pinvoke7.cs.
8012         
8013         * domain.c (mono_init): Call a new initialization function.
8014
8015         * appdomain.c (mono_runtime_init): Call the new initializer function
8016         of the marshal module.
8017
8018         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
8019         inserted into empty structures by mcs. Fixes pinvoke7.cs.
8020
8021         * marshal.h marshal.c: Added locks around the wrapper caches to make
8022         this module thread safe.
8023
8024         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
8025         this argument. Fixes pinvoke1.exe.
8026
8027 2003-08-25  Lluis Sanchez <lluis@ximian.com>
8028
8029         * object.h: Added call_type field to MonoMethodMessage and the corresponding
8030         enumeration of values. Removed fields to store remote call output values in
8031         MonoAsyncResult. Not needed any more.
8032         * object.c: Initialize call_type and async_result fields in mono_message_init.
8033         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
8034         dispatching the message.
8035         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
8036         async call to finish. To do it use a message with EndInvoke call type.
8037
8038 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
8039
8040         * loader.h loader.c (mono_method_hash_marhal_info): New function which
8041         determines whenever a method has marshalling info.
8042
8043 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8044
8045         * assembly.c: fix the build on windows.
8046
8047 2003-08-22 Lluis Sanchez <lluis@ximian.com>
8048
8049         * object.cs: Fixed bug #47785.
8050
8051 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
8052
8053         * string-icalls.c (StringReplace): If their are no occurances of
8054         the old string found return a reference to the supplied
8055         string. This saves some memory and matches MS behavoir.
8056         
8057 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8058
8059         * socket-io.c: fixed compilation for systems that define AF_INET6
8060         and don't define SOL_IP/SOL_IPV6.
8061
8062 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
8063
8064         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
8065         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
8066
8067         * rawbuffer.c rawbuffer.h: Make this module thread safe.
8068
8069         * domain.c: Make this module thread safe.
8070
8071         * domain.c (mono_init): Call new initialization function.
8072
8073         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
8074         reference types too. Fixes #38812.
8075
8076         * image.c (mono_image_init): Fixed warnings.
8077
8078         * class.c (mono_class_from_typeref): Handle assembly load failure
8079         correctly.
8080
8081         * appdomain.c (add_assemblies_to_domain): Handle the case when
8082         the references of an assembly are not yet loaded.
8083
8084         * metadata.c image.c assembly.c: Moved initialization of global
8085         variables to a separate function called at startup since lazy 
8086         initialization of these variables is not thread safe.
8087         
8088         * image.c assembly.c: Made this module thread safe by adding locks in 
8089         the appropriate places.
8090
8091         * domain.c (mono_init): Call the new initialization functions of the
8092         three modules.
8093
8094 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
8095
8096         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
8097           make a direct call. It is proxy's work to make the call asynchronous.
8098           mono_delegate_end_invoke(): If the targe is a proxy, just collect
8099           the return values.
8100         * object.cs: mono_method_call_message_new(): read AsyncResult and
8101           state object from parameters list, if this info is requested.
8102         * object.h: Added fields to store remote call output values in
8103           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
8104
8105 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8106
8107         * object.h: add needed fields to MonoThread.
8108         * threads.c, threads.h: allow registering a function to cleanup data
8109         allocated per thread by the JIT.
8110
8111 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8112
8113         * loader.h: portability fix by Bernie Solomon
8114         * <bernard@ugsolutions.com>.
8115
8116 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
8117
8118         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
8119         return a MonoArray. This simplifies the code and also ensures that
8120         the cache allways contains an object reference as a value.
8121
8122         * icall.c (ves_icall_get_parameter_info): Simplified using the new
8123         function.
8124
8125 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8126
8127         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
8128         fixes a problem with byte ordering when getting the address family for
8129         a socket.
8130
8131 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
8132
8133         * .cvsignore: Added monosn.
8134
8135         * reflection.h reflection.c loader.c: Added support for parameter
8136         marshalling to dynamically created types. Fixes #47295.
8137
8138 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
8139
8140         * rand.c: remove useless warnings.
8141
8142 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8143
8144         * class.c: implemented ldtoken for methods and fieldrefs.
8145
8146 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8147
8148         * threadpool.c: when mono_async_invoke was called, no one took care of
8149         monitoring the queue. So if the method invoked took some time and we
8150         got new async invoke requests after 500 ms (the thread created waited
8151         that long in WaitForSingleObject), the new async invoke was not called
8152         until the previous one finished.
8153
8154         This is fixed now. Thanks to Totte for helping with it.
8155
8156 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8157
8158         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
8159
8160 2003-08-11  Martin Baulig  <martin@ximian.com>
8161
8162         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
8163
8164 2003-08-06  Martin Baulig  <martin@ximian.com>
8165
8166         * mono-debug-debugger.c: Added support for static fields,
8167         properties and methods.
8168
8169 2003-08-06  Martin Baulig  <martin@ximian.com>
8170
8171         * mono-debug-debugger.c: Don't store the MonoString's vtable to
8172         make this work for applications with multiple application domains.
8173
8174 2003-08-04  Martin Baulig  <martin@ximian.com>
8175
8176         * mono-debug-debugger.c: Completely reworked the type support; the
8177         most important thing is that we're now just using one single
8178         `MonoType' instance per type.
8179
8180 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
8181
8182         * mono-endian.h, mono-endian.c, icall.c: Added icall
8183         ves_icall_System_Double_AssertEndianity to assert double word endianity
8184         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
8185
8186 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8187
8188         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
8189         support, icalls and fixes.
8190
8191 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
8192
8193         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
8194         classes that are a punctuation character in .NET is not the same a
8195         g_unichar_ispunct.
8196
8197 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8198
8199         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
8200
8201 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
8202
8203         * icall.c: Add new MemCopy internalcall.
8204         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
8205         Simplified code; It is not necessary to handle all the cases here,
8206         as the C# code takes care of it.  Only handle the case of the name
8207         resource embedded into the assembly.
8208
8209         Changed signature to return the data pointer and the size of the
8210         data. 
8211
8212 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
8213
8214         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
8215         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
8216
8217 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
8218
8219         * socket-io.c: ignore EINTR error in select.
8220
8221 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8222
8223         * class.h, class.c: removed unused subclasses field in MonoClass.
8224
8225 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
8226
8227         * icall.c: improve fix of get_base_definition(). If the parent class
8228           doesn't have the mehod, look at the parent of the parent.
8229         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
8230           to check if a parameter is an in or out parameter
8231           (PARAM_ATTRIBUTE_IN is not set by default).
8232           mono_method_return_message_restore(): Use mono_class_value_size to
8233           get the size of a value type. mono_type_stack_size (parameterType)
8234           does not return the correct value if parameterType is byRef.
8235           mono_load_remote_field(), mono_load_remote_field_new(),
8236           mono_store_remote_field(), mono_store_remote_field_new():
8237           raise exception if the remote call returns an exception.
8238
8239 2003-07-28  Martin Baulig  <martin@ximian.com>
8240
8241         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
8242         method.  This is a wrapper around mono_runtime_invoke() which
8243         boxes the instance object if neccessary.
8244
8245 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8246
8247         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
8248         metadata.h, row-indexes.h, verify.c: first cut of generics support.
8249
8250 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8251
8252         * icall.c: disable mcs bug workaround.
8253
8254 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
8255
8256         * object.c (mono_runtime_class_init): Take the metadata_section
8257         mutex before obtaining the domain mutex.
8258
8259         * appdomain.h: Added definition of metadata_section mutex here. 
8260
8261         * object.c: define metadata_mutex here.
8262
8263 2003-07-24  Ravi Pratap  <ravi@ximian.com>
8264
8265         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
8266         fixed.
8267
8268 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
8269
8270         * reflection.c: Fix bug #46669
8271
8272 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8273
8274         * exception.c:
8275         * exception.h:
8276         * icall.c:
8277         * object.h: fill in the type name for TypeLoadException.
8278
8279 2003-07-23  Ravi Pratap  <ravi@ximian.com>
8280
8281         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
8282         relationship between TypeBuilders while compiling corlib) and bug
8283         45993 (Array types returned from the runtime while compiling
8284         corlib were from the loaded corlib).
8285
8286 2003-07-22  Martin Baulig  <martin@ximian.com>
8287
8288         * mono-debug-debugger.c: Reworked the type support a bit more;
8289         distinguish between types and classes.
8290
8291 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
8292
8293         * icall.c: add IsArrayImpl icall.
8294
8295 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
8296
8297         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
8298         initializing real_size only once. Also fix bug #46602.
8299
8300 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
8301
8302         * object.c: Renamed mono_metadata_section to metadata_section.
8303
8304 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
8305
8306         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
8307           empty array if the type is an array. Fixed.
8308           ves_icall_MonoMethod_get_base_definition: if the base method
8309           is abstract, get the MethodInfo from the list of methods of
8310           the class.
8311         * reflection.c: ParameterInfo.PositionImpl should be zero-based
8312           and it was 1-based. Fixed in mono_param_get_objects.
8313
8314 2003-07-20  Martin Baulig  <martin@ximian.com>
8315
8316         * mono-debug.h: Set version number to 31.
8317         (mono_debug_init): Added `MonoDomain *' argument.
8318
8319         * mono-debug-debugger.c: Reworked the type support; explicitly
8320         tell the debugger about builtin types; pass the `klass' address to
8321         the debugger.
8322
8323 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
8324
8325         * image.c: Allow new metadata tables to be loaded without a
8326         warning. Also update the warning message to give the new constant value.
8327                 
8328 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
8329
8330         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
8331         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
8332         array type representation changes.
8333
8334 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8335
8336         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
8337         on Environment.Exit () call.
8338
8339 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8340
8341         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
8342         requires a matching corlib.
8343
8344 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
8345
8346         * Changelog: My editor decided to add a CR to each line. Sorry about that.
8347           Committed again without the CRs.
8348         
8349 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
8350
8351         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
8352           getting it from the "this" socket instance. Did not work
8353           if the socket is a subclass of Socket.
8354           Also fixed bug #35371.
8355
8356 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8357
8358         * metadata.c: fixed size for TypedByRef.
8359         * loader.c: when searching for a method, consider the vararg amrker.
8360         * unicode.c, decimal.c: constify some arrays.
8361
8362 2003-07-15  Dick Porter  <dick@ximian.com>
8363
8364         * socket-io.c: Fixed compilation for gcc < 3.2.
8365
8366         Fixed compilation for machines that don't have AF_INET6 (thanks to
8367         Bernie Solomon <bernard@ugsolutions.com> for that part.)
8368
8369         Fixed compile warnings.
8370         
8371         Fixed formatting and line endings.
8372
8373 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
8374
8375         * socket-io.h:
8376         * socket-io.c: Added IPv6 support.
8377
8378 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
8379
8380         * class.c (mono_class_is_assignable_from): New function to implement
8381         the is_assignable_from logic. Used by mono_object_isinst, 
8382         Type::IsAssignableFrom () and the interpreter.
8383
8384         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
8385         Object, even interfaces.
8386         
8387         * object.c (mono_object_isinst): Implement in terms of 
8388         is_assignable_from.
8389
8390         * icall.c (ves_icall_type_is_assignable_from): New icall.
8391
8392 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
8393
8394         * domain.c (foreach_domain): fix compiler warning.
8395
8396 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
8397
8398         * image.c (load_metadata_ptrs): use g_strndup because strndup is
8399         not available on all plattforms
8400
8401 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
8402
8403         * image.h image.c: Store the metadata version string in MonoImage.
8404         * icall.c: New icall to retrieve the image version.
8405         * reflection.c (create_dynamic_image): Fill in the image version field
8406         * reflection.c (build_compressed_metadata): Use the image version
8407         from the image structure.
8408
8409 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8410
8411         * appdomain.c: modified comment.
8412         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
8413         That will be its last iteration when mono_gc_cleanup is called from
8414         mono_runtime_cleanup and before the domain is unloaded.
8415
8416         Fixes bug #45962.
8417
8418 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
8419
8420         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
8421         attributes.
8422
8423 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8424
8425         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
8426         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
8427         Bernie Solomon <bernard@ugsolutions.com>.
8428
8429 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8430
8431         * object.c, object.h: provide mono_object_new_fast() for faster
8432         allocation in some special cases.
8433
8434 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
8435
8436         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
8437         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
8438
8439 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
8440
8441         * threadpool.c: fix leaks.
8442
8443 2003-07-01  Dick Porter  <dick@ximian.com>
8444
8445         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
8446         using MonoGHashTables.  Fixes threadpool bug posted to list.
8447
8448 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
8449
8450         * image.h, image.c: added support to load an assembly from a byte array.
8451         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
8452         assembly bundle support.
8453
8454 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
8455
8456         * threadpool.c (mono_thread_pool_add): keep a reference to the
8457         AsyncResult to prevent GC
8458
8459 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
8460
8461         * class.c: leak fix.
8462
8463 2003-06-25  Dick Porter  <dick@ximian.com>
8464
8465         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
8466         for the async object, the WaitHandle object will close the handle.
8467         Fixes bug 45321.
8468
8469 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8470
8471         * class.c: in mono_array_class_get (), lookup from the hash with the
8472         same type we insert: this works around a bug in
8473         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
8474         lluis. The real fix will have to wait for after the release.
8475
8476 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
8477
8478         * icall.c: fix memory leak when getting type members.
8479
8480 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8481
8482         * reflection.c: added more pubtoken special cases.
8483
8484 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
8485
8486         * class.c: handle field offset correctly when class size
8487         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
8488
8489 2003-06-20  Martin Baulig  <martin@ximian.com>
8490
8491         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
8492         *image' field.
8493
8494 2003-06-20  Martin Baulig  <martin@ximian.com>
8495
8496         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
8497
8498 2003-06-20  Martin Baulig  <martin@ximian.com>
8499
8500         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
8501         just distinguish between variables in registers and variables at
8502         an offset relative to a register.
8503
8504 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8505
8506         * icall.c: #ifdef out latest changes until mcs is fixed.
8507
8508 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8509
8510         * icall.c: return members in metadata order.
8511
8512 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8513
8514         * icall.c: avoid infinite loop in GetTimeZoneData.
8515
8516 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
8517
8518         * icall.c: added Marshal.Prelink/All icalls.
8519
8520 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8521
8522         * object.c, object.h: fix warnings and do some overflow checking
8523         when creating arrays.
8524
8525 2003-06-17  Dick Porter  <dick@ximian.com>
8526
8527         * file-io.h:
8528         * file-io.c: File attributes need to be tweaked slightly when
8529         passed from the managed to the w32 world.
8530
8531 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
8532         * profiler.h profiler-private.h profiler.c: Rework last patch
8533         based on suggestion by Paolo.
8534         
8535 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
8536
8537         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
8538         instruction level coverage data collection.
8539         * profiler.h profiler.c (: Added new callback function which can be
8540         used by the profiler to limit which functions should have coverage
8541         instrumentation.
8542         * profiler.c (mono_profiler_load): Call g_module_build_path to
8543         generate the file name of the profiler library.
8544
8545 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8546
8547         * profiler.c, profiler.h, profiler-private.h: added basic block 
8548         coverage profiling API.
8549
8550 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
8551
8552         * reflection.c (mono_reflection_create_runtime_class): Add support
8553         for events in dynamically generated code.
8554
8555         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
8556         not allocated.
8557
8558 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8559
8560         * icall.c: when getting timezone info, return reasonable values if we
8561         can't get the actual data.
8562
8563 2003-06-14  Dick Porter  <dick@ximian.com>
8564
8565         * threads.c (start_wrapper): Remove the reference to the thread
8566         object in the TLS data, so the thread object can be finalized.
8567         This won't be reached if the thread threw an uncaught exception,
8568         so those thread handles will stay referenced :-( (This is due to
8569         missing support for scanning thread-specific data in the Boehm GC
8570         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
8571
8572 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
8573
8574         * reflection.c: ensure streams and tables are first allocated with
8575         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
8576
8577 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8578
8579         * icall.c: fixed GetElementType for byrefs (bug# 44792).
8580
8581 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
8582
8583         * reflection.c (mono_reflection_create_runtime_class): Add support for
8584         properties to dynamically created classes.
8585         * reflection.c: Fix a few places where non-MonoObjects were inserted
8586         into the tokens hashtable.
8587
8588 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8589
8590         * object.c: some support to handle out of memory exceptions.
8591
8592 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
8593
8594         * marshal.c (mono_marshal_get_native_wrapper): support reference
8595         return types
8596
8597 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8598
8599         * object.h, object.c: more portability stuff from Bernie Solomon.
8600         Unexport mono_object_allocate(). Added mono_object_unbox ().
8601         Set exitcode when an unhandled exception is thrown.
8602
8603 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
8604
8605         * marshal.c (mono_marshal_get_native_wrapper): use custom
8606         marshaler for return types.
8607
8608 2003-06-10  Dick Porter  <dick@ximian.com>
8609
8610         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
8611         ip_mreq is available
8612
8613 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
8614
8615         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
8616         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
8617         by Bernie Solomon <bernard@ugsolutions.com>.
8618
8619 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
8620
8621         * gc.c (mono_gc_init): Avoid error message on shutdown when
8622         GC_DONT_GC=1 is used.
8623
8624         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
8625         New icall to return the GUID of a module.
8626
8627 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8628
8629         * class.c: ensure instance size always includes the parent's size
8630         even whem class size is set explicitly (fixes bug#44294).
8631
8632 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8633
8634         * profiler.h, profiler.c: made the simple profiler thread-safe,
8635         get more accurate timing info. Allow the loading of an
8636         externally-developed profiler module.
8637
8638 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
8639
8640         * marshal.c (mono_marshal_get_native_wrapper): improved
8641         class/byref arguments.
8642         (mono_marshal_get_native_wrapper): better string marshaling support.
8643
8644 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
8645
8646         * class.c: ensure .pack and .size are handled correctly and
8647         simplified layout of static fields.
8648
8649 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
8650
8651         * appdomain.c
8652         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
8653
8654         * loader.c (mono_lookup_pinvoke_call): look for modules in the
8655         current directory (fix bug 44008)
8656
8657 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
8658
8659         * marshal.c (mono_marshal_get_native_wrapper): started support for
8660         custom marshalers.
8661         (mono_delegate_to_ftnptr): consider marshalling specifications
8662
8663 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
8664
8665         * reflection.c, reflection.h: emit custom marshal info.
8666
8667 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8668
8669         * object.c: free the GError.
8670         * icall.c: added CloseEvent_internal.
8671         * threads.[ch]:
8672         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
8673         call.
8674
8675 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
8676
8677         * loader.c (mono_method_get_signature): Add support for dynamic
8678         assemblies.
8679
8680 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
8681
8682         * reflection.c: fixed bug #43905.
8683
8684 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8685
8686         * class.c, domain.c, icall.c, metadata.h, object.h: support for
8687         handling TypedReference and ArgIterator.
8688         * loader.c, loader.h: added function to get signature at call site.
8689
8690 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8691
8692         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
8693         data readonly. Buglets and warning fixes. Some MethodSpec support.
8694
8695 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8696
8697         * class.h, class.c, object.c: remove relative numbering support.
8698
8699 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
8700
8701         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
8702         free the string, until we get a chance to fix Gtk#
8703
8704 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8705
8706         * marshal.c: revert last patch.
8707
8708 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
8709
8710         * icall.c: updates for new mono_class_vtable() not calling
8711         the type constructor anymore.
8712
8713 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
8714
8715         * object.h, object.c: separate vtable creation from type
8716         initialization. Make running the .cctor thread safe.
8717
8718 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
8719
8720         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
8721
8722 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
8723
8724         * loader.c (mono_get_method): consider calling convention
8725
8726 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
8727
8728         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
8729         to return the invisible global type for a module.
8730
8731         * reflection.c (mono_image_build_metadata): Emit global fields too.
8732
8733 2003-05-20  Peter Williams  <peterw@ximian.com>
8734
8735         * loader.c (mono_lookup_internal_call): Add a few newlines.
8736
8737 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
8738
8739         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
8740         literal strings.
8741
8742         * appdomain.c (set_domain_search_path): Recalculate search path when
8743         AppDomainSetup.PrivateBinPath changes.
8744
8745         * object.c (mono_class_compute_gc_descriptor): It turns out some
8746         parts of the class libs (like System.Thread) holds pointers to
8747         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
8748         to treat native int a pointer type here.
8749         
8750 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
8751
8752         * appdomain.h, domain.c: add hashtable for jump target resolution.
8753
8754 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
8755
8756         * reflection.h reflection.c icall.c: Added new icalls 
8757         GetManifestResourceInfoInternal, GetModulesInternal and support
8758         infrastructure.
8759
8760 2003-05-16  Dick Porter  <dick@ximian.com>
8761
8762         * icall.c:
8763         * file-io.h:
8764         * file-io.c: Implement System.IO.MonoIO::GetTempPath
8765
8766 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
8767
8768         * object.c: mono_store_remote_field: little fix to previous patch.
8769
8770 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8771
8772         * class.c: add constructors to array classes.
8773         * icall.c: special case array construction for InternalInvoke (),
8774
8775 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
8776
8777         * class.h class.c reflection.c object.c: Added support for field
8778         defaults in dynamically generated classes.
8779
8780 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
8781
8782         * reflection.c: properly encode charset for ddlimport.
8783
8784 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
8785
8786         * threads.c: allow compiling without GC.
8787
8788 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8789
8790         * appdomain.h, object.c, object.h, threads.c, threads.h: added
8791         handling of thread static data.
8792
8793 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8794
8795         * reflection.h, reflection.c: added mono_custom_attrs_free ().
8796
8797 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
8798
8799         * class.c (mono_array_class_get): always set the serializable flags
8800         (mono_array_class_get): always set the SEALED attribute for array types
8801
8802 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
8803
8804         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
8805         attributes (fix for bug 42021).
8806
8807 2003-05-12  Dick Porter  <dick@ximian.com>
8808
8809         * gc.c: Don't run finalizers when the finalizer thread is
8810         finishing up, because the default domain has already been
8811         destroyed.
8812
8813 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
8814
8815         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
8816         value is null, we should throw an exception.   This is slightly
8817         different than the other conventions used for the constructor.
8818
8819 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8820
8821         * socket-io.c: fixed windows build.
8822
8823 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8824
8825         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
8826
8827 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
8828
8829         * object.c (mono_string_new_wrapper): Compatibility fix for MS
8830         compilers.
8831
8832 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
8833
8834         * class.c (mono_class_layout_fields): Add experimental GC aware
8835         auto layout facility. Requires class library changes to work correctly.
8836
8837         (mono_class_setup_vtable): Avoid overriding explicit interface
8838         method implementations. Fixes iface3.exe test.
8839
8840         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
8841         object reference.
8842         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
8843         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
8844
8845         * metadata.h: Add new type classification macro which determines
8846         whenever the type holds an object reference.
8847
8848 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
8849
8850         * marshal.c (mono_marshal_get_native_wrapper): cleanups
8851
8852 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
8853
8854         * gc.c (finalizer_thread): Work around a GC bug.
8855
8856 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
8857
8858         * marshal.c (emit_struct_conv): allow unions
8859
8860         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
8861
8862 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
8863
8864         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
8865
8866 2003-05-06  Martin Baulig  <martin@ximian.com>
8867
8868         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
8869
8870 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8871
8872         * socket-io.c:
8873         (Select_internal): allow NULLs, don't create arrays if not needed.
8874         Coupled with Socket.cs changes.
8875
8876         * threadpool.c:
8877         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
8878         register a finalizer for it that will close the semaphore handle. This
8879         fixes the leak and make Lupus' test run with > 4080 loops.
8880
8881 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
8882
8883         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
8884         Jerome Laban (bug #42287)
8885
8886 2003-05-02  Martin Baulig  <martin@ximian.com>
8887
8888         * debug-mono-symfile.h
8889         (MonoSymbolFile): Moved declaration into mono-debug.h.
8890         (MonoDebugMethodJitInfo): Likewise.
8891         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
8892         argument.
8893         (_mono_debug_address_from_il_offset): Take a
8894         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
8895
8896         * mono-debug.h
8897         (MonoDebugDomainData): New struct.
8898         (mono_debug_get_domain_data): New function.
8899         (mono_debug_add_method): Take an additional `MonoDomain *'
8900         argument.
8901         (mono_debug_source_location_from_address): Likewise.
8902         (mono_debug_il_offset_from_address): Likewise.
8903         (mono_debug_address_from_il_offset): Likewise.
8904
8905 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
8906
8907         * reflection.c: one more check for null type in custom attrs.
8908
8909 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8910
8911         * reflection.c: avoid warning (comparison is always false due to limited
8912         range of data type).
8913
8914 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8915
8916         * icall.c: throw an exception in Type.GetField if the argument 'name'
8917         is NULL.
8918
8919 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
8920
8921         * reflection.c: fixed handling of enums in named arguments to custom
8922         attributes (bug #42123).
8923
8924 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
8925
8926         * reflection.c: use the right array element type and handle
8927         a null for a Type argument, too.
8928
8929 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
8930
8931         * reflection.c: handle arrays as arguments to custom attributes.
8932
8933 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8934
8935         * reflection.c: handle a string value in a custom attr
8936         ctor that takes an object.
8937
8938 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
8939
8940         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
8941         (fix bug #42063)
8942
8943 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
8944
8945         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
8946
8947 2003-04-27  Martin Baulig  <martin@ximian.com>
8948
8949         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
8950         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
8951         MONO_DEBUGGER_EVENT_BREAKPOINT.
8952         (mono_breakpoint_trampoline_code): Removed.
8953         (mono_debugger_event_handler): The last argument is now a
8954         `guint32'.
8955         (mono_debugger_insert_breakpoint_full): Removed the
8956         `use_trampoline' argument.
8957         (mono_debugger_method_has_breakpoint): Likewise.
8958         (mono_debugger_trampoline_breakpoint_callback): Renamed to
8959         mono_debugger_breakpoint_callback(); take the method and
8960         breakpoint number as arguments.
8961
8962 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
8963
8964         * metadata.c: fix off by one when loading parameters attributes.
8965
8966 2003-04-24  Martin Baulig  <martin@ximian.com>
8967
8968         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
8969
8970 2003-04-24  Martin Baulig  <martin@ximian.com>
8971
8972         * mono-debug-debugger.c: Moved all code which interacts with the
8973         Mono Debugger here.
8974
8975         * debug-mono-symfile.c: This code now just deals with the symbol
8976         file itself, the debugger code is now in mono-debug-debugger.c.
8977
8978 2003-04-23  Martin Baulig  <martin@ximian.com>
8979
8980         * mono-debug.c (mono_debug_source_location_from_il_offset):
8981         New method; like mono_debug_source_location_from_address(), but
8982         takes an IL offset instead of a machine address.
8983
8984 2003-04-23  Martin Baulig  <martin@ximian.com>
8985
8986         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
8987         `line' field; this is now computed by the debugger.
8988
8989 2003-04-23  Martin Baulig  <martin@ximian.com>
8990
8991         * mono-debug.[ch]: New files.  This is the new debugging interface.
8992
8993         * mono-debug-debugger.[ch]: New files.  Moved all code which
8994         interacts with the Mono Debugger here.
8995
8996 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
8997
8998         * domain.c (mono_init): initialize mono_defaults.monitor_class
8999
9000 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
9001
9002         * reflection.c (method_encode_code): Add a spicy exception to help
9003         future compiler authors.
9004
9005 2003-04-21  Martin Baulig  <martin@ximian.com>
9006
9007         * icall.c
9008         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9009         Make this work with relative pathnames; g_filename_to_uri() needs
9010         an absolute filename.
9011
9012 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
9013
9014         * icall.c: Track name changes in Object and ValueType.
9015
9016 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
9017
9018         * metadata.c (mono_type_stack_size): size should be a multiple of
9019         sizeof (gpointer)
9020
9021 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9022
9023         * gc.c:
9024         (internal_domain_finalize): moved into mono_domain_finalize. No need
9025         to create another thread because the finalizers will be run in the
9026         finalizer thread.
9027         
9028         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
9029         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
9030         to be run (MS does this too).
9031
9032 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
9033
9034         * object.c (mono_class_compute_gc_descriptor): Update comment.
9035
9036         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
9037
9038         * image.h: Add synchronized wrapper cache.
9039
9040         * image.c (do_mono_image_open): Initialize cache.
9041
9042         * reflection.c (create_dynamic_mono_image): Initialize cache.
9043
9044 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9045
9046         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
9047         ves_icall_System_Buffer_ByteLengthInternal.
9048
9049 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
9050
9051         * reflection.c: setup klass->nested_in earlier. Allow
9052         a dash in the assembly name.
9053
9054 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
9055
9056         * metadata.c (mono_type_to_unmanaged): dont access
9057         type->data.klass for MONO_TYPE_OBJECT
9058         (mono_type_to_unmanaged): consider System.Delegate class
9059
9060 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
9061
9062         * class.c: just setup supertypes in the proper place instead of
9063         initializing the full element class for arrays.
9064
9065 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
9066
9067         * class.c: ensure the element class of arrays is initialized.
9068         Setup the supertype info for array classes, too.
9069
9070 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
9071
9072         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
9073
9074 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9075
9076         * Makefile.am: re-added -m option when running cygpath. This way,
9077         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
9078         separator.
9079         * mono-config.c: same codepath for locating mono config file for WIN32
9080         and the rest.
9081         * assembly.c: if mono_assembly_setrootdir is called, don't override
9082         the value set.
9083
9084 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9085
9086         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
9087         MONO_ASSEMBLIES variable.
9088
9089 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
9090
9091         * icall.c: added Assembly::GetNamespaces() icall.
9092
9093 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9094
9095         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
9096
9097 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
9098
9099         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
9100         * object.c: fixed bug in the construction of vtable for proxies
9101
9102 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
9103
9104         * object.c (mono_array_new): Mark mono_array_new as an icall.
9105
9106 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9107
9108         * class.c: fixed test for public method when overriding interfaces.
9109         Closes bug #40970.
9110
9111 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9112
9113         * appdomain.h, domain.c: added mono_domain_foreach() to
9114         be able to access the currently loaded appdomains.
9115         * object.c: make string interning work across sppdomains.
9116         Mark some functions for use as icalls.
9117
9118 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
9119
9120         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
9121
9122         * reflection.h reflection.c: Allocate long living data using 
9123         GC_MALLOC_ATOMIC so the collector does not need to scan it.
9124
9125         * reflection.c: Double the allocation size in streams instead of
9126         increasing it, to prevent unneccesary copying on large assemblies.
9127         
9128         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
9129         creation if the assembly does not have the Run flag set.
9130
9131 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9132
9133         * class.h: avoid the C++ keywords in header files (Jerome Laban
9134         spotted and fixed this).
9135
9136 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9137
9138         * object.c:
9139         (mono_unhandled_exception): fill in the arguments for the
9140         UnhandledException event. Only trigger that event for the default
9141         domain (as MS does).
9142
9143 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
9144
9145         * object.c: Improve typed allocation stuff based on suggestions from
9146         Paolo. Also turn it on if the GC library supports it.
9147
9148 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
9149
9150         * object.c object.h class.h: Added experimental typed allocation
9151         facility using the interfaces in gc_gcj.h.
9152
9153         * os/gc_wrapper.h: Added new include files.
9154         
9155 2003-04-03  Martin Baulig  <martin@ximian.com>
9156
9157         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
9158         which is not yet enabled by default.
9159
9160         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
9161         functions.
9162         (mono_gc_lock, mono_gc_unlock): New static functions.
9163
9164         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
9165         functions; stop/start the world for the garbage collector.  This
9166         is using the windows API; we need to complete the SuspendThread()/
9167         ResumeThread() implementation in the io-layer to make this work on Unix.
9168         (mono_gc_push_all_stacks): New public function; tells the garbage
9169         collector about the stack pointers from all managed threads.
9170
9171 2003-04-03  Martin Baulig  <martin@ximian.com>
9172
9173         * object.h (MonoThread): Added `gpointer stack_ptr'.
9174
9175         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
9176
9177 2003-04-03  Martin Baulig  <martin@ximian.com>
9178
9179         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
9180
9181 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
9182
9183         * reflection.c (typebuilder_setup_fields): Initialize field.first and
9184         field.last.
9185
9186 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
9187
9188         * loader.c (mono_lookup_internal_call): Report the corlib that is
9189         out of sync.
9190
9191 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
9192
9193         * icall.c (ves_icall_type_GetTypeCode): fixed check for
9194         System.DBNull (it's class not valuetype).
9195
9196 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
9197
9198         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
9199         if the array method was already assigned a token (fixes bug#40646).
9200
9201 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
9202
9203         * reflection.c (mono_reflection_get_type): Attempt type resolve even
9204         if no assembly is given.
9205
9206 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
9207
9208         * metadata.h: Added the new tables.
9209
9210         * row-indexes.h: Added definitions for new tables.
9211
9212         * metadata.c: Add schemas for new tables, and add support for
9213         computing the sizes of them.
9214
9215         * class.c: Update for handling the new type cases.
9216
9217 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
9218
9219         * metadata.h (MONO_TYPE_IS_VOID): new macro
9220
9221 2003-03-31  Martin Baulig  <martin@ximian.com>
9222
9223         * threads.h (MonoThreadCallbacks): Added `thread_created'.
9224
9225         * threads.c (mono_thread_new_init): Call `thread_created' in the
9226         mono_thread_callbacks.
9227
9228 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
9229
9230         * loader.h: added marshalbyrefobject_class to mono_defaults
9231         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
9232         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
9233           generation of output parameters.
9234           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
9235         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
9236           contextbound and the target object belongs to the context of the caller.
9237         * object.h: added context and unwrapped_server variables in MonoRealProxy.
9238         * object.c: Implemented support for interfaces and abstract classes
9239           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
9240           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
9241
9242 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
9243
9244         * class.h class.c (mono_class_is_subclass_of): New function.
9245         
9246         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
9247         routines for most common case (calls from ArrayList::ToArray).
9248
9249         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
9250         routine so programs which call Environment::Exit() can be profiled.
9251
9252         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
9253         Added MONO_ARCH_SAVE_REGS.
9254
9255         * icall.c (ves_icall_type_is_subtype_of): Use new function.
9256
9257 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
9258
9259         * blob.h: Add a couple of new MonoType types definitions.
9260
9261         * tabledefs.h: Add a couple of new call convs.
9262
9263 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
9264
9265         * reflection.h (MonoReflectionDynamicAssembly): track changes in
9266         the layout of the class.
9267
9268         * reflection.c (alloc_table): double the size on overflow to avoid
9269         unnecessary copying.
9270
9271         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
9272         avoid filling out metadata tables and blobs. Also set mb->ilgen to
9273         null so it can be garbage collected.
9274         
9275 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
9276
9277         * reflection.c (mono_reflection_get_type): Return the resolved type
9278         only if it is in the assembly we searched.
9279
9280         * reflection.c (ensure_runtime_vtable): Initialize method slots.
9281
9282         * class.c (mono_class_setup_vtable): Set the slot of the overriding
9283         method.
9284
9285 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9286
9287         * appdomain.c:
9288         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
9289         the right one is 'file:///blah', but MS allows it.
9290         * assembly.c:
9291         (mono_assembly_open): allow 'file://blah'
9292
9293         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
9294
9295 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
9296
9297         * socket-io.c: fixes bug #40310.
9298
9299 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
9300
9301         * reflection.c (mono_reflection_parse_type): handle deeply nested
9302         types correctly.
9303
9304         * reflection.c (mono_image_create_token): Use unique token values
9305         since they will be put into a hash table.
9306
9307         * class.c (mono_class_setup_vtable): If a method occurs in more than
9308         one place in the vtable, and it gets overriden, then change the
9309         other occurances too.
9310
9311         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9312         object as return type.
9313
9314 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
9315
9316         * icall.c: Deleted "ToString" implementation for double and float
9317         because they are full implemented in managed code.
9318
9319 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9320
9321         * reflection.c, reflection.h: implemented and exported functions
9322         to retrieve info about custom attributes.
9323
9324 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9325
9326         * appdomain.c: moved Uri handling to assembly.c
9327         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
9328         work when using a file Uri in *nix and windows.
9329
9330         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
9331         GetReferencedAssemblies.
9332
9333 2003-03-18  Dick Porter  <dick@ximian.com>
9334
9335         * icall.c: Rename a couple of internal calls
9336
9337         * threads.c: Set the thread state to Stopped when a thread exits.
9338         Fixes bug 39377.
9339
9340 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
9341
9342         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
9343         New icall.
9344
9345         * object.c (mono_class_vtable): fix warning.
9346
9347 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
9348
9349         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
9350
9351         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
9352         memory.
9353         (method_encode_clauses): Create exception info structures in the right
9354         order.
9355         (mono_reflection_setup_internal_class): Initialize supertypes field.
9356
9357         * class.c object.c: Handle interfaces which implement other interfaces 
9358         correctly.
9359
9360         * class.h class.c: Move the supertypes array initialization code into 
9361         a separate function so it can be used for dynamic types too. Also call
9362         it earlier, in mono_class_init(), since it can be used before the
9363         type is initialized.
9364
9365 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9366
9367         * Makefile.am:
9368         * assembly.c:
9369         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
9370
9371         * appdomain.c:
9372         * appdomain.h:
9373         * marshal.c:
9374         * object.c: remove warnings.
9375
9376 2003-03-13  Martin Baulig  <martin@ximian.com>
9377
9378         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
9379         (MonoDebugLexicalBlockEntry): New types.
9380
9381         * debug-mono-symfile.c
9382         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
9383
9384 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9385
9386         * process.c: ret can be any non-zero value accroding to MS doc.
9387
9388 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
9389
9390         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
9391         fixing a warning for a miss-used prototype, would have cause
9392         random memory corruption.
9393
9394 2003-03-07  Martin Baulig  <martin@ximian.com>
9395
9396         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
9397         getting really annoying ....
9398
9399 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
9400
9401         * reflection.c (fixup_method): added support for array methods.
9402
9403 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
9404
9405         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
9406         (pointed out by Michael Adams).
9407
9408 2003-03-04  Dick Porter  <dick@ximian.com>
9409
9410         * icall.c: Temporarily reverted the Double and Single ToString()
9411         change, because it broke nunit.
9412
9413 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
9414
9415         * object.h, threads.h: make include files compatible with C++
9416         (patch by Jerome Laban <jlaban@wanadoo.fr>).
9417
9418 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
9419
9420         * icall.c: Erased ToString helper functions for Double and Single.
9421         Now, that implementations ar all in managed code (Double and Single
9422         Formatters).
9423
9424 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
9425
9426         * appdomain.c: Added method for initializing the default context of
9427         a domain. Added internal call for getting the default context.
9428         * appdomain.h: Added context variable in MonoDomain struct.
9429         * domain.c: mono_domain_set also sets the default context of the domain
9430         * icall.c: Mapped internal method InternalGetDefaultContext.
9431         * object.c: mono_object_get_virtual_method returns always a remoting
9432         wrapper if the object is a transparent proxy.
9433         mono_runtime_invoke_array: when creating an object by calling the
9434         constructor, if the created object is a proxy, then the constructor should
9435         be called using the a remoting wrapper.
9436
9437 2003-03-03  Dick Porter  <dick@ximian.com>
9438
9439         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
9440         variable so it compiles on solaris.  Problem spotted by
9441         Christopher Taylor <ct@cs.clemson.edu>
9442
9443 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9444
9445         * appdomain.c:
9446         (get_info_from_assembly_name): don't leak value.
9447
9448         * icall.c:
9449         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
9450         result.
9451
9452 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
9453
9454         * assembly.c: export mono_image_load_references ().
9455         * class.c: handle function pointers. mono_class_from_name() now
9456         supports nested type names directly.
9457
9458 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
9459
9460         * reflection.h reflection.c: Encode already created dynamic methods 
9461         and fields correctly as a DEF instead of a REF.
9462
9463         * reflection.c: Get rid of the force_ref argument to 
9464         mono_image_typedef_or_ref since it was wrong in the first place.
9465
9466         * string-icalls.c: add error checking to string constructors according
9467         to the MSDN docs.
9468
9469         * reflection.c: Emit types in the order their TypeBuilders were 
9470         created. Previously, a new table index was assigned to each type before
9471         the tables were emitted. This was wrong because the signature blob
9472         might already refer to a type by its original table index.
9473
9474 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
9475
9476         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
9477         change.
9478         
9479 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9480
9481         * Makefile.am: make assemblies dir have \ instead of / on windows.
9482
9483 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
9484
9485         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
9486         iterate over the NESTEDCLASS table using a linear search since the
9487         table is not guaranteed to be sorted by the secondary key.
9488
9489         * class.c (mono_class_create_from_typedef): fixed up call to
9490         mono_metadata_nesting_typedef.
9491         
9492 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
9493
9494         * marshal.c (mono_string_to_byvalstr): clear the memory as
9495         suggested by Jerome Laban <jlaban@wanadoo.fr>
9496
9497 2003-02-26  Dick Porter  <dick@ximian.com>
9498
9499         * process.c: Cope with padding in .rsrc blocks
9500
9501 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
9502
9503         * metadata.h: reverted the filter_len change, it breaks reflection
9504         
9505 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
9506
9507         * metadata.h: added a new field to store the filter_len
9508         
9509
9510 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
9511
9512         * reflection.c: handle custom attributes for types and members
9513         created with Reflection.Emit (bug#38422).
9514
9515 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
9516
9517         * reflection.c: define RTSpecialName automatically for constructors for
9518         compatibility with MS.NET.
9519
9520         * reflection.c (mono_reflection_create_runtime_class): initialize
9521         nested_in field of dynamically created classes.
9522
9523 2003-02-22  Martin Baulig  <martin@ximian.com>
9524
9525         * debug-mono-symfile.h: Incremented version number.
9526
9527 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
9528
9529         * object.h icall.c process.c: fix warnings.
9530
9531 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
9532
9533         * appdomain.h appdomain.c:
9534         (mono_domain_try_type_resolve): split the 
9535         name_or_tb argument into a name and a tb argument.
9536         (mono_domain_has_type_resolve): new function to check whenever the
9537         application has registered a TypeResolve event handler.
9538         
9539         * icall.c reflection.h reflection.c: move the type resolve logic into
9540         mono_reflection_get_type () so it will be invoked when 
9541         Assembly::GetType () is called.
9542
9543         * reflection.c:
9544         (mono_reflection_get_type): renamed to get_type_internal.
9545         (mono_reflection_get_type): fixed type name generation so it works 
9546         for nested types too.
9547         (mono_reflection_get_type): call has_type_resolve () to avoid the 
9548         costly type name generation if there is no resolve event handler.
9549
9550 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9551
9552         * class.c, image.c: load exported types from file references.
9553
9554 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
9555
9556         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
9557           used to cache the managed methods used to create proxies and make 
9558           remote invocation of methods.
9559         * class.h: Added in MonoVTable a flag to indicate that a class needs 
9560           to be remotely created.
9561         * object.c: Modified the method mono_class_vtable(). It now initializes 
9562           the remote flag of the vtable. Modified mono_object_new_specific(), 
9563           so now it checks the remote flag.
9564         * icall.c: Added a couple of internal methods, one for enabling instance 
9565           creation interception for a type, and one for creating objects bypassing
9566           the remote check.
9567
9568 2003-02-18  Martin Baulig  <martin@ximian.com>
9569
9570         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
9571         New interncall to get a method's metadata token.
9572
9573         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
9574         New interncall for the debugger.
9575
9576 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
9577
9578         * class.c (mono_class_setup_vtable): allocate supertype array
9579
9580 2003-02-18  Martin Baulig  <martin@ximian.com>
9581
9582         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
9583
9584 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9585
9586         * reflection.c:
9587         (assembly_name_to_aname): jump over unknown properties (i've found
9588         something like: 'type, assembly, version=xxx, custom=null, public...',
9589         so now will ignore custom=null and still get the rest of the values).
9590
9591 2003-02-17  Dick Porter  <dick@ximian.com>
9592
9593         * threads.c: Have Thread.Start() wait for a semaphore to signal
9594         that the thread has set up all its local data.  This fixes bug
9595         34323, where Abort() raced the new thread's TLS data.
9596
9597         Also removes the handle_store() call from start_wrapper, because
9598         threads are now always created suspended and there is no longer a
9599         race between the parent and child threads to store the info.
9600
9601 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
9602
9603         * image.c: explain the #- heap issue in a message, hopefully
9604         avoiding FAQs on mono-list.
9605
9606 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9607
9608         * icall.c:
9609         (GetEntryAssembly): if the domain has not invoked
9610         AppDomain.ExecuteAssembly yet, return the assembly of the default
9611         AppDomain.
9612
9613 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
9614
9615         * class.c (mono_ldtoken): make it work in dynamic assemblies.
9616
9617 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
9618
9619         * metadata.c, reflection.c: simple speedup to type hash
9620         and equals code.
9621
9622 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
9623
9624         * image.c, image.h, class.c, assembly.c: move module loading
9625         to MonoImage. When loading metadata, consider alignemnet from
9626         the start of metadata, not from the metadata address in memory.
9627
9628 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
9629
9630         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
9631         AssemblyBuilder objects. Factored out custom attribute creation into
9632         a separate function.
9633         (create_custom_attr): new function to create custom attributes.
9634
9635 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
9636
9637         * Makefile.am: Got tired of typing the full pathname to pedump.
9638         Until there is another option, am installing this.
9639
9640 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
9641
9642         * class.c (class_compute_field_layout): always set field->parent 
9643         (mono_ldtoken): use mono_defaults.fieldhandle_class;
9644
9645 2003-02-11  Dick Porter  <dick@ximian.com>
9646
9647         * threads-types.h:
9648         * monitor.c: Rewrote Monitor, making lock much faster and
9649         Pulse/Wait work as specified.  Also uses much fewer handles, and only
9650         creates them as needed.
9651
9652         * exception.c: Added SynchronizationLockException
9653
9654         * threads.c: Deleted old Monitor implementation.  The new one is
9655         in a new file.
9656
9657 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
9658
9659         * class.c: handled TypedReference type code. Set the correct size for
9660         class data. Setup interface_offsets for interface classes, too.
9661
9662 2003-02-09  Martin Baulig  <martin@ximian.com>
9663
9664         * debug-mono-symfile.h: Reflect latest symbol writer changes.
9665
9666 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
9667
9668         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
9669         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
9670         * object.c: fixed mono_object_get_virtual_method () for interfaces.
9671         * verify.c: check for code that runs after the end of the method.
9672
9673 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
9674
9675         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
9676         "System.Math::Round2".
9677         * sysmath.h: Added Floor, Round and Round2 definitions.
9678         * sysmath.c: Modified certain functions that were not 100% compliant
9679         with MS.NET (math precision) and added the implementation of Floor,
9680         Round and Round2.
9681
9682 2003-02-07  Martin Baulig  <martin@ximian.com>
9683
9684         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
9685
9686 2003-02-07  Martin Baulig  <martin@ximian.com>
9687
9688         * debug-mono-symfile.c: Reflected latest symwriter changes.
9689         (mono_debug_create_mono_symbol_file): Removed.
9690         (mono_debug_open_mono_symbol_file): Take an argument which
9691         specifies whether to create a dynamic symbol file.
9692
9693 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
9694
9695         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
9696
9697 2003-02-05  Martin Baulig  <martin@ximian.com>
9698
9699         * reflection.c (mono_image_build_metadata): Make this public,
9700         protect it against being called multiple times, don't create
9701         resources and don't build the compressed metadata here.
9702         (mono_image_create_pefile): Do this here.
9703
9704         * icall.c
9705         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
9706
9707 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9708
9709         * socket-io.c: fixed bug #36322.
9710
9711 2003-02-06  Piers Haken <piersh@friskit.com>
9712
9713         * appdomain.[ch]:
9714         * class.h:
9715         * debug-mono-symfile.c:
9716         * icall.c:
9717         * loader.c:
9718         * mono-config.c:
9719         * monosn.c:
9720         * reflection.c:
9721         * socket-io.c: warning cleanups
9722
9723 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
9724
9725         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
9726         function. works like remoting invoke, but does a check for the Proxy first.
9727
9728 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
9729
9730         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
9731
9732 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
9733
9734         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
9735         array of pointers.
9736         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
9737         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
9738
9739         * object.c (mono_store_remote_field_new): used by the new jit
9740         instead of mono_store_remote_field
9741         (mono_load_remote_field_new): used by the new jit
9742         instead of mono_load_remote_field
9743
9744 2003-02-05  Patrik Torstensson
9745
9746         * appdomain.c: changed unload to take the domain id instead
9747         of domain
9748         
9749         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
9750
9751
9752 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9753
9754         * appdomain.c: don't look for assemblies in ApplicationBase if
9755         PrivateBinPathProbe is set.
9756
9757 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9758
9759         * object.c: make the first argument in main_args contain the absolute
9760         path to the assembly. Fixes bug #37511.
9761
9762 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9763
9764         * icall.c: get correct UTC offset for countries not using daylight
9765         time saving. Fixes bug #30030.
9766
9767 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9768
9769         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
9770         and 1 are the family).
9771
9772 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
9773
9774         * icall.c (ves_icall_InternalExecute): removed wrong assertion
9775
9776         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
9777
9778 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
9779
9780         * reflection.c: added support for SignatureHelper tokens, which is
9781         needed by the Calli opcode.
9782
9783         * reflection.h: track changes to SignatureHelper class.
9784
9785         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
9786
9787 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9788
9789         * appdomain.c: fixed loading assemblies from PrivateBinPath.
9790
9791 2003-02-03  Patrik Torstensson
9792         * appdomain.[c|h], domain.c : 
9793          - Added support for getting a domain via domain id
9794          - Support for setting and getting domain from System.AppDomain 
9795            (used in cross appdomain channel)
9796          - Added support for get/set for a MonoAppContext on a thread 
9797            (Context class in System.Runtime.Remoting.Contexts),
9798          - Removed hack in Get/SetData and ExecuteAssembly.
9799         
9800         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
9801         the managed world to get control when a proxy is created.
9802
9803         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
9804         
9805 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
9806
9807         * icall.c
9808         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9809         Populate the codebase field as well.
9810
9811 2003-02-02  Martin Baulig  <martin@ximian.com>
9812
9813         * debug-mono-symfile.c
9814         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
9815         (mono_debug_symfile_add_method): Allow interncalls.
9816
9817 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9818
9819         * icall.c: throw parse exception if strtod fails or the string is empty.
9820
9821 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
9822
9823         * marshal.c: handle object type separately from defined
9824         class types.
9825
9826 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
9827
9828         * marshal.c: handle NATIVE_LPSTR for strings when it's
9829         explicitly specified.
9830
9831 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
9832
9833         * reflection.c, reflection.h, icall.c: setup the reflection
9834         handle cache for ModuleBuilders and AssemblyBuilders.
9835
9836 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
9837
9838         * reflection.c (reflection_methodbuilder_to_mono_method): set
9839         pinvoke flag
9840
9841 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9842
9843         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
9844
9845 2003-01-29  Dick Porter  <dick@ximian.com>
9846
9847         * threads.c: No need for the fake_thread kludge now that Thread
9848         doesn't run a class constructor
9849         
9850 2003-01-29  Dick Porter  <dick@ximian.com>
9851
9852         * threads.c: Use g_direct_hash instead of the rather bogus
9853         g_int_hash
9854
9855 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
9856
9857         * marshal.c (mono_marshal_get_native_wrapper): add check for null
9858         (fix pinvoke12.exe)
9859         (mono_marshal_get_struct_to_ptr): generate valid IL code
9860         (mono_marshal_get_ptr_to_struct): generate valid IL code
9861         (*): correctly set sig->pinvoke, we need to memdup the signature
9862         to do that
9863
9864 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9865
9866         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
9867         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
9868
9869 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9870
9871         * profiler.c: provide more callers information.
9872
9873 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
9874
9875         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
9876
9877         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
9878
9879         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
9880
9881 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9882
9883         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
9884         exception instead of going into an infinite loop on dates which it 
9885         can't yet handle.
9886
9887         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
9888         out-of-range exception if needed.
9889
9890         * class.c (mono_class_setup_vtable): allow a virtual method to provide
9891         an implementation for an interface method and to override an inherited
9892         method at the same time. 
9893         Imagine a scenario when a virtual method is used to override a
9894         virtual abstract method in a parent class, and this same method 
9895         provides an implementation for an method inherited from an interface. 
9896         In this case, the interface resolution code will set im->slot, which 
9897         means that the virtual method override pass will skip this method 
9898         which means a pointer to the abstract method inherited from the parent
9899         will remain in the vtable of this non-abstract class.
9900
9901         * class.c: (mono_class_setup_vtable): continue search for a real 
9902         method if only an abstract method is found.     
9903
9904 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9905
9906         * reflection.c: add size to encoding for ByValStr and ByValArray
9907         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
9908
9909 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9910
9911         * class.c (mono_class_setup_vtable): pass the override info as an
9912         argument.
9913
9914         * class.c (mono_class_setup_vtable): set the slot of overriding methods
9915         correctly.
9916         
9917         * reflection.c (ensure_runtime_vtable); add support for method 
9918         overrides.
9919         
9920 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9921
9922         * reflection.c (resolution_scope_from_image): Hack to work to work with
9923         dynamic assemblies.
9924
9925         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
9926         added a 'force_ref' argument to force this function to allways return 
9927         a TypeRef. This is needed by mono_image_get_memberref_token ().
9928         
9929 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9930
9931         * reflection.c (mono_image_get_type_info): interfaces really don't have
9932         a parent.
9933
9934         * reflection.c (mono_image_basic_init): fill out missing fields of
9935         image structure.
9936
9937         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
9938         dynamic assemblies. This is required so dynamic assemblies show up in
9939         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
9940         Type::GetType() etc. This is consistent with MS behaviour.
9941
9942         * image.c image.h reflection.c: add newly created classes to the name 
9943         cache so mono_class_get () will find them.      
9944
9945 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9946
9947         First part of changes to get IKVM.NET running under mono.
9948         
9949         * appdomain.h, appdomain.c: added new function 
9950         mono_domain_try_type_resolve() which will emit TypeResolve events. 
9951         This function will call AppDomain::DoTypeResolve to do the actual work.
9952
9953         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
9954         moved existing code dealing with dynamic tokens to a new function 
9955         called mono_reflection_lookup_dynamic_token (). This function will 
9956         raise TypeResolve events when appropriate. Since reflection.c is not 
9957         part of libmetadata, a new hook function called 
9958         mono_lookup_dynamic_token() is added to class.c which will call this.
9959
9960         * assembly.h assembly.c: make the invoke_load_hook function public,
9961         so it can be called for dynamic assemblies.
9962
9963         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
9964
9965         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
9966         type isn't found.
9967
9968         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
9969         MonoGHashTable, since it contains pointers to objects which the GC 
9970         needs to track.
9971
9972         * assembly.c (search_loaded): remove unused variable.
9973         
9974 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
9975
9976         * object.c: fixed issue exposed by gcc-generated IL programs
9977         that use RVA data for pointers.
9978
9979 2003-01-25  Martin Baulig  <martin@ximian.com>
9980
9981         * threads.c (start_wrapper): Moved the initialization of
9982         `start_func' above the mono_new_thread_init() call to which we
9983         pass it as argument.
9984
9985 2003-01-24  Martin Baulig  <martin@ximian.com>
9986
9987         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
9988         the MonoThread pointer.
9989
9990 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
9991
9992         * icall.c: Rename `PowImpl' to Pow.
9993
9994 2003-01-23  Dick Porter  <dick@ximian.com>
9995
9996         * threads.c (start_wrapper): Create a Thread object if needed, so
9997         the Main() thread can do the class initialisation in a subthread
9998         that has been set up to allow managed code execution.
9999
10000         Pass the thread ID instead of the MonoThread pointer to the thread
10001         start and attach callbacks.  This change is required, because the
10002         jit thread start callback must be called _before_ the Thread
10003         object can be created.
10004         
10005         (mono_thread_init): Removed much object creation code that is no
10006         longer needed.  No managed code is called from here now.
10007
10008         * object.c (mono_runtime_exec_managed_code): Create a subthread
10009         for Main, and call back to the runtime to use it.
10010         Set the exit code when Main exits.
10011
10012         * gc.c: Make sure domain finalisation happens in a subthread.
10013         Re-enable threaded GC, fixing bug 31333 (again).
10014
10015         * environment.c: System.Environment internall calls (so far just
10016         ExitCode is here, the others are still in icall.c)
10017
10018         * appdomain.c (mono_runtime_cleanup): All threads running managed
10019         code should have finished before mono_runtime_cleanup() is
10020         reached, so no need to clean up threads.
10021
10022 2003-01-22  Martin Baulig  <martin@ximian.com>
10023
10024         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
10025         `gpointer func' arguments.      
10026         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
10027         but added `MonoThread *thread' argument.
10028         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
10029
10030         * threads.c (mono_new_thread_init): Added `gpointer func' argument
10031         and pass it to the mono_thread_start_cb callback.
10032         (mono_install_thread_callbacks): New public function to install a
10033         set of callbacks which are set by the debugger.
10034         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
10035
10036 2003-01-22  Martin Baulig  <martin@ximian.com>
10037
10038         * Makefile.am: Install debug-mono-symfile.h.
10039
10040 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
10041
10042         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
10043
10044 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
10045
10046         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
10047         * class.c (mono_ptr_class_get): correctly set access levels of pointers
10048         (mono_array_class_get): correctly set access levels of arrays
10049
10050 2003-01-20      Patrik Torstensson
10051         * image.h (MonoAssemblyName): changed major, minor, build, revision
10052         from signed to unsigned.
10053
10054 2003-01-20  sean kasun <skasun@azstarnet.com>
10055
10056         * reflection.c (load_cattr_value): Now this handles
10057         MONO_TYPE_SZARRAY.  Fixes bug #35629
10058
10059 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
10060
10061         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
10062         integer value
10063
10064 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10065
10066         * decimal.c: fixed bug #26056.
10067
10068 2003-01-17  Martin Baulig  <martin@ximian.com>
10069
10070         * gc.c: Raise an ExecutionEngineException instead of using g_error().
10071
10072 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10073
10074         * exception.[ch]:
10075         (mono_get_exception_type_initialization): new function.
10076
10077         * object.c: throw a TypeInitializationException when an exception is
10078         thrown invoking the class constructor.
10079
10080 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10081
10082         * reflection.c: fixed attribute reading.
10083
10084 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10085
10086         * icall.c:
10087         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
10088         provided, look for the type in the calling assembly and then in
10089         mscorlib; if the assembly name is provided, only try that one.
10090
10091 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
10092
10093         * object.c: register the vtable before there is a chance it's
10094         queried again recursively.
10095
10096 2003-01-13  Duncan Mak  <duncan@ximian.com>
10097
10098         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
10099         gc-internal.h. 
10100         
10101 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
10102
10103         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
10104
10105 2003-01-11  Martin Baulig  <martin@ximian.com>
10106
10107         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
10108         this to 20 for the release.
10109
10110 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
10111
10112         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
10113
10114         * loader.c (mono_method_get_marshal_info): bug fix
10115
10116         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
10117         structures with explicit layout
10118
10119 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10120
10121         * profiler.c: made the output more readable (and sorted). 
10122         Added caller information for the allocation profiler.
10123
10124 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
10125
10126         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
10127
10128 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10129
10130         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
10131         to get value types.
10132         
10133 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
10134
10135         * object.c, profiler.h, profiler.c, profiler-private.h:
10136         Added object allocation profiler.
10137
10138 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
10139
10140         * reflection.h, reflection.c: handle global methods.
10141         Compress blob entries.
10142
10143 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
10144
10145         * marshal.c: fix compilation.
10146
10147 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
10148
10149         * loader.c (mono_method_get_marshal_info): impl.
10150
10151         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
10152
10153 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10154
10155         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
10156         for reference types.
10157
10158 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
10159
10160         * loader.c: fixed off by one error in loaded parameter names.
10161
10162 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
10163
10164         * marshal.c (mono_marshal_get_icall_wrapper): like
10165         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
10166         instead of a MonoMethod.
10167
10168 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10169
10170         * decimal.c: fixed bug #36537.
10171
10172 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
10173
10174         * marshal.c: throw a missing method exception if a
10175         P/Invoke method is not found.
10176
10177 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10178
10179         * icall.c: allow a null this for constructors.
10180
10181 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
10182
10183         * icall.c: raise the proper exceptions if the arguments to the
10184         internal Invoke are incorrect.
10185
10186 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
10187
10188         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
10189
10190 2003-01-03  Martin Baulig  <martin@ximian.com>
10191
10192         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10193
10194 2002-12-31  Martin Baulig  <martin@ximian.com>
10195
10196         * debug-mono-symfile.c: Completely rewrote the type section.
10197         Instead of using individual malloc()ed fields, we use one big
10198         continuous memory area and offsets into this area.
10199         See the comments in the source code for details.
10200
10201 2002-12-30  Martin Baulig  <martin@ximian.com>
10202
10203         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
10204
10205 2002-12-30  Martin Baulig  <martin@ximian.com>
10206
10207         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
10208         line number table in this data blob instead of using an external
10209         pointer.
10210
10211 2002-12-28  Martin Baulig  <martin@ximian.com>
10212
10213         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10214
10215 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
10216
10217         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
10218         as a boxed return type.
10219
10220 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
10221
10222         * appdomain.c
10223         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
10224         g_build_filename to properly get separators on the filename created.
10225
10226         * object.h: Small change, introduce MonoMarshalByRefObject to
10227         track the layout of that structure in the C# universe as we make
10228         changes there.
10229
10230 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
10231
10232         * object.c: removed assert to allow static fields on interfaces.
10233         * loader.c: a TypeSpec may be used for any type, not just arrays.
10234
10235 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10236
10237         * class.c, class.h: added mono_class_array_element_size ().
10238         Ignore static methods in interfaces.
10239
10240 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10241
10242         * threads.c: fixed the build under cygwin.
10243
10244 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10245
10246         * reflection.c: handle nullref constants. Allocate keys for
10247         reflection handles with the GC.
10248
10249 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10250
10251         * threads.c, threads.h: added mono_thread_get_abort_signal()
10252         to get a suitable signal for thread abort.
10253
10254 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10255
10256         * metadata.c: fix handling of ExportedType table.
10257
10258 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10259
10260         * icall.c: added WriteWindowsDebugString internal call.
10261
10262 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10263
10264         * reflection.h: added fields to match C# implementation.
10265
10266 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10267
10268         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
10269
10270 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
10271
10272         * gc.h, gc-internal.h: Rename header for GC internal calls to
10273         gc-internal.h from gc.h as to not clash with Boehm GC having its
10274         header installed as <gc.h> in outside include paths.
10275         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
10276         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
10277
10278 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10279
10280         * icall.c: assign minor, build and revision in FillName.
10281
10282 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
10283
10284         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
10285         Added support for running code generated by Reflection.Emit.
10286
10287 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10288
10289         * appdomain.c: check for NULL argument in LoadFrom.
10290
10291 2002-12-10  Dick Porter  <dick@ximian.com>
10292
10293         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
10294
10295 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10296
10297         * appdomain.c: fix buglet when building exe file name.  Handle full
10298         assembly name (needed after latest changes to AssemblyName).
10299         * image.c:
10300         (mono_image_close): free some hashtables.
10301
10302 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
10303
10304         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
10305         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
10306         on some systems (redhat 7.3) 
10307
10308 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
10309
10310         * threads.c: delete the critical section of a sync block,
10311         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
10312
10313 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
10314
10315         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
10316
10317 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10318
10319         * appdomain.[ch]: handle the assembly preload event to try loading the
10320         assemblies using the paths we have in the current domain.
10321
10322         * assembly.[ch]: created an assembly preload hook that is called to try
10323         loading the assembly by other means that the ones provided here.
10324
10325         * domain.c: initialize the domain search path.
10326
10327         From now on, assemblies (TODO: except corlib and System) are loaded
10328         according to these rules when using mono_assembly_load ():
10329
10330                 1. It tries to load the assembly from the ApplicationBase
10331                 of the current domain appending .dll and .exe (TODO: have to
10332                 try loading from name/name.dll and name/name.exe).
10333
10334                 2. It tries the search path specified in PrivateBinPath for the
10335                 current domain (if any).
10336
10337                 3. Previous behavior.
10338
10339 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
10340
10341         * icall.c: implemented GetInterfaceMap() related icall.
10342         * domain.c, loader.h: load MethodInfo in mono_defaults.
10343
10344 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10345
10346         * gc.c: disable the finalizer thread for now, untill all the issues
10347         with it are resolved.
10348
10349 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10350
10351         * string-icalls.c: handle embedded nulls in string ctor when the
10352         length is specified.
10353
10354 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10355
10356         * class.c: look for explicit interface implementation in parent
10357         classes, too.
10358
10359 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
10360
10361         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
10362
10363 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10364
10365         * gc.c: protect handles with a critical section.
10366
10367 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10368
10369         * icall.c:
10370         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
10371         parameters. If no assembly specified, try getting the type from all
10372         the assemblies in the current domain, else, load the assembly and get
10373         the type from it.
10374
10375 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10376
10377         * marshal.c: applied patch from Aleksey Demakov that fixes
10378         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
10379
10380 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10381
10382         * icall.c: fixed get_location.
10383
10384 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
10385
10386         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
10387         declarations to make it work with older gcc. 
10388
10389         * loader.c (mono_get_method): set signature->pinvoke for native calls
10390
10391 2002-11-20  Dick Porter  <dick@ximian.com>
10392
10393         * threads.c (mono_thread_init): Set the main thread's handle
10394
10395 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10396
10397         * gc.c: allow compilation without GC support. Changed to match the
10398         mono coding style.
10399
10400 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10401
10402         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
10403
10404 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
10405
10406         * reflection.c: set a public key token on the core assemblies.
10407
10408 2002-11-18  Dick Porter  <dick@ximian.com>
10409
10410         * threads.c: Split out some thread initialisation so that other
10411         files can set the start callback function.
10412
10413         * gc.c: Run finalisers in a separate thread, to avoid stack
10414         overflow.  Fixes bug 31333.
10415
10416         * appdomain.c: Set up GC finalisation thread.
10417
10418         * reflection.c: 
10419         * object.c: 
10420         * domain.c: Use gc.h macros for GC_malloc
10421         
10422 2002-11-15  Dick Porter  <dick@ximian.com>
10423
10424         * threadpool.c: 
10425         * threads.c:
10426         * appdomain.c: Removed mono_runtime_init_with_attach(),
10427         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
10428         merging the extra parameter with the existing function.  Removed
10429         unneeded code in mono_thread_attach().
10430
10431 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
10432
10433         * image.c (mono_image_loaded_by_guid): a method to get loaded
10434         images by guid. 
10435         (load_metadata_ptrs): we store the guid as string.
10436
10437 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
10438
10439         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
10440
10441         * metadata.c (mono_guid_to_string): imported method form Zoltan
10442         Varga (slightly modified)
10443
10444         * assembly.c (mono_assembly_open): load precompiled code
10445
10446         * loader.h (MonoMethod): we store the method token for use in the
10447         aot compiler. 
10448
10449 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10450
10451         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
10452         the hook function called when an assembly is loaded.
10453         
10454         * domain.c: Modified file.
10455         (mono_domain_assembly_load): removed hash table insertion of assemblies.
10456
10457         Fixes bug #33196.
10458
10459 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
10460
10461         * reflection.c: Map PEFileKind to the value expected by the WinNT
10462         image loader. 
10463
10464 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10465
10466         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
10467         Read until the buffer is filled completely.
10468
10469 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10470
10471         * icall.c: implemented MonoType.InternalGetEvent ().
10472
10473 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10474
10475         * appdomain.c: implemented InitAppDomainSetup. Delayed
10476         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
10477         the entry_assembly.
10478
10479         * assembly.c: base_dir is now an absolute path ending with
10480         G_DIR_SEPARATOR.
10481
10482         * icall.c: modified get_location according to the above changes.
10483
10484         * object.c: init AppDomain.SetupInformation for the default domain after
10485         we have the entry assembly.
10486
10487         * domain.c: when unloading a domain, setup = NULL.
10488
10489 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
10490
10491         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
10492
10493 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
10494
10495         * object.h, object.c: introduced mono_object_get_virtual_method ()
10496         to lookup the method invoked on an object when a callvirt is done on
10497         a method.
10498         * icall.c: make MethodInfo::Invoke() always do a virtual call.
10499
10500 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10501
10502         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
10503         current domain when loaded an assembly and failed to load it.
10504
10505         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
10506
10507 2002-10-31  Dick Porter  <dick@ximian.com>
10508
10509         * icall.c: 
10510         * file-io.h: 
10511         * file-io.c: Return the error status in a parameter, as the
10512         GetLastError() value has long since been blown away if we try and
10513         look it up in a subsequent internal call invocation.  Delete the
10514         GetLastError() internal call, because it's useless.
10515
10516 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
10517
10518         * class.[ch]: added cast_class to fix bug 29517
10519
10520 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
10521
10522         * marshal.c: create valid IL code in the filter clause:
10523         the new JIT is less forgiving:-)
10524
10525 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10526
10527         * icall.c: removed get_property internal call.
10528
10529 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
10530
10531         * appdomain.h domain.c: Added an ID to appdomains.
10532         
10533         * threads.c threads.h icall.c: Implement icall
10534         Thread:GetDomainID(), and remove unused icall 
10535         CurrentThreadDomain_internal.
10536
10537 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10538
10539         * icall.c: Don't recurse through the base types in GetConstructor.
10540         Fixes bug #32063. 
10541
10542 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
10543
10544         * mempool.h, mempool.c: added mono_mempool_empty() and
10545         mono_mempool_stats().
10546
10547 2002-10-23  Dick Porter  <dick@ximian.com>
10548
10549         * file-io.c: 
10550         * file-io.h: 
10551         * icall.c: Added MonoIO.GetFileType internal call
10552
10553 2002-10-17  Dick Porter  <dick@ximian.com>
10554
10555         * appdomain.c (mono_runtime_cleanup): Don't signal the async
10556         delegate semaphore before waiting for all threads to finish,
10557         because new threads can also call async delegates.  Fixes bug
10558         32004.
10559
10560         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
10561         of 3 seconds, in case another async job is queued.  (This part is
10562         needed because the bug fix reintroduced the 3s exit lag.)  This
10563         makes the mono_runtime_shutdown flag superfluous.
10564
10565 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
10566
10567         * reflection.c: include ehader size in method section headers.
10568         Really check for suplicated modules entries.
10569
10570 2002-10-17  Martin Baulig  <martin@gnome.org>
10571
10572         * debug-mono-symfile.c: Added back support for locals.
10573
10574 2002-10-14  Martin Baulig  <martin@gnome.org>
10575
10576         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
10577         MONO_TYPE_VOID.
10578
10579 2002-10-14  Martin Baulig  <martin@gnome.org>
10580
10581         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
10582         mono_class_get() instead of looking in the class cache. 
10583
10584 2002-10-13  Martin Baulig  <martin@gnome.org>
10585
10586         * debug-mono-symfile.c: Set version number to 28, include the
10587         signature in method names.
10588
10589 2002-10-13  Martin Baulig  <martin@gnome.org>
10590
10591         * debug-mono-symfile.h: Set version number to 27.
10592
10593 2002-10-11  Martin Baulig  <martin@gnome.org>
10594
10595         * gc.c: Don't register/unregister NULL pointers as disappearing links.
10596
10597 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
10598
10599         * metadata.c, metadata.h: added helper function to allocate signatures.
10600
10601 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10602
10603         * icall.c: added internal call to get the location of machine.config.
10604
10605 2002-10-08  Martin Baulig  <martin@gnome.org>
10606
10607         * debug-mono-symfile.c: Ignore classes with a pending init for the
10608         moment.
10609
10610 2002-10-03  Dick Porter  <dick@ximian.com>
10611
10612         * threads.c: Freebsd pthread_t is a pointer
10613
10614 2002-10-03  Dick Porter  <dick@ximian.com>
10615
10616         * socket-io.c: Implemented GetHostName_internal
10617
10618 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10619
10620         * mono-config.c:
10621         (mono_config_parse_file): don't leak the text.
10622
10623 2002-10-02  Martin Baulig  <martin@gnome.org>
10624
10625         * debug-mono-symfile.c: Added support for methods.
10626
10627 2002-10-01  Martin Baulig  <martin@gnome.org>
10628
10629         * debug-mono-symfile.c: Don't emit methods and line numbers for
10630         the dynamic symbol file, just write the type table.  We can easily
10631         have an external helper program which creates a symbol file for an
10632         IL file.        
10633
10634 2002-10-01  Dick Porter  <dick@ximian.com>
10635
10636         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
10637         Only add the handle to the cleanup array when we're about to
10638         launch the thread.  Bug 31425 deadlocked when the test was run on
10639         mono under w32.
10640
10641 2002-10-01  Martin Baulig  <martin@gnome.org>
10642
10643         * debug-mono-symfile.c: Added support for properties.
10644
10645 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
10646
10647         * reflection.c: unaligned store fix from Mark Crichton
10648         <crichton@gimp.org>.
10649
10650 2002-09-27  Martin Baulig  <martin@gnome.org>
10651
10652         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
10653         New interncall.
10654
10655 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
10656
10657         * assembly.h, assembly.c: use a sane API to hook into the assembly
10658         loading process instead of a useless special-purpouse hack
10659         (ngen needs a hook, too, for example).
10660
10661 2002-09-27  Dick Porter  <dick@ximian.com>
10662
10663         * threads.c (mono_thread_init): Call GetCurrentProcess() so
10664         io-layer can set up some process handle info.  Not needed on w32,
10665         but doesn't hurt either.
10666
10667         * process.c: Pass the program name in the second parameter to
10668         CreateProcess, so the path is searched.  Include the working
10669         directory. Implemented process name, process enumeration, and some
10670         process detail internal calls.
10671         
10672         * icall.c: Added internal calls for process lookup, and some
10673         process details
10674
10675 2002-09-26  Martin Baulig  <martin@gnome.org>
10676
10677         * assembly.c (mono_install_open_assembly_hook): New global
10678         function to install a function to be invoked each time a new
10679         assembly is loaded.
10680         (mono_assembly_open): Run this callback function if set.
10681
10682         * debug-mono-symfile.c: Put back line numbers for the dynamic
10683         symbol file and also record the .il file as source file.  This
10684         allows us to install the temporary symbol file as `file.dbg' just
10685         like a compiler-generated one.
10686
10687 2002-09-26  Nick Zigarovich <nick@chemlab.org>
10688
10689         * Corrected typo in gc.c (BOHEM vs BOEHM).
10690
10691 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10692
10693         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
10694         GetProperties. Also avoid calling g_slist_length in GetProperties and
10695         GetMethods.
10696
10697 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
10698
10699         * reflection.c: avoid unaligned stores (bug spotted by
10700         Mark Crichton  <crichton@gimp.org>).
10701
10702 2002-09-25  Martin Baulig  <martin@gnome.org>
10703
10704         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
10705         instead of guint64 for addresses and added prologue/epilogue info.
10706
10707 2002-09-25  Martin Baulig  <martin@gnome.org>
10708
10709         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
10710         store line number info.  For the dynamic symbol file, we only need
10711         to provide the JIT generated dynamic line number info for the dynamic
10712         symbol file.
10713
10714 2002-09-25  Martin Baulig  <martin@gnome.org>
10715
10716         * debug-mono-symfile.h: Incremented version number.
10717
10718 2002-09-24  Martin Baulig  <martin@gnome.org>
10719
10720         * class.c (mono_debugger_class_init_func): New global function
10721         pointer variable.
10722         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
10723         call it.
10724
10725         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
10726         function.  This is called via the mono_debugger_class_init_func
10727         hook to add all types to the dynamic type table.
10728         (ves_icall_MonoDebugger_GetType): New interncall to get a class
10729         from its metadata token.
10730
10731         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
10732         New interncall for the debugger.
10733
10734 2002-09-24  Nick Drochak <ndrochak@gol.com>
10735
10736         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
10737         before using it in case it is null.
10738         
10739 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10740
10741         * metadata.c: allow custom modifiers in local var signatures
10742         (bug spotted by Zoltan Varga).
10743
10744 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
10745
10746         * class.c: deal with the <Module> class that may have a NULL vtable.
10747         Eliminate warnings.
10748
10749 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10750
10751         * image.c, image.h: more strong name helpers.
10752         * monosn.c: more work: convert pem keys to cryptoapi format.
10753
10754 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
10755
10756         * string-icalls.c: speedup IndexOf.
10757
10758 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10759
10760         * icall.c: updates from Zoltan.2.Varga@nokia.com.
10761
10762 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
10763
10764         * icall.c: cleanup: use mono_object_domain ().
10765
10766 2002-09-23  Martin Baulig  <martin@gnome.org>
10767
10768         * debug-mono-symfile.c: Improved type support.
10769
10770 2002-09-22  Martin Baulig  <martin@gnome.org>
10771
10772         * debug-mono-symfile.c: Added support for reference types and strings.
10773
10774 2002-09-22  Martin Baulig  <martin@gnome.org>
10775
10776         * debug-mono-symfile.c: Started to work on the type table.
10777
10778 2002-09-21  Martin Baulig  <martin@gnome.org>
10779
10780         * debug-mono-symfile.c: Largely reworked the symbol table format.
10781         The symbol table is now incrementally updated each time a new
10782         method is added.  We're now also using our own magic and version
10783         so that you don't need to recompile all your classes if the
10784         dynamic table changes.
10785         (mono_debug_update_mono_symbol_file): Removed.
10786         (mono_debug_symfile_add_method): New function to add a method.
10787
10788 2002-09-21  Martin Baulig  <martin@gnome.org>
10789
10790         * icall.c
10791         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
10792         New interncall.
10793
10794         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
10795         New interncall to get a method from its metadata token.
10796
10797 2002-09-21  Martin Baulig  <martin@gnome.org>
10798
10799         * debug-mono-symfile.c: Create type table.
10800
10801 2002-09-20  Martin Baulig  <martin@gnome.org>
10802
10803         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
10804
10805 2002-09-20  Martin Baulig  <martin@gnome.org>
10806
10807         * debug-mono-symfile.c: Provide information about params and locals.
10808
10809 2002-09-20  Martin Baulig  <martin@gnome.org>
10810
10811         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
10812         New interncall.
10813
10814         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
10815         interncall to get a method from its metadata token.
10816
10817 2002-09-20  Martin Baulig  <martin@gnome.org>
10818
10819         * debug-mono-symfile.c: Added a few checks for method->header
10820         being non-NULL.  This should never happen, but for the moment
10821         let's use a g_warning() rather than a g_assert().
10822
10823 2002-09-19  Mark Crichton  <crichton@gimp.org>
10824
10825         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
10826         even if support for it isn't present.  Added an #ifdef to fix this.
10827
10828         * socket-io.c: Added checks back for Solaris support.
10829
10830 2002-09-19  Martin Baulig  <martin@gnome.org>
10831
10832         * debug-mono-symfile.c (read_string, write_string): Reflect latest
10833         changes in the symbol file format.
10834
10835 2002-09-18  Martin Baulig  <martin@gnome.org>
10836
10837         * debug-mono-symfile.c: Set version number to 21.
10838
10839 2002-09-18  Dick Porter  <dick@ximian.com>
10840
10841         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
10842         on netbsd.  Fixes bug 30051.
10843
10844 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10845
10846         * reflection.c:
10847         (set_version_from_string): little fix.
10848
10849 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10850
10851         * monosn.c, Makefile.am: added strong name utility.
10852         * reflection.h, reflection.c: implemented delayed signing,
10853         locale, version and hash id assembly attributes.
10854
10855 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
10856
10857         * loader.c, metadata.c: load param attributes in signatures.
10858
10859 2002-09-16  Martin Baulig  <martin@gnome.org>
10860
10861         * debug-mono-symfile.c: Added string table with all method names.
10862
10863 2002-09-14  Martin Baulig  <martin@gnome.org>
10864
10865         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
10866         fast method lookup.
10867
10868 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10869
10870         * reflection.c: record the public key token of referenced assemblies.
10871
10872 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
10873
10874         * image.c, image.h: added functions to get the strong name and the
10875         public key of an assembly.
10876         * pedump.c: use them.
10877
10878 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
10879
10880         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
10881
10882 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
10883
10884         * marshal.c (mono_marshal_get_managed_wrapper): Added
10885         MONO_TYPE_BOOLEAN 
10886
10887 2002-09-11  Martin Baulig  <martin@gnome.org>
10888
10889         * gc.c: Call GC_unregister_disappearing_link() on all links when
10890         finalizing them, this is necessary to aviod a crash in boehm's
10891         finalize handler.
10892
10893 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
10894
10895         * gc.c: handle GetTarget for finalized objects spotted and fixed by
10896         nick@chemlab.org.
10897
10898 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
10899
10900         * icall.c: implemented MonoType::Module.
10901         * reflection.c, reflection.h: mono_module_get_object () from
10902         Tomi Pakarinen <tomi.pakarinen@welho.com>.
10903
10904 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
10905
10906         * icall.c: ignore overridden methods in GetMethods ().
10907         Fix for FieldInfo::SetValue().
10908         * object.c: handle float/double in runtime invoke.
10909
10910 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
10911
10912         * object.c: allow a constructor to be called again on an object.
10913
10914 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10915
10916         * class.h, class.c: move field layout code to it's own function and
10917         export it. Get an interface id earlier. Move fields in MonoClass
10918         so they are more cache friendly and align the bitfields.
10919         * loader.c: temporary handle get_param_names() for a runtime method.
10920         * reflection.c, reflection.h: more code to handle runtime creation of
10921         types.
10922
10923 2002-09-09  Martin Baulig  <martin@gnome.org>
10924
10925         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
10926         signature with the pinvoke field being set for the actual call.
10927
10928 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
10929
10930         * icall.c: removed some unused icalls. Start of map of glib charsets
10931         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
10932
10933 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
10934
10935         * debug-helpers.c: break infinite loop (found and fixed by
10936         Holger Arnold <harnold@gmx.de>).
10937
10938 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10939
10940         * icall.c: target may be null in create_delegate.
10941
10942 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10943
10944         * marshal.c: handle a boolean return type.
10945
10946 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10947
10948         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
10949
10950 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
10951
10952         * gc.c: fix weakreferences.
10953
10954 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
10955
10956         * icall.c: added icall to get default codepage.
10957
10958 2002-09-03  Dick Porter  <dick@ximian.com>
10959
10960         * threads.h: 
10961         * threads.c: Use MonoThread instead of MonoObject where
10962         apropriate.
10963
10964         Store running thread objects in a hash table, so that we have all
10965         the info to hand when waiting for them to finish
10966         (means we don't need OpenThread() any more, so mingw builds should
10967         be fully functional again.)
10968
10969         * verify.c:
10970         * object.h: Added thread ID to MonoThread
10971
10972 2002-09-03  Martin Baulig  <martin@gnome.org>
10973
10974         * icall.c (System.Reflection.Assembly::get_location): New interncall.
10975
10976 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10977
10978         * icall.c: fixed leak in get_temp_path. Thanks lupus.
10979
10980 2002-09-03  Martin Baulig  <martin@gnome.org>
10981
10982         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
10983         argument to store the end address of the disassembled instruction.
10984
10985         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
10986         here from debug-symfile.h.
10987         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
10988         JIT into this struct.
10989         (MonoSymbolFile): Added `char *image_file' field.
10990         (MonoDebugGetMethodFunc): Removed.
10991         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
10992         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
10993         (mono_debug_find_method): New method.
10994
10995         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
10996         create a full symbol file.
10997         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
10998         and static symbol files.
10999         (mono_debug_find_method): The symbol file keeps an internal method hash,
11000         call this to get a MonoDebugMethodInfo from a MonoMethod.
11001
11002         * debug-symfile.[ch]: Removed.
11003
11004 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
11005
11006         * image.c (do_mono_image_open): Remove linker version check.
11007
11008 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
11009
11010         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
11011         wrappers for instance methods.
11012         
11013 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11014
11015         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
11016
11017 2002-08-28  Dick Porter  <dick@ximian.com>
11018
11019         * Makefile.am: Export HOST_CC for w32 builds
11020
11021 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
11022
11023         * file-io.c process.c: MonoString are null terminated, no
11024         need for mono_string_to_utf16() anymore.
11025
11026 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11027
11028         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
11029
11030 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
11031
11032         * icall.c, reflection.h: speedup System.MonoType.
11033
11034 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
11035
11036         * reflection.c: allow null as the value of a string argument in
11037         custom attributes constructors.
11038
11039 2002-08-27  Martin Baulig  <martin@gnome.org>
11040
11041         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
11042         `trampoline_address' field.
11043
11044 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
11045
11046         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
11047         check (fixes bug #29486) 
11048
11049 2002-08-27  Martin Baulig  <martin@gnome.org>
11050
11051         * debug-mono-symfile.c: Changed the file format in a way that allows us
11052         open it read-only and to use a specially malloced area for all the
11053         dynamic data.  We can now also generate a symbol file on-the-fly if we're
11054         debugging IL code and there is no MCS generated symbol file for it.
11055
11056 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11057
11058         * object.c: added a define for a good string and array
11059         creation speedup (not enabled by default because we need to deal with
11060         the synch stuff).
11061
11062 2002-08-26  Martin Baulig  <martin@gnome.org>
11063
11064         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
11065         function to create a dynamic symbol file.  This is used by the
11066         debugger to create a symbol file for IL code on-the-fly.
11067
11068 2002-08-26  Martin Baulig  <martin@gnome.org>
11069
11070         * loader.c (mono_lookup_pinvoke_call): Include the error message
11071         from g_module_error() in the error message.
11072
11073 2002-08-24  Martin Baulig  <martin@gnome.org>
11074
11075         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
11076         function to update the symbol file.  The symbol file is mmap()ed
11077         writable, but private.  This allows us to install the symbol file
11078         together with the assembly.
11079
11080 2002-08-24  Martin Baulig  <martin@gnome.org>
11081
11082         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
11083         but they can read the new symbol file format which mcs is now creating.
11084
11085         * debug-symfile.c (mono_debug_find_source_location): Moved to
11086         debug-mono-symfile.c; this is now operating on the new symbol file.
11087
11088 2002-08-23  Martin Baulig  <martin@gnome.org>
11089
11090         * debug-helpers.c (mono_method_desc_from_method): New function to get
11091         a MonoMethodDesc from a MonoMethod.
11092
11093 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
11094
11095         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
11096         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
11097
11098 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11099
11100         * string-icalls.[ch]: make helper methods static.
11101
11102 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11103
11104         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
11105         types to it and to SetValueInternal.
11106
11107         * object.c: Moved handle_enum label to its proper place. This was the
11108         f... bug! ;-)
11109
11110         This time i compiled mcs and gtk-sharp and they both work.
11111
11112 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11113
11114         * icall.c: reverted partially my previous patch until 
11115         object.c:set_value handles enums correcly.
11116
11117 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11118
11119         * icall.c:
11120         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
11121         (ves_icall_System_Environment_get_MachineName): removed warning when
11122         compiling under cygwin.
11123
11124 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11125
11126         * object.c: fixed field_get_value() for reference types.
11127
11128 2002-08-22  Dick Porter  <dick@ximian.com>
11129
11130         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
11131         Don't free a buffer while it's still needed.  Patch from Jonathan
11132         Liger <Jonathan.liger@wanadoo.fr>
11133
11134 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
11135
11136         * icall.c (ves_icall_System_Environment_get_Platform): Add new
11137         internal call.
11138
11139 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
11140
11141         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
11142         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
11143
11144         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
11145         we call unmanaged code which throws exceptions.
11146
11147 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11148
11149         * appdomain.h: added per-domain entry_assembly.
11150         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
11151         arguments.
11152         * icall.c: Assembly::GetEntryAssembly icall.
11153         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
11154         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
11155
11156 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11157
11158         * appdomain.h, gc.c: added mono_domain_finalize ().
11159
11160 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11161
11162         * object.c:
11163         (mono_print_unhandled_exception): changed g_warning by g_printerr
11164         because g_log has a 1024 characters limit (yeah, i got a big stack
11165         trace). Don't print exception name, that should be in ToString 
11166         returned string.
11167
11168 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11169
11170         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
11171         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
11172
11173 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11174
11175         * object.c:
11176         (mono_print_unhandled_exception): after previous commit, i realized
11177         that MS calls ToString on the exception. I changed this function to
11178         do that. This way we get stack_trace for free.
11179
11180 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11181
11182         * object.c:
11183         (mono_print_unhandled_exception): invoke Message property instead of
11184         getting 'message' field from Exception. Don't allocate memory for
11185         'trace' and 'message' if not needed.
11186
11187 2002-08-18  Dick Porter  <dick@ximian.com>
11188
11189         * unicode.c: Fix asserts to match Encoder.cs checks
11190
11191 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11192
11193         * marshal.c: fix unaligned store issue and a few wrong
11194         opcode argument types.
11195
11196 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11197
11198         * icall.c: added GetUninitializedObjectInternal internal call.
11199
11200 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
11201
11202         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
11203         to the right domain.
11204
11205 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
11206
11207         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
11208
11209         * class.c (class_compute_field_layout): set blittable to false for Strings
11210
11211         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
11212
11213 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11214
11215         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
11216         first chunk of code to create types at runtime. Code to
11217         handle ReflectedType/DeclaringType. Make reflection handles
11218         domain specific.
11219
11220 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
11221
11222         * class.c: set correct name in arrays.
11223
11224 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
11225
11226         * appdomain.c (mono_domain_transfer_object): make it work with
11227         valuetypes. bug fixes.
11228
11229 2002-08-12  Dick Porter  <dick@ximian.com>
11230
11231         * object.h: Rename some parameters to avoid c++ keywords (Patch
11232         from Joseph Wenninger <kde@jowenn.at>)
11233
11234 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
11235
11236         * icall.c: added icall to implement Assembly.GetFile*.
11237
11238 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11239
11240         * reflection.h, reflection.c: code to embed managed resources.
11241
11242 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
11243
11244         * class.c: move all the type size stuff into
11245         class_compute_field_layout().
11246
11247 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11248
11249         * class.c: ensure enums have always the correct instance size.
11250         * unicode.c: remove wrong assert.
11251
11252 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11253
11254         * assembly.c: fix mem corruption issue.
11255         * image.h, image.c: added mono_image_get_resource () to access
11256         managed resources.
11257         * icall.c: implemented Assembly.EntryPoint property and some
11258         Managed Resources related internalcalls.
11259
11260
11261 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11262
11263         * image.c, image.h: impemented mono_image_get_entry_point ().
11264         * appdomain.c: use mono_image_get_entry_point.
11265
11266 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11267
11268         * reflection.c: support the object type argument when loading
11269         custom attributes.
11270
11271 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
11272
11273         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
11274         String as return type.
11275
11276 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
11277
11278         * reflection.c: fix encoding of named args for custom attrs to match
11279         the ms implementation. Read them back when instantiating custom
11280         attributes.
11281
11282 2002-08-02  Radek Doulik  <rodo@ximian.com>
11283
11284         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
11285         by Dietmar as quick fix
11286         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
11287         16 as stack size, used on more places as quick fix before Dietmar
11288         will fix it properly
11289
11290 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11291
11292         * object.h, object.c: added accessors for fields and properties.
11293
11294 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11295
11296         * class.c, class.h: made mono_class_get_field_from_name ()
11297         loop on parent types.
11298         Added mono_class_get_property_from_name ().
11299
11300 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11301
11302         * class.c, class.h: move the code to setup the type vtable in its own
11303         function so that it can be reused also for types created at runtime.
11304         Eliminate the "class" identifier from the header file.
11305         * reflection.c: setup the vtable for enums so that we can create
11306         objects for use in SetConstant ().
11307
11308 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
11309
11310         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
11311         instead of the delegate itself as this pointer (bug #28383)
11312
11313 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
11314
11315         * marshal.c (mono_marshal_get_managed_wrapper): added return type
11316         conversions.
11317
11318 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11319
11320         * loader.c: don't set the pinvoke bit on icalls.
11321
11322 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
11323
11324         * debug-helpers.c (mono_method_full_name): only print a number to
11325         indicate wrapper type (so that the output is more readable in traces).
11326
11327 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
11328
11329         * class.c (mono_class_init): include method override patch from Paolo
11330
11331 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
11332
11333         * icall.c: fixed GetTypeCode().
11334
11335 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
11336
11337         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
11338         use real delegate invoke function to make it work with multicast
11339         delegates (fix bug# 28291).
11340
11341 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11342
11343         * object.c: load constant strings.
11344
11345 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11346
11347         * reflection.c: no magic numbers.
11348         * tabledefs.h: security action enum.
11349
11350 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11351
11352         * assembly.c: fix possible memory corruption.
11353
11354 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11355
11356         * reflection.h, reflection.c: added support for linking resources.
11357         * verify.c: check we have an updated corlib.
11358
11359 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
11360
11361         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
11362         string arrays.
11363         (mono_marshal_string_array): null terminate unmanaged string arrays.
11364         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
11365
11366 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11367
11368         * icall.c: Type.GetType () can now return also types from the
11369         calling assembly.
11370
11371 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11372
11373         * loader.h, loader.c: stack walking support.
11374         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
11375         GetCallingAssembly.
11376
11377 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
11378
11379         * marshal.c: added optimisations for blittable types 
11380
11381         * class.c (mono_array_class_get): do not set blittable attribute on arrays
11382         (mono_class_setup_mono_type): set blittable attribute for single
11383         and double.
11384
11385         * marshal.c (mono_string_utf8_to_builder): impl.
11386         (mono_string_builder_to_utf8): impl.
11387         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
11388
11389 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
11390
11391         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
11392         (mono_marshal_get_managed_wrapper): impl. byref types
11393
11394 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11395
11396         * icall.c:
11397         (search_method): don't display debug message. 
11398
11399 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
11400
11401         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
11402
11403 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11404
11405         * appdomain.c: set the missing filename when throwing exception.
11406
11407 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
11408
11409         * metadata.c (mono_type_size): code cleanup
11410         (mono_type_stack_size): removed some test code
11411
11412 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
11413
11414         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
11415         mono_get_exception_file_not_found now.
11416
11417         * exception.c (mono_exception_from_name_two_strings): New version
11418         that will call a constructor with two string arguments. 
11419         (mono_get_exception_file_not_found): New helper routine, used to
11420         report file-not-found errors.
11421
11422 2002-07-20  Dick Porter  <dick@ximian.com>
11423
11424         * process.h:
11425         * process.c: Pass file handles to CreateProcess
11426         
11427         * icall.c:
11428         * file-io.h:
11429         * file-io.c: Implemented CreatePipe
11430
11431 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
11432
11433         * metadata.c (mono_get_param_info): set alignment for value types
11434
11435 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11436
11437         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
11438         Constify mono_domain_assembly_open().
11439         * loader.c: handle null namespace in icalls.
11440
11441 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
11442
11443         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
11444         (emit_str_to_ptr_conv): marshal object as structs
11445
11446         * metadata.c (mono_type_to_unmanaged): marshal object as structs
11447
11448         * marshal.c (mono_marshal_get_runtime_invoke): support value types
11449
11450 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
11451
11452         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
11453         (mono_marshal_get_native_wrapper): we an now return value types
11454
11455 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11456
11457         * verify.c: more checks implemented.
11458
11459 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
11460
11461         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
11462         (fix bug #27695)
11463         (mono_marshal_get_native_wrapper): allow byref arguments
11464         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
11465         impl. PtrToStringXXX methods
11466         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
11467         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
11468         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
11469         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
11470         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
11471
11472 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11473
11474         * reflection.c: fix buglet in parsing an assembly name.
11475
11476 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
11477
11478         * marshal.c (emit_ptr_to_str_conv): first impl.
11479
11480 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11481
11482         * object.c, class.h: cache the vtable in the class as suggested by
11483         vargaz@freemail.hu (Zoltan Varga).
11484
11485 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11486
11487         * class.h, loader.c: added mono_field_from_token().
11488         * verify.c: first cut of type checking code.
11489
11490 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
11491
11492         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
11493
11494 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
11495
11496         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
11497         (fix bug #27782)
11498         (mono_marshal_get_remoting_invoke): impl.
11499         (mono_delegate_begin_invoke): impl.
11500         (mono_mb_emit_save_args): impl.
11501         (mono_delegate_end_invoke): impl.
11502         (mono_marshal_get_delegate_begin_invoke):
11503         (mono_marshal_get_delegate_end_invoke):
11504         (mono_marshal_get_delegate_invoke): generate a special name for
11505         those methods (including the signature) and associate them whith
11506         the delegate class. 
11507
11508 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
11509
11510         * reflection.[ch]: 
11511         (mono_reflection_type_from_name): now it has a MonoImage parameter
11512         which is used as the default image to search the type in. If the image
11513         is NULL or getting the type from it fails, it defaults to corlib.
11514
11515         * icall.c: changed 1 call to mono_reflection_type_from_name to match
11516         new parameter.
11517
11518 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11519
11520         * reflection.c: update the parameter table index.
11521
11522 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11523
11524         * domain.c: don't include the mark byte in the string hash.
11525
11526 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11527
11528         * icall.cs: icall for Type.GetTypeCode ().
11529         * verify: a couple of fixes and disabled local initialization checks.
11530
11531 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
11532
11533         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
11534
11535         * debug-helpers.c (mono_method_full_name): print the type of the
11536         runtime wrapper
11537
11538         * metadata.c (mono_signature_hash): a hash function for signatures
11539         (mono_signature_hash): better hash algorithm
11540
11541         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
11542
11543         * debug-helpers.c (mono_method_full_name): this can now generate
11544         method names with signatures
11545
11546         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
11547         method dont have this pointers.
11548
11549 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
11550
11551         * reflection.c: fixup typebuilder tokens.
11552         * image.c: fix buglet.
11553         * marshal.h: remove whitespace.
11554         * metadata.h, metadata.c: reinstate code that was removed.
11555         * verify.c: handle catch directives and fix another couple of bugs.
11556
11557 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
11558
11559         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
11560         (mono_marshal_get_native_wrapper): make it comp. with the old code
11561         (mono_marshal_get_native_wrapper): support boolean
11562         (mono_marshal_get_managed_wrapper): support more types
11563
11564 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
11565
11566         * class.c (class_compute_field_layout): compute class->blittable attribute.
11567
11568 2002-07-09  Dick Porter  <dick@ximian.com>
11569
11570         * threads.c: Make the thread cleaning up cope with threads that
11571         call ExitThread()
11572
11573 2002-07-08  Radek Doulik  <rodo@ximian.com>
11574
11575         * reflection.c (method_encode_code): use non-translated values to
11576         compute finally_start, this fixes exception handling on ppc, yay!
11577
11578         * decimal.h (struct signscale): fix endianess
11579
11580 2002-07-07  Radek Doulik  <rodo@ximian.com>
11581
11582         * reflection.c: swap box_val and not val
11583
11584 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
11585
11586         * reflection.c, reflection.h: handle full assembly info in type name.
11587         Handle Type arguments when loading custom attributes.
11588         * icall.c: updated to use new mono_reflection_type_from_name () method.
11589
11590 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11591
11592         * loader.c:
11593         (method_from_memberref): also print assembly name when method not found.
11594
11595 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11596
11597         * icall.c:
11598         (ves_icall_TypeGetProperties): fixed bug #27473. 
11599
11600 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11601
11602         * reflection.c: display image name and token when cannot find the
11603         .ctor for an attribute.
11604
11605 2002-07-05  Martin Baulig  <martin@gnome.org>
11606
11607         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11608
11609 2002-07-04  Dick Porter  <dick@ximian.com>
11610
11611         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
11612         compile on mingw.  This will cause mingw builds to not wait for
11613         subthreads to terminate after the main thread does.  I've lodged a
11614         bug with the mingw developers for them to wrap OpenThread().
11615
11616 2002-07-03  Dick Porter  <dick@ximian.com>
11617
11618         * threads.c: Store thread IDs instead of handles, because
11619         GetCurrentThread() returns a pseudohandle and therefore stores
11620         useless values.  mono_thread_cleanup() continues checking the
11621         array of threads until it is empty, to cope with subthreads
11622         spawning new threads after the main thread has finished.
11623
11624         * profiler.h:
11625         * profiler.c:
11626         * profiler-private.h: Pass the thread ID to thread profiler
11627         functions, instead of a handle
11628
11629 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11630
11631         * verify.c: fixes to make it more usable.
11632         * pedump.c: added --verify code to verify IL code in an assembly.
11633
11634 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11635
11636         * reflection.c: turn errors into warnings to allow compiling corlib.
11637
11638 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
11639
11640         * reflection.c: add special cases to compile corlib.
11641
11642 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11643
11644         * reflection.c: handle properties with only a set method.
11645
11646 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11647
11648         * opcodes.h: add enum with opcodes in opval order.
11649
11650 2002-07-01  Dick Porter  <dick@ximian.com>
11651         
11652         * object.h:
11653         * object.c (mono_runtime_run_main): Removed unneeded argument
11654
11655 2002-06-28  Martin Baulig  <martin@gnome.org>
11656
11657         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11658
11659 2002-06-27  Dick Porter  <dick@ximian.com>
11660
11661         * threads.c: Store the handle in both the parent thread and in the
11662         subthread, to minimise the time between starting a new thread and
11663         storing its ID.
11664
11665 2002-06-26  Dick Porter  <dick@ximian.com>
11666
11667         * appdomain.c (mono_runtime_cleanup): Close the socket library
11668         after all the threads have finished, not before
11669
11670 2002-06-26  Martin Baulig  <martin@gnome.org>
11671
11672         * debug-symfile.c (mono_debug_find_source_location): Added
11673         `guint32 *line_number' argument.  If it's not NULL, store the line number
11674         there and return the file name without the line number.
11675
11676 2002-06-25  Dick Porter  <dick@ximian.com>
11677
11678         * icall.c:
11679         * process.h:
11680         * process.c: Process forking and other support functions
11681
11682 2002-06-25  Dick Porter  <dick@ximian.com>
11683
11684         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
11685         things dont happen when the image is closed.
11686         (mono_image_lookup_resource): Walk the resource section looking
11687         for a particular entry
11688
11689         * cil-coff.h: PE resource section decoding
11690
11691 2002-06-25  Dick Porter  <dick@ximian.com>
11692         
11693         * assembly.h:
11694         * assembly.c: 
11695         (mono_assembly_foreach): Accessor functions to walk the list of
11696         loaded assemblies
11697         (mono_assembly_set_main):
11698         (mono_assembly_get_main): Process methods need to know which
11699         assembly is the "main" one
11700
11701         * object.c (mono_runtime_run_main): Record the main assembly
11702
11703         * debug-helpers.c: Fix typo
11704
11705 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
11706
11707         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
11708         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
11709
11710 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11711
11712         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
11713
11714 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
11715
11716         * image.c (do_mono_image_open): Initialize reference count,
11717         otherwise we leak the MonoImage.
11718
11719 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11720
11721         * reflection.c: small tweak to handle self-hosting.
11722
11723 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
11724
11725         * reflection.c: fix type name parse code.
11726
11727 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11728
11729         * reflection.c: break out of the loop.
11730         * image.c: special case corlib.
11731
11732 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11733
11734         * reflection.c: add all the custom attrs at the end to ensure the
11735         ctors have been properly initialized when the attributes are defined
11736         in the current assembly.
11737
11738 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11739
11740         * reflection.c: handle correctly multiple-nested types.
11741
11742 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
11743
11744         * row-indexes.h: fix typos.
11745         * reflection.c: adjust for typos and fix method_def_or_ref
11746         encoding in MethodImpl table.
11747
11748 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11749
11750         * reflection.c: fix entry point patching (thanks Serge!).
11751
11752 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
11753
11754         * verify.c: add check for System.Exception
11755
11756 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11757
11758         * image.c, class.c: minifix for code just c&p'ed.
11759         * reflection.c: warning fix.
11760         * object.h, loader.h, domain.c: load also StringBuilder.
11761
11762 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11763
11764         * marshal.h, marshal.c: some support code to handle complex marshaling.
11765
11766 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11767
11768         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
11769         Better signatures with vtable error dump.
11770
11771 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
11772
11773         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
11774
11775 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
11776
11777         * icall.c (ves_icall_Type_GetField): impl.
11778
11779 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11780
11781         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
11782         to retrieve a marshal description blob for a field or param.
11783
11784 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11785
11786         * reflection.h, reflection.c: change order of nested type emission
11787         to avoid table corruption. The NestedTypes table is sorted.
11788         * icall.c: change order of GetConstructor results to workaround mcs bug.
11789
11790 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11791
11792         * reflection.h, reflection.c: handle field and param marshal
11793         information.
11794
11795 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11796
11797         * icall.c, marshal.c marshal.h: more Marshal class implementation.
11798
11799 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11800
11801         * reflection.c: fix call convention.
11802
11803 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11804
11805         * reflection.h, reflection.c: mono_image_get_memberref_token()
11806         takes a type instead of a class, now. Added
11807         mono_image_get_array_token() to create tokens for the special
11808         multi-dim array methods.
11809
11810 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
11811
11812         * assembly.c: handle modules (no assembly table). Split
11813         loading references in its own function.
11814         * class.c: handle moduleref resolution scope.
11815         * image.c, image.h: cache module name in image.
11816
11817 2002-06-07  Martin Baulig  <martin@gnome.org>
11818
11819         * reflection.c (mono_image_get_type_info): Only add a class layout entry
11820         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
11821
11822 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11823
11824         * icall.c: more signature fixes that used uint instead of int.
11825
11826 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11827
11828         * reflection.c: fixed signature of field refs.
11829
11830 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11831
11832         * class.c, reflection.c: handle typerefs of nested types
11833         (both on read and when writing files).
11834
11835 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
11836
11837         * icall.c: fix method signatures that tried to workaround the previous
11838         typo, d'oh!
11839
11840 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11841
11842         * debug-helpers.c: fix typo.
11843
11844 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11845
11846         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
11847         rewrote the PE/COFF writing code (our programs are understood by the
11848         ms runtime, now).
11849
11850 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11851
11852         * gc.c, gc.h, icall.c: weakreference support.
11853
11854 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11855
11856         * Makefile.am, mono-config.c: use $(sysconfdir).
11857
11858 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11859
11860         * icall.c: changed default precision of Double.ToString() to 15.
11861         Fixed memory leak. Unified with Single.ToString.
11862
11863 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11864
11865         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
11866
11867 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
11868
11869         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
11870         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
11871         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
11872         and myself.
11873
11874 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11875
11876         * debug-symfile.c, sysmath.c: yet more compilation fixes.
11877
11878 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11879
11880         * reflection.c, socket-io.c: more compilation fixes.
11881
11882 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11883
11884         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
11885         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
11886         unicode.c: warning and compiler compatibility fixes.
11887
11888 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
11889
11890         * class.h, metadata.c: fixed warnings/compilation errors.
11891
11892 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11893
11894         * Makefile.am, mono-config.c, mono-config.h: configuration file
11895         support routines.
11896         * loader.c, loader.h: make Dll mapping configurable at runtime in the
11897         config file. Export methods to insert and lookup mappings.
11898
11899 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11900
11901         * reflection.c: handle types and boxed objects in custom attr
11902         constructors.
11903
11904 2002-05-30  Martin Baulig  <martin@gnome.org>
11905
11906         * debug-symfile.c
11907         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
11908
11909 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
11910
11911         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
11912         to lookup the implmap row for a P/Invoke method.
11913         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
11914         P/Invoke method from the runtime on an as needed basis.
11915
11916 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
11917
11918         * metadata.c (mono_metadata_parse_signature): impl.
11919
11920 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11921
11922         * class.c: handle .pack directive.
11923
11924 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
11925
11926         * object.c: initialize static fields with RVA data.
11927
11928 2002-05-25  Martin Baulig  <martin@gnome.org>
11929
11930         * debug-symfile.c
11931         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
11932
11933 2002-05-24  Martin Baulig  <martin@gnome.org>
11934
11935         * debug-symfile.c
11936         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
11937         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
11938         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
11939
11940 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11941
11942         * object.c: special case string ctros in invoke.
11943         * gc.c: silly whitespace changes.
11944
11945 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
11946
11947         * threadpool.[ch]: impl. a threadpool that can
11948         be used by mint and mono.
11949
11950 2002-05-22  Martin Baulig  <martin@gnome.org>
11951
11952         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
11953         The first argument is now a `MonoReflectionModuleBuilder *', the return
11954         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
11955         `methods' field to get the method builder.  The `token' argument is the
11956         unfixed token.
11957
11958         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
11959         invalid characters instead of g_assert_not_reached()ing.  This seems
11960         to be the behaviour of mscorlib.
11961
11962 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
11963
11964         * object.c (mono_runtime_invoke_array): applied patch from Rachel
11965         Hestilow to fix bug #25104
11966
11967 2002-05-21  Martin Baulig  <martin@gnome.org>
11968
11969         * debug-symfile.c (mono_debug_find_source_location): New function.
11970         Looks up an IL offset in the line number table and returns the source
11971         location as a string.
11972
11973 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11974
11975         * icall.c:
11976         (mono_double_ToStringImpl): changed %f by %g until we have something
11977         better.
11978
11979 2002-05-21  Nick Drochak  <ndrochak@gol.com>
11980
11981         * icall.c : Use different name for Math.Pow's icall.  Needed to check
11982         parameters first in C#.
11983
11984 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11985
11986         * icall.c, reflection.h: added icall to get info about an event.
11987
11988 2002-05-20  Radek Doulik  <rodo@ximian.com>
11989
11990         * object.c (mono_value_box): don't use memcpy for boxing on BIG
11991         endian
11992         (mono_value_box): don't use memcpy for small sizes on
11993         architectures with unaligned access
11994
11995 2002-05-20  Martin Baulig  <martin@gnome.org>
11996
11997         * reflection.c (mono_reflection_setup_internal_class): Don't crash
11998         if `tb->parent == NULL'.
11999         (mono_reflection_create_internal_class): New function.  This is
12000         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
12001         for enum types.
12002
12003         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
12004         New interncall.
12005
12006 2002-05-19  Martin Baulig  <martin@gnome.org>
12007
12008         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
12009         argument to get the length, don't default to the array length.
12010
12011 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
12012
12013         * assembly.c (mono_assembly_setrootdir): New function used to
12014         override the MONO_ASSEMBLIES directory.
12015
12016 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12017
12018         * icall.c: ValueType_GetHashCode() initialize local var.
12019
12020 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
12021
12022         * reflection.c: sort custom attributes table.
12023
12024 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12025
12026         * reflection.c: support named args in custom attributes (write support).
12027
12028 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
12029
12030         * reflection.c: fix finally position calculation.
12031
12032 2002-05-15  Radek Doulik  <rodo@ximian.com>
12033
12034         * reflection.c: fixed endianess at many places
12035
12036         * icall.c (ves_icall_InitializeArray): comment out debug msg
12037
12038 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
12039
12040         * object.c (mono_unhandled_exception): new function to handle
12041         unhandled exceptions.
12042         (mono_unhandled_exception): call the UnhandledException event.
12043         (mono_runtime_delegate_invoke): impl.
12044
12045 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
12046
12047         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
12048         returns the RVA, not the direct pointer to the data. Handle the case
12049         when the class size is fixed.
12050
12051 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
12052
12053         * reflection.c: fix some endianess issues.
12054
12055 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
12056
12057         * object.c (mono_runtime_invoke): is now able to catch exceptions.
12058
12059         * threads.c (mono_thread_init): added a callback which is invoked
12060         at thread start.
12061
12062 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
12063         
12064         * icall.c: make GetHashCode return non-negative values.
12065
12066 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
12067
12068         * object.c, icall.c, gc.c: revert to address-based hashcode.
12069
12070 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
12071
12072         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
12073
12074 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12075
12076         * icall.c, class.c: special case <Module>.
12077
12078 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
12079
12080         * icall.c: fix bug in GetNow().
12081
12082 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
12083
12084         * object.c (mono_runtime_class_init): make sure that we call all
12085         static class constructors.
12086
12087 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12088
12089         * reflection.c: sort methodsemantics table.
12090
12091 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12092
12093         * reflection.h, reflection.c: honour init locals setting.
12094
12095 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
12096
12097         * icall.c: copied Double ToStringImpl for Single ToStringImpl
12098
12099 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12100
12101         * reflection.c: support ContructorBuilders in attribute blob creation.
12102
12103 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12104
12105         * reflection.c: some changes to build a binary that can be run
12106         directly in windows.
12107
12108 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12109
12110         * loader.c: print a big message when an icall can't be found.
12111
12112 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12113
12114         * string-icalls.c: fix bug 24248.
12115
12116 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
12117
12118         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
12119         icall.c, reflection.h: separate assembly loading by pathname and by
12120         assembly name. Use the MONO_PATH env var to search for assemblies.
12121
12122 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12123
12124         * assembly.c, image.h: add some support for assemblies
12125         with multiple modules.
12126         * class.c, class.h: export mono_class_from_typeref().
12127         * loader.c: remove duplicated code and use mono_class_from_typeref(),
12128         instead.
12129
12130 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12131
12132         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
12133         documentation says (the ECMA one is correct).
12134
12135 2002-05-02  Dick Porter  <dick@ximian.com>
12136
12137         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
12138         Don't name the synchronisation mutex.
12139
12140 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
12141
12142         * rand.c
12143         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
12144         Make the prototypes match.
12145         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
12146         Same.
12147
12148         * icall.c
12149         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
12150         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
12151         all systems have tm.tm_zone, so use strftime() with %Z to print
12152         the timezone abreviation into a temp string.
12153
12154         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
12155         rather than mono_array_addr() on a MonoString on Big Endian
12156         machines.
12157
12158 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
12159
12160         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
12161         fix bug 24041
12162
12163 2002-04-30  Dick Porter  <dick@ximian.com>
12164
12165         * socket-io.c: Cope with SOCKET being an integer rather than a
12166         pointer now.
12167
12168         * threads.c: Added Thread_free_internal, to deal with thread
12169         handle cleanup.  Moved calls to handle_store() and handle_remove()
12170         to start_wrapper(), so each can only be called once.  Allocate
12171         synchronisation blocks with GC_malloc(), and use GC finalisation
12172         to close the handles.
12173
12174         * icall.c: added System.Threading.Thread::Thread_free_internal
12175
12176 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12177
12178         * icall.c: support Environment.Exit, CommandLineArgs().
12179
12180 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
12181
12182         * object.c, object.h: added mono_runtime_run_main () and
12183         mono_runtime_get_main_args () for use in System.Environment.
12184
12185 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12186
12187         * gc.c: fix thinko, enable actual finalization since the jit is now
12188         fixed.
12189
12190 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12191
12192         * gc.c, object.c: take into account that an object may be offset wrt the address
12193         returned by GC_malloc().
12194
12195 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12196
12197         * image.c: handle files without entries in the assembly table (modules).
12198
12199 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
12200
12201         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
12202         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
12203         allowed to be null when it's System.Object class setup.
12204
12205 2002-04-27  Martin Baulig  <martin@gnome.org>
12206
12207         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
12208         if `tb->parent == NULL' rather than crashing.
12209
12210 2002-04-28  Nick Drochak  <ndrochak@gol.com>
12211
12212         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
12213         calling acos() where asin() should have been called.
12214
12215 2002-04-26  Martin Baulig  <martin@gnome.org>
12216
12217         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
12218         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
12219         there's a subdirectory called `System', but we don't want to read that
12220         subdirectory as an assembly.
12221
12222 2002-04-25  Martin Baulig  <martin@gnome.org>
12223
12224         * debug-symfile.c: Reflect latest MonoString changes.
12225
12226 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12227
12228         * rand.c, rand.h: instance method icalls need to have an explicit
12229         this pointer as first argument in the C implementation.
12230
12231 2002-04-25  Nick Drochak <ndrochak@gol.com>
12232
12233         * icall.c: Fix typo in map for GetNonZeroBytes
12234
12235 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
12236
12237         * string-icalls.c : String does now passes unit tests without any 
12238         errors, the following changes has been made:
12239         
12240         Implemented replace methods.
12241         Renaming of methods to (try) follow the standard.
12242         Fixed compare ordinal
12243         Made all memory allocated directly to function instead of via icall function.
12244         Small performance fix in is_in_array function
12245                         
12246  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
12247
12248         c (mono_string_Internal_ctor_charp_int_int):
12249         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
12250         sindex < 0, throw ArgumentOutOfRangeException instead of
12251         ArgumentNullException.
12252
12253         Added new check for length == 0, however
12254         I need to make it return String.Empty from the C code.
12255         
12256         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
12257         that calculate the length for us here.
12258         
12259         (mono_string_Internal_ctor_sbytep_int_int): Replaced
12260         mono_string_new_utf16 with mono_string_new, since value is utf8.
12261
12262 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12263
12264         * object.c: register the object for finalization if needed.
12265         Allocate one more char in the string for the terminating 0 char.
12266
12267 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12268
12269         * class.c, class.h, image.c: check if a type implemenst a destructor.
12270         Use the proper key for array class lookups.
12271         * icall.c: register the icalls in the System.GC class.
12272         * gc.c, gc.h: GC-related functions and icalls.
12273
12274 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12275
12276         * icall.c:
12277         * socket-io.c:
12278         * unicode.c: free some strings gotten from mono_string_to_utf8 and
12279         changed a couple of free () by g_free ().
12280
12281         * decimal.c: one-liner in the comments for decimal2string ().
12282
12283 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
12284
12285         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
12286
12287 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
12288
12289         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
12290         * object.c (mono_runtime_invoke_array) : handle null in params
12291
12292 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
12293
12294         * string-icalls.c: fixed bug in split (one off bug)
12295
12296 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
12297
12298         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
12299         * icalls.c: added String::Equals as internal method
12300
12301 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
12302
12303         * threads.c: fixed bug in the double interlocked functions
12304
12305 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
12306
12307         * threads.c: implemented all of the new interlocked icalls.
12308         * string-icalls.c: fix a bug in insert.
12309         * icalls.c: added the icalls for interlocked, removed old string functions.
12310         
12311 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12312
12313         * loader.c: fix off-by-one error when reading argument names.
12314
12315 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12316
12317         * profiler.c: win32 counter implementation (untested).
12318         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
12319         (the latter needs testing and more complete impl. from win32 folks).
12320
12321 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
12322
12323         * object.c: mono_array_new_full workaround mono_array_class_get
12324         problem.
12325
12326 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12327
12328         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
12329         * object.h (mono_string_chars): Changed casting type.
12330
12331 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12332
12333         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
12334                            method signatures to use gunichar2 instead of gint16.
12335
12336 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
12337
12338         * object.h, object.c: domain-specific versions of mono_object_new and
12339         mono_array_new.
12340
12341 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
12342
12343         * object.c: changed String layout
12344
12345         * string-icalls.c (mono_string_Internal_ctor_chara): added
12346         internal string constructors.
12347
12348 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
12349
12350         * threads.c: pass 'this' to the thread start routine.
12351
12352 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12353
12354         * string-icalls.c: fix IndexOf and LastIndexOf. Now
12355         InternalCompareStr don't call twice mono_string_cmp_char for the last
12356         character. Improved performance in mono_string_cmp_char.
12357
12358 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12359
12360         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
12361         code into its own library: libmonoruntime.
12362
12363 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
12364
12365         * object.h, object.c: changed array format so that szarrays do not
12366         require a bounds structure.
12367         * icall.c, appdomain.c: support for new szarray format.
12368
12369 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12370
12371         * metadata.c: compare also the retuns type when comparing signatures:
12372         we didn't do this as an optimization since really overloaded methods
12373         must differ also in the arguments, but this doesn't work with
12374         low-level IL code (or when using explicit conversion operators: see
12375         bug#23498 for an example).
12376
12377 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12378
12379         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
12380
12381 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
12382
12383         * icall.c: make MonoType::GetElementType its own icall.
12384
12385 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12386
12387         * icall.c: remove MonoMethod_get_Name().
12388         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
12389         object.
12390
12391 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12392
12393         * string-icalls.c: optimized a few methods.
12394
12395 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12396
12397         * icall.c: added all new string internal calls
12398         * string-icalls.c: added, new string internal call implementation.
12399         * object.c: added mono_string_new_size for allocating a string a size
12400
12401 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
12402
12403         * object.c (mono_object_isinst): use the same code as in the
12404         optimized x86 version.
12405
12406 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12407
12408         * profiler.c: TSC-based timer code (faster and more accurate).
12409         Not hooked up in configure, yet (set USE_X86TSC to 1).
12410
12411 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
12412
12413         * profiler.c, profiler.h: track time spent compiling methods.
12414         * threads.c: track thread creation/destruction.
12415
12416 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
12417
12418         * profiler.c, profiler.h, profiler-private.h: profiling interface
12419         and sample implementation. Moved here so that it can be used also by
12420         the jit.
12421
12422 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
12423
12424         * reflection.c, reflection.h: keep types and other handles separate in
12425         the hash tables for referred tokens. Add guid for modules.
12426
12427 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
12428
12429         * assembly.c: fix bugs found with valgrind.
12430         * metadata.h, metadata.c: added mono_metadata_guid_heap().
12431
12432 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
12433
12434         * threads: added icall support for getting current domain for
12435                    the thread.
12436  
12437 2002-04-13  Martin Baulig  <martin@gnome.org>
12438
12439         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
12440         (MonoDebugVarInfo): Added `index' field for register based addresses.
12441         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
12442         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
12443         `MonoDebugVarInfo *params' and `guint32 this_offset' with
12444         `MonoDebugVarInfo *this_var'.
12445
12446         * debug-symfile.c (relocate_variable): New static function to write
12447         a location description for a local variable or method parameter.
12448
12449 2002-04-12  Martin Baulig  <martin@gnome.org>
12450
12451         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
12452         stack offset and begin/end scope address of a local variable.
12453         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
12454         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
12455         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
12456
12457         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
12458         Added new relocation types for start/end scope of a local variable.
12459
12460 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12461
12462         * object.h: add mono_object_domain() macro.
12463         * reflection.c: handle typespecs.
12464         * icall.c: MonoMethod::get_Name() implementation.
12465
12466 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12467
12468         * icall.c: String::GetHashCode() icall implementation.
12469
12470 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12471
12472         * icall.c: String::IndexOfAny icall.
12473         * object.c, object.h: make array->max_length more useful.
12474         Intrduced mono_object_class() and mono_string_length() macros.
12475
12476 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12477
12478         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
12479         instead of g_unichar_isdigit.
12480
12481 2002-04-11  Nick Drochak  <ndrochak@gol.com>
12482
12483         * icall.c: Implement a simple Double.ToString().
12484
12485 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12486
12487         * appdomain.h: only io-layer.h is supposed to be included.
12488         * icall.c: explicitly import environ. Fix warning.
12489
12490 2002-04-10  Nick Drochak  <ndrochak@gol.com>
12491
12492         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
12493                 return true even if it's not Daylight Savings time.
12494                 Only return false for the case where the function isn't
12495                 implemented for a plaform (read Windows).
12496
12497 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12498
12499         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
12500         data with a mutex.
12501
12502 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
12503
12504         * mempool.c (mono_mempool_alloc): only use g_malloc when
12505         absolutely necessary.
12506
12507 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
12508
12509         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
12510
12511         * class.c (mono_class_vtable): use domain mempool to allocate vtable
12512         (mono_class_proxy_vtable): use domain mempool
12513
12514 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
12515
12516         * appdomain.h, appdomain.c: split initialization that requires the
12517         execution engine support into mono_runtime_init().
12518
12519 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
12520
12521         * class.c (mono_class_init): don't include vtable inside MonoClass
12522         to save some memory, gather some statistics.
12523         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
12524
12525 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12526
12527         * icall.c: internalcall implementation for ValueType.Equals().
12528
12529 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
12530
12531         * object.c (mono_message_init): moved 
12532         (mono_runtime_exec_main): new arch. independent impl.
12533         (mono_runtime_invoke_array): new method - like
12534         mono_runtime_invoke, but you can pass an array of objects.
12535         (mono_remoting_invoke): new arch. independent impl.
12536         (mono_message_invoke): new arch. independent impl.
12537         (mono_runtime_class_init): new arch. independent impl.
12538         (mono_runtime_object_init): new arch. independent impl.
12539
12540 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12541
12542         * metadata.c, object.c, reflection.c: documented the exported
12543         functions.
12544
12545 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12546
12547         * icall.c: simpler code to pass the assembly builder data to corlib.
12548         Implement GetNestedTypes() internalcall.
12549
12550 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12551
12552         * class.c: warn if a type can't be loaded.
12553
12554 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
12555
12556         * image.h: typedef MonoImageOpenStatus
12557         * types.h: removed unused file
12558         
12559 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
12560
12561         * icall.c: Enum_ToObject accepts enum value arguments.
12562
12563 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
12564
12565         * class.c: move initialization of properties, events and nested
12566         classes, so that they happen for interfaces, too.
12567
12568 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
12569
12570         * icall.c: cleanup some ugly casts in Array_SetValue*.
12571
12572 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12573
12574         * icall.c: the values array fro enums is of the correct type, now.
12575         Implement (correctly) getFullName instead of assQualifiedName for
12576         MonoType.
12577         * reflection.h, reflection.c: added mono_type_get_name ().
12578
12579 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
12580
12581         * assembly.c, image.h: for each MonoImage, record from wich assembly
12582         it was loaded.
12583         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
12584         Make Type.Assembly work.
12585
12586 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
12587
12588         * debug-symfile.h: use char* instead of gpointer to avoid
12589         unnecessary casts.
12590
12591         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
12592
12593         * icall.c (ves_icall_InternalExecute): impl. FielSetter
12594         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
12595
12596 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
12597
12598         * icall.c (mono_message_init): impl. (code cleanup)
12599         (ves_icall_InternalExecute): impl. FieldGetter
12600
12601         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
12602         defined we call all (non-static)methods through the vtable. 
12603
12604 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
12605
12606         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
12607         finalizer even though the memory is still referenced (and the chunk of
12608         memory is not freed).
12609
12610 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
12611
12612         * assembly.c: fix brokeness.
12613
12614 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
12615
12616         * class.c: kill some warnings. Check explicit interface method
12617         implementation also without considering the namespace.
12618         Load also literal strings in static class data.
12619
12620 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
12621
12622         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
12623         (default_assembly_name_resolver): Make the resolver take the
12624         "base" directory where the assembly was originally defined, so we
12625         can load DLLs that are in the same directory as the assembly that
12626         is being referenced.
12627
12628 2002-03-28  Dick Porter  <dick@ximian.com>
12629
12630         * file-io.h: 
12631         * file-io.c:
12632         * socket-io.c: 
12633         * unicode.h: 
12634         * unicode.c: Warning cleanups
12635
12636 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
12637
12638         * object.h, reflection.h: use the correct type instead of MonoObject.
12639
12640 2002-03-28  Martin Baulig  <martin@gnome.org>
12641
12642         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
12643         (mono_debug_update_symbol_file): Initialize classes if necessary.
12644
12645 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12646
12647         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
12648         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
12649
12650 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
12651
12652         * assembly.h: fix function prototype.
12653         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
12654         * mono-endian.h: use const cast.
12655
12656 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
12657
12658         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
12659
12660 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
12661
12662         * loader.c: don't assert when a typeref can't be loaded, give
12663         a chance to the runtime to trow an exception instead.
12664         * loader.h: fix warning.
12665
12666 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
12667
12668         * class.c (mono_class_proxy_vtable): added proxy support
12669
12670 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
12671
12672         * icall.c: removed last of PAL calls, added System.Environment
12673         * file-io.h, file-io.c: MonoIO implementation
12674         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
12675
12676 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
12677
12678         * appdomain.c: do not use the byte marker in ldstr table lookup.
12679         * debug-helpers.c: allow two ':' to separate class and method name.
12680         * object.c: allocate arrays bounds with the GC, too.
12681         * verify: add a few more checks.
12682
12683 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
12684
12685         * reflection.c: output also literal strings. Allocate parameter data
12686         with GC_malloc() (thanks, Martin, for catching this!).
12687
12688 2002-03-26  Martin Baulig  <martin@gnome.org>
12689
12690         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
12691         include the `this' offset in the `param_offsets'.
12692
12693 2002-03-25  Martin Baulig  <martin@gnome.org>
12694
12695         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
12696         mono_debug_get_class() function to get the classes. Added new
12697         relocation types for arrays and strings.
12698         (mono_debug_get_class): New static function to search in all
12699         referenced assemblies for a metadata token.
12700
12701         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
12702
12703 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12704
12705         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
12706         hold gc-allocated objects. Make the string heap a stream like the
12707         others. Removed duplicated code when writing stream info.
12708         Added asserts to catch possible buffer overflows. Set the sorted map
12709         for tables that need sorting. Added some documentation.
12710
12711 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
12712
12713         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
12714         for interned strings and vtables.
12715
12716 2002-03-24  Martin Baulig  <martin@gnome.org>
12717
12718         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
12719         it in the array since it was created with g_slist_prepend().
12720
12721 2002-03-24  Martin Baulig  <martin@gnome.org>
12722
12723         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
12724         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
12725         (mono_debug_method_from_token): Renamed to
12726         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
12727         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
12728
12729         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
12730         relocation types.
12731
12732         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
12733
12734 2002-03-24  Martin Baulig  <martin@gnome.org>
12735
12736         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
12737         (mono_debug_method_from_token): New func.
12738
12739         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
12740         New interncall, calls mono_debug_local_type_from_signature().
12741         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
12742         calls mono_debug_method_from_token().
12743
12744 2002-03-23  Martin Baulig  <martin@gnome.org>
12745
12746         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
12747         specifies the number of bytes to be converted, not the array size.
12748         Return the number of chars, not the number of bytes.
12749         (ves_icall_iconv_get_chars): The `byteCount' argument
12750         specifies the number of bytes to be converted, not the array size.
12751
12752 2002-03-23  Martin Baulig  <martin@gnome.org>
12753
12754         * reflection.h (MonoReflectionSigHelper): New type.
12755
12756         * reflection.c (mono_reflection_sighelper_get_signature_local),
12757         (mono_reflection_sighelper_get_signature_local): New functions.
12758
12759         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
12760         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
12761         interncalls.
12762
12763 2002-03-23  Martin Baulig  <martin@gnome.org>
12764
12765         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
12766         is_writeable is set.
12767         (mono_raw_buffer_update): New function to write the modified map
12768         back to disk.
12769
12770         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
12771
12772         * debug-symfile.c (mono_debug_update_symbol_file): Call
12773         mono_raw_buffer_update() when done writing.
12774
12775 2002-03-23  Martin Baulig  <martin@gnome.org>
12776
12777         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
12778
12779         * debug-symfile.c: Added support for arguments and local variables.
12780
12781 2002-03-23  Dick Porter  <dick@ximian.com>
12782
12783         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
12784         protected by ifdefs, hence breaking the w32 build.
12785
12786 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12787
12788         * object.c: implement is_interned() the right way.
12789
12790 2002-03-21  Martin Baulig  <martin@gnome.org>
12791
12792         * debug-symfile.[ch]: New files to handle debugging information
12793         files. There's also support to dynamically update these symbol
12794         files to include machine dependent information.
12795
12796 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
12797
12798         * threads.c (mono_thread_create): new function to create thread
12799         from C
12800
12801 2002-03-20  Martin Baulig  <martin@gnome.org>
12802
12803         * icall.c (ves_icall_InternalInvoke): Create a new object if the
12804         method is a constructor.
12805         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
12806         points to ves_icall_InternalInvoke().
12807
12808 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
12809
12810         * file-io.c: Flush shouldn't throw exceptions.
12811
12812 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
12813
12814         * file-io.c: FileStream flush support; FileSetLength now
12815         restores file pointer.
12816
12817 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
12818
12819         * class.c: set image for pointer classes.
12820
12821 2002/03/19  Nick Drochak <ndrochak@gol.com>
12822
12823         * sysmath.c: Forgot one.
12824
12825 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
12826
12827         * sysmath.c: Avoid redefining existing names.
12828
12829 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
12830
12831         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
12832         handled by runtime as icall rather than dllimport from libm.so
12833         * file-io.c, file-io.h: fixed handle argument type.
12834
12835 2002-03-18  Dick Porter  <dick@ximian.com>
12836
12837         * reflection.c (mono_image_get_type_info): rename interface to
12838         iface, because of "#define interface struct" on windows.
12839
12840 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
12841
12842         * class.c, class.h: rename and export mono_ptr_class_get().
12843         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
12844         * reflection.c, reflection.h, icall.c: better/saner type name
12845         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
12846         method signatures.
12847
12848 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
12849
12850         * class.c (mono_class_init): removed hardcoded GHC_SLOT
12851
12852         * icall.c (ves_icall_InternalInvoke): impl.
12853
12854 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12855
12856         * reflection.c: output the interface map table, too.
12857
12858 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
12859
12860         * class.c (class_compute_field_layout): separate computation of 
12861         static field layout
12862
12863 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
12864
12865         * icall.c: added System.Buffer support.
12866         * file-io.c: moved file icalls from PAL to FileStream.
12867
12868 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
12869
12870         * icall.c (ves_icall_System_Object_GetHashCode): impl.
12871
12872 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
12873
12874         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
12875
12876 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12877
12878         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
12879
12880 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
12881
12882         * debug-helpers.{c,h}: moved here from monograph some useful functions
12883         to locate a method by name/signature in a class or image. Included
12884         also a small and flexible IL disassembler.
12885
12886 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
12887
12888         * reflection.c: fixup tokens in methods with small header size, too.
12889
12890 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
12891
12892         * object.c (mono_string_to_utf8): remove assert(!error), instead
12893         print a warning. 
12894
12895 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
12896
12897         * icall.c: update to the new mono_Array_class_get interface.
12898
12899 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12900
12901         * appdomain.c, object.c: Boehm-GC enable.
12902         * icall.c: make get_data_chunk() support split data requests.
12903         Ensure a class is initialized in more cases. Return only the first
12904         property found in GetProperties() or the compiler gets confused. 
12905         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
12906         * reflection.h, reflection.c: add fixup mechanism for field and method
12907         tokens. Initialize assembly->typeref in a single place. Output
12908         properties after events. Support custom attributes for events, too.
12909         Typo fix for paramter custom attrs.
12910
12911 2002-03-07  Martin Baulig  <martin@gnome.org>
12912
12913         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
12914
12915 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
12916
12917         * class.c (mono_array_class_get): fix. for multi. dim. arrays
12918
12919 2002-03-06  Martin Baulig  <martin@gnome.org>
12920
12921         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
12922         non-zero lower bounds. See testcases #F10-#F13.
12923
12924 2002-03-05  Martin Baulig  <martin@gnome.org>
12925
12926         * exception.c (mono_get_exception_argument_out_of_range): New exception.
12927
12928         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
12929         ves_icall_System_Array_GetValue(), only calculate the absolute array position
12930         here.
12931         (ves_icall_System_Array_SetValue): Likewise.
12932         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
12933         as argument and does the actual work. This function is used when copying a
12934         multi-dimensional array.
12935         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
12936         now do all the widening conversions of value types.
12937         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
12938
12939 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12940
12941         * class.c: remove some magic numbers and use the smbolic names,
12942         instead. Added init_events() to load event info at class init time.
12943         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
12944         and mono_metadata_methods_from_event().
12945         * reflection.h, reflection.c: added support for writing out the evnets
12946         related information.
12947
12948 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12949
12950         * reflection.h, icall.c: use a different method (GetInterfaces)
12951         to gather interface info and add isbyref, isprimitive and
12952         ispointer to the ves_icall_get_type_info() return value.
12953
12954 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12955
12956         * class.h: stared adding support for events.
12957         * icall.c: split find_members implementation. Added debug icall to get
12958         the address of an object.
12959         * reflection.c: handle TypeBuilders in mono_type_get_object().
12960
12961 2002-03-01  Martin Baulig  <martin@gnome.org>
12962
12963         * icall.c (ves_icall_System_Array_GetLength): This must throw an
12964         ArgumentOutOfRangeException(), not an ArgumentException().
12965         (ves_icall_System_Array_GetLowerBound): Likewise.
12966         (ves_icall_System_Array_GetValue): Improved argument checking.
12967         (ves_icall_System_Array_SetValue): Improved argument checking.
12968
12969 2002-03-01  Martin Baulig  <martin@gnome.org>
12970
12971         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
12972         called with invalid arguments rather than just dying with g_assert().
12973         (ves_icall_System_Array_SetValue): Likewise.
12974         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
12975         raise a NotImplementedException instead.
12976         (ves_icall_System_Array_GetLength): Added argument checking.
12977         (ves_icall_System_Array_GetLowerBound): Added argument checking.
12978
12979 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
12980
12981         * object.h (mono_assert): new macros mono_assert and
12982         mono_assert_not_reached
12983
12984 2002-02-28  Martin Baulig  <martin@gnome.org>
12985
12986         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
12987         and "System::String::IsInterned" to "System::String::_IsInterned".
12988
12989 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
12990
12991         * icall.c: remove hacks for typebuilder. Added icall to create a
12992         modified type from a tybebuilder.
12993         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
12994         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
12995         to create a backing MonoClass for a TypeBuilder.
12996
12997 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12998
12999         * class.c, class.h: more refactoring of class init.
13000         Export mono_class_setup_mono_type() and mono_class_setup_parent().
13001
13002 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
13003
13004         * marshal.c, marshal.h: start of marshaling interface.
13005
13006 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
13007
13008         * icall.c: fix order in assembly qualified name icall.
13009
13010 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
13011
13012         * class.c: do not free str, since we store it in the hash table.
13013         * reflection.h: add label field to MonoILExceptionInfo.
13014         * reflection.c: handle references to more than one assembly. Handle
13015         case when there isn't a module created in the assembly.
13016
13017 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
13018
13019         * class.c: Fix typo. Start refactoring of class init code.
13020
13021 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
13022
13023         * appdomain.c: exit with 1 on error.
13024         * class.c: we already have the name in MonoClassField.
13025         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
13026         MonoStreamHeader instead of an offset of image->raw_metadata.
13027
13028 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
13029
13030         * appdomain.c (mono_init): Be even more descriptive about the error.
13031
13032 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
13033
13034         * appdomain.c: give the user an informative message when corlib can't
13035         be loaded.
13036
13037 2002-02-26  Martin Baulig  <martin@gnome.org>
13038
13039         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13040         New icall to get the time zone data.
13041
13042 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13043
13044         * reflection.c: set virtual and raw size of section correctly.
13045         * threads.c: transfer domain information to newly created threads.
13046
13047 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13048
13049         * class.c: when instancing a class in a domain, load the default
13050         vaules for static fields from the constant table. Fix System.Enum to
13051         not be an enum.
13052         * icall.c: implement Object::GetType() internalcall. Implemented
13053         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
13054         Fixed checking of binding flags in find_members().
13055         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
13056         * reflection.c: handle enumerations when writing to the constant
13057         table. Use a different object cache for types.
13058
13059
13060 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
13061
13062         * object.c (mono_object_isinst): fix for arrays
13063
13064         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
13065
13066 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13067
13068         * object.c: don't use mprotect ()  and fix intern pool hash table
13069         lookup for big endian systems.
13070
13071 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13072
13073         * icall.c: change type_is_subtype_of () signature.
13074
13075 2002-02-21  Mark Crichton  <crichton@gimp.org>
13076
13077         * rand.c, rand.h: Added random number generator for
13078         System.Security.Cryptography classes.
13079
13080         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
13081
13082         * icall.c: Added System.Security.Cryptography calls.
13083
13084 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13085
13086         * class.c, icall.c, metadata.c: better support for pointer types.
13087         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
13088         * reflection.c: Add support for getting custom attrs for properties
13089         and simplify some code.
13090
13091 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13092
13093         * icall.c: change getToken () and add custom attribute GetBlob()helper
13094         method.
13095         * reflection.h: add custom attrs array to the reflection builder structures.
13096         * reflection.c: encode and emit custom attributes for all the relevant
13097         reflection objects. Cache fieldref and methodref tokens. Change
13098         mono_image_create_token() interface to take a MonoDynamicAssembly.
13099         More complete custom attributes decoder. Load custom attributes for
13100         Assembly, Field, Method and Constructor objects, too. Make the
13101         returned array an Attribute[] one, not object[]. Added
13102         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
13103         custom attribute constructor.
13104
13105 2002-02-20  Dick Porter  <dick@ximian.com>
13106
13107         * icall.c:
13108         * rawbuffer.c:
13109         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
13110         problem code out for now).
13111
13112 2002-02-19  Radek Doulik  <rodo@ximian.com>
13113
13114         * object.c (mono_ldstr): use hash table to avoid multiple swapping
13115
13116 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
13117
13118         * icall.c: register the GetCustomAttributes method.
13119         * object.c, object.h: add mono_string_new_len ().
13120         * reflection.h, reflection.c: added mono_runtime_invoke(),
13121         mono_install_runtime_invoke(). Added
13122         mono_reflection_get_custom_attrs () to load custom attributes and
13123         create the attribute objects.
13124
13125 2002-02-19  Dick Porter  <dick@ximian.com>
13126         * threads-dummy-types.c:
13127         * threads-dummy-types.h:
13128         * threads-dummy.c:
13129         * threads-dummy.h:
13130         * threads-pthread-types.c:
13131         * threads-pthread-types.h:
13132         * threads-pthread.c:
13133         * threads-pthread.h:  Deleted obsolete files
13134
13135 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
13136
13137         * class.c (mono_class_vtable): runtime init the class when we
13138         allocate static class data.
13139
13140         * icall.c (ves_icall_System_Array_SetValue): check for null values.
13141
13142         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
13143         and String - but we will need generic marshalling support in the
13144         future. 
13145         (mono_init): set the domain name in a ms compatible way
13146
13147         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
13148         String[].
13149
13150 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
13151
13152         * object.c (mono_array_clone): use alloca() instead of g_malloc  
13153         for sizes
13154
13155         * appdomain.c (mono_domain_unload): impl.
13156
13157 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13158
13159         * appdomain.c, object.c: fix intern pool implementation.
13160         * class.c: fix alignment code.
13161
13162 2002-02-16  Radek Doulik  <rodo@ximian.com>
13163
13164         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
13165         and s2 > s1, just copy lower bytes to be compatible with little
13166         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
13167         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
13168
13169         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
13170         force big_endian to be 1 for big endian machines 
13171         (ves_icall_iconv_new_decoder): ditto
13172
13173 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
13174
13175         * socket-io.c (convert_sockopt_level_and_name): If the system
13176         doesn't define SOL_IP or SOL_TCP, get them by hand using
13177         getprotobyname() and caching the values (because this could be a
13178         slow operation).
13179         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
13180         Use the appropriate struct when the system does support it. Ie,
13181         not all systems have struct ip_mreqn so use struct ip_mreq when
13182         appropriate.
13183
13184 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
13185
13186         * reflection.c: handle finally clauses.
13187
13188 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
13189
13190         * socket-io.c: use g_snprintf() instead of snprintf.
13191
13192 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
13193
13194         * reflection.c (mono_param_get_objects): Cast second argument to
13195         mono_method_get_param_names to a const char** to silence the
13196         compiler warning.
13197
13198         * appdomain.c (mono_domain_assembly_open): Put parens around the
13199         truth statement in the for-loop.
13200
13201         * unicode.c (iconv_convert): Got rid of a compiler warning about
13202         int i being unused when the system has a new iconv.
13203         (iconv_get_length): Same.
13204
13205         * image.c (load_class_names): Cast the second argument to
13206         g_hash_table_insert() to char* to hush compiler warnings about the
13207         arg being a const.
13208         (mono_image_open): Same here.
13209
13210         * socket-io.c: Don't conditionally include sys/filio.h or
13211         sys/sockio.h here anymore since we now get them from
13212         io-layer/io-layer.h
13213         (inet_pton): If the system doesn't support inet_aton, implement
13214         using inet_addr and also #define INADDR_NONE if it isn't defined
13215         by the system.
13216
13217 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13218
13219         * metadata.c, metadata.h: added function to get packing and size info
13220         of a typedef.
13221         * reflection.h, reflection.c: handle field RVA data. Save info about
13222         the table layout if needed. Assign typedef indexes to all the types
13223         before dumping the info about them to avoid forward reference problems.
13224
13225 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
13226
13227         * socket-io.c (convert_sockopt_level_and_name): ifdef
13228         SO_ACCEPTCONN because it is not defined on my system (old debian)
13229
13230 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13231
13232         * opcode.c: use stddef.h to get NULL.
13233
13234 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
13235
13236         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
13237         for FIONBIO, FIONREAD and SIOCATMARK.
13238         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
13239         define INADDR_NONE and besides, inet_addr() is deprecated and
13240         should not be used. Use inet_pton() instead - it also has the
13241         added bonus that it can easily handle IPv6 addresses as well.
13242         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
13243
13244 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
13245
13246         * decimal.c: remove _MSC_VER conditional.
13247
13248 2002-02-13  Dick Porter  <dick@ximian.com>
13249
13250         * socket-io.c: 
13251         * icall.c: Internal calls for Blocking, Select, Shutdown,
13252         GetSocketOption and SetSocketOption
13253
13254 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13255
13256         * assembly.cs: better resolver: use it instead of some kludgy
13257         code.
13258
13259 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
13260
13261         * reflection.c: the best way to speed-up the compiler is to avoid
13262         infinite loops.
13263
13264 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
13265
13266         * class.c (mono_class_vtable): changed the object layout
13267         (obj->vtable->class). 
13268         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
13269
13270 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13271
13272         * assembly.c: look for assemblies in the assembly dir, too.
13273
13274 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13275
13276         * class.c: fix thinko in mono_class_from_type().
13277
13278 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13279
13280         * exception.h, exception.c: added TypeLoadException.
13281         * object.h, object.c: added mono_array_clone ().
13282         * icall.c: handle throwOnError in AssemblyGetType().
13283         Added Array.Clone().
13284         * opcode.h, opcode.c: use a single value for the opcode val.
13285         Compile fix for non-gcc compilers.
13286
13287 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
13288
13289         * opcodes.c, opcodes.h: export interesting info about opcodes.
13290
13291 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
13292
13293         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
13294         icalls. 
13295
13296         * class.c (class_compute_field_layout): set element_class for enums
13297         (mono_class_create_from_typedef): set element_class for normal classes
13298
13299         * icall.c (ves_icall_System_Enum_get_value): impl.
13300
13301         * class.c (mono_class_create_from_typedef): do not set valuetype
13302         flag for System.ValueType and System.Enum
13303
13304 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
13305
13306         * unicode.c (iconv_convert): fix big endian problem.
13307
13308 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13309
13310         * class.c: add asserts if we are ever going to scribble over memory.
13311         * socket-io.c: not all systems have AF_IRDA defined.
13312
13313 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
13314
13315         * class.c (class_compute_field_layout): do not consider static
13316         fields to compute alignment
13317
13318 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
13319
13320         * appdomain.c (mono_appdomain_get): impl.
13321         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
13322
13323 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
13324
13325         * icall.c: ignore "file://" prefix when loading an assembly.
13326
13327 2002-01-23  Dick Porter  <dick@ximian.com>
13328
13329         * socket-io.c:
13330         * icall.c:
13331         * Makefile.am: Added socket support
13332
13333 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
13334
13335         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
13336         code back.  This should return the assemblies that are loaded by
13337         the runtime on behalf of an application domain. 
13338
13339         The current implementation is still broken, it just returns every
13340         assembly loaded, but until we get real applications domain this
13341         will do.
13342
13343 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
13344
13345         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
13346         AppDomain object.
13347
13348 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
13349
13350         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
13351         the mono_class_from_name lookup.
13352         (ves_icall_get_parameter_info): ditto.
13353         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
13354         method.
13355         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
13356
13357 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13358
13359         * class.c: load also nested classes on class init.
13360         System.ValueType instance methods gets passed boxed
13361         values, unless methods in derived classed that get a pointer to the
13362         data.
13363         * icall.c: use better name parsing code in GetType().
13364         * image.c, image.h: add mono_image_loaded ().
13365         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
13366         * reflection.c, reflection.h: added mono_reflection_parse_type().
13367
13368 2002-01-22  Veronica De Santis <veron78@interfree.it>
13369
13370         * icall.c : Added mapping of internal calls for Manual and Auto reset events
13371         * threads.c : Added the implementation of internal calls for events
13372         * threads.h : Added prototypes of internal calls for events
13373         
13374 2002-01-21  Radek Doulik  <rodo@ximian.com>
13375
13376         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
13377
13378 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
13379
13380         * class.c (mono_class_init): set min_align to 1 (instead of 0)
13381         (mono_class_value_size): use min_align
13382
13383 2002-01-20  Dick Porter  <dick@ximian.com>
13384
13385         * threads.h:
13386         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
13387         so it compiles on w32.
13388
13389 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
13390
13391         * metadata.c (mono_type_stack_size): impl.
13392
13393         * class.c (mono_class_get_field): impl. memberref token
13394
13395 2002-01-16 Veronica De Santis <veron78@@interfree.it>
13396
13397         * icall.h : Added the internal calls mapping for CreateMutex_internal
13398                     and ReleaseMutex_internal.
13399         * threads.h : Added the prototype of mutexes internal calls.
13400         * threads.c : Added the implementations of mutexes internal calls.
13401
13402 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13403
13404         * metaparse.h: removed unused file.
13405         * reflection.c, reflection.h: added stream_data_align () function 
13406         to align data in streams and keep stream aligned. Add support for
13407         exception support in method headers.
13408
13409 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
13410
13411         * unicode.c: make iconv_convert () return the number of bytess written
13412         in the output buffer.
13413
13414 2002-01-15  Dick Porter  <dick@ximian.com>
13415         * threads.c: Make the runtime's idea of infinite timeouts coincide
13416         with the class library's
13417
13418         Fix a particularly egregious bug in mono_thread_cleanup(). That
13419         code was so utterly bogus it must have been written on a Monday.
13420
13421 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
13422
13423         * reflection.h: add subtypes field to TypeBuilder.
13424         * reflection.c: encode constants for literal fields.
13425         Handle subtypes. Fix user string token (and add a zero byte)
13426         at the end.
13427         
13428 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
13429
13430         * class.c (mono_class_init): bug fix: assign slot numbers for
13431         abstract methods.
13432
13433 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13434
13435         * reflection.c: don't try to output a code RVA for abstract methods.
13436         Small fixes for method header format. Output parameter info to the
13437         ParamDef table. Save method overriding info to MethodImpl table.
13438         Fix property support. Allow typedef.extends to be a type in the
13439         building assembly.
13440         * verify.c: fix off-by-one error.
13441
13442 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
13443
13444         * class.c: fix mono_class_from_mono_type () for szarray types.
13445         Remove unused cache check in mono_class_from_type_spec().
13446         * icall.c: *type_from_name () functions handle simple arrays and byref.
13447         * reflection.c: handle byref and szarray types. Handle methods without
13448         body (gets P/Invoke compilation working). Handle types and fields in
13449         get_token ().
13450         * reflection.h: add rank to MonoTypeInfo.
13451
13452 2002-01-10  Dick Porter  <dick@ximian.com>
13453
13454         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
13455         internal calls
13456
13457 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13458
13459         * icall.c: initialize class in type_from_handle ().
13460         Loop also in parent classes for get_method ().
13461         * reflection.c: properly encode class and valuetype types.
13462         Start on encoding TypeBuilder types. Handle fieldrefs.
13463         Use correct length when registering a user string.
13464         Handle ConstructorBuilder and MonoMethod in get_token ().
13465         Make mono_type_get_object () aware of cached types.
13466         * object.c: back out change to mono_string_new ().
13467
13468 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
13469         * object.c: mono_string_new should return a NULL when the string 
13470         passed in is NULL -- not try to deference it.
13471         
13472 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
13473
13474         * icall.c: hack to make IsSubType work for TypeBuilders.
13475         * reflection.c: emit constructors before methods.
13476         Retrieve param names in mono_param_get_objects().
13477
13478 2002/01/05  Nick Drochak  <ndrochak@gol.com>
13479
13480         * Makefile.am: fix list of headers and sources so automake 1.5
13481         doesn't complain. Removed \# at end of list.
13482
13483 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
13484
13485         * reflection.c: get token for a method ref. Set return type of
13486         constructor to void.
13487         * loader.c: debug message.
13488         * class.c: typo fix.
13489
13490 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
13491
13492         * icall.c: fix array init with rank > 1. FindMembers
13493         loops in parent class as well.
13494         * image.c: do not insert nested types in name cache.
13495         * reflection.c: warning fix.
13496         * reflection.h: add override method (for interface impl).
13497
13498 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
13499
13500         * metadata.c: fix customattr decoding.
13501
13502 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
13503
13504         * rawbuffer.cs: Added native Win32 implementation, avoids using
13505         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
13506
13507 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
13508
13509         * class.c: make the low-level routines handle the cache.
13510
13511 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
13512
13513         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
13514
13515 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
13516
13517         * class.c: fix mono_array_element_size() for objects.
13518         * class.h, class.c: add properties to MonoClass and load them
13519         at init time.
13520         * icall.c: check with isinst() when assigning a value to an array
13521         instead of requiring the classes to match exactly.
13522         Implemented icall for System.Type::GetType().
13523         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
13524         enums. Handle bindingflags when looking for methods and fields.
13525         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
13526         and mono_metadata_methods_from_property().
13527         * reflection.h, reflection.c: added structures for propreties,
13528         parameters and enums. Implemented mono_property_get_object() and
13529         mono_param_get_objects().
13530
13531 2001-12-18  Dick Porter  <dick@ximian.com>
13532
13533         * file-io.c: Use mono_string_to_utf16() instead of
13534         mono_string_chars()
13535
13536         * object.c: Added mono_string_to_utf16(), which copies the non
13537         NULL-terminated MonoString into a new double-null-terminated
13538         buffer.
13539
13540 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
13541
13542         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
13543
13544 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
13545
13546         * file-io.c: raise exceptions if handle is invalid.
13547
13548 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
13549
13550         * assembly.c: yet another check for mscorlib.
13551         * class.c, class.h: load nesting info for classes.
13552         * icall.c: many new functions to support the Reflection classes.
13553         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
13554         * reflection.h, reflection.c: mono_image_create_token(),
13555         mono_assembly_get_object(), mono_type_get_object(),
13556         mono_method_get_object(), mono_field_get_object(): methods to return
13557         objects that parallel the C representation of assemblies, types,
13558         methods, fields.
13559
13560 2001-12-11  Dick Porter  <dick@ximian.com>
13561
13562         * icall.c:
13563         * file-io.c: Internal calls for file IO.
13564
13565 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
13566
13567         * tabledefs.h: missing FileAttributes.
13568         * verify.h, verify.c: use is_valid_string () to simplify and check for
13569         valid strings more correctly. Fix warnings and speeling.
13570         Check more tables: Filed, File, ModuleRef, StandAloneSig.
13571         Check code: branches, maxstack, method calls.
13572
13573 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
13574
13575         * object.c (mono_object_allocate): removed static, so that the jit
13576         can allocate value types.
13577
13578         * icall.c (ves_icall_System_DateTime_GetNow): impl.
13579
13580 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13581
13582         * class.c: init enum types right away and register the
13583         token->MonoClass map in mono_class_create_from_typedef ().
13584         * verify.h, verify.c: first cut of the verifier.
13585         * pedump.c: add --verify switch to verify metadata tables.
13586         * tabledefs.h: add some missing enums.
13587
13588 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
13589
13590         * class.c (mono_install_runtime_class_init): impl.
13591         (mono_class_init): renamed mono_class_metadata_init to
13592         mono_class_init, also removed the metadata_inited flag
13593
13594         * object.c (mono_object_isinst): use faster algorithm
13595
13596 2001-11-30  Radek Doulik  <rodo@ximian.com>
13597
13598         * mono-endian.h: reverted last change
13599         added function prototypes
13600
13601         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
13602         add mono-endian.c back
13603
13604         * mono-endian.c: returned back, as Paolo pointed out, it's needed
13605         for unaligned access, I've mistaked it with endianess. I am
13606         sorry.
13607         (mono_read16): fix reverted endianess
13608         (mono_read64): ditto
13609         (mono_read32): ditto
13610
13611 2001-11-30  Dick Porter  <dick@ximian.com>
13612
13613         * exception.c: Implement mono_exception_from_name()
13614
13615 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13616
13617         * metadata.h, metadata.c: remove params_size and locals_size and their
13618         calculation from the metadata code: they are only usefult to the
13619         interp.
13620
13621 2001-11-29  Radek Doulik  <rodo@ximian.com>
13622
13623         * object.c (mono_ldstr): swap bytes here, it's probably not the
13624         best place, but works for me now, I'll redo it once I know mono
13625         better, also note that I add PROT_WRITE and don't reset back, also
13626         note that it's only affects big endians, so x86 should be OK
13627
13628         * mono-endian.h (read16): use just glib macros for both endians
13629
13630         * mono-endian.c: removed as glib macros are used in in
13631         mono-endian.h so we don't need to care about endianess for read
13632         macros as glib does that for us already
13633
13634 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
13635
13636         * class.h, class.h: take minimum alignment into consideration so
13637         that the fields of a class remain aligned also when in an array.
13638
13639 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13640
13641         * loader.h, loader.c: add mono_method_get_param_names().
13642         * class.c: 0-init class fields.
13643
13644 2001-11-26  Dick Porter  <dick@ximian.com>
13645
13646         * icall.c:
13647         * threads-types.h:
13648         * threads.c: New file that handles System.Threading on all platforms
13649
13650         * object.c: 
13651         * object.h: Remove the synchronisation struct from MonoObject,
13652         replace it with a pointer that gets initialised on demand
13653
13654         * Makefile.am: Replace all the system-specific threading code with
13655         a single file that uses the new wrapper library
13656
13657 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
13658
13659         * class.c, class.h: add mono_install_trampoline() so that the runtime
13660         can register a function to create a trampoline: removes the ugly
13661         requirement that a runtime needed to export arch_create_jit_trampoline.
13662         * object.h, object.c: added mono_install_handler() so that the runtime
13663         can install an handler for exceptions generated in C code (with
13664         mono_raise_exception()). Added C struct for System.Delegate.
13665         * pedump.c: removed arch_create_jit_trampoline.
13666         * reflection.c: some cleanups to allow registering user strings and
13667         later getting a token for methodrefs and fieldrefs before the assembly
13668         is built.
13669         * row-indexes.h: updates and fixes from the new ECMA specs.
13670
13671 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
13672
13673         * class.h, class.c: add enum_basetype field to MonoClass.
13674         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
13675         to get index in the constant table reated to a field, param or
13676         property.
13677         * reflection.h, reflection.c: handle constructors. Set public-key and
13678         version number of the built assembly to 0.
13679         * row-indexes.h: update from new ECMA spec.
13680
13681 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13682
13683         * class.h, class.c: add a max_interface_id to MonoClass.
13684         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
13685         since it's used to do that. Added mono_type_type_from_obj().
13686         Make GetType() return NULL instead of segfaulting if the type was not
13687         found. Handle simple arrays in assQualifiedName.
13688         * object.h: add a struct to represent an Exception.
13689         * reflection.c: output call convention in method signature.
13690         Add code to support P/Invoke methods and fixed offsets for fields.
13691
13692 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
13693
13694         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
13695         the value.
13696         * icall.c: use mono_array_addr instead of array->vector: fixes the
13697         reflection image writing.
13698         * reflection.c: init call convention byte to 0 in method signature.
13699         Encode the property signature. Don't output property-related methods
13700         twice. Really process the properties for a type (don't cast a field to
13701         a property, my mom always told me that).
13702         Fix 64 bit issues in pointer alignment in a different and more
13703         readable way.
13704
13705 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
13706
13707         * loader.h: Removed type class from MonoDefaults, added monotype
13708
13709         * loader.c: Loaded MonoType, removed loading of Type
13710
13711         * icall.c (my_mono_new_object): Now returns a System.MonoType,
13712         and fills in System.Type._impl with a RuntimeTypeHandle rather
13713         than the actual MonoClass *
13714
13715         (ves_icall_type_from_handle): change from type_class to
13716         monotype_class
13717
13718         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
13719         implemented
13720
13721         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
13722         implemented
13723
13724         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
13725
13726         (ves_icall_System_Reflection_Assembly_GetType): implemented
13727
13728         (ves_icall_System_MonoType_assQualifiedName): implemented
13729
13730         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
13731
13732 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
13733
13734         * assembly.c (mono_assembly_open): Implement a cache for the
13735         assemblies. 
13736
13737         (mono_assembly_close): only destroy the assembly when the last
13738         reference is gone.
13739         
13740 2001-11-09  Dick Porter  <dick@ximian.com>
13741
13742         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
13743
13744 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
13745
13746         * class.c (mono_class_metadata_init): bug fix: compute the right slot
13747
13748 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13749
13750         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
13751         from Martin Weindel.
13752         * object.h: add mono_string_chars ().
13753
13754 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
13755
13756         * reflection.c (build_compressed_metadata): Eliminates warnings
13757         and uses 64-bit clean code.
13758
13759         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
13760         (mono_type_equal): Change signature to eliminate warnings.
13761
13762 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13763
13764         * icall.c, loader.c: remove the internalcall array constructors.
13765         Changes to match the new MonoArray structure.
13766         * object.h, object.c: an array object doesn't allocate an extra
13767         vector. Add mono_array_new_full () to create jagged arrays easily.
13768
13769 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13770
13771         * metadata.h, metadata.c: add mono_metadata_field_info () to
13772         retreive all the info about a field from vairous tables.
13773         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
13774         * class.h, class.c: augment MonoClassField with more info.
13775         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
13776         policy and load a field's RVA if needed.
13777
13778 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
13779
13780         * class.c (mono_class_metadata_init): create a trampoline for all
13781         virtual functions instead of actually compiling them.
13782
13783 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
13784
13785         * class.h, class.c: include name in MonoClassField.
13786         * class.c: fix fundamental type of System.Object and System.String.
13787         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
13788         tokens in ldtoken.
13789         * icall.c: remove internalcalls for the Reflection stuff that is now
13790         done in C# code.
13791         * loader.c: mono_field_from_memberref () implementation.
13792         * mono-endian.c: thinko (s/struct/union/g).
13793         * object.c, object.h: make the mono_string_* prototypes actually use
13794         MonoString instead of MonoObject.
13795         * reflection.c, reflection.h: updates for changes in the reflection
13796         code in corlib: we use C structures that map to the actual C# classes.
13797         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
13798         fat method header if needed and use the info from the ILGenerator for
13799         methods. Handle fields in types. Misc fixes.
13800
13801 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
13802
13803         * class.c (mono_class_metadata_init): bug fix: always allocate
13804         space for static class data
13805
13806 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
13807
13808         * class.c (mono_compute_relative_numbering): use relative
13809         numbering to support fast runtime type checks.
13810
13811 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
13812
13813         * class.c (mono_class_create_from_typeref): added debugging output
13814         to print class name when MonoDummy is returned instead of real class
13815
13816 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
13817
13818         * class.c (mono_class_metadata_init): interface offset table now
13819         contains pointers into the vtable - this is more efficient for the jit
13820
13821 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
13822
13823         * class.c (mono_class_metadata_init): use a temporary vtable (the
13824         old algorithm only worked for the interpreter, but not for the jit)
13825
13826 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
13827
13828         * loader.c (method_from_memberref): use mono_class_get to get the
13829         class of an array instead of using System.Array directly.
13830         (mono_get_method): also add MEMBERREF methods to the method cache
13831         which usefull for arrays.
13832
13833 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
13834
13835         * pedump.c (arch_compile_method): added to compute vtable entry
13836
13837         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
13838         number of interfaces.
13839         
13840         * class.h: merged MonoArrayClass into MonoClass
13841
13842         * class.c (mono_class_create_from_typedef): compute the vtable size and
13843         allocate space to include the vtable inside MonoClass
13844         (mono_class_metadata_init): initialize the vtable
13845
13846 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
13847
13848         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
13849         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
13850         * image.c: endian fixes by Laurent Rioux.
13851         * object.h, object.c: rename MonoStringObject to MonoString and
13852         MonoArrayObject to MonoArray. Change some function names to conform to
13853         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
13854         guint16* as first argument, so don't use char*.
13855         Provide macros to do the interesting things on arrays in a portable way.
13856         * threads-pthread.c: updates for the API changes and #include <sched.h>
13857         (required for sched_yield()).
13858         * icall.c: updates for the API changes above.
13859         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
13860         platforms that need them.
13861
13862 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
13863
13864         * class.c: set the correct type for all the fundamental
13865         type when loading the class.
13866
13867 2001-10-05  Dick Porter  <dick@ximian.com>
13868
13869         * threads-pthread.c (pthread_mutex_timedlock): Simple
13870         compatibility version for C libraries that lack this call.
13871
13872 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13873
13874         * class.c: MonoTypes stored in MonoClass are stored as
13875         fundamental MonoTypes when the class represents a
13876         fundamental type (System.Int32, ...).
13877         The TypeHandle return by ldtoken is a MonoType*.
13878         * icall.c: ves_icall_get_data_chunk () write out all the
13879         PE/COFF stuff. Implement ves_icall_define_method (),
13880         ves_icall_set_method_body (), ves_icall_type_from_handle ().
13881         * image.c: properly skip unknown streams.
13882         * loader.h, loader.c: add type_class to mono_defaults.
13883         * metadata.c, metadata.h: export compute_size () as
13884         mono_metadata_compute_size () with a better interface.
13885         Typo and C&P fixes.
13886         * pedump.c: don't try to print the entry point RVA if there is no entry point.
13887         * reflection.c, reflection.h: many cleanups, fixes, output method
13888         signatures and headers, typedef and typeref info, compress the metadata
13889         tables, output all the heap streams, cli header etc.
13890         * row-indexes.h: typo fixes.
13891
13892 2001-10-04  Dick Porter  <dick@ximian.com>
13893
13894         * object.h: Add a synchronisation mutex struct to MonoObject
13895
13896         * object.c (mono_new_object): Initialise the object
13897         synchronisation mutexes
13898
13899         * icall.c: System.Threading.Monitor internal calls
13900         
13901         * threads-pthread.h:
13902         * threads-pthread.c: System.Threading.Monitor internal calls
13903
13904         * threads-types.h: New file, includes the system-specific thread
13905         structures
13906         
13907         * threads-pthread-types.h:
13908         * threads-pthread-types.c: New files, handle pthread-specific
13909         synchronisation types
13910
13911         * threads-dummy-types.h: 
13912         * threads-dummy-types.c: New files of dummy support for
13913         thread-specific types
13914
13915         * metadata.c:
13916         * image.c:
13917         * pedump.c: include mono-endian.h not endian.h
13918         
13919         * Makefile.am: More threads files.
13920         Name mono-endian.h not endian.h
13921
13922 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
13923
13924         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
13925         stuff and implement a few more bits.
13926         * icall.c: a field needs to be dereferenced twice. Do not use the same
13927         name for two variables in the same scope.
13928         * image.c, image.h: cleanups.
13929
13930 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
13931
13932         * class.c (mono_class_metadata_init): bug fix: compute the right size
13933
13934 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
13935
13936         * icall.c: implemented some of the Reflection internalcalls.
13937         * image.c, image.h: start writing out the PE/COFF image.
13938         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
13939         that does the reverse than decode_blob_size ().
13940         * object.c: use mono_metadata_encode_value (). Move here
13941         temporary implementation of mono_string_to_utf8 ().
13942         * rawbuffer.c: make malloc_map static.
13943
13944 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13945
13946         * metadata.c: fix type comparison for arrays.
13947         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
13948         Added a couple of new classes to monodefaults.
13949         * icall.c: added a couple of Reflection-related internalcalls.
13950         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
13951         Added a byval_arg MonoType to MonoClass.
13952
13953 2001-09-28  Dick Porter  <dick@ximian.com>
13954
13955         * icall.c:
13956         * threads-pthread.h: 
13957         * threads-pthread.c: Implemented internal calls for
13958         LocalDataStoreSlot operations.  Applied mutexes around all shared
13959         data.  Reworked the thread creation and Start() operations to
13960         avoid a race condition.
13961         
13962         * threads-dummy.h:
13963         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
13964
13965 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
13966
13967         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
13968
13969 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
13970
13971         * class.c, loader.c: warn and return NULL instead of erroring out.
13972         * icall.c: added System.AppDomain::getCurDomain().
13973         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
13974
13975 2001-09-25  Dick Porter  <dick@ximian.com>
13976
13977         * threads-pthread.h:
13978         * threads-pthread.c: Implemented timed thread joining and added
13979         System.Threading.Thread::Join_internal internal call
13980
13981         * icall.c: Added System.Threading.Thread::Join_internal internal call
13982
13983         * threads-dummy.h:
13984         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
13985
13986 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
13987
13988         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
13989         mono_string_intern () to implement the semantics of the ldstr opcode
13990         and the interning of System.Strings.
13991         * icall.c: provide hooks to make String::IsIntern and String::Intern
13992         internalcalls.
13993
13994 2001-09-23  Dick Porter  <dick@ximian.com>
13995
13996         * threads-dummy.c: 
13997         * threads-dummy.h: New files of dummy threading routines
13998
13999         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
14000         support code based on system specifics
14001
14002         Rename PTHREAD_LIBS to THREAD_LIBS
14003         
14004 2001-09-23  Dick Porter  <dick@ximian.com>
14005
14006         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
14007         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
14008         internal calls.
14009         (mono_thread_init): Set up a Thread object instance to return when
14010         the main thread calls Thread.CurrentThread
14011         (mono_thread_cleanup): Wait for all subthreads to exit
14012
14013         * icall.c: New internal calls for System.Threading.Thread::Sleep
14014         (including Schedule) and CurrentThread
14015
14016         * threads.h: New file, to insulate thread-specific stuff from the
14017         rest of the code
14018
14019 2001-09-21  Dick Porter  <dick@ximian.com>
14020
14021         * threads-pthread.h: 
14022         * threads-pthread.c: New file, for handling pthreads-style
14023         threading support.  Start() now starts a new thread and executes
14024         the ThreadStart delegate instance.
14025
14026         * icall.c: Added the internalcall for
14027         System.Threading.Thread::Start_internal
14028
14029         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
14030
14031 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
14032
14033         * loader.c: work around the different signatures for delegates
14034         constructors csc generates in compiled code vs the ones compiled in mscorlib.
14035
14036 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14037
14038         * class.h, class.c: add mono_class_get_field_from_name ().
14039         * *: Fix C comments and other ANSI C issues.
14040
14041 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
14042
14043         * endian.h, assembly.c: fix some endianness issues.
14044
14045 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
14046
14047         * loader.h, load.c: add delegate_class to mono_defaults.
14048         Handle runtime provided methods in mono_get_method ().
14049
14050 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
14051
14052         * loader.c (mono_get_method): use pinvoke for internal call
14053
14054         * icall.c: use pinvoke for internal call
14055
14056         * loader.c (method_from_memberref): set the method name
14057
14058 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
14059
14060         * metadata.c: help the compiler generate better code for
14061         mono_class_from_mono_type ().
14062
14063 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
14064
14065         * class.c (mono_class_metadata_init): delayed computing of the
14066         class size to mono_class_metadata_init ()
14067
14068 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
14069
14070         * class.c, class.h: add an interfaces member to MonoClass.
14071         * image.c, image.h: add assembly_name field to MonoImage
14072         from the assembly table.
14073         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
14074
14075 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14076
14077         * class.c: Handle Array in mono_class_from_mono_type ().
14078         * metadata.c, pedump.c: some endian fixes.
14079
14080 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
14081
14082         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
14083         * metadata.c: fix small problem introduced with the latest commit.
14084
14085 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
14086
14087         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
14088         We don't need a MonoMetadata pointer anymore to compare signatures in
14089         mono_metadata_signature_equal (), update callers.
14090         Reduced memory usage an number of allocations for MonoMethodHeader and
14091         MonoMethodSignature.
14092
14093 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
14094
14095         * metadata.c: added compare for szarray.
14096
14097 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
14098
14099         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
14100         and add a couple more types to it and mono_defaults. Give an hint on
14101         classes that need implementing in our corlib and are referenced
14102         in mscorlib.
14103
14104 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
14105
14106         * class.h, class.c: keep track if a class is also an Enum.
14107         * loader.c: Implement a couple more types for use in libffi
14108         marshalling. Gives better diagnostics when failing to dlopen
14109         a library. Set method->klass for P/Invoke methods, too.
14110
14111 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
14112
14113         * class.c, class.h: add a MonoType this_arg to MonoClass that
14114         represents a pointer to an object of the class' type that
14115         can be used by the interpreter and later the type cache.
14116         Add best guess alignment info for valuetype objects.
14117
14118 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
14119
14120         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
14121         into MonoType: one less level of indirection and allocation and
14122         simplifies quite a bit of code. Added cache for MonoTypes that are
14123         used frequently, so that we don't need to allocate them all the time.
14124
14125 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
14126
14127         * class.c (mono_class_create_from_typedef): System.Enum is also a
14128         value type, although it does not derive from System.ValueType
14129         (maybe a bug in the ms compiler?)
14130
14131         * metadata.c (mono_type_size): return the right size for value types
14132
14133         * loader.c (mono_get_method): only initialize method header if not abstract
14134
14135         * class.c (mono_class_from_mono_type): use mono_default values. 
14136
14137 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
14138
14139         * *: use MonoClass pointers instead of <type_tokens>
14140         
14141         * class.h: new flag: metadata_inited.
14142
14143         * class.c (mono_class_metadata_init): impl.
14144         (mono_class_instance_size): impl.
14145         (mono_class_data_size): impl.
14146
14147 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
14148
14149         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
14150         MonoClass now has the name and name_space fields. 
14151         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
14152         mono_get_method () takes and optional MonoClass as argument.
14153         Removed mono_typedef_from_name() and added mono_class_token_from_name()
14154         instead that takes advantage of a map from class names to typedef
14155         tokens in MonoImage.
14156
14157 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
14158
14159         * metadata.c: zero is not a valid alignment boundary.
14160         Merge MONO_TYPE_VOID in default decoding code.
14161
14162 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
14163
14164         * image.h: merged MonoMetadata into MonoImage
14165
14166         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
14167         identify the type of elements.
14168
14169 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
14170
14171         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
14172         * cil-coff.h: split MonoMSDOSHeader and add size info.
14173         * image.c: add some consistency checks.
14174         * metadata.c: fix row size computation: one programmer
14175         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
14176         add explanation for the locator routine.
14177         Fix decoding of size in method header.
14178         
14179 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
14180
14181         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
14182         (g_concat_dir_and_file): Bring g_concat_dir_and_file
14183         function from gnome-libs.  This uses the right path separator
14184         based on the OS, and also works around a bug in some systems where
14185         a double slash is not allowed. 
14186         (default_assembly_name_resolver): Use g_concat_dir_and_file
14187         (mono_assembly_open): ditto.
14188
14189 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
14190
14191         * metadata.c (mono_metadata_signature_equal): impl.
14192
14193         * *: void is now a realy MonoType (instead of using NULL)
14194         
14195         * metadata.c (do_mono_metadata_parse_type): use
14196         mono_metadata_parse_type to parse void value.
14197
14198 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
14199
14200         * metadata.c, metadata.h: in the signature and method header store
14201         only the space required for holding the loca vars and incoming arguments.
14202
14203 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
14204
14205         * metadata.c (do_mono_metadata_parse_type): treat void like any
14206         other type (instead of assigning NULL);
14207
14208 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
14209
14210         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
14211
14212 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
14213
14214         * image.c (do_mono_image_open): added a cache for arrays.
14215
14216 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14217
14218         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
14219         decode a single column from a row in a metadata table and changes
14220         to take advantage of it in the typedef locator (gives a nice speed up).
14221         Store offset info for function params.
14222
14223 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
14224
14225         * image.h (MONO_IMAGE_IS_CORLIB): removed 
14226
14227 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
14228
14229         * assembly.c: how could mono_assembly_close () had ever worked?
14230         * metadata.c, metadata.h: provide offset info for local vars.
14231         Implement mono_type_size () to take care of alignment as well
14232         as size (it was mono_field_type_size in cli/class.c before).
14233
14234 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
14235
14236         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
14237
14238         * assembly.h (CORLIB_NAME): set to corlib.dll
14239
14240         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
14241
14242 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14243
14244         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
14245         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
14246         tokentype.h: massive namespace cleanup.
14247
14248 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14249
14250         * metadata.h, metadata.c: decode exception clauses when parsing method header.
14251
14252 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
14253
14254         * metadata.c (mono_metadata_free_type): added check for type !=
14255         NULL (void) before calling mono_metadata_free_type()
14256
14257 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
14258
14259         * metadata.h, row_indexes.h: added header with enumerations to use
14260         to index in the columns from tables in metadata and to decode coded
14261         tokens: we should start using this instead of embedding magic numbers
14262         all over the code.
14263
14264 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
14265
14266         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
14267         Move metadata_t info from cli_image_info_t to MonoImage, where
14268         it's easily accessible. Changed all the uses accordingly.
14269         Added the method and class caches to MonoImage.
14270         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
14271         and mono_metadata_decode_value () signature to be more consistent
14272         with the other parse functions (and simplify code). Taken advantage
14273         of zero-length array allocation with GCC. Removed reduntant (and
14274         wrong) MonoFieldType struct and use MonoParam instead. Changed
14275         mono_metadata_parse_field_type () to use common code for parsing.
14276         Added mono_metadata_typedef_from_field () and
14277         mono_metadata_typedef_from_method () to lookup a typedef index from a
14278         field or method token.
14279         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
14280
14281 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
14282
14283         * metadata.c (mono_metadata_parse_field_type): Implement. 
14284         (do_mono_metadata_parse_type): Split engine from
14285         mono_metadata_parse_type, so that we can create smaller structures
14286         for things that just have one pointer to the MonoType (look at
14287         the MonoFieldType)
14288
14289 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
14290
14291         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
14292         as Jan Gray found out, it is incorrect. 
14293
14294 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
14295
14296         * assembly.c: Implement asssembly loading.  This loads an image
14297         and loads all the referenced assemblies.  Come to think of it, we
14298         could always do lazy loading of the assemblies. 
14299
14300         * image.c (mono_image_open): Keep loaded images in a hashtable.
14301
14302         * image.h (MonoImage): Add reference count.
14303
14304 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
14305
14306         * assembly.c (mono_assembly_open): Keep track of the file name in
14307         case the assembly has no ASSEMBLY table.
14308
14309         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
14310         from get.c here.
14311
14312 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
14313
14314         * metadata.c, metadata.h: decode local vars in method header
14315         parse function. Change callers accordingly.
14316
14317 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
14318
14319         * metadata.h, cil-coff.h: protect against multiple inclusion.
14320         Added some new structures to hold information decoded from metadata:
14321         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
14322         and relevant decoding/free functions.
14323         * metadata.c: implement decoding functions. Add warning for out of bounds
14324         index in mono_metadata_locate(). Implement mono_get_method () to retreive
14325         all the info about a method signature and invocation. Remove check on
14326         uninitialized local var in parse_mh() and fix memory leak.
14327
14328 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
14329
14330         * metadata.h: More macros.
14331
14332         * tokentype.h: New file.
14333
14334 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
14335
14336         * assembly.c: added a consistency check and initialize
14337         some structures with g_new0().
14338         * metadata.c: fixed a couple more bugs in table size computation
14339         and add other checks for out-of bound access to metadata.
14340
14341 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
14342
14343         * metatada.c: fix bugs computing table sizes. Spew a
14344         warning when index in string heap is out of bounds.
14345
14346 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
14347
14348         * metadata.h: Add a couple of macros to manipulate tokens. 
14349
14350 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14351
14352         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
14353         cli_section_tables).
14354
14355 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
14356
14357         * metadata.c (mono_metadata_user_string): New function, provides
14358         access to the UserString heap. 
14359
14360 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
14361
14362         * metadata.c: Add inline documentation.
14363
14364 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
14365
14366         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
14367         files. 
14368
14369 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
14370
14371         * typeattr.h: New file, TypeAttribute flags. 
14372
14373 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
14374
14375         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
14376         mono_assembly_ensure_section): Section loading code.
14377         (load_section_tables): Load the sections.
14378
14379         * mono/metadata/metadata.c (mono_metadata_locate_token,
14380         mono_metadata_locate): Functions to locate the information
14381         definition given a token or a table and an index.
14382         (mono_metadata_compute_table_bases): New.
14383         (compute_size): New function to compute the sizes of the various
14384         tables.
14385
14386         * mono/metadata/metadata.h: Finish listing the different index
14387         types. 
14388
14389         * mono/metadata/pedump.c: Improve to dump new information.
14390
14391 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
14392
14393         * mono/metadata/metadata.c: Entered all the tables matching
14394         Beta2. 
14395
14396         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
14397