2005-02-28 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
1 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
2
3         * reflection.c (encode_marshal_blob): Encode param_num field as well.
4
5         * object-internals.h (MonoReflectionMarshal): Add param_num field.
6
7 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
8
9         * object.c: generalized the reference bitmap creation
10         and added hooks for the new GC.
11         * class-internals.c: removed the gc_bitmap field from MonoClass.
12
13 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14
15         * domain.c: help the compiler to produce better code
16         in mono_jit_info_table_find ().
17
18 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19
20         * object.c: make all allocations look typed.
21
22 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
23
24         * socket-io.c: load Mono.Posix if it's not loaded already
25         (fixes bug#73033).
26
27 2005-02-24  Martin Baulig  <martin@ximian.com>
28
29         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
30         * reflection.c (dup_type): Likewise.
31
32 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
33
34         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
35         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
36
37 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
38
39         * domain.c, threads.c, object-internals.h: make the critical thread
40         local vars use the fast access mode (even when we're compiled in
41         a lib). Provide accessors to be used by the jit during codegen.
42
43 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
44
45         * appdomain.c: Changed hook functios behavior to include
46         support for the reflection only assemblies. Some icalls were changed
47         to support the mentioned assemblies too. Signatures of static methods
48         try_assembly_resolve and real_load now have an additional parameter:
49         refonly.
50
51         * assembly.c: General changes to mono_assembly_ methods to support
52         reflection only api. Functions mono_assembly_open, mono_assembly_load,
53         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
54         suffix, to support an additional gbool parameter to specify whether
55         the assembli is reflection only or not. Created some new hook functions 
56         to add support for reflection only assemblies. Signatures of static 
57         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
58         have now an additional parameter: refonly.
59
60         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
61         indicating whether the assembly is reflection only or not.
62
63         * exception.c: Add mono_get_exception_invalid_operation.
64
65         * icall.c: Throw an InvalidOperationException when trying to invoke
66         a property/method/event, or trying to set/get the value of a field.
67         Also add an icall to retrieve the ref_only flag to the
68         MonoReflectionAssembly.
69
70 2005-02-23  Chris Toshok  <toshok@ximian.com>
71
72         Part of fix for #72827.
73         * mono-debug.c (mono_debug_add_method): add lexical block data to
74         the info we write.  Kind of a hack at the moment - we copy the
75         lexical block info from the MonoDebugMethodInfo to the
76         MonoDebugMethodJitInfo here, before writing it.
77         (mono_debug_read_method): read the lexical block info.
78
79         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
80
81         * debug-mono-symfile.h: add lexical block support.
82
83         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
84         support.
85
86 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
87
88         * loader.c (mono_lookup_pinvoke_call): Fix warning.
89
90         * object.c (mono_runtime_free_method): Call mono_free_method () and
91         put the TODOs there.
92
93         * loader.c (mono_free_method): Free up most memory allocated for 
94         dynamic methods.
95
96 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
97
98         * reflection.c: properly flag a Type argument to a
99         named custom attr value (bug #72248).
100
101 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
102
103         * reflection.c: reduce code duplication in named custom
104         attribute encoding.
105
106 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
107
108         * reflection.c: properly encode custom attrs of type object
109         (bug #72649).
110
111 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
112
113         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
114
115 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
116
117         * socket-io.c: load System.dll if it's not loaded already
118         (bug #72850 and #70477).
119
120 2005-02-21  Martin Baulig  <martin@ximian.com>
121
122         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
123         generic instances.
124
125 2005-02-21  Martin Baulig  <martin@ximian.com>
126
127         * reflection.c (mono_image_build_metadata): We also need to
128         "fixup" the MethodImpl table after we computed the final method
129         indices.  Call fixup_methodimpl() to do that.
130         (fixup_methodimpl): New private method.
131
132 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
133
134         * assembly.c: special case mscorlib.dll (bug#72536),
135         patch from Carlos Alberto Cortez.
136
137 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
138
139         * threads-types.h threads.c: Fix build bustage.
140
141         * threads.c: Use a union for long<->double conversions.
142
143         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
144         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
145
146         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
147         containing the checkpoint call with NOT_TAKEN.
148         
149         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
150         checkpoint before pushing the arguments, so they won't have to be
151         spilled to stack.
152
153 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
154
155         * domain.c, assembly.c, domain-internals.h: make some data
156         const and relocation-free.
157
158 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
159
160         * object.c, appdomain.c, class-internals.h: introduce the
161         MonoClassRuntimeInfo structure to hold the info needed to
162         use a class at runtime. Made mono_class_vtable() lock-free
163         for all the appdomains.
164
165 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
166
167         * metadata-internals.h, image.c: introduce a per-image mempool to
168         be used for memory that has the same lifetime as the image.
169
170 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
171
172         * domain.c: In mono_init_internal(), instead of selecting the first
173         runtime version supported by an executable, get a list of all
174         supported versions and select the one for which an mscorlib exists
175         (since even if the runtime supports a given version, it doesn't mean
176         that the framework for that version is installed).
177         Modified get_runtimes_from_exe to support this behavior.
178         In supported_runtimes, added information about additional system
179         assembly versions.
180         
181         * assembly.c: Added support for more than one system assembly version
182         per runtime version. Updated the assembly list.
183         In mono_assembly_remap_version, removed the initial version check,
184         since we don't know to which version we need to compare until we
185         get the version set on which the assembly is based.
186         Moved the code for loading corlib into the new method
187         mono_assembly_load_corlib(), so it can be used by the initialization
188         code.
189         
190         * domain-internals.h: Updated data structures and added declaration
191         for mono_assembly_load_corlib.
192
193 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
194
195         * reflection.c (resolve_object): Fix the creation of the signature in 
196         the SignatureHelper case.
197
198         * assembly.c (mono_assembly_remap_version): Fix binary search.
199         
200 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
201  
202         * class.c: Added inheritance check when a method is overloaded (from a
203         virtual method or when implementing an interface) and when a class is
204         inherited. Added functions to set a failure for a class and to 
205         retreive the exception from a failure.
206         * class-internals.h: Added fields to MonoClass to keep the exception
207         information status for inheritance (or other exceptions) to be thrown
208         later (i.e. not at load time).
209         * object.c: Throw the inheritance SecurityException when a type is to 
210         be created with either class or method inheritance violations.
211         * reflection.c|h: Fix when getting declsec from a class. Removed 
212         unrequired code for class. Improved sanity in parameter naming.
213         * security-manager.c|h: Added functions to check for class and method
214         inheritance.
215
216 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
217
218         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
219         and has_finalize in dynamic types as well.
220
221 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
222
223         * culture-info-table.h : fixed currency format for en-GB (and so on).
224
225 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
226
227         * gc.c: ensure the GC handles never have 0 as a value.
228
229 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
230
231         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
232         a pointer to a struct to unmanaged code. Fixes #72625.
233
234 2005-02-16  Martin Baulig  <martin@ximian.com>
235
236         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
237
238 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
239
240         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
241
242 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
243
244         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
245
246         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
247         UnmanagedFunctionPointerAttribute, use it for determining calling convention
248         etc. Fixes #71471.
249
250         * reflection.c (mono_custom_attrs_get_attr): New helper function.
251
252         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
253
254 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
255
256         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
257         changes to make the current context a field in MonoThread.
258
259 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
260
261         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
262         the last change.
263         
264         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
265         extracted from mono_marshal_get_native_wrapper.
266
267         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
268         to create wrappers around native functions.
269
270         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
271         delegates for arbitrary function pointers. Fixes #71472.
272
273 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
274
275         * threads.c: cleaned up the code a little.
276
277 2005-02-15  Martin Baulig  <martin@ximian.com>
278
279         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
280         the data table.
281
282         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
283         allocate larger chunks if needed.
284
285 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
286
287         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
288         in by mistake.
289
290 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
291
292         * domain.c: keep the domains in an array and ensure the domain ids
293         are kept small, so they can be used as indexes to domain-specific data
294         with a small memory overhead.
295
296 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
297
298         * icall.c: Handle byref types in Type icalls. Fixes #72544.
299
300 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
301
302         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
303
304 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
305
306         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
307
308         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
309         values.
310
311         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
312         
313 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
314
315         * domain-internals.h: add the hashtable here.
316
317         * class-internals.h: Remove `info' from MonoMethod
318
319         * domain.c: Add a new hashtable, jit_trampoline_hash
320
321 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
322
323         * object.c: don't set the value of static fields
324         (fixes bug#72494).
325
326 2005-02-11  Martin Baulig  <martin@ximian.com>
327
328         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
329         (mono_debug_add_method): Silently ignore the method if it's too big.
330         (mono_debug_add_type): Likewise.
331
332 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
333
334         * threads.c, appdomain.c: remove #ifdefs from the code.
335
336 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
337
338         * metadata-internals.h: Added flags to MonoAssembly to cache the most
339         common security informations. This allows us to stay in unmanaged code
340         when doing LinkDemand and it's special cases (except for the first 
341         time for initialization). The flags a very much used with --security.
342         * reflection.c|h: Added code to get declarative security attributes 
343         for LinkDemand and InheritanceDemand. This required to refactor the
344         existing code for Demand.
345         * security-manager.c|h: Added new method fields for the special cases
346         of LinkDemand.
347
348 2005-02-10  Martin Baulig  <martin@ximian.com>
349
350         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
351         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
352
353 2005-02-10  Martin Baulig  <martin@ximian.com>
354
355         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
356         debugging code; this is almost a complete rewrite.
357
358         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
359
360 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
361
362         * domain.c, object.h: expose mono_string_equal () and 
363         mono_string_hash ().
364         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
365         it's implemented in managed code.
366
367 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
368
369         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
370         lo leak objects between appdomains.
371
372 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
373
374         * assembly.c: old compilers compilation fix from 
375         robertj@gmx.net (Robert Jordan).
376
377 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
378
379         * class-internals.h: Little reminder for the future.
380
381         * debug-helpers.c: Fix up wrapper_type_names
382
383 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
384
385         * image.c, metadata-internals.h: when loading an image from a file,
386         mmap all of it and use the same codepaths as when using a
387         in-memory image: the code is simpler and we use less memory
388         (both writable and readonly).
389
390 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
391
392         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
393         API to alloc runtime data structures that need to be tracked by the
394         GC and contain pointers.
395         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
396         make the code more readable and eventually use a different GC.
397
398 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
399
400         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
401         for out arguments.
402         
403 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
404
405         * object.c: In release_type_locks(), don't release the cctor lock
406         if it has already been released. This fixes a crash in the
407         thread5 test.
408
409 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
410
411         * gc.c, marshal.c, icall.c: register a delegate for finalization
412         only when the native function pointer has been allocated for it.
413
414 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
415
416         * object.c: cleaned up some code, allocate objects that are
417         pointer free with the atomic malloc variant. Allocate memory
418         for static data from the mempool if it's pointer-free.
419         Allocate the bounds array at the end of the array data, when needed.
420         * object-internals.h, object.h: move a private function in a private
421         header.
422         * class.c: handle missing case in tracking references in fields.
423
424 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
425
426         * class.c, class-internals.h: keep track if a type has
427         reference fields in either the instance or static fields.
428
429 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
430
431         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
432         and renamed to MonoRuntimeInfo. Added fields to store the expected
433         framework assembly version. Changed mono_get_framework_version and
434         mono_get_runtime_version for a single mono_get_runtime_info method.
435         
436         * assembly.c: Added method to remap system assembly versions to the
437         current executing runtime version. Removed old mapping code.
438         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
439         
440         * icall.c, reflection.c: Track api changes.
441
442 2005-02-06  Miguel de Icaza  <miguel@novell.com>
443
444         * loader.c (method_from_memberref): Improve error reporting,
445         produce the class name instead of the typeref/typedef index. 
446
447 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
448
449         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
450
451 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
452
453         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
454         stdcall and charset name mangling.  Reorganize the code and add
455         some tracing stuff.
456
457 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
458
459         * monodiet.c: More iters!
460
461         * marshal.c: Iter usage.
462
463         * icall.c: Iter usage.
464
465         * object.c: Use iters.
466
467         * debug-helpers.c: More iters
468
469 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
470
471         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
472         under win32.
473
474 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
475
476         * mono-debug-debugger.c: use iters
477
478         * class.c, class-internals.h: mono_class_setup_events is static
479         now
480
481         * All callers: use iters
482
483 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
484
485         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
486         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
487
488 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
489
490         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
491
492         * marshal.h: Add prototypes for ldfld/stfld_remote.
493
494         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
495         this is called during startup.
496         
497 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
498
499         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
500         MonoThreadsSync struct private in monitor.c. Changed the way
501         MonoThreadsSync is allocated so it's faster and there is no
502         need to keep track of it with a finalizer and it uses less memory.
503         This also finally allows us to allocate mono objects as ptrfree when
504         there are no reference fields.
505
506 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
507
508         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
509         disappearing link to the GC interface and use them to simplify
510         the gchandles code.
511
512 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
513
514         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
515         stfld_remote which call mono_load/store_field_new. This allows methods
516         calling ldfld/stfld wrappers to be AOTed.
517
518         * console-io.c: Include sys/filio.h under solaris.
519         
520         * console-io.c: Include curses.h if needed correctly.
521
522 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
523         
524         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
525         method->klass as well.
526
527         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
528
529         * class.c (mono_class_init): Switch on lazy initialization of 
530         methods.
531
532         * class.c (mono_class_get_finalizer): Handle the case when the 
533         finalizer is inherited.
534
535 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
536
537         * console-io.c: <curses.h> is needed by term.h on solaris.
538
539 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
540
541         * icall.c, class-internals.h, monodiet.c, class.c: Remove
542         mono_class_setup_properties where possible. Remove this ftn from
543         the header file, and make it static.
544
545 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
546
547         * loader.c: Add missing setup_... call.
548
549         * class.c: Add missing setup_... calls.
550
551         * class.c (mono_class_init): Switch on lazy initialization of 
552         the generic vtable.
553         
554         * class.c (mono_class_init): Fix generics broken by the recent changes.
555
556         * monodiet.c (handle_type): Add missing setup_... calls.
557
558         * class.c: Back out garbage in previous patch.
559         
560         * class.c: Add missing setup_... calls.
561
562         * class.c (mono_class_get_method_from_name_flags): Avoid calling
563         mono_class_setup_methods () if possible.
564
565         * class-internals.h (MonoClass): Add 'has_cctor' flag.
566
567         * class-internals.h (MonoCachedClassInfo): New structure.
568
569         * class.c: Initialize properties and events fields of MonoClass lazily.
570
571         * class.c: Add infrastructure for lazily initializing the methods and
572         vtable fields of MonoClass. Not yet used.
573
574         * class.c (mono_class_get_finalizer): New helper function.
575
576         * class.c: Add infrastructure for loading some class related data from
577         an AOT file.
578
579         * object.c: Add infrastructure for initializing the vtable from data
580         in the AOT file.
581
582         * gc.c (run_finalize): Use mono_class_get_finalizer ().
583
584         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
585         appropriate initialization function before accessing parts of the
586         MonoClass structure.
587
588         * marshal.c: Fix warnings.
589         
590         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
591
592         * mono-debug-debugger.c (get_exception_message): Use 
593         mono_class_get_method_from_name_flags ().
594
595 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
596
597         * reflection.c, appdomain.c: Replace a few manual searches that
598         Zoltan missed. (Paolo approved this part of my initial patch).
599
600 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
601
602         * profiler.c: disable recording statistical events at report time.
603
604 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
605
606         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
607         to byteswap arrays of enum values, too (bug #72080).
608
609 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
610
611         * appdomain.c (set_domain_search_path): Allow this to be called if
612         domain->setup is not yet set.
613
614         * loader.c (mono_method_get_index): New helper function.
615
616         * loader.c reflection.c: Use mono_method_get_index ().
617
618         * class.c (mono_class_get_method_from_name_flags): New helper method.
619
620         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
621         this.
622
623         * class.c (mono_class_get_cctor): New helper method.
624
625         * string-icalls.c object.c class.c marshal.c reflection.c: Use
626         mono_class_get_method () to look up methods.
627
628 2005-02-01  Miguel de Icaza  <miguel@novell.com>
629
630         * console-io.c: Fix the build, this should work on Windows.
631
632 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
633
634         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
635         be set to null to keep things valid
636
637 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
638
639         * icall.c: added Console 2.0 icalls.
640         * Makefile.am: added console-io.[ch]
641         * console-io.[ch]: internal calls for Console 2.0 API.
642
643 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
644
645         * class.c: make sure we consider all the interfaces
646         when calculating max_interface_id (bug found by
647         Jeroen Frijters running ikvm).
648
649 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
650
651         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
652         valuetype fields to null.
653
654         * object.c (set_value): Ditto. Fixes #71669.    
655
656 2005-01-31  Martin Baulig  <martin@ximian.com>
657
658         * metadata.c (mono_metadata_has_generic_params): New public
659         function; checks whether something is a generic method.
660
661 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
662
663         * appdomain.c: fix infinite recursion when adding assemblies.
664
665 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
666
667         * object.c: Fix small typo to return all items for Environment.
668         GetCommandLineArgs.
669
670 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
671
672         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
673         reflection.c: more domain and assembly-unload related fixes
674         and memory leaks plugs.
675
676 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
677
678         * 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.
679
680 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
681
682         * loader.c (mono_method_signature): Make this method lazy
683         (mono_get_method_from_token): Don't computate the signature here.
684
685         Doing this saves quite a bit of memory. I got 90 kb on starting up
686         monodoc. It should also save some disk reads on startup.
687
688         * *: MonoMethod->signature might be NULL now. You *MUST* use
689         mono_method_signature.
690
691 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
692
693         * object.c (mono_runtime_get_main_args): Return an array from the
694         current domain here. Fixes #71938.
695
696 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
697
698         * monitor.c: formatting changes to comply with the
699         mono coding style and remove #ifdefs from the code.
700
701 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
702
703         * metadata.c, private.h: remove some unneeded data
704         and use a more compact representation for table schemas.
705
706 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
707
708         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
709         to get a better distribution in hash tables.
710         * *.c: use mono_aligned_addr_hash() where appropriate.
711         * assembly.c: make var static.
712
713 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
714
715         * domain-internals.h: Put MonoJitInfo on a diet.
716
717         * domain.c: Fix a warning.
718
719 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
720
721         * gc.c: rework the gc handles code to reuse handles
722         when freed.
723
724 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
725
726         * domain.c: fixed long standing bug in mono_string_equal() which
727         was brought to light with the ldstr changes.
728
729 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
730
731         * reflection.c: Remove warning by adding missing include for marshal.h
732
733 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
734
735         * domain.c, object.c: change the ldstr_table to hold
736         MonoString* as keys: makes the runtime isinterned lookup
737         faster and simplifies memory management.
738
739 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
740  
741         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
742         possible to add imperative security checks before calling the icall.
743         * reflection.c: Return security attributes on the original MonoMethod
744         (and not the wrapped one). This fix permissions on icalls.
745
746 2005-01-25  Dick Porter  <dick@ximian.com>
747
748         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
749         the check for mktime() support actually test the mktime() return
750         value.  "Fixes" bug 71682, though the output is still different to
751         MS.
752
753 2005-01-25  Martin Baulig  <martin@ximian.com>
754
755         * class.c (mono_class_is_assignable_from): Make this work for
756         generic instances.
757
758 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
759
760         * marshal.c (mono_string_utf8_to_builder)
761         (mono_string_builder_to_utf16): We might not have ownership of the
762         string. In thise case, we need to create a new buffer.
763
764         * object-internals.h (mono_stringbuilder_capacity): sb->str might
765         be null, in which case, use the default capacity.
766
767 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
768
769         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
770         GC events to the profiler.
771
772 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
773
774         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
775         if you don't want the GC to run.
776
777 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
778
779         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
780         start providing a GC API and keeping different implementations in
781         their own file.
782         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
783
784 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
785
786         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
787         mmap rather than allocating a huge buffer.
788         (mono_debug_close_mono_symbol_file): Free the buffer allocated
789         above.
790
791 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
792
793         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
794         and CheckExecutionRights.
795         * reflection.c|h: Keep the index of the declarative security to be 
796         used, instead of the pointer, when AOT compiler is used. Also add 
797         class initialization when requesting demands.
798         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
799         CheckExecutionRights. Both properties are now FALSE by default, and
800         unmodifiable, unless the --security option is used.
801
802 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
803
804         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
805         reflection.c: properly refcount images and assemblies, many leaks fixed.
806
807 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
808
809         * threadpool.c: increase the timeout for threads in the thread pool to
810         10s.  Fixes bug #67159.
811
812 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
813
814         * class-internals.h: Sun's compiler insists on explicit
815         signed on bit fields to handle then correctly.
816
817 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
818
819         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
820         Make the size of the array fit only the number of invalid path
821         chars that we have.
822
823         * class.c (_mono_class_get): Improve the error reporting when a
824         class referenced is not found, to assist debugging. 
825
826 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
827
828         * threads.c: fix off-by-one error.
829         * domain.c: free data allocated in the domain.
830
831 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
832
833         * reflection.c (mono_method_body_get_object): Fill out exception info
834         as well.
835
836         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
837         structure.
838         
839 2005-01-19  Martin Baulig  <martin@ximian.com>
840
841         * loader.c (mono_get_method_constrained): Make this work again.
842
843 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
844
845         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
846         guint16 to match the managed side.
847
848         * reflection.c (mono_reflection_body_get_object): Fill out local
849         variables array.
850
851         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
852         as well.
853
854         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
855         'local_var_sig_token'.
856
857 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
858
859         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
860         System.Drawing.
861
862         * reflection.c (mono_method_body_get_object): Handle abstract and
863         runtime methods.
864
865 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
866
867         * marshal.c, loader.c, class-internals.h, reflection.c:
868         store the emthod data for a wrapper in an array instead of a list.
869
870 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
871
872         * marshal.c: change the code to allocate memory more
873         conservatively for method wrappers.
874
875 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
876
877         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
878         fields from MonoClass to the marshal info structure where they belong.
879
880 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
881
882         * class.c, object.c, class-internals.h, marshal.c: rearrange
883         some fields and tweak some types to lower memory usage.
884
885 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
886
887         * threads.c (signal_thread_state_change): Handle the case when the
888         target thread is the current thread.
889
890         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
891
892         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
893         emit_ptr_to_object_conv. 
894
895         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
896         marshalling. Fixes #71352.
897
898 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
899
900         * metadata.h, blob.h: move table enum to blob.h so it can be included
901         in any header.
902         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
903         cut the size of MonoImage/MonoDynamicImage.
904
905 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
906
907         * profiler.c (mono_profiler_install_simple): Fix default arguments.
908
909 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
910
911         * reflection.c, reflection.h, icall.c: add a function to check
912         if an attribute type is defined for a metadata object.
913
914 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
915
916         * object-internals.h: Added some needed fields from StringBuilder class.
917         * marshal.c: Set the maxCapacity when creating a StringBuilder.
918
919 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
920
921         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
922         threads before shutting down the runtime.
923
924         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
925
926 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
927
928         * object-internal.h, threads.c: implement stacksize and 
929         parameterized thread start functionality (requires
930         matching corlib). Marked broken code for later removal.
931
932 2005-01-12  Martin Baulig  <martin@ximian.com>
933
934         * class-internals.h (MonoGenericClass): Moved the `initialized'
935         flag to MonoDynamicGenericClass, removed `init_pending'.
936         (MonoGenericInst): Added `is_reference' flag.
937
938 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
939
940         * reflection.c (mono_image_create_pefile): Only set the pe_offset
941         inside the MSDOS header. Fixes #71201.
942
943         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
944         gc thread.
945         (mono_domain_finalize): Ditto.
946
947 2005-01-12  Martin Baulig  <martin@ximian.com>
948
949         * class.c (mono_get_shared_generic_class): Use the cache for
950         non-dynamic generic classes.
951
952         * class-internals.h (mono_class_create_generic_2): Removed
953         function prototype, this function is now static inside class.c.
954
955         * class.c (mono_class_create_generic_2): Made this static, only
956         call it from mono_class_init() and mono_class_setup_parent().
957         (collect_implemented_interfaces_aux): Call mono_class_init() on
958         the interfaces we collect.
959         (mono_class_setup_vtable): Call mono_class_init (class->parent).
960
961 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
962
963         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
964         it a real thread handle.
965
966         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
967         MonoJitExceptionInfo, since each catch clause needs its own variable.
968         
969 2005-01-11  Dick Porter  <dick@ximian.com>
970
971         * image.c (mono_pe_file_open): New variant on mono_image_open()
972         that does not set up the CLI metadata; used for FileVersionInfo so
973         it can get the data for windows binaries too.
974         
975         * process.c (process_read_string_block): Don't read off the end of
976         the StringTable block.
977
978         These both fix bug 70766.
979
980 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
981
982         * gc.c: set some fields to NULL at GC cleanup time.
983         * threads.c: if we quit the main thread, call exit ().
984
985 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
986
987         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
988
989 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
990
991         * threads.h, threads.c, object.c: added accessor and settor for
992         main_thread. Handle it specially when exiting from it: wait
993         for other foreground threads to exit.
994
995 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
996
997         * process.c, verify.c: remove some bloat.
998
999 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
1000
1001         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
1002         the calling convention to cdecl under win32.
1003
1004 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
1005
1006         * object.c (mono_object_get_size): New function to get the size of
1007         an object instance.
1008
1009         * profiler.c (simple_allocation): Use above.
1010
1011 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
1012
1013         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
1014         ves_icall_System_AppDomain_getRootDomain (as it's not required to
1015         get an appdomain by it's id and we can't assume the root's id is 0).
1016         * domain-internals.h: Change the function prototype to match.
1017         * icall.c: Change the icall table for AppDomain.
1018
1019 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
1020
1021         * locales.c (string_invariant_compare_char): Only compute
1022         GUnicodeTypes in the case where we need them.  Test for ordinality
1023         first and return if so.
1024
1025         From the commit:
1026
1027                 /*
1028                  * FIXME: here we must use the information from c1type and c2type
1029                  * to find out the proper collation, even on the InvariantCulture, the
1030                  * sorting is not done by computing the unicode values, but their
1031                  * actual sort order.
1032                  */
1033
1034 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
1035
1036         * loader.c: for P/Invoke methods, allow the "Internal" shared
1037         library name to refer to the calling process symbol namespace.
1038
1039 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
1040
1041         * Makefile.am: Add the security manager to the build.
1042         * security-manager.c|h: New. Initialization of the security manager.
1043
1044 2005-01-07  Dick Porter  <dick@ximian.com>
1045
1046         * threads.c: 
1047         * monitor.c: Update thread state during Monitor and WaitHandle
1048         waits.  Fixes bug 71031.
1049
1050 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
1051
1052         * reflection.c (property_encode_signature): Correctly handle when the
1053         property has no methods.
1054
1055 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
1056
1057         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
1058         
1059         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
1060         fields from mb, not rmb. Fixes #71017.
1061
1062         * marshal.c (emit_ptr_to_str_conv): Add support for 
1063         ByValTStr -> string conversion. Fixes #71015.
1064
1065         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
1066
1067         * mempool.c (mono_mempool_contains_addr): New helper function.
1068
1069 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
1070
1071         * metadata.c (mono_metadata_compute_size): Fix size calculation of
1072         HasSematics encoded fields.
1073         
1074         * metadata.c (mono_type_to_unmanaged): Improve error message for 
1075         invalid string marshalling.
1076
1077         * metadata.c: Fix warnings.
1078         
1079 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
1080
1081         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
1082         profiler support.
1083
1084 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
1085
1086         * domain.c object.c domain-internals.h: Revert part of r38077 since the
1087         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
1088         tests.
1089
1090 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
1091
1092         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
1093         so methods containing these can be AOTed.
1094
1095 2005-01-03  Martin Baulig  <martin@ximian.com>
1096
1097         * loader.c (find_method): Removed the hack for generic instances.
1098         (method_from_memberref): If our parent is a generic instance, pass
1099         its generic type definition to find_method() and then inflate the
1100         method.
1101         (mono_get_method_constrained): Pass the generic type definition to
1102         find_method() and inflate the method later.
1103
1104         * class-internals.h (MonoStats): Added `generic_class_count'.
1105
1106         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
1107         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
1108
1109         * reflection.c (mono_custom_attrs_from_params): Don't ignore
1110         generic type definitions.
1111
1112 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
1113
1114         * loader.c icall.c: Fix warnings.
1115
1116 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
1117
1118         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
1119         blittable types. Fixes #70864.
1120
1121 2004-12-29  Martin Baulig  <martin@ximian.com>
1122
1123         * icall.c
1124         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
1125
1126         * reflection.c (mono_method_get_object): Create a
1127         "System.Reflection.MonoGenericMethod" for inflated methods; don't
1128         call mono_get_inflated_method().
1129
1130         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
1131
1132 2004-12-27  Martin Baulig  <martin@ximian.com>
1133
1134         * class-internals.h (MonoMethod): Added `is_inflated' flag.
1135         (MonoMethodInflated): Added `inflated' field.
1136
1137         * class.c (mono_class_inflate_generic_method): Don't really
1138         inflate the method here; just set the `is_inflated' flag in the
1139         MonoMethod.
1140         (mono_class_get_inflated_method): Actually inflate the method here
1141         if it's not already inflated; we use the MonoMethodInflated's new
1142         `inflated' field as a cache.
1143
1144 2004-12-26  Martin Baulig  <martin@ximian.com>
1145
1146         * class.c
1147         (inflate_generic_class): Moved some code out of inflate_generic_type().
1148         (mono_class_inflate_generic_method): If we're already inflated,
1149         inflate the context and use the declaring method; ie. make sure
1150         the declaring method of an inflated method is always the generic
1151         method definition.
1152         (mono_class_create_from_typedef): Create
1153         `class->generic_container->context->gclass'.
1154
1155 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
1156
1157         * metadata-internals.h, marshal.c, reflection.c: More
1158         MonoGHashTable->GHashTable.
1159
1160         * domain-internals.h, class.c: Change MonoGHashTable's into
1161         GHashTables for some cases where no gc stuff is used
1162
1163         All users: update apis
1164
1165 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
1166
1167         * metadata.c (builtin_types): Make this `const'. Makes this get
1168         put into the shareable section.
1169         (mono_metadata_init): Casts to make gcc happy.
1170
1171 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
1172
1173         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
1174
1175 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
1176
1177         * icall.c: Added an internal call to retrieve the position and length
1178         of assembly-level declarative security attributes (RequestMinimum, 
1179         RequestOptional and RequestRefuse). This is used by the Assembly class
1180         to re-create the corresponding permission sets.
1181
1182 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
1183
1184         * marshal.c: fix the stelemref wrapper to be type correct
1185         (and faster).
1186
1187 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
1188
1189         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
1190         to do key & 0x7fffffff. Hashtable already does this. It just
1191         results in longer code.
1192
1193 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
1194
1195         * appdomain.c: Bump corlib version.
1196         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
1197         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
1198         * reflection.c|h: Add functions to get declarative security infos
1199         (blob position and length) for assemblies, classes and methods.
1200
1201 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
1202
1203         * reflection.c: sort the constant table (bug #70693).
1204
1205 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
1206
1207         * object-internals.h, threads.c, domain.c: add accessors for
1208         the MonoThread and MonoDomain tls keys.
1209
1210 2004-12-18  Martin Baulig  <martin@ximian.com>
1211
1212         * class.c (inflate_generic_type): If we're inflating a generic
1213         instance, set `ngclass->context->container = context->container';
1214         ie. the container we inflated into.
1215
1216         * metadata.c (mono_metadata_parse_generic_param): Reflect above
1217         inflate_generic_type() changes.
1218
1219 2004-12-17  Martin Baulig  <martin@ximian.com>
1220
1221         * class-internals.h
1222         (MonoGenericClass): Replaced `MonoType *generic_type' with
1223         `MonoClass *generic_class'.  Removed `dynamic_info'; if
1224         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
1225         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
1226
1227 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
1228
1229         * exception.c (mono_exception_from_token): New helper function.
1230
1231 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
1232
1233         * assembly.c (mono_assembly_load_with_partial_name): Call 
1234         mono_assembly_loaded before invoking the preload hooks. Fixes
1235         #70564.
1236
1237         * object-internals.h (MonoThread): Change culture_info and 
1238         ui_culture_info into an array.
1239
1240         * threads.c: Cache culture info objects from more than one appdomain.
1241
1242         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
1243         current UI culture.
1244
1245 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
1246
1247         * threads.h threads.c appdomain.c: Clear the culture_info field of
1248         all threads during unloading if they point to an object in the dying
1249         appdomain.
1250
1251 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
1252
1253         * culture-info.h (TextInfoEntry): New struct
1254         * object-internals.h: sync with managed
1255         * locales.c: fill the `text_info_data' field
1256         * culture-info-tables.h: update
1257
1258 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
1259
1260         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
1261         collector.
1262
1263 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
1264
1265         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
1266         (ves_icall_ModuleBuilder_getMethodToken): Ditto
1267
1268 2004-12-12  Martin Baulig  <martin@ximian.com>
1269
1270         * mono-debug-debugger.c (write_type): If we're an enum and the
1271         builtin types have already been initialized, call mono_class_init().
1272
1273 2004-12-11  Martin Baulig  <martin@ximian.com>
1274
1275         * metadata.c (mono_metadata_load_generic_params): Added
1276         `MonoGenericContainer *parent_container' argument; automatically
1277         compute `container->is_method'; pass the correct owner to
1278         get_constraints().      
1279
1280         * reflection.c (compare_genericparam): Sort the GenericParam table
1281         according to increasing owners. 
1282
1283 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
1284
1285         * profiler.c: allow disabling the default profiler.
1286
1287 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
1288
1289         * decimal.c, icall.c: allow disabling System.Decimal support.
1290
1291 2004-12-09  Marek Safar <marek.safar@seznam.cz>
1292
1293         * reflection.c: Add support for null attribute arguments.
1294
1295 2004-12-09  Martin Baulig  <martin@ximian.com>
1296
1297         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
1298         names to get rid of compiler warnings.
1299
1300 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
1301
1302         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
1303         mono_marshal_load_type_info (). Fixes #69625.
1304         (mono_marshal_get_ptr_to_struct): Likewise.
1305
1306 2004-12-08  Martin Baulig  <martin@ximian.com>
1307
1308         * mono-debug.h: Bumped version number to 47.
1309
1310         * mono-debug-debugger.c
1311         (mono_debugger_event_handler, mono_debugger_event): Take two
1312         guint64 arguments insteed of a gpointer and a guint32.  
1313
1314 2004-12-08  Martin Baulig  <martin@ximian.com>
1315
1316         * debug-mono-symfile.h
1317         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
1318         `address' to `native_offset'.
1319
1320 2004-12-08  Martin Baulig  <martin@ximian.com>
1321
1322         * class.c (mono_class_create_from_typespec): Only inflate if we
1323         either have `context->gclass' or `context->gmethod'.
1324
1325 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
1326
1327         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
1328
1329         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
1330
1331         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
1332
1333         * reflection.c (mono_assembly_get_object): Remove the workaround put
1334         in for the release.
1335         
1336         * appdomain.c: Use the corlib_internal field from MonoAssembly.
1337
1338         * appdomain.c: Bump corlib version.
1339
1340         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
1341         be visible in other appdomains.
1342
1343 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
1344
1345         * threads.c: Interlocked inc and dec for longs were messed up,
1346         use a KISS based impl for this. Fixes 70234
1347
1348 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
1349
1350         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
1351
1352 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1353
1354         * icall.c: fix to follow policy not to allow struct
1355         arguments in icalls.
1356
1357 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1358
1359         * process.c: make the patch that handles spaces in file paths work
1360         on mono/windows too.
1361
1362 2004-12-06  Martin Baulig  <martin@ximian.com>
1363
1364         * class.c (mono_class_create_generic): Call
1365         mono_class_setup_supertypes() if we're dynamic.
1366         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
1367
1368 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
1369
1370         * object-internals.h: Add new fields to MonoThread.
1371
1372         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1373
1374         * icall.c threads-types.h threads.c: Add new icalls.
1375
1376         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
1377
1378         * object-internals.h (MonoReflectionAssembly): Sync object layout with
1379         managed side.
1380
1381         * appdomain.c: Bump corlib version.
1382
1383         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
1384         internal assemblies. Fixes #69181.
1385
1386 2004-12-05  Martin Baulig  <martin@ximian.com>
1387
1388         * class.c (mono_class_inflate_generic_signature): Make this a
1389         no-op if `context' is NULL or we don't have any type parameters;
1390         also copy `sentinelpos'.        
1391
1392 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
1393
1394         * image.c: Add unbox_wrapper_cache.
1395
1396         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
1397
1398         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
1399         function generator.
1400         
1401         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
1402         Fixes #70173.
1403
1404         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
1405         
1406 2004-12-04  Martin Baulig  <martin@ximian.com>
1407
1408         * loader.c (mono_method_get_signature_full): New public function;
1409         like mono_method_get_signature(), but with an additional
1410         `MonoGenericContext *' argument.
1411
1412         * class.c (mono_class_inflate_generic_signature): Formerly known
1413         as inflate_generic_signature(); make this public.
1414
1415 2004-12-04  Martin Baulig  <martin@ximian.com>
1416
1417         * metadata.c
1418         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
1419         instead of a `MonoGenericContainer *'.  
1420         (mono_metadata_parse_array_full): Likewise.
1421         (mono_metadata_parse_signature_full): Likewise.
1422         (mono_metadata_parse_method_signature_full): Likewise.
1423         (mono_metadata_parse_generic_inst): Likewise.
1424         (mono_metadata_parse_generic_param): Likewise.
1425         (mono_metadata_parse_mh_full): Likewise.
1426         (mono_type_create_from_typespec_full): Likewise.
1427
1428 2004-12-03  Martin Baulig  <martin@ximian.com>
1429
1430         * class-internals.h (MonoGenericContainer): Replaced the
1431         `MonoGenericContext * pointer with a `MonoGenericContext'
1432         structure and made it the first element.
1433
1434 2004-12-03  Martin Baulig  <martin@ximian.com>
1435
1436         * class.c
1437         (inflate_generic_type): Set the `context->container' when creating
1438         a new MonoGenericContext.
1439         (mono_class_inflate_generic_method): Likewise.
1440         (mono_class_create_from_typespec): Just use `context->container'
1441         to get the container.
1442
1443         * loader.c (method_from_methodspec): Set `context->parent' from
1444         `context->container' - and if that's a method container, use its
1445         parent.  Also set the `context->container' when creating a new
1446         MonoGenericContext.
1447         (mono_get_method_from_token): Use just `context->container' to get
1448         the container.
1449
1450         * metadata.c (do_mono_metadata_parse_generic_class): Also set
1451         `gclass->context->container'.
1452
1453         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
1454         the `context->container' when creating a new MonoGenericContext.
1455
1456 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
1457
1458         * reflection.c (compare_genericparam): Sort params with identical
1459         owner by their number. Fixes gen-111 on sparc.
1460
1461 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
1462
1463         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
1464         around the domain changes.
1465
1466         * appdomain.c (mono_domain_unload): Handle the case when the thread
1467         calling Unload is itself being aborted during unloading. Fixes #70022.
1468
1469         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
1470
1471         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
1472         checkpoint_func as an icall so it gets a wrapper.
1473         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
1474         in the cross-appdomain wrappers too.
1475
1476         * threads.c (mono_thread_has_appdomain_ref): Make this public.
1477
1478         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
1479
1480         * reflection.c: Fix some memory leaks.
1481         
1482 2004-12-02  Martin Baulig  <martin@ximian.com>
1483
1484         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
1485
1486         * metadata.c (generic_class_cache): New static hashtable.
1487         (mono_metadata_lookup_generic_class): New public method.
1488
1489 2004-12-02  Martin Baulig  <martin@ximian.com>
1490
1491         * class.c (mono_class_create_from_typedef): Call
1492         mono_class_setup_parent() and mono_class_create_mono_type() before
1493         parsing the interfaces.
1494
1495 2004-12-02  Martin Baulig  <martin@ximian.com>
1496
1497         * metadata.c (generic_inst_cache): New static hashtable.
1498         (mono_metadata_lookup_generic_inst): New public function.
1499         (mono_metadata_inflate_generic_inst): New public function.
1500         (mono_metadata_parse_generic_inst): New public function.
1501         (do_mono_metadata_parse_generic_class): Use the new
1502         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
1503         since this'll also use the cache.
1504
1505         * reflection.c (mono_reflection_bind_generic_method_parameters):
1506         Use mono_metadata_lookup_generic_inst() to use the new cache.
1507
1508         * class.c (inflate_mono_type): Use
1509         mono_metadata_inflate_generic_inst() to inflate a generic
1510         instance; this'll also use the new cache.
1511
1512         * loader.c (method_from_methodspec): Use
1513         mono_metadata_parse_generic_inst() and
1514         mono_metadata_inflate_generic_inst() rather than parsing it
1515         manually, so we can use the new cache.
1516
1517 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
1518
1519         * threads.c (wait_for_tids): Do not incorrectly free threads when 
1520         the wait times out.
1521
1522 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1523
1524         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
1525         iter->args based on whether parameters are passed in registers (i.e.
1526         MONO_ARCH_REGPARMS is defined)
1527
1528 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
1529
1530         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
1531         the exception message. Fixes #70070.
1532         (method_from_methodspec): Fix warnings.
1533
1534 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1535
1536         * process.c: (complete_path) return the path quoted
1537
1538 2004-12-01  Martin Baulig  <martin@ximian.com>
1539
1540         * class-internals.h (MonoGenericInst): New structure.
1541         (MonoGenericClass): Replaced `type_argc', `type_argv' and
1542         `is_open' with `MonoGenericInst *inst'.
1543         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
1544         `is_open' with `MonoGenericInst *inst'.
1545
1546 2004-11-30  Martin Baulig  <martin@ximian.com>
1547
1548         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
1549
1550         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
1551         to `generic_class_cache'.
1552
1553         * metadata.c
1554         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
1555         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
1556         (mono_generic_inst_is_valuetype): Renamed to
1557         mono_generic_class_is_valuetype().
1558
1559         * class-internals.h
1560         (MonoGenericInst): Renamed to MonoGenericClass.
1561         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
1562         (MonoClass): Renamed `generic_inst' to `generic_class'.
1563         (MonoGenericContext): Renamed `ginst' to `gclass'.
1564
1565         * object-internals.h
1566         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
1567
1568         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
1569         mono_reflection_generic_class_initialize().
1570
1571         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
1572         now known as "System.Reflection.MonoGenericClass".
1573         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
1574
1575 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
1576
1577         * class-internals.h: Added a flag field to MonoClass to cache the
1578         declarative security attributes actions associated with the class.
1579         * domain-internals.h: Added booleans to MonoJitInfo to cache the
1580         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
1581         applicable to the JITted method.
1582         * reflection.c|h: Added functions to extract (as flags) which security
1583         actions are available (declaratively) for a method, class or assembly.
1584         * metadata.c|h: Added functions to search the declarative security
1585         table in the metadata.
1586         
1587 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
1588
1589         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
1590         EXPORTEDTYPES are already in the class name cache, so there is no
1591         need to add extra code here to look at them. Just removes a bit of
1592         cruft.
1593
1594         (ves_icall_System_Environment_get_TickCount): No need for #if
1595         WINDOWS. We already have the code in io-layer.
1596
1597 2004-11-28  Martin Baulig  <martin@ximian.com>
1598
1599         * loader.c
1600         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
1601         Fixes gen-112.cs.
1602
1603 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
1604
1605         * assembly.c (do_mono_assembly_open): Instead of having a
1606         conditional WITH_BUNDLE, incorporate support for bundles here, by
1607         having a global `bundles' variable holding a pointer to the actual
1608         bundles. 
1609
1610         (mono_register_bundled_assemblies): New API call used by the
1611         bundle code. 
1612
1613         See mkbundle.1 for details.
1614         
1615 2004-11-27  Martin Baulig  <martin@ximian.com>
1616
1617         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
1618         the vtable for generic methods.
1619
1620 2004-11-26  Martin Baulig  <martin@ximian.com>
1621
1622         * metadata.c
1623         (mono_metadata_generic_method_hash): New public function.
1624         (mono_metadata_generic_method_equal): Likewise.
1625
1626         * class-internals.h
1627         (MonoGenericContainer): Added `GHashTable *method_hash'.
1628
1629         * reflection.c (ReflectionMethodBuilder): Added
1630         `MonoGenericContainer *generic_container'.
1631         (reflection_methodbuilder_to_mono_method): Don't create a new
1632         MonoGenericContainer each time we're called.
1633         (mono_reflection_bind_generic_method_parameters): Use
1634         `container->method_hash' to cache the results so we don't create a
1635         different method if we're called several times with the same
1636         arguments.
1637
1638         * loader.c (method_from_methodspec): Use the new
1639         `container->method_hash' here, too.
1640
1641 2004-11-26  Martin Baulig  <martin@ximian.com>
1642
1643         * class.c (inflate_generic_signature): Correctly compute
1644         `res->has_type_parameters'.
1645         (mono_class_vtable): Use the `has_type_parameters' flag to
1646         determine whether we're a generic method.
1647
1648         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
1649
1650 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
1651
1652         * object.c (mono_runtime_run_main): Fix a small memory leak.
1653
1654 2004-11-25  Martin Baulig  <martin@ximian.com>
1655
1656         * class.c (set_generic_param_owner): Fixed the loop.
1657
1658 2004-11-25  Martin Baulig  <martin@ximian.com>
1659
1660         * object.c (mono_class_vtable): Don't create any JIT wrappers for
1661         generic methods.
1662
1663 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
1664
1665         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
1666         names. Fixes #69787.
1667
1668 2004-11-24  Martin Baulig  <martin@ximian.com>
1669
1670         * class.c (mono_class_create_generic_2): If we don't have a
1671         `ginst->parent', inflate `gklass->parent' to get our parent.
1672
1673 2004-11-24  Martin Baulig  <martin@ximian.com>
1674
1675         * reflection.c (compare_genericparam): Correctly sort the
1676         GenericParam table; fixes #69779.
1677
1678 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
1679
1680         * reflection.c: When writing a PE file, don't create a huge
1681         buffer in memory. Just write the arrays we have to the file.
1682         This reduces memory usage.
1683
1684         * metadata-internals.h: MonoDynamicStream pefile is no longer used
1685         globally.
1686
1687 2004-11-17  Martin Baulig  <martin@ximian.com>
1688
1689         * class.c (mono_class_init): Don't setup `class->parent' for
1690         dynamic instances; moved this to mono_class_generic_2().
1691         (mono_class_create_generic): Also set `klass->inited' for dynamic
1692         generic instances.
1693         (mono_class_create_generic_2): Don't do anything for dynamic
1694         generic instances.  Set `klass->parent' here and also call
1695         mono_class_setup_parent() here. 
1696
1697         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
1698         `MonoType *parent' argument; set `ginst->parent' before calling
1699         mono_class_create_generic_2(), so we set the correct parent.
1700
1701 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
1702
1703         * reflection.c: allow getting attributes from ModuleBuilder
1704         (used by ikvm).
1705
1706 2004-11-17  Martin Baulig  <martin@ximian.com>
1707
1708         * class.c (mono_class_create_from_typedef): If a type parameter is
1709         inherited from an outer class, set its owner to that class.
1710
1711 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
1712
1713         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
1714           for (int*) written size. This fixes bug #69592.
1715
1716 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
1717
1718         * icall.c: Added IsAuthenticodePresnet internal call.
1719         * image.c|h: New function that check a MonoImage for an Authenticode
1720         signature in the certificate PE data directory.
1721         * security.c|h: New internal call to ask the runtime if an 
1722         Authenticode signature seems referenced in the PE header.
1723
1724 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
1725
1726         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
1727
1728         * reflection.c (mono_image_create_pefile): Free the assembly streams
1729         after writing out the assembly file.
1730
1731         * object.c (mono_runtime_run_main): Fix small memory leak.
1732
1733         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
1734         property access modifiers. Fixes #69389.
1735
1736 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
1737
1738         * domain.c, object.c, object-internals.h, domain-internals.h,
1739         object.h, marshal.c: keep dynamic code info per domain.
1740
1741 2004-11-15  Martin Baulig  <martin@ximian.com>
1742
1743         * class.c (mono_type_get_name_recurse): Put type arguments in
1744         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
1745         see bug #68387.
1746
1747 2004-11-15  Martin Baulig  <martin@ximian.com>
1748
1749         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
1750         (mono_class_setup_vtable): When computing `the_cname' for a
1751         generic instance, don't include the namespace since we'd otherwise
1752         add it twice.
1753
1754 2004-11-15  Martin Baulig  <martin@ximian.com>
1755
1756         * class.c (mono_class_create_generic): Changed return type to void.
1757         (mono_class_create_generic_2): New public function; setup
1758         `class->method', `class->field' and `class->interfaces' here
1759         instead of in mono_class_init().
1760
1761         * class.h (mono_class_create_generic): Moved to class-internals.h.
1762
1763 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
1764
1765         * reflection.c (mono_image_create_pefile): take a file HANDLE.
1766         rather than writing to memory, write to this file. Right now,
1767         we are just writting into a buffer, and copying that. However
1768         we can avoid the buffer later.
1769
1770         (mono_dynamic_stream_reset): new function
1771
1772         * icall.c, object-internals.h: update for the above.
1773
1774 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
1775
1776         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
1777         have been using gc'd memory. First it is slower, unlikely
1778         the comment in the source code said, secondly, it increases
1779         our footprint to do it in the gc.
1780
1781         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
1782         the method so that it does not have to copy to managed code.
1783
1784 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
1785
1786         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
1787
1788 2004-11-12  Martin Baulig  <martin@localhost>
1789
1790         * reflection.c (mono_image_create_token): Allow generic method
1791         definitions here, since they may appear in an `.override'; see
1792         gen-98/gen-99 for an example.
1793
1794 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
1795
1796         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
1797         #69365.
1798
1799         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
1800         descriptive.
1801
1802 2004-11-11  Martin Baulig  <martin@ximian.com>
1803
1804         * class.c (mono_class_setup_vtable): In an explicit interface
1805         implementation, the method name now includes the arity.
1806
1807 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
1808
1809         * object.c (mono_array_full_copy): Fix warning.
1810
1811 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
1812
1813         * appdomain.c: Removed look_for_method_by_name(). Use the new method
1814         mono_class_get_method_from_name() instead.
1815         
1816         * class-internals.h: Added two new types of wrappers. 
1817         Added MonoRemotingTarget enum. Added new trampoline function type, which
1818         takes an additional MonoRemotingTarget value as parameter, so it is
1819         possible to request a trampoline for a specific target.
1820         
1821         * class.c: Added new mono_class_get_method_from_name() method.
1822         
1823         * class.h: In MonoRemoteClass, we can have now to vtables, one for
1824         general remoting sinks and one specific for cross domain calls.
1825         
1826         * debug-helpers.c: Added new wrapper names.
1827         
1828         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
1829         of a remote class.
1830         
1831         * image.c: Porperly delete value objects form the remoting invoke hashtable.
1832         
1833         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
1834         with several other methods (mono_marshal_get_xappdomain_dispatch,
1835         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
1836         and others) can generate a fast remoting wrapper for cross domain calls.
1837         More information can be found in docs/remoting.
1838         Other changes: Removed mono_find_method_by_name, and used
1839         mono_class_get_method_from_name instead.
1840         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
1841         is stored in the remoting invoke hashtable.
1842         
1843         * marshal.h: published the new method for getting the xdomain wrapper,
1844         and also added a method for getting the adequate wrapper for a given
1845         method and target.
1846         
1847         * object-internals.h, object.c: Added a couple of methods for capying and
1848         cloning arrays.
1849         Modified mono_install_remoting_trampoline, which takes the new remoting
1850         trampoline that has a remoting target as parameter.
1851         mono_class_proxy_vtable now also takes a remoting target as parameter, and
1852         will return the most suitable vtable for the target.
1853         Added mono_remote_class_vtable, which returns the vtable of a remote class
1854         (which can be the normal remoting vtable or the xdomain vtable).
1855         
1856         * threads.c: the xdomain invoke and dispatch wrappers must also be
1857         protected against interruptions.
1858
1859 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1860
1861         * icall.c: use memmove in BlockCopyInternal when the source and
1862         destination arrays are the same.
1863
1864 2004-11-09  Martin Baulig  <martin@ximian.com>
1865
1866         * class-internals.h (MonoGenericContainer): Removed `method' and
1867         `signature', replaced them with `is_method' and `is_signature'
1868         flags.  Added `context'.
1869
1870         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
1871         instead of a `MonoGenericContainer *'.
1872
1873         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
1874         for dynamic type parameters.
1875         (mono_metadata_load_generic_params): Setup `container->context'.
1876
1877         * reflection.c (mono_reflection_setup_generic_class): Setup
1878         `tb->generic_container->context'.
1879         (do_mono_reflection_bind_generic_parameters): Use
1880         mono_class_inflate_generic_type() to correctly inflate types,
1881         rather than using our own hack just for MONO_TYPE_VAR.
1882
1883 2004-11-09  Martin Baulig  <martin@ximian.com>
1884
1885         * class.c (mono_class_inflate_generic_method): Small fix; don't
1886         crash here.
1887
1888         * icall.c
1889         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
1890         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
1891         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
1892         (ves_icall_Type_BindGenericParameters): Likewise.
1893         (ves_icall_Type_get_IsGenericInstance): Likewise.
1894         (ves_icall_Type_GetGenericParameterPosition): Likewise.
1895         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
1896         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1897         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1898
1899 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
1900
1901         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
1902         assembly versions and public key tokens. Fixes #69113.
1903
1904 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
1905
1906         * metadata.c: fix bug introduced with the type cache changes
1907         on 2004-11-06.
1908
1909 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
1910
1911         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
1912         the MonoClass pointer instead of the token in exception clauses.
1913         * reflection.c: updates for the above and make the code not depend
1914         on the structure of MonoExceptionClause.
1915
1916 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
1917
1918         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
1919         Add support for dynamic assemblies. Fixes #69114.
1920
1921         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
1922
1923 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
1924
1925         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
1926         since most only those methods use it. the code member of
1927         MonoMethodPInvoke was dead, so that can be removed too. Also,
1928         remove inline_count (again, not used), and move slot so that it
1929         can share bits with some other flags. This saves 8 bytes in the
1930         structure and gives us about 50 kb back for mcs helloworld.cs
1931
1932         * *.[ch]: Do naming changes for the above.
1933
1934         * loader.c (mono_method_get_header): Lazily init the header
1935         on first access.
1936         (mono_get_method_from_token): don't init the header here
1937         (mono_free_method): the header may never be allocated
1938
1939         Overall, this saves 150 kb of unmanaged allocations
1940         for mcs helloworld.cs. That accounts for 10% of the unmanaged
1941         memory at runtime.
1942         
1943         * loader.c, loader.h (mono_method_get_header): new accessor.
1944
1945         * *.[ch]: use the above method. Prepares us to lazily load
1946         the header.
1947
1948         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
1949         three warnings, which are actual bugs (see 69206).
1950
1951         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
1952         unused. Saves a cool 4 bytes / method.
1953
1954 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
1955
1956         * metadata.c (builtin_types): Add types for System.Object here.
1957         (mono_metadata_parse_type_full): Cache MonoType*'s that are
1958         for a class or valuetype from klass->this_arg or klass->byval_arg.
1959
1960         On mcs for a hello world, this gets us down from 21836 MonoType's
1961         to 14560.
1962
1963         (mono_metadata_free_type): Account for the above change.
1964
1965 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
1966
1967         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
1968         exception instead of asserting if name is null.
1969         (ves_icall_System_AppDomain_GetData): Ditto.
1970
1971 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
1972
1973         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
1974         EnumBuilder.
1975
1976         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
1977         Return NULL when the domain does not have entry_assembly set.
1978
1979         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
1980         Add a 'resource_modules' argument.
1981         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
1982
1983         * reflection.c (mono_reflection_create_runtime_class): Move setting
1984         of wastypebuilder here, so mono_get_type_object () returns a MonoType
1985         for enums too.
1986
1987         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
1988         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
1989         Throw an ArgumentNullException if 'ptr' is null.
1990
1991         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
1992         assemblies here. Fixes #69020.
1993
1994 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
1995
1996         * reflection.c (build_compressed_metadata): Fix the previous patch for
1997         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
1998         the stack.
1999
2000 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
2001
2002         * assembly.c (mono_assembly_names_equal): Allow a match if one of
2003         the cultures is false. Fixes #69090.
2004
2005         * reflection.c (build_compressed_metadata): Fix invalid memory read 
2006         detected by valgrind.
2007         
2008         * reflection.c (mono_reflection_get_type): Avoid triggering a 
2009         TypeResolve multiple times for the same type. Fixes #65577.
2010
2011 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
2012
2013         * marshal.c: Avoid using ldftn to call managed functions. It is
2014         much slower than just a call.
2015
2016         * reflection.c (mono_module_get_object): free the basename we
2017         allocate here from glib.
2018         
2019         * reflection.c (ensure_runtime_vtable): make sure to free
2020         overrides.  Also, we were allocating an array of MonoMethod not an
2021         array of MonoMethod*.
2022
2023         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
2024
2025         * image.c (mono_image_close): free image->guid here.
2026
2027 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
2028
2029         * reflection.c: Fix some spec conformance issues with the PE file
2030         structures so mcs compiled apps run on the Net 2.0 beta.
2031
2032 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
2033
2034         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
2035         Implement this. Fixes #67264.
2036
2037         * debug-helpers.h debug-helpers.c marshal.c: Move 
2038         mono_find_method_by_name to debug-helpers.c.
2039
2040 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
2041
2042         * object.c (mono_release_type_locks): type_initialization_hash is
2043         a GHashTable.
2044
2045         * reflection.c object.c object-internals.h: Fix warnings.
2046
2047         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
2048         without accessors. Fixes #61561.
2049
2050         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
2051         application base from the root domain if not set. Fixes #65641.
2052         (mono_runtime_init): Fix warning.
2053
2054 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2055
2056         * appdomain.c: call mono_thread_pool_init.
2057         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
2058         of worker threads based on the number of CPUs and the environment
2059         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
2060         for non-windows (windows) systems.
2061
2062 2004-10-27  Chris Toshok  <toshok@ximian.com>
2063
2064         * mono-debug-debugger.c (write_class): don't call mono_class_init
2065         here, as even with the check for (!klass->init_pending), we get
2066         into a situation where we're hitting cycles in class
2067         initialization.  Fixes #68816.
2068
2069 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
2070
2071         * image.c: Avoid overwriting values in the loaded_images_hash when an
2072         assembly is loaded multiple times. Fixes #61152.
2073
2074         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
2075         so multiple satellite assemblies for the same name can be loaded.
2076         Fixes #68259.
2077
2078         * mono_domain_assembly_preload: Actually return the loaded assembly, 
2079         not NULL.
2080
2081         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
2082         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
2083
2084         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
2085         pending finalizers are not invoked after the appdomain has been 
2086         unloaded. Fixes #67862.
2087
2088 2004-10-22  Martin Baulig  <martin@ximian.com>
2089
2090         * mono-debug-debugger.c
2091         (mono_debugger_runtime_invoke): Don't box valuetypes.
2092
2093 2004-10-22  Chris Toshok  <toshok@ximian.com>
2094
2095         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
2096         don't hide private methods.
2097
2098 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
2099
2100         * icall.c: Allows the runtime to "share" (when known) the public key
2101         token of an assembly. This avoid the need to recalculate the token 
2102         (from the public key) in managed code.
2103
2104 2004-10-21  Chris Toshok  <toshok@ximian.com>
2105
2106         * debug-helpers.c (append_class_name): argh, revert last patch.
2107         
2108 2004-10-21  Chris Toshok  <toshok@ximian.com>
2109
2110         * debug-helpers.c (append_class_name): use '+' as the delimiter,
2111         not '/', so that it matches what the debugger uses to look up
2112         methods.
2113
2114 2004-10-21  Martin Baulig  <martin@ximian.com>
2115
2116         * mono-debug-debugger.c (mono_debugger_throw_exception): New
2117         public method; this is called each time an exception is thrown and
2118         allows the debugger to use exception catch points.
2119
2120 2004-10-21  Martin Baulig  <martin@ximian.com>
2121
2122         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
2123         the stack pointer and the exception object in some struct and pass
2124         that to the debugger.
2125
2126 2004-10-21  Chris Toshok  <toshok@ximian.com>
2127
2128         * mono-debug-debugger.c (do_write_class): add instance/static
2129         event support.  We don't expose "raise" or "other" yet.
2130         (event_is_static): new method.
2131
2132 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
2133
2134         * mono-debug-debugger.c
2135         (mono_debugger_handle_exception): Remove
2136         bogus return value for fussy compilers.
2137
2138 2004-10-20  Martin Baulig  <martin@ximian.com>
2139
2140         * mono-debug-debugger.c
2141         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
2142         (mono_debugger_handled_exception): Likewise.
2143
2144 2004-10-20  Martin Baulig  <martin@ximian.com>
2145
2146         * mono-debug-debugger.h (MonoDebuggerEvent): Added
2147         MONO_DEBUGGER_EVENT_EXCEPTION.
2148
2149         * mono-debug-debugger.c (mono_debugger_handle_exception): New
2150         public function to send the debugger a notification for an
2151         exception and inform it about a catch/finally clause.
2152
2153 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
2154
2155         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
2156         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
2157         fix 2.95 build. 
2158
2159         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
2160
2161 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
2162
2163         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
2164         marshalled as [In,Out]. Fixes #58325.
2165
2166 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
2167
2168         * reflection.c (mono_method_body_get_object): Implement some fields.
2169
2170 2004-10-12  Martin Baulig  <martin@ximian.com>
2171
2172         * reflection.c (mono_reflection_bind_generic_parameters): Small
2173         fix, correctly retrieve our parent from a generic instance.
2174
2175 2004-10-12  Martin Baulig  <martin@ximian.com>
2176
2177         * metadata.c (mono_metadata_generic_param_equal): We always have
2178         an owner.
2179
2180         * class.c
2181         (mono_class_from_generic_parameter): We need to have an owner.
2182         (my_mono_class_from_generic_parameter): Likewise.
2183
2184         * reflection.c (mono_reflection_setup_generic_class): Renamed to
2185         mono_reflection_create_generic_class() and added a new
2186         mono_reflection_setup_generic_class().  
2187         (mono_reflection_initialize_generic_param): If we're a nested
2188         generic type and inherited from the containing class, set our
2189         owner to the outer class.
2190
2191 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
2192
2193         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
2194
2195         * reflection.c (mono_method_body_get_object): New function to create
2196         a MethodBody object.
2197
2198         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
2199
2200 2004-10-11  Martin Baulig  <martin@ximian.com>
2201
2202         * metadata.c (_mono_metadata_type_equal): Renamed to
2203         do_mono_metadata_type_equal() and made static.
2204
2205 2004-10-11  Martin Baulig  <martin@ximian.com>
2206
2207         * appdomain.c: Bump corlib version number to 28.
2208
2209 2004-10-10  Martin Baulig  <martin@ximian.com>
2210
2211         * class-internals.h
2212         (MonoGenericInst): Added `MonoGenericContainer *container'.
2213         (MonoGenericMethod): Likewise.
2214         (MonoGenericContext): Likewise.
2215         (MonoGenericParam): Added `MonoGenericContainer *owner'.
2216
2217         * metadata.c
2218         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
2219         (do_mono_metadata_parse_generic_inst): Likewise.
2220         (mono_metadata_parse_type_full): New public method.  This is the actual
2221         mono_metadata_parse_type() implementation - with an additional
2222         `MonoGenericContainer *' argument.
2223         (mono_metadata_parse_array_full): Likewise.
2224         (mono_metadata_parse_signature_full): Likewise.
2225         (mono_metadata_parse_method_signature_full): Likewise.
2226         (mono_metadata_parse_mh_full): Likewise.
2227         (mono_type_create_from_typespec): Likewise.
2228         (mono_metadata_interfaces_from_typedef_full): New public method;
2229         this is similar to the other _full() methods, but we take a
2230         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
2231         (mono_metadata_parse_generic_param): Take an additional
2232         `MonoGenericContainer *' argument and lookup the MonoGenericParam
2233         from that container.
2234         (mono_metadata_generic_param_equal): New static method to compare
2235         two type parameters.
2236         (_mono_metadata_type_equal): New static method; takes an
2237         additional `gboolean signature_only' argument - if true, we don't
2238         compare the owners of generic parameters.
2239         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
2240         with a TRUE argument - do a signature-only comparision.
2241
2242         * loader.c: Use the new _full() methods and pass the
2243         MonoGenericContainer to them.
2244
2245         * object-internals.h (MonoReflectionTypeBuilder): Added
2246         `MonoGenericContainer *generic_container' field.
2247         (MonoReflectionMethodBuilder): Likewise.
2248
2249 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
2250
2251         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
2252         case initial images of dynamic assemblies.
2253
2254         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
2255
2256         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
2257
2258         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
2259         length of event->other array.
2260         (typebuilder_setup_events): Ditto.
2261
2262         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
2263         'assembly_by_name' and add an 'assemblies' list.
2264
2265         * assembly.h assembly.c: Add a new search hook for determining whenever
2266         an assembly is already loaded. Use this instead of searching in the
2267         loaded_assemblies list.
2268
2269         * domain.c appdomain.c: Implement the new search hook so loaded 
2270         assemblies are now scoped by appdomain. Fixes #67727.
2271
2272 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
2273
2274         * threads.c (mono_thread_attach): Initialize synch_lock field so
2275         mono_thread_detach works again.
2276
2277         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
2278         'lib' too. Fixes #63130.
2279
2280 2004-10-06  Jackson Harper  <jackson@ximian.com>
2281
2282         * culture-info-tables.h: regenerated.
2283
2284 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
2285
2286         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
2287         implemented by other interfaces in the result. Fixes #65764.
2288         
2289         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
2290         Handle unloadable modules without crashing.
2291
2292         * image.c (load_modules): Revert the previous patch since modules must
2293         have a fixed index inside the array.
2294         
2295         * image.c (load_modules): Don't include native modules in the modules
2296         array.
2297
2298 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
2299
2300         * reflection.h: Add param_defaults field.
2301
2302         * reflection.c: Add support for parameter defaults in dynamic methods.
2303         Fixes #64595.
2304
2305         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
2306         an empty string when a type has no namespace. Fixes #64230.
2307
2308 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
2309
2310         * tabledefs.h: Added "internal" security actions to support non-CAS
2311         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
2312         Note: they do not seems to be used anymore in 2.0 (new metadata format)
2313
2314 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
2315
2316         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
2317         constructor of abstract class. Fixes #61689.
2318
2319 2004-10-04  Martin Baulig  <martin@ximian.com>
2320
2321         * class-internals.h (MonoGenericContainer): New type.
2322         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
2323         `MonoGenericContainer *generic_container'.
2324         (MonoClass): Replaced `gen_params' and `num_gen_params' with
2325         `MonoGenericContainer *generic_container'.
2326
2327         * metadata.c (mono_metadata_load_generic_params): Return a
2328         `MonoGenericContainer *' instead of a `MonoGenericParam *';
2329         removed the `num' argument.
2330
2331 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
2332
2333         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
2334         for dynamic images.
2335
2336         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
2337         machine fields.
2338
2339         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
2340
2341         * reflection.c: Save pe_kind and machine values into the generated
2342         image file.
2343
2344         * appdomain.c: Bump corlib version number.
2345
2346         * object-internals.h: Reorganize layout of LocalBuilder.
2347
2348         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
2349         New helper function.
2350
2351         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
2352         created MonoType for dynamic types. Fixes #66180.
2353
2354 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
2355
2356         * threadpool.c: the ares hashtable needs a critical section around it.
2357         this prevents some nasty segfaults
2358
2359 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
2360
2361         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
2362         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
2363         bug 67324).
2364         
2365 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
2366
2367         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
2368         
2369 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
2370
2371         * image.c: Always canonicalize image file names, to avoid loading
2372         the same assembly twice when referenced using a relative path.
2373
2374 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
2375
2376         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
2377
2378         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
2379
2380         * marshal.c: Fix warnings.
2381
2382 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
2383
2384         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
2385         attempting to marshal the delegate_trampoline as the method_addr.
2386         This patch has a static hashtable of marshalled delegates so that 
2387         we can map delegate_trampoline addresses back to delegates.  This
2388         allows a delegate passed to managed code to be passed back into native
2389         code.  Fixes #67039
2390
2391 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
2392
2393         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
2394
2395         * reflection.c (method_encode_code): Align method headers properly.
2396         Fixes #66025.
2397
2398 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
2399
2400         * marshal.c: In the runtime invoke wrapper, reset the abort
2401         exception if it is cached. This avoids the automatic rethrowal of 
2402         the exception after the catch of the wrapper. Also check for pending
2403         interruptions before calling the managed method. This is done using
2404         the new method emit_thread_force_interrupt_checkpoint, since the
2405         normal checkpoint method is ignored when running the invoke wrapper.
2406         * object.c: If the abort exception is rethrown, set the abort_exc
2407         field of the thread, so it will be rethrown aftere every catch.
2408         * threadpool.c: Only run an interruption checkpoint if what has been
2409         requested is a stop of the thread (aborts will be ignored).
2410         * threads.c: By default, a thread will now never be interrumped while
2411         running the runtime invoke wrapper (this ensures that runtime_invoke
2412         will always return to the caller if an exception pointer is provided).
2413         There is a new special method mono_thread_force_interruption_checkpoint()
2414         to force an interruption checkpoint even if running a protected
2415         wrapper, which is used by the same runtime invoke wrapper to do a check
2416         at a safe point.
2417
2418 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
2419
2420         * object.c, object-internals.h: Implemented mono_release_type_locks,
2421         which releases the cctor locks held by a thread.
2422         * threads.c, threads.h: In thread_cleanup, release cctor locks held
2423         by a thread. Added mono_thread_exit() method to be used to safely stop
2424         a thread.
2425
2426 2004-09-28  Raja R Harinath  <rharinath@novell.com>
2427
2428         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
2429         Move null check before dereference.  Avoid indexing beyond the end
2430         of the 'modules' array.
2431
2432 2004-09-28  Raja R Harinath  <rharinath@novell.com>
2433
2434         * metadata-internals.h (MonoImage): Add module_count field.
2435         * image.c (load_modules): Set image->module_count.
2436         (mono_image_load_file_for_image): Use image->module_count.
2437         * reflection.c (mono_image_load_module): Append to image->modules array 
2438         of dynamic assembly.
2439         (mono_module_get_object): Fix loop to actually increment index.
2440         Use image->module_count.
2441         * assembly.c (mono_assembly_load_references): Use image->module_count.
2442         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2443         Likewise.
2444
2445 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
2446
2447         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
2448         Avoid assert on generic types.
2449
2450 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
2451
2452         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
2453
2454         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
2455
2456         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
2457         function to convert a MarshalSpec structure to its managed counterpart.
2458
2459         * reflection.c: Fix warnings.
2460         
2461         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
2462         field.
2463
2464         * icall.c (mono_create_icall_signature): Fix build.
2465
2466 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
2467
2468         * icall.c: Add MakePointType icall.
2469
2470         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
2471         warnings.
2472
2473 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2474
2475         * threadpool.c: reuse allocated slots in the queue.
2476
2477 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
2478
2479         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
2480
2481         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
2482
2483         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
2484         previous change.
2485
2486         * tabledefs.h: Add constants for pinvoke attributes BestFit and
2487         ThrowOnUnmappableChar.
2488
2489         * icall.c (ves_icall_Type_GetPacking): New icall.
2490
2491 2004-09-24  Martin Baulig  <martin@ximian.com>
2492
2493         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
2494
2495 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2496
2497         * appdomain.c:
2498         (mono_domain_set): allow setting a domain that is being unloaded.
2499         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
2500         being unloaded.
2501
2502 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
2503
2504         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
2505         the GetCustomAttributes icall.
2506
2507 2004-09-23  Martin Baulig  <martin@ximian.com>
2508
2509         * object-internals.h (MonoReflectionGenericParam): Replaced
2510         'has_ctor_constraint', `has_reference_type' and `has_value_type'
2511         with `guint32 attrs'.
2512
2513 2004-09-23  Martin Baulig  <martin@ximian.com>
2514
2515         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
2516
2517 2004-09-23  Martin Baulig  <martin@ximian.com>
2518
2519         * object-internals.h (GenericParameterAttributes): New enum.
2520
2521 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
2522
2523         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
2524         
2525         * class.c (init_events): Fill out event->other field.
2526
2527         * class.c: Fix warnings.
2528
2529         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
2530
2531 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
2532
2533         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
2534         walk which doesn't supply the IL offset.
2535
2536 2004-09-22  Martin Baulig  <martin@ximian.com>
2537
2538         * reflection.c (mono_reflection_setup_internal_class): If we're
2539         System.ValueType, System.Object or System.Enum, set
2540         `klass->instance_size' and create the vtable.
2541         (mono_reflection_create_internal_class): If we're an enum type,
2542         get the base class from our current corlib.
2543
2544 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
2545
2546         * reflection.h (MonoResolveTokenError): New type.
2547
2548         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
2549         icall.
2550
2551         * icall.c: Add an 'error' argument to the ResolveToken icalls.
2552
2553 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
2554
2555         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
2556         Support also calling constructors, but only for already allocated objects.
2557
2558 2004-09-17  Geoff Norton <gnorton@customerdna.com>
2559
2560         * reflection.c (type_get_qualified_name): If the klass is null
2561         return the typename to avoid a NullRefEx.
2562         (encode_cattr_value): Get the qualified name of the boxed type,
2563         not the underlying enumtype.  Fixes #62984.
2564
2565 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
2566
2567         * marshal.c: Fix problems with previous checkin.
2568
2569 2004-09-21    <vargaz@freemail.hu>
2570
2571         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
2572         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
2573
2574         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
2575
2576 2004-09-21  Geoff Norton <gnorton@customerdna.com>
2577
2578         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
2579         should only return a type for pointers, arrays, and passbyref types.
2580         Fixes bug #63841.
2581
2582 2004-09-21  Martin Baulig  <martin@ximian.com>
2583
2584         * domain.c (mono_debugger_check_runtime_version): New public
2585         function.
2586
2587         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
2588
2589 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
2590
2591         * reflection.c: Added missing sort to the declarative security 
2592         attributes table. MS implementation stops seeing the attributes if the
2593         token number regress in the table (as shown by ildasm and permview).
2594
2595 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
2596
2597         * object-internals.h (MonoReflectionModule): Add 'token' field.
2598         
2599         * reflection.c (mono_reflection_get_token): Add support for Module
2600         and Assembly.
2601         (mono_module_get_object): Set 'token' field.
2602         (mono_module_file_get_object): Set 'token' field.
2603
2604         * icall.c: Add new Assembly and Module icalls.
2605
2606         * appdomain.c: Bump corlib version.
2607
2608 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
2609
2610         * loader.h loader.c class.h class.c: Add helper functions for obtaining
2611         tokens of metadata objects.
2612
2613         * reflection.h reflection.c (mono_reflection_get_token): New function
2614         to obtain the token of a metadata object.
2615
2616         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
2617
2618 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
2619
2620         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
2621         
2622         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
2623
2624 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
2625
2626         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
2627         * object-internals.h: Added 3 MonoArray* members to MonoReflection
2628         AssemblyBuilder to access the permissions set in the class lib.
2629         * reflection.c: Added security attributes encoding step in 
2630         mono_image_build_metadata.
2631         * tabledefs.h: Added new security actions defined in 2.0:
2632         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
2633
2634 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
2635
2636         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
2637         macro parameter.
2638
2639 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
2640  
2641         * locales.c: nullify the ICU_collator member of CompareInfo when it is
2642           finalized. There where random SIGSEVs at program termination, when
2643           an object being finalized was trying to do a string comparison and
2644           the current culture was already finalized.
2645  
2646 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2647
2648         * threads.c: call thread_cleanup before finishing the thread if we get
2649         there.
2650
2651 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
2652
2653         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
2654         assemblies from the parent. Fixes #65665.
2655
2656 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
2657
2658         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
2659         modifiers.
2660
2661 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
2662
2663         * reflection.h: add prototype for mono_get_dbnull_object
2664         * reflection.c: add prototypes for get_default_param_value_blobs 
2665         and mono_get_object_from_blob for fussier compilers
2666
2667 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
2668  
2669         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
2670         false deadlock checks in class initialization.
2671  
2672 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
2673
2674         * image.c (mono_image_addref): Fix comment.
2675
2676         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
2677         possible.
2678
2679 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
2680
2681         * reflection.c (mono_param_get_objects): Modified to return
2682         ParameterInfo.DefaultValue object.
2683
2684         (get_default_param_value_blobs):
2685         (mono_get_object_from_blob):
2686         (mono_get_dbnull_object): New helper routines. 
2687
2688         * object.c (mono_get_constant_value_from_blob): New helper routine
2689         carved out from get_default_field_value ()
2690
2691         * object-internals.h (mono_get_constant_value_from_blob): Added
2692         function declaration.
2693
2694 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
2695
2696         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
2697         referenced assemblies. Fixes #62135.
2698
2699         * exception.h exception.c (mono_get_exception_file_not_found2): New
2700         helper function.
2701
2702 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
2703
2704         * class.h class.c: Add mono_type_get_underlying_type ().
2705
2706 2004-09-09  Geoff Norton <gnorton@customerndna.com>
2707
2708         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
2709         Fix GetTypes() to support dynamically created assemblies.
2710
2711 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
2712
2713         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
2714         
2715         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
2716         previous patch.
2717
2718         * reflection.h reflection.c loader.c: Allow dynamic construction of
2719         pinvoke methods. Fixes #65571.
2720         
2721         * reflection.c (mono_reflection_get_type): Revert previous change since
2722         it causes regressions.
2723
2724 2004-09-08  Martin Baulig  <martin@ximian.com>
2725
2726         * class.c (class_compute_field_layout): Don't call
2727         mono_class_layout_fields() for open generic instances.
2728
2729 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
2730         * threads.c appdomain.c: fix typo in GC macro
2731
2732 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2733
2734         * threads.c: don't call mono_thread_detach() in start_wrapper(),
2735         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
2736
2737 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
2738
2739         * image.c (mono_image_close): Applied patch from 
2740         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
2741         assembly is loaded multiple times from data.
2742         
2743         * image.c (mono_image_open): Fix warning.
2744
2745 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2746
2747         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
2748         once. Fixes #58334.
2749         
2750         * reflection.c (mono_reflection_create_runtime_class): Initialize
2751         klass->nested_classes. Fixes #61224.
2752
2753 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
2754
2755         * threads.c: sched_yield() on exit, to allow threads to quit.
2756
2757 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2758
2759         * object.c (mono_unhandled_exception): Remove leftover debug code.
2760
2761 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
2762
2763         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
2764
2765 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
2766
2767         * marshal.c (emit_marshal_array): Really null terminate string arrays.
2768         
2769         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
2770
2771 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2772
2773         * marshal.c (emit_marshal_array): Null terminate string arrays.
2774         
2775         * marshal.c (raise_auto_layout_exception): Fix warning.
2776
2777         * reflection.c (mono_param_get_objects): Initialize the default value
2778         with DBNull.Value, not null. Fixes #62123.
2779
2780 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
2781
2782         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
2783         throw an exception with a cute explanation.
2784
2785 2004-09-06  Dick Porter  <dick@ximian.com>
2786
2787         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
2788         Close the new process's thread handle, as we don't use it.  The
2789         handle stays around forever otherwise.
2790
2791 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2792
2793         * object.c (arith_overflow): Fix warning.
2794
2795         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
2796         calling conventions in method refs. Fixes #65352.
2797
2798         * reflection.c: Fix warnings.
2799
2800 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
2801
2802         * icall.c: Add a new icall for Array.Clear
2803
2804 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
2805
2806         * object.c: When allocating an array, we have to throw
2807         an overflow exception if any of the lengths are < 0.
2808
2809 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2810
2811         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
2812         properly. Also move implementation of string array marshalling to 
2813         managed code. Fixes #42316.
2814
2815 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2816
2817         * assembly.c: provide more information when loading an assembly fails.
2818
2819 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2820
2821         * filewatcher.c: don't expect the development fam package to be
2822         installed.
2823
2824 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
2825
2826         * marshal.c: Make a copy of the signature cookie since it will be
2827         freed by the caller.
2828         
2829         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
2830
2831         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
2832
2833         * metadata.c (mono_metadata_free_marshal_spec): New function to free
2834         marshal specs.
2835
2836         * marshal.c: More refactoring.
2837         
2838         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
2839         smaller functions.
2840
2841 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
2842
2843         * object.c: In mono_message_invoke, fill the output parameter array after
2844           calling the managed method (it was done before the call). This fixes
2845           bug #59299.
2846
2847 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
2848
2849         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
2850         as well.
2851
2852 2004-09-02  Martin Baulig  <martin@ximian.com>
2853
2854         * class.c (mono_class_instance_size): Don't allow generic type
2855         definitions or open generic instances.
2856         (mono_class_array_element_size): If we're a value type, call
2857         mono_class_instance_size() on the original class.
2858
2859         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
2860         handle generic instances.
2861
2862         * mono-debug-debugger.c (write_type): Handle generic instances
2863         like classes.
2864
2865 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
2866
2867         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
2868         the allocation request fails. Fixes #65089.
2869
2870         * object.c (mono_runtime_free_method): Do not call mono_free_method.
2871         
2872         * object.c (mono_runtime_free_method): New function to free a dynamic
2873         method.
2874
2875         * marshal.c (mono_delegate_free_ftnptr): New function to free the
2876         delegate trampoline.
2877
2878         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
2879         with hasthis as dynamic,
2880
2881         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
2882
2883         * domain.c (mono_jit_info_table_remove): New function to remove an
2884         entry from the jit info table.
2885
2886         * class-internals.h (MonoMethod): Add 'dynamic' field.
2887
2888         * loader.c: Fix warnings.
2889
2890 2004-09-01  Martin Baulig  <martin@ximian.com>
2891
2892         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
2893         instead of mono_debugger_lock() because the latter one is a no-op
2894         unless running in the debugger.
2895
2896 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
2897
2898         * class.c (class_compute_field_layout): Classes with auto-layout or
2899         reference fields are not blittable.
2900         
2901 2004-09-01  Dick Porter  <dick@ximian.com>
2902
2903         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
2904         mono_image_get_filename() to get the assembly location.
2905
2906         * icall.c:
2907         * metadata.h: Fix compile warnings
2908
2909 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
2910
2911         * class.c (class_compute_field_layout): System.Object is blittable.
2912
2913         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
2914         as in/out. Fixes #59909.
2915
2916 2004-09-01  Martin Baulig  <martin@ximian.com>
2917
2918         * metadata.h (MONO_TYPE_ISREFERENCE): Call
2919         mono_metadata_generic_inst_is_valuetype() if we're a generic
2920         instance to check whether our underlying type is a reference type.
2921
2922 2004-09-01  Martin Baulig  <martin@ximian.com>
2923
2924         * metadata.c (mono_type_size): If we're a generic instance, call
2925         mono_class_value_size() for value types.
2926
2927 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
2928
2929         * marshal.c: Implement more custom marshalling functionality. Fixes
2930         #64915.
2931
2932 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
2933
2934         * mono-debug.c, debug-mono-symfile.c: add some locking love.
2935
2936 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
2937
2938         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
2939
2940         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
2941
2942         * icall.c: Fix some warnings.
2943
2944         * threads.c (abort_appdomain_thread): Fix unref errors.
2945         (mono_thread_current): Fix THREAD_DEBUG define.
2946
2947 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
2948
2949         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
2950
2951         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
2952
2953 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
2954
2955         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
2956         string arrays.
2957
2958 2004-08-28  Martin Baulig  <martin@ximian.com>
2959
2960         * metadata.c
2961         (mono_metadata_generic_inst_is_valuetype): New public function.
2962
2963         * metadata.h (MONO_TYPE_ISSTRUCT): Call
2964         mono_metadata_generic_inst_is_valuetype() if we're a generic
2965         instance to check whether our underlying type is a valuetype.
2966
2967 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
2968
2969         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
2970         #63768.
2971
2972 2004-08-25  Martin Baulig  <martin@ximian.com>
2973
2974         * loader.c (mono_get_method_from_token): Abstract methods can also
2975         be generic and thus have type parameters.
2976
2977         * metadata-internals.h
2978         (MonoDynamicImage): Added `GPtrArray *gen_params'.
2979
2980         * reflection.c (mono_image_get_generic_param_info): Don't create a
2981         metadata row, just add an entry to the `gen_params' array.
2982         (build_compressed_metadata): Sort the `gen_params' array and then
2983         actually create the metadata.
2984
2985 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2986
2987         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
2988
2989 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
2990
2991         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
2992
2993 2004-08-24  Martin Baulig  <martin@ximian.com>
2994
2995         * class.cs (mono_class_is_subclass_of): Like an interface, a
2996         generic instance also derives from System.Object.
2997
2998 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
2999
3000         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
3001         custom modifiers to be in any order. Fixes #61990.
3002
3003 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
3004
3005         * object.c: Register mono_object_new_fast icall.
3006         
3007         * object.c (mono_class_get_allocation_ftn): Return to calling
3008         mono_object_new_fast, since it seems faster to compute the object 
3009         size in unmanaged code than passing it as a parameter.
3010
3011         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
3012
3013         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
3014         this function with Boehm as the oom handler, so we don't have to check
3015         the result of GC_malloc.
3016
3017         * object.c: Remove checks for oom.
3018
3019         * object.h object.c (mono_class_get_allocation_ftn): New function to
3020         return the icall which can be used to allocate an instance of a given
3021         class. 
3022
3023         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
3024
3025         * class-internals.h: Add 'enabled' field.
3026
3027 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
3028
3029         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
3030
3031 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
3032         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
3033         value 0x0010.
3034
3035 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
3036
3037         * appdomain.c: use the Tls function for appdomain too,
3038         at Zoltan's request. Actually return in mono_context_get
3039
3040         * appdomain.c, profiler.c, threads.c: use __thread
3041
3042 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
3043
3044         * appdomain.c threads.c: Call GC_CreateThread on windows.
3045
3046         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
3047         multiple libraries since this don't work on windows.
3048
3049 2004-08-18  Martin Baulig  <martin@ximian.com>
3050
3051         * class-internals.h
3052         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
3053         MonoMethodHeader.
3054
3055         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
3056         MonoMethodNormal since we also need it for abstract and interface
3057         methods.
3058
3059         * reflection.c
3060         (build_compressed_metadata): Sort the GenericParam table.
3061         (mono_image_create_token): Added `gboolean create_methodspec'
3062         argument; this is false when generating a MethodImpl token.
3063         (reflection_methodbuilder_to_mono_method): Abstract and interface
3064         methods may also have generic parameters.
3065
3066 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
3067
3068         * appdomain.c: thread local alloc
3069
3070 2004-08-17  Martin Baulig  <martin@ximian.com>
3071
3072         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
3073
3074         * icall.c
3075         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
3076         argument.
3077
3078         * class.c (mono_type_get_full_name): New public function.
3079         (mono_type_get_name): Don't include the type arguments.
3080
3081 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
3082
3083         * Makefile.am: Build static versions of libmetadata and libmonoruntime
3084         for inclusion into the mono executable.
3085
3086 2004-08-16  Martin Baulig  <martin@ximian.com>
3087
3088         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
3089         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
3090
3091 2004-08-14  Martin Baulig  <martin@ximian.com>
3092
3093         * class.c (dup_type): Also copy the `byref' field.
3094
3095 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
3096
3097         * reflection.c (create_dynamic_mono_image): Revert the last change 
3098         since it breaks bootstrap.
3099
3100 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
3101
3102         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
3103
3104         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
3105         not free them with g_free.
3106
3107 2004-08-11  Martin Baulig  <martin@ximian.com>
3108
3109         * reflection.c (mono_reflection_setup_internal_class): Also call
3110         mono_class_setup_mono_type() if we already have a `tb->type.type'.
3111
3112 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
3113
3114         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
3115         called during default (first) AppDomain creation. Keep track of
3116         Evidence when loading assemblies.
3117
3118 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3119
3120         * opcodes.c, opcodes.h: reduce runtime relocations.
3121
3122 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
3123
3124         * culture-info.h, locales.c: fixes and chages to sue the new
3125         optimized format of the locale data.
3126         * culture-info-tables.h: regenerated.
3127
3128 2004-08-06  Geoff Norton <gnorton@customerdna.com>
3129         
3130         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
3131
3132 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
3133
3134         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
3135         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
3136         * domain-internals.h: icall declaration.
3137         * icall.c: icall registration.
3138         * object-internals.h: New fields in MonoAssembly for CAS.
3139
3140 2004-08-05  Duncan Mak  <duncan@ximian.com>
3141
3142         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
3143         CEE_LDELEM_ANY.
3144
3145 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3146
3147         * reflection.c: fix to deal with object[] arrays in custom ctors
3148         (bug #62550).
3149
3150 2004-08-05  Martin Baulig  <martin@ximian.com>
3151
3152         * class.c (mono_class_array_element_size): Added support for
3153         generic instances and correctly handle "recursive" types.
3154
3155 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
3156
3157         * assembly.c: Fix warnings.
3158
3159 2004-08-04  Martin Baulig  <martin@ximian.com>
3160
3161         * class.c
3162         (mono_type_get_name_recurse): Added `gboolean include_arity'
3163         argument specifying whether or not we should include the generic
3164         arity in the type name.
3165         (_mono_type_get_name): New static function.
3166         (mono_class_setup_vtable): If we're a generic instance, don't
3167         include the generic arity in the names of explicit method
3168         implementations.        
3169
3170 2004-08-03  Martin Baulig  <martin@ximian.com>
3171
3172         * class.c (mono_type_get_name_recurse): Enclose the generic type
3173         arguments in `<', '>'.
3174
3175 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3176
3177         * gc.c: make GC warning messages use the trace API, they are just
3178         noise to most of the users.
3179
3180 2004-08-03  Martin Baulig  <martin@ximian.com>
3181
3182         * debug-mono-symfile.c (read_string): Correctly read the string.
3183
3184 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
3185
3186         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
3187         
3188         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
3189         icalls.
3190         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
3191
3192 2004-07-30  Martin Baulig  <martin@ximian.com>
3193
3194         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
3195         Reflect latest symbol writer changes.   
3196
3197 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3198
3199         * object.c: always create an object if null is passed
3200         to Invoke() where a valuetype is expected.
3201
3202 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
3203
3204         * marshal.c (mono_marshal_init): make managed
3205         signatures match native ones better for 64bits.
3206
3207 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3208
3209         * appdomain.c: hack to build correctly the private bin path on windows.
3210         Fixes bug #61991.
3211
3212 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
3213
3214         * assembly.c: Load mscorlib from the correct framework directory
3215           (mono/<version>/mscorlib.dll).
3216         * appdomain.h: Added prototypes for new functions.
3217         * internals.h: Added some prototypes.
3218         * domain.c: When initializing the runtime, get from the executable and
3219           the configuration files the runtime version that the app supports.
3220           Added support methods for reading app.exe.config. Added list of versions
3221           supported by the JIT. Added two new methods: mono_init_from_assembly,
3222           which initializes the runtime and determines the required version from
3223           the provided exe file, and mono_init_version, which initializes
3224           the runtime using the provided version.
3225         * icall.c: Get machine.config from version-specific directory.
3226         * reflection.c: When generating an image, embed the version number
3227           of the current runtime.
3228
3229 2004-07-28  Dick Porter  <dick@ximian.com>
3230
3231         * socket-io.c
3232         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
3233         returned sockaddr size before creating the remote address object.
3234         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
3235         61608.
3236
3237 2004-07-28  Dick Porter  <dick@ximian.com>
3238
3239         * locales.c (string_invariant_compare_char): Fix invariant char
3240         compares between upper and lower cases.  Fixes bug 61458.
3241
3242 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
3243         
3244         * marshal.c: actually cache stelem.ref wrappers.
3245         
3246 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
3247
3248         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
3249         sections and remove the mono_cli_rva_map () function.
3250
3251 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3252
3253         * debug-mono-symfile.c: fix one more endianess issue, from a patch
3254         by Geoff Norton (<gnorton@customerdna.com>).
3255
3256 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3257
3258         * class.c: fix class loads for pointer types (typeof(int) !=
3259         typeof(int*)).
3260
3261 2004-07-27  Martin Baulig  <martin@ximian.com>
3262
3263         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
3264         reading the debugging information from an external ".mdb" file.
3265
3266 2004-07-24  Martin Baulig  <martin@ximian.com>
3267
3268         * reflection.c (mono_image_get_type_info): Only write a class
3269         layout entry if we actually have a size or a packing size.
3270
3271 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
3272
3273         * reflection.c (type_get_fully_qualified_name): 
3274         insert cast to get type checking of ?: with non-gcc compilers
3275
3276 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
3277
3278         * rand.c: use g_getenv for both lookups of
3279         MONO_EGD_SOCKET
3280
3281 2004-07-17  Martin Baulig  <martin@ximian.com>
3282
3283         * reflection.c (mono_reflection_bind_generic_method_parameters):
3284         Set `gmethod->reflection_info'.
3285
3286 2004-07-17  Martin Baulig  <martin@ximian.com>
3287
3288         * class.c (mono_class_create_from_typedef): Insert the newly
3289         created class into the hash table before computing the interfaces
3290         since we could be called recursively.
3291
3292 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
3293
3294         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
3295         function to implement stelem.ref in managed code
3296         * class-internals.h, debug-helpers.c: a new wrapper type
3297         for the above.
3298
3299 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3300
3301         * gc.c: allow GC handles to work even when no GC is compiled in.
3302         Fix part of bug #61134 (GetAddrOfPinnedObject).
3303
3304 2004-07-13  Peter Williams  <peter@newton.cx>
3305  
3306         * process.c (complete_path): Make sure we don't attempt to execute
3307         directories.
3308  
3309 2004-07-12  Geoff Norton <gnorton@customerdna.com>
3310
3311         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
3312           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
3313           and will add/subtract the hour if needed
3314
3315 2004-07-12  Martin Baulig  <martin@ximian.com>
3316
3317         * reflection.c (mono_field_get_object): If we have
3318         `field->generic_info', take the attributes from
3319         `field->generic_info->generic_type'.    
3320
3321 2004-07-12  Martin Baulig  <martin@ximian.com>
3322
3323         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
3324         This function must be called before initializing the runtime.
3325         (mono_debug_init_1): New function; call this after initializing
3326         the runtime, but before loading the assembly.  It tells the
3327         debugger to load corlib and the builtin types.
3328
3329         * mono-debug-debugger.c: Did some larger changes in the debugging
3330         code; support recursive class declarations, make sure we actually
3331         add all classes.
3332
3333 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3334
3335         * debug-helpers.c: undo my previous patch and fixed the real issue in
3336         ../mini/exceptions-x86.c
3337
3338 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3339
3340         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
3341         when no HOME env. variable was set and a NullRef was thrown in a .cctor
3342         called from other .cctors.
3343
3344 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
3345
3346         * loader.c: Removed the mono_loader_wine_init hack now that we are
3347         doing a managed version of Windows.Forms.
3348
3349 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
3350
3351         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
3352         threadpool.c, threads.c: remove static data from rootset.
3353
3354 2004-07-09  Dick Porter  <dick@ximian.com>
3355
3356         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
3357         Don't do any more processing if the matched length was 0.  It was
3358         increasing the size of the string before.  Fixes bug 61167.
3359
3360 2004-07-09  Dick Porter  <dick@ximian.com>
3361
3362         * socket-io.h:
3363         * socket-io.c
3364         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3365         Add support for SO_PEERCRED if its available.
3366
3367 2004-07-09  Peter Bartok <pbartok@novell.com>
3368         * loader.c: winelib.exe.so error message is now only displayed if
3369         MONO_DEBUG is set. To help us avoid questions when people are trying
3370         out the new Managed.Windows.Forms.
3371
3372 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
3373
3374         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
3375         for isinst and castclass wrappers.
3376
3377         * class-internals.h icall.c: Move registration and lookup of JIT icalls
3378         to libmetadata from the JIT, so they could be used by the marshalling
3379         code and the interpreter.
3380
3381         * marshal.c: Register marshalling related JIT icalls here instead of
3382         in mini.c. Use CEE_MONO_ICALL instead of the family of 
3383         CEE_MONO_PROC<x> opcodes to call marshalling functions.
3384
3385         * metadata.h: Remove unneeded marshalling conversions.
3386
3387         * opcodes.c: Update for new opcodes.
3388         
3389 2004-07-08  Martin Baulig  <martin@ximian.com>
3390
3391         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
3392         (mono_debug_get_domain_data): Make this function static.
3393
3394 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3395
3396         * gc.c, object.h: add nice GC handle API for embedders.
3397
3398 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
3399
3400         * reflection.c: more changes for the new api
3401
3402         * object.c: When we reflect on a field w/ a constant value, it
3403         will not have a memory location, so we must access metadata. Also,
3404         allow easier reading of strings so that we can read them from
3405         the constant data.
3406
3407         * class.c (mono_class_layout_fields): no need for literal fields here.
3408
3409         * class-internals.h: api changes for const fields
3410
3411         * icall.c (ves_icall_get_enum_info): use new apis for const fields
3412
3413 2004-07-06  Martin Baulig  <martin@ximian.com>
3414
3415         * mono-debug.h: Increment version number to 44.
3416
3417         * mono-debug.c (mono_debug_add_wrapper): The second argument is
3418         now a gpointer, rewrote this whole method.
3419
3420         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
3421         function.  Add information about the wrapper in a new "misc table".
3422
3423         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
3424         for the new misc table.
3425
3426 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
3427
3428         * metadata-internals.h image.c: Add a cache for helper signatures.
3429
3430         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
3431
3432 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
3433
3434         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
3435         delegates from a delegate. Fixes #61033.
3436         
3437         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
3438         marshalling of stringbuilder arrays. Fixes #59900.
3439
3440 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
3441
3442         * icall.c: Add EnumBuilder:setup_enum_type icall.
3443
3444 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
3445
3446         * icall.c: Added a new icall for the property version of
3447         OffsetOfStringData.
3448
3449 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
3450
3451         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
3452         it has a constant size across platforms.
3453
3454         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
3455         stack trace.
3456
3457 2004-06-29  Martin Baulig  <martin@ximian.com>
3458
3459         * mono-debug.c (mono_debug_add_method): Protect the whole function
3460         in mono_debugger_lock(), not just parts of it.
3461
3462 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
3463
3464         * reflection.c: make sure padding bytes in heaps are zeroed.
3465
3466 2004-06-24  David Waite  <mass@akuma.org>
3467
3468         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
3469         image.c, loader.c, locales.c, marshal.c, metadata.c,
3470         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
3471         string-icalls.c, threads.c: change to C90-style comments from C99 /
3472         C++ -style
3473
3474 2004-06-24  Dick Porter  <dick@ximian.com>
3475
3476         * threads.c
3477         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
3478         return createdNew.  Fixes bug 60412.
3479
3480         * threads-types.h: 
3481         * icall.c: Add createdNew parameter to CreateMutex icall
3482
3483 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3484
3485         * reflection.c, object-internals.h: save default value in params.
3486
3487 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3488
3489         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
3490         no need to build a new path combining that with the application base.
3491         Fixes bug #60442.
3492
3493 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
3494
3495         * reflection.c: fixed minor standard compliance issues.
3496
3497 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3498
3499         * reflection.c: fixed issue with encoding some custom attributes
3500         (arrays in properties and fields, bug #60411).
3501
3502 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3503
3504         * reflection.c: fix start address when copying the public key token.
3505
3506 2004-06-23  Martin Baulig  <martin@ximian.com>
3507
3508         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
3509         the `exc' object in a static object to put it into the GC's root set.
3510
3511 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
3512
3513         * reflection.c: make mono_reflection_setup_internal_class ()
3514         callable a second time to setup a new parent class.
3515
3516 2004-06-23  Dick Porter  <dick@ximian.com>
3517
3518         * threads.c: Check for WAIT_IO_COMPLETION return values.
3519
3520 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
3521
3522         * appdomain.c: Removed the g_free on the public key token. Now copy 
3523         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
3524         * assembly.c: Added public key token string value when loading 
3525         assemblies. Fix bug #60439.
3526         * icall.c: Added missing informations (like public key) in 
3527         GetReferencedAssemblies. Fix #60519.
3528         * image.h: Changed definition for public key token from const char*
3529         public_tok_value to guchar public_key_token [17];
3530         * reflection.c: Updated for changes to public key token.
3531
3532 2004-06-22  Lluis Sanchez Gual
3533
3534         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
3535         for the field in base classes.
3536
3537 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3538
3539         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
3540         mark headers as not supported, they are installed only for use by the
3541         debugger.
3542
3543 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
3544
3545         * *.c, *.h: avoid namespace pollution in public headers.
3546
3547 2004-06-21  Martin Baulig  <martin@ximian.com>
3548
3549         * exception.c (mono_get_exception_security): It's in
3550         "System.Security", not in "System".
3551
3552         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
3553         the exception classes.
3554
3555 2004-06-21  Martin Baulig  <martin@ximian.com>
3556
3557         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
3558         Protect the exception object from being finalized.
3559
3560 2004-06-21  Martin Baulig  <martin@ximian.com>
3561
3562         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
3563         public function.
3564
3565 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
3566
3567         * reflection.c: Load the assembly in mono_reflection_type_from_name,
3568         if it was not loaded before. Fix parts of #60439.
3569
3570 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
3571
3572         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
3573         code that was broken since Ben's change: wrappers are now
3574         dependent on the method signature only again.
3575
3576 2004-06-21  Martin Baulig  <martin@ximian.com>
3577
3578         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
3579         added interface support.
3580
3581 2004-06-21  Martin Baulig  <martin@ximian.com>
3582
3583         * class.c (mono_vtable_get_static_field_data): New public method.
3584
3585 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
3586
3587         * filewatcher.c : Windows build fix to be compliant with API changes.
3588
3589 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3590
3591         * class.h, class.c: more accessors.
3592         * metadata.h, metadata.c: prepare for hiding MonoType and
3593         MonoMethodSignature: people should use the accessors from now on
3594         outside of the tree.
3595
3596 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3597
3598         * *.c, *.h: more API cleanups.
3599
3600 2004-06-18  Jackson Harper  <jackson@ximian.com>
3601
3602         * assembly.c: Trace loading assemblies.
3603         * loader.c: Trace loading native libraries.
3604         * mono-config.c: Trace loading config files.
3605         
3606 2004-06-18  Dick Porter  <dick@ximian.com>
3607
3608         * locales.c: Tell ICU the lengths of strings, it can cope with
3609         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
3610
3611 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
3612
3613         * image.c: swapped name/filename;
3614
3615 2004-06-18  Martin Baulig  <martin@ximian.com>
3616
3617         * mono-debug-debugger.c (write_class): Write the parent class at
3618         the end of the header.
3619
3620 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3621
3622         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
3623
3624 2004-06-17  Raja R Harinath  <rharinath@novell.com>
3625
3626         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
3627         (bundle_obj): New conditional define.
3628         (BUILT_SOURCES): Remove.
3629         ($(bundle_srcs)): Make parallel-make safe.
3630         (libmonoruntime_la_LIBADD): Make unconditional.
3631         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
3632         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
3633
3634 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
3635
3636         * culture-info-tables.h: It was inconsistent with the latest
3637           supp info files.
3638
3639 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
3640
3641         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
3642         be loaded.
3643
3644         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
3645         with gcc 2.95.
3646
3647 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3648
3649         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
3650         cleaned up public header threads.h.
3651
3652 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3653
3654         * Makefile.am, *.c, *.h: more API cleanups.
3655
3656 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3657
3658         * Makefile.am: removed monosn from compilation.
3659         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
3660         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
3661         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
3662         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
3663         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
3664         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
3665
3666 2004-06-15  Jackson Harper  <jackson@ximian.com>
3667
3668         * assembly.c: Make locales lower case when searching the GAC for
3669         assemblies. gacutil will always make locales lowercase when
3670         installing so this effectively makes them case insensitive.
3671         
3672 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
3673
3674         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
3675         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
3676           parameter which allows to choose whether the wait can be interrupted or 
3677           not. Also added the method mono_monitor_enter(), which locks the monitor
3678           using an infinite wait and without allowing interruption.
3679           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
3680           interrupted.
3681         * object.h: Added new fields in MonoThread. suspend_event holds the event
3682           used to susped/resume the thread. synch_lock is the lock object to use for
3683           modifying the thread state.
3684         * threads.c: Use the new synch_lock object for locking, instead of "this",
3685           which can generate deadlocks.
3686           Moved thread state change in Thread.Sleep and Thread.Join from managed
3687           to unmanaged code. This avoids a deadlock when the thread was suspended
3688           just after acquiring the thread lock.
3689           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
3690           Implemented Thread.Suspend using an event instead of ThreadSuspend,
3691           which is not fully implemented in the io-layer.
3692         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
3693
3694 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
3695
3696         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
3697         threads-types.h: more API cleanups.
3698
3699 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3700
3701         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
3702         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
3703         threadpool.c, threads.c: first pass at the exported API cleanup.
3704
3705 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
3706
3707         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
3708
3709 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3710
3711         * icall.c: added internalGetHome.
3712
3713 2004-06-14  Dick Porter  <dick@ximian.com>
3714
3715         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
3716         possible to return successfully when '.' or '..' were the only
3717         entries in a directory, but were skipped.  The MonoIOStat was not
3718         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
3719         Fixes bug 59574.
3720
3721 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
3722
3723         * reflection.c: make binaries run on .Net 1.1 by default.
3724
3725 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
3726
3727         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
3728
3729 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
3730
3731         * marshal.c: keep track of struct size with explicit layout
3732         (bug #59979).
3733
3734 2004-06-12  Martin Baulig  <martin@ximian.com>
3735
3736         * mono-debug-debugger.c: Comment out a debugging g_message().
3737
3738 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3739
3740         * reflection.c, reflection.h: do not free custom attrs that are cached.
3741         * icall.c: use braces to make code clearer.
3742
3743 2004-06-11  Martin Baulig  <martin@ximian.com>
3744
3745         * class.h (MonoInflatedField): New type.
3746         (MonoClassField): Replaced `MonoType *generic_type' with
3747         `MonoInflatedField *generic_info'.
3748
3749         * icall.c
3750         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
3751
3752 2004-06-11  Martin Baulig  <martin@ximian.com>
3753
3754         * reflection.c (mono_image_create_method_token): Correctly encode
3755         varargs methods.
3756
3757 2004-06-11  Martin Baulig  <martin@ximian.com>
3758
3759         * metadata.c (mono_metadata_parse_method_signature): When parsing
3760         a MethodDef which has VarArgs, also set sentinelpos if we don't
3761         have any parameters.
3762
3763 2004-06-11  Martin Baulig  <martin@ximian.com>
3764
3765         * verify.c (mono_method_verify): In CEE_CALL, use
3766         mono_method_get_signature() to get the method's signature, unless
3767         we're a PInvoke method.
3768
3769 2004-06-10  Jackson Harper  <jackson@ximian.com>
3770
3771         * assembly.c: Use <path>/lib/mono/gac for the extra paths
3772         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
3773         logical name as the supplied path is just a prefix to the gac not
3774         the direct path to it.
3775         
3776 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
3777
3778         * reflection.c: make the token for a created method match
3779         the token of the MethodBuilder it was created from
3780         (IKVM requires this behaviour now).
3781
3782 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
3783
3784         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
3785         reflection.c, socket-io.c: leak fixes.
3786
3787 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
3788
3789         * icall.c: handle sentinel pos in vararg methods in position different
3790         from 0.
3791
3792 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3793
3794         * culture-info-tables.h: freshly generated.
3795
3796 2004-06-09  Martin Baulig  <martin@ximian.com>
3797
3798         * loader.c (mono_get_method_constrained): Call `mono_class_init
3799         (constrained_class)'.   
3800
3801 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
3802
3803         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
3804         any methods. Fixes #59629.
3805
3806 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3807
3808         * culture-info-tables.h: reflecting locale-builder updates.
3809
3810 2004-06-08  Dick Porter  <dick@ximian.com>
3811
3812         * object.h:
3813         * locales.c: Fixed compile warnings, including a real bug in
3814         CompareInfo_internal_compare.
3815         
3816 2004-06-08  Dick Porter  <dick@ximian.com>
3817
3818         * locales.c
3819         (ves_icall_System_Globalization_CompareInfo_internal_index):
3820         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3821         Double-check the resuls of usearches, because ICU currently
3822         ignores most of the collator settings here.  Fixes bug 59720.
3823         
3824 2004-06-08  Dick Porter  <dick@ximian.com>
3825
3826         * locales.c
3827         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3828         Fix memory leak and segfault-causing typo.  No idea how this one
3829         lasted so long without being noticed.
3830
3831 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
3832
3833         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
3834         any methods. Fixes #59629.
3835
3836 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3837
3838         * assembly.c:
3839         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
3840         own the critical section before). Removed dead code (that's done
3841         in the preload hook).
3842
3843         (mono_assembly_load_with_partial_name): call the preload hook.
3844
3845 2004-06-08  Martin Baulig  <martin@ximian.com>
3846
3847         * metadata.c (mono_metadata_signature_alloc): Default
3848         `sentinelpos' to -1.
3849
3850         * reflection.c (mono_image_get_array_token): Likewise.
3851
3852 2004-06-08  Martin Baulig  <martin@ximian.com>
3853
3854         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
3855
3856         * metadata.c (mono_metadata_parse_method_signature): When parsing
3857         a MethodDef which has VarArgs, set sentinelpos.
3858
3859         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
3860         `gint16' since we're using -1 for non-varargs methods.
3861
3862         * reflection.c
3863         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
3864         (method_encode_signature): Added varargs support.
3865         (method_builder_encode_signature): Likewise.
3866         (mono_image_get_varargs_method_token): New static method.
3867         (mono_image_create_method_token): New public method; this is
3868         called via an icall instead of mono_image_create_token() when
3869         calling a varargs method.       
3870
3871 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
3872
3873         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
3874
3875 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3876
3877         * culture-info-tables.h : Reflecting the latest locale-builder that
3878           fixed empty array representation ({} to {0}).
3879
3880 2004-06-07  Jackson Harper  <jackson@ximian.com>
3881
3882         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
3883         looking up extra gac paths. This allows MONO_GAC_PATH to act
3884         exactly like a prefix.
3885         
3886 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
3887
3888         * reflection.c (mono_reflection_type_from_name): Make a copy of the
3889         type name before modifying it. Fixes #59405.
3890
3891 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3892
3893         * culture-info.h: added fields for "all datetime patterns".
3894         * locales.c: (  ves_icall_System_Globalization_CultureInfo
3895           _construct_datetime_format ()): fill xxx_patterns fields.
3896         * object.h: added fields for "all datetime patterns" to
3897           MonoDateTimeFormatInfo.
3898         * culture-info-tables.h: reflecting locale-builder updates.
3899
3900 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
3901
3902         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
3903         the event has no add and remove methods. Fixes #59629.
3904
3905 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
3906
3907         * object.c: Fixed possible integer overflow when allocating large
3908         strings.
3909
3910 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
3911
3912         * culture-info-tables.h: reflecting locale-builder updates.
3913
3914 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
3915
3916         * culture-info-tables.h: reflecting locale-builder updates.
3917
3918 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
3919
3920         * culture-info-tables.h: reflecting locale-builder updates.
3921
3922 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
3923
3924         * threads.c: Made Thread.Sleep abortable.
3925
3926 2004-06-02  Martin Baulig  <martin@ximian.com>
3927
3928         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
3929
3930         * debug-mono-symfile.h: Bumped symbol file version number to 37.
3931
3932 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
3933
3934         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
3935
3936 2004-05-30  Jackson Harper  <jackson@ximian.com>
3937
3938         * reflection.c: Do not hardcode assembly versions or public key
3939         tokens anymore. All of this except the corlib section was dead
3940         code anyways.
3941         
3942 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
3943
3944         * object.c (mono_runtime_invoke_array): Automatically create boxed
3945         objects for byref valuetypes if needed. Fixes #59300.
3946         
3947         * object.c (mono_method_return_message_restore): Handle 
3948         MONO_TYPE_OBJECT as well.
3949
3950 2004-05-28  Jackson Harper  <jackson@ximian.com>
3951
3952         * reflection.c: The modified type encoding was causing build
3953         problems. Reverted for now.
3954         
3955 2004-05-28  Jackson Harper  <jackson@ximian.com>
3956
3957         * reflection.c/h: Take an assembly ref so that we dont create
3958         fully qualified names when encoding types in the same assembly as
3959         the custom attribute being emitted.
3960         * appdomain.c: Increment version number.
3961         
3962 2004-05-26  Duncan Mak  <duncan@ximian.com>
3963
3964         * icall.c
3965         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3966         Set the full version number (major, minor, build, revision).
3967
3968 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
3969
3970         * marshal.c (emit_struct_conv): increment src/dst after blit
3971         (mono_marshal_get_managed_wrapper,
3972         mono_marshal_get_native_wrapper): make sure we have marshalling
3973         info before marshalling params (info computation affects
3974         blittable)
3975
3976         * class.c (class_compute_field_layout): correctly deal with
3977         blittable
3978         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
3979         value types (as per what windows dows by default)
3980         (mono_class_setup_mono_type): System.ValueType is blittable
3981         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
3982         blittable
3983
3984         * marshal.c (mono_marshal_load_type_info): flag types  as
3985         non-blittable if the native layout doesn't match the managed
3986         layout
3987
3988 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3989
3990         * appdomain.c: don't add stuff in the private search path that is
3991         above the application base. If application base is not set, there's
3992         no private search path.
3993
3994 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
3995
3996         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
3997         byref struct arguments in native->managed marshalling.
3998
3999 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
4000
4001         * marshal.c (mono_marshal_get_runtime_invoke): correctly
4002         cache methods using signature (special case for methods
4003         that are value type or string class)
4004         
4005         * image.c (mono_image_close): clean up allocated GSList's
4006         in runtime_invoke_cache.
4007
4008 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4009
4010         * mono-config.c: set the correct path for mono_cfg_dir on windows when
4011         there's no MONO_CFG_DIR environment variable defined.
4012
4013 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4014
4015         * threads.c: windows version must be >= 0x0500 to include OpenThread.
4016
4017 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
4018
4019         * threadpool.c: Really wait for 500ms after the async call, even if the wait
4020           is interrumped.
4021         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
4022           before waiting for it, and call CloseHandle after the wait to unref it.
4023           This will make sure that handles are not disposed too early.
4024
4025 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4026
4027         * appdomain.c:
4028         * appdomain.h:
4029         * icall.c: removed
4030         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
4031         needed now.
4032
4033         * object.c: se the application_base only for the domain that runs
4034         Main. Fixes bug #59216,
4035
4036 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4037
4038         * appdomain.c:
4039         * object.c: only the domain in which Main is run have
4040         SetupInformation.ConfigurationFile set, so moved a few lines from
4041         appdomain.c to object.c.
4042
4043 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4044
4045         * appdomain.c: we tried to load [name].(dll|exe), but according
4046         to bug #57710, we must also try [culture]/[name].(dll|exe) and
4047         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
4048         There's a test case attached to bug #58922.
4049
4050 2004-05-27  Dick Porter  <dick@ximian.com>
4051
4052         * icall.c:
4053         * file-io.c: Implemented icalls for locking and unlocking regions
4054         in a file.
4055         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
4056         FALSE on error (fixes both compiler warning and real bug.)
4057
4058 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
4059
4060         * culture-info-tables.h: reflecting locale-builder updates.
4061
4062           (Added missing ChangeLog entry for 05/26)
4063
4064 2004-05-27  Jackson Harper  <jackson@ximian.com>
4065
4066         * locales.c: Fix some cut and paste errors.
4067         
4068 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4069
4070         * mono-config.c: set the correct path for config. directory on windows.
4071
4072 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4073
4074         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
4075           on win32.
4076
4077 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
4078
4079         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
4080         from pinvoke functions.
4081         
4082         * marshal.c (mono_ftnptr_to_delegate): Implement this.
4083
4084 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4085
4086         * culture-info-tables.h: reflecting locale-builder updates.
4087
4088 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
4089
4090         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
4091         #59086.
4092
4093 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
4094
4095         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
4096         * icall.c: Modified icalls for RNG.
4097         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
4098         Windows (CryptoAPI).
4099
4100 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
4101
4102         * locales.c: Fix build.
4103
4104 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4105
4106         * culture-info-tables.h: reflecting locale-builder updates.
4107
4108 2004-05-25  Jackson Harper  <jackson@ximian.com>
4109
4110         * locales.c: When creating the current culture use the $LANGs
4111         specific culture. So DateTimeFormat and NumberFormat entries are created.
4112         
4113 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
4114
4115         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
4116         a char array as parameter.
4117
4118 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
4119
4120         * image.c: In mono_image_open(), always use an absolute path name to
4121           look for already loaded images.
4122
4123 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
4124
4125         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
4126         missing in the windows build (like older cygwin include files).
4127
4128 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
4129
4130         * icall.c: Fixed check for possible integer overflow in Buffer_
4131         BlockCopy icall. Replaced comments style // by /* */.
4132
4133 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
4134
4135         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
4136         
4137         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
4138         check after MONO_VTADDR. Fixes pinvoke2.exe.
4139
4140         * marshal.h marshal.c metadata.h: Add beginnings of support for
4141         ftnptr -> delegate marshalling.
4142
4143 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
4144
4145         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
4146         * threads.c: Fix warnings.
4147
4148 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
4149
4150         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
4151         * icall.c: Registered icalls for Suspend and Resume.
4152         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
4153           Thread.Abort.
4154         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
4155         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
4156         * process.c: Use WaitForSingleObjectEx.
4157         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
4158           checkpoints.
4159         * threads.c, threads.h: Make use of new Ex wait methods. Improved
4160           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
4161           for Suspend and Resume. Added new mono_thread_stop, used for stoping
4162           background threads. Added basic support for Abort in Windows.
4163           Start new threads using a managed delegate invoke wrapper. This wrapper
4164           has an interruption checkpoint that is needed since an interruption
4165           can be requested before the thread leaves the unmanaged code that starts 
4166           the thread.
4167         * marshal.c: Added interruption checkpoint after every native call, and
4168           also before managed calls for wrappers called from unmanaged code to
4169           go into managed code.
4170         * object.h: Added new field in MonoThread to keep track of interruption
4171           requests.
4172
4173 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
4174
4175         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
4176         calls.
4177
4178 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4179
4180         * appdomain.c:
4181         * assembly.c:
4182         * gc.c:
4183         * locales.c:
4184         * mono-config.c:
4185         * rand.c: getenv -> g_getenv (windows!)
4186
4187         * process.c: complete_path is also used on non-windows platforms.
4188
4189 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4190
4191         * icall.c: new signature for Process_Start.
4192
4193         * process.[ch]: new signature for Process_Start. If we're on windows
4194         and UseShellExecute is false, we have to search for the program by
4195         ourselves if we don't get a full path.
4196
4197 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
4198
4199         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
4200         marshalling and call CleanUpNativeData if needed. Fixes #58646.
4201
4202 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4203
4204         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
4205         Fixes bug #58373.
4206
4207 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4208
4209         * process.c: use double quotes to quote program name and arguments on
4210         windows. Fixes bug #58575.
4211
4212 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4213
4214         * file-io.c: don't return "." and ".." when using windows Find*File.
4215
4216 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
4217
4218         * marshal.c: Don't pass wrappers to message init because method 
4219         addressed used to lookup metadata. part of remoting[2|3] fix.
4220
4221 2004-05-15  Jackson Harper  <jackson@ximian.com>
4222
4223         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
4224         path is essentially the same as MONO_PATH except that it points to
4225         GACs instead of lib directories.
4226         * loader.h: The user gac is gone so we dont need function to
4227         enable/disable it.
4228         * mono-config.c: user gac option is now gone.
4229         
4230 2004-05-15  Jackson Harper  <jackson@ximian.com>
4231
4232         * culture-info.h: Make defines more consistent, add calendar data
4233         to the culture info table.
4234         * culture-info-tables.h: Add basic calendar data. Basically
4235         everyone gets default gregorian until all the data is
4236         updated.
4237         * locales.c: Use the new consistent defines. Set calendar data for
4238         culture info objects.
4239         * object.h: add a field for calendar data to CultureInfo
4240         
4241 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
4242
4243         * image.c: image->runtime_invoke_cache is keyed on signatures now.
4244         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
4245         a signature.
4246         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
4247         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
4248         an extra param that is the pointer of the method to invoke. The IL for
4249         the invoke method is no longer specific to the method, but to the
4250         signature of the method. Thus, we can share the same code for multiple
4251         methods. This reduces the number of methods that have to be compiled.
4252
4253 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
4254
4255         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
4256
4257         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4258
4259         * icall.c: Optimize Buffer.BlockCopy.
4260
4261 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4262
4263         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
4264         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
4265         quote). Changed them to "MMMM yyyy".
4266
4267 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
4268
4269         * rand.c
4270         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
4271
4272 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
4273
4274         * reflection.h: Updated after changes to managed structures.
4275
4276         * appdomain.c: Bump corlib version.
4277
4278 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4279
4280         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
4281         windows.
4282
4283 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4284
4285         * Makefile.am: link to ../os/libmonoos.la on windows.
4286
4287         * assembly.c:
4288                 -If MONO_DEBUG, warn about non-existing directories in
4289                 MONO_PATH.
4290                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
4291                 compile time variable.
4292                 -Removed init_default_path and call mono_set_rootdir from
4293                 libmonoos.a instead (windows only).
4294
4295         * assembly.h: declare mono_assembly_getrootdir().
4296
4297         * domain.c:
4298         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
4299
4300         * loader.c: s/getenv/g_getenv/
4301
4302 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
4303
4304         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
4305
4306         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
4307
4308         * metadata.h: Add new marshalling conversions.
4309
4310         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
4311         function.
4312
4313         * reflection.c (mono_reflection_get_type): Lookup the type in all
4314         modules of a multi-module assembly. Fixes #58291.
4315
4316 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
4317
4318         * threads.c: Before aborting a background, set the StopRequested
4319         state.  This avoids throwing the Abort exception.
4320         In mono_thread_manage, don't continue with the shutdown until all
4321         aborted threads have actually stopped.
4322
4323 2004-05-10  Jackson Harper  <jackson@ximian.com>
4324
4325         * locales.c: Remove the modifier from culture names.
4326         
4327 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4328
4329         * Makefile.am: monosn is not installed any more. It has been deprecated
4330         in favor of sn.
4331
4332 2004-05-07  Jackson Harper  <jackson@ximian.com>
4333
4334         * locales.c
4335         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
4336         Fix array construction, add bailout if the length is 0.
4337
4338 2004-05-07  Dick Porter  <dick@ximian.com>
4339
4340         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
4341         machine doesn't have a DNS entry.  Patch by Urs Muff
4342         (umuff@quark.com), fixes bug 57928.
4343
4344 2004-05-06  Jackson Harper  <jackson@ximian.com>
4345
4346         * reflection.c: Handle null PublicTokens properly. alloc mem for
4347         assembly names culture so we dont crash when freeing it.
4348         
4349 2004-05-06  Jackson Harper  <jackson@ximian.com>
4350
4351         * assembly.c: Check the usergac when loading with partial names.
4352         
4353 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
4354
4355         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
4356         does nothing for now (not required for Linux/Windows) but the class
4357         library can call it (and a newer or modified runtime could need it).
4358         * icall.c: Registred icall.
4359
4360 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4361
4362         * loader.c: prints a message on module loading error we set MONO_DEBUG
4363         environment variable.
4364
4365 2004-05-05  Jackson Harper  <jackson@ximian.com>
4366
4367         * appdomain.c: Handle PublicKeyToken=null properly.
4368         
4369 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
4370
4371         * environment.c|h: Added icall ves_icall_System_Environment_
4372         GetOSVersionString to get the current OS version as a string.
4373         * icall.c: Registred icall.
4374
4375 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
4376
4377         * object.c: in mono_object_get_virtual_method(), take into account that
4378         non-virtual methods don't have a slot in the vtable. Check needed when
4379         the object is a proxy.
4380
4381 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
4382
4383         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
4384         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
4385
4386         * object.c (mono_class_compute_gc_descriptor): Fix warning.
4387
4388         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
4389         passed when a valuetype is expected.
4390
4391         * object.c (mono_unhandled_exception): Only set the exit code if the
4392         exception happens in the main thread. Fixes thread5.exe.
4393
4394         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
4395         invalid names. Fixes #58047.
4396
4397 2004-05-03  Jackson Harper  <jackson@ximian.com>
4398
4399         * assembly.c: This line was committed accidently and is unneeded.
4400         
4401 2004-05-03  Jackson Harper  <jackson@ximian.com>
4402
4403         * icall.c: Add new icall for Assembly::LoadWithPartialName
4404         * assembly.c/.h: new function that probes the GAC to load partial
4405         assembly names by Paolo Molaro.
4406         
4407 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4408
4409         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
4410         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
4411         (type_get_fully_qualified_name): Added PublicKeyToken when building a
4412         full type name.
4413
4414 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4415
4416         * appdomain.c: fixed check for 'neutral' culture and removed warning.
4417         * reflection.c: fix bug when parsing a full type name and Version is not
4418         the last thing in the string.
4419
4420 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
4421
4422         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
4423         crashes when it is freed.
4424
4425 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4426
4427         * assembly.c: print the compat warning to stderr.
4428
4429 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
4430
4431         * assembly.c (mono_assembly_load_references): Add a compatibility
4432         hack to run old applications that might be still referencing the
4433         3300-based assemblies, only do this for System.xxx.
4434
4435 2004-05-01  Jackson Harper  <jackson@ximian.com>
4436
4437         * appdomain.c: If the culture is neutral we set it to "".
4438         
4439 2004-04-29  Jackson Harper  <jackson@ximian.com>
4440
4441         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
4442
4443 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
4444  
4445         * string-icalls.c: added low overhead function for copying chars
4446         * icall.c: added needed icall for the above function
4447  
4448 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4449
4450         * icall.c: fix return value of get_global_assembly_cache.  Implemented
4451         Environment.GetLogicalDrives.
4452
4453 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
4454
4455         * rand.c: try and talk to egd or prngd
4456         for random bytes if opening devices fail.
4457
4458 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
4459
4460         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
4461         alignment for the type using the native alignment of its members 
4462         instead of using klass->min_align.
4463
4464         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
4465
4466 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4467
4468         * file-io.c:
4469         * socket-io.c: added check for sys/aio.h.
4470
4471 2004-04-28  Dick Porter  <dick@ximian.com>
4472
4473         * threads.c: Don't abort a thread thats already aborting, when
4474         terminating everything.
4475
4476 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4477
4478         * icall.c: added 2 new async calls for Socket.
4479
4480         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
4481         IO on *nix systems.
4482
4483         * threadpool.c: removed unused variable.
4484
4485 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
4486
4487         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
4488
4489 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
4490
4491         * locales.c: put back string_invariant_tolower () and
4492         string_invariant_toupper ().
4493
4494 2004-04-26 David Waite <mass@akuma.org>
4495
4496         * file-io.h:
4497         * socket-io.h:
4498         * threads.h:
4499         * unicode.h: remove comma from end of enumeration declarations
4500
4501 2004-04-26 David Waite <mass@akuma.org>
4502
4503         * debug-mono-symfile.h:
4504         * decimal.c:
4505         * mono_debug.h:
4506         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
4507
4508
4509 2004-04-26  Jackson Harper  <jackson@ximian.com>
4510
4511         * appdomain.c: Increment version number.
4512         
4513 2004-04-26  Jackson Harper  <jackson@ximian.com>
4514
4515         * appdomain.c: Set assembly references public token value when
4516         PublicKeyToken is specified, not the hash_value. Free public token
4517         values when free assembly name data. Previously the public key
4518         token was hex decoded, however we are using hex encoded public key
4519         tokens, so this is not neccasary.
4520         * assembly.c: Lookup assemblies in the gac if their public token
4521         value is set. Add function to allow enabling user gac
4522         lookups. Specify whether or not the assembly was loaded from the
4523         GAC. Compare full assembly names when checking the cache for
4524         assemblies (Temporarily disabled see comment in code). Remove
4525         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
4526         specifies trace-loader they get extra info to stdout on the
4527         loading of assemblies.
4528         * image.h: Add a field for an assembly references public token
4529         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
4530         whether an assembly has been loaded from the GAC.
4531         * image.c: Remove a corlib -> mscorlib name mapping.
4532         * loader.h: Add function to enable/disable the user gac.
4533         * mono-config.c: Check if the usergac is enabled in the config
4534         file.
4535         * icall.c: New icall to determine whether or not an assembly has
4536         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
4537         * tabldefs.h: Add constant for assemblyref flag that specifies a
4538         full public key is used instead of a public token.
4539         * reflection.c: Remove mscorlib -> corlib mappings. Set
4540         PublicTokenValue instead of hash value. This value is a hex
4541         string so it does not need to be expanded.
4542
4543 2004-04-26  Martin Baulig  <martin@ximian.com>
4544
4545         * mono-debug-debugger.c (mono_debugger_initialize): Set
4546         `mono_debugger_initialized' before calling mono_debug_lock().
4547
4548 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
4549
4550         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
4551           InternalToUpper/InternalToLower.
4552         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
4553           removed invariant culture shortcut.  This is now done in managed code.
4554         * locales.c: (string_invariant_toupper/tolower) removed.
4555
4556 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4557
4558         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
4559         Added Poll internal call.
4560
4561         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
4562         call for Poll. Select was too heavy for polling a single socket.
4563
4564         * threadpool.[ch]: added mono_threadpool_cleanup.
4565         * threads.c: use it. Don't use Thread_Abort on windows.
4566
4567 2004-04-23  Martin Baulig  <martin@ximian.com>
4568
4569         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
4570
4571 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
4572
4573         * icall.c: Registred new icalls for key pair protection and added an
4574         icall for Environment.GetFolderPath on Windows.
4575         * security.c|h: Added new icalls for key pair protection.
4576
4577 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4578
4579         * socket-io.c: don't display the non-supported family warning for known
4580         families. Now this is not displayed on windows when checking support
4581         for IPv4/IPv6.
4582
4583 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4584
4585         * class.c: don't display the layout warning for static fields.
4586
4587 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
4588
4589         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
4590         * locales.c, locales.h: Added new icalls for culture-specific
4591         Char.ToLower and Char.ToUpper.
4592
4593 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4594
4595         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
4596         by David Waite.
4597
4598 2004-04-20  Martin Baulig  <martin@ximian.com>
4599
4600         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
4601         of the type name before passing it to mono_reflection_type_from_name().
4602
4603 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
4604
4605         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
4606         encodings here. Fixes #56965.
4607
4608 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
4609
4610         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4611         fix test on strstr result not that I can see anything that
4612         relies on the result.
4613
4614 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
4615
4616         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
4617         Fixes #57081.
4618
4619         * marshal.c (mono_marshal_get_string_encoding): New helper function.
4620
4621         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
4622         function to determine which marshalling to use for strings. Fixes
4623         #56965.
4624
4625         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
4626
4627         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
4628
4629 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
4630
4631         * icall.c: #include mono-config.h
4632
4633 2004-04-15  Jackson Harper  <jackson@ximian.com>
4634
4635         * culture-info-tables.h: Fix date formats for en-US culture.
4636         
4637 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
4638
4639         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
4640         ThreadPool.SetMinThreads.
4641         * threadpool.c: Implemented ThreadPool.GetMinThreads and
4642         ThreadPool.SetMinThreads.
4643
4644 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
4645
4646         * mono-config.c: also load the .config file in the directory
4647         where the assembly was found.
4648
4649 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
4650
4651         * assembly.c: load per-assembly config files.
4652         * icall.c: decrapified code to get the config dir and moved to
4653         mono-config.c.
4654         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
4655         per-assembly config files. When doing a dll map lookup give precedence
4656         to the per-assembly data.
4657
4658 2004-04-14  Martin Baulig  <martin@ximian.com>
4659
4660         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
4661         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
4662         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
4663
4664         * mono-debugger-debugger.c: While the debugger is locked, remember
4665         whether the symbol tables have changes and send one single
4666         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
4667
4668 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
4669
4670         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
4671
4672         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
4673         function.
4674
4675         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
4676         account when marshalling string arrays. Fixes #56965.
4677
4678 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
4679
4680         * icall.c: Add new icalls mapping for security.
4681         * security.c|h: Add internal calls for WindowsIdentity,
4682         WindowsImpersonationContext and WindowsPrincipal.
4683
4684 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
4685
4686         * class.c: Added comment to ensure the System.MonoDummy class
4687         is removed when no longer necessary
4688
4689 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
4690
4691         * appdomain.c: Pass arguments to the bootstraping exceptions to
4692         minimize JITed methods at boot
4693
4694         * metadata.c (mono_exception_from_name_two_strings): Allow for the
4695         second string to be null.
4696
4697         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4698         Change the protocol to minimize the JIT methods at startup.  Now
4699         it Returns the internal codepage, if the value of "int_code_page"
4700         is 1 at entry, and we can not compute a suitable code page
4701         number, returns the code page as a string.
4702
4703 2004-04-13  Jackson Harper  <jackson@ximian.com>
4704
4705         * culture-info-tables.h: Fix number of decimal digits for all
4706         english locales.
4707
4708 2004-04-13  Jackson Harper  <jackson@ximian.com>
4709
4710         * icall.c: Clairfy out of sync error message. It is not always
4711         your corlib that is out of sync.
4712
4713 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
4714
4715         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
4716         properties when only the set accessor is overriden. Fixes #55874.
4717
4718 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
4719
4720         * assembly.c (mono_assembly_load_references): Make this thread safe.
4721         Fixes #56327.
4722
4723 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
4724
4725         * monosn.c: Add missing initialization calls.
4726
4727 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
4728
4729         * locales.c:
4730         ves_icall_System_Globalization_CultureInfo_construct_number_format
4731         Fix g_assert so it compiles on fussier compilers re int/ptr
4732         mismatch
4733
4734 2004-04-08  Dick Porter  <dick@ximian.com>
4735
4736         * socket-io.h:
4737         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
4738         53992.  Also rearrange the code so that the internal calls return
4739         an error value and exceptions are thrown from managed code.
4740
4741         * icall.c: Add type info to the socket icalls.
4742
4743 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4744
4745         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
4746         owes me a beer.
4747
4748 2004-04-07  Martin Baulig  <martin@ximian.com>
4749
4750         * class.c (mono_class_from_generic_parameter): Don't default
4751         `klass->parent' to `mono_defaults.object_type'.
4752
4753 2004-04-07  Martin Baulig  <martin@ximian.com>
4754
4755         * reflection.c (mono_reflection_initialize_generic_parameter): Set
4756         `param->pklass->reflection_info'.       
4757
4758 2004-04-07  Jackson Harper  <jackson@ximian.com>
4759
4760         * culture-info-tables.h: Fix date separator symbol.
4761         
4762 2004-04-07  Martin Baulig  <martin@ximian.com>
4763
4764         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
4765         from System.Type to System.MonoType.
4766
4767 2004-04-07  Martin Baulig  <martin@ximian.com>
4768
4769         * reflection.h
4770         (MonoReflectionGenericParam): Added `has_reference_type' and
4771         `has_value_type' fields.
4772
4773         * reflection.c (mono_image_get_generic_param_info): Encode the
4774         correct flags if we have the `class' or `struct' constraint.
4775
4776 2004-04-07  Martin Baulig  <martin@ximian.com>
4777
4778         * reflection.h
4779         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
4780
4781 2004-04-07  Jackson Harper  <jackson@ximian.com>
4782
4783         * appdomain.c: Revert extra patches, just wanted to bump the
4784         version number.
4785         
4786 2004-04-07  Jackson Harper  <jackson@ximian.com>
4787
4788         * Makefile.am: Add culture-info private headers.
4789         * icall.c: Add new icalls for contructing locales.
4790         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
4791         * locales.h: Declare new culture info construction methods.
4792         * object.h: Add new fields used to avoid the CultureMap to
4793         MonoCultureInfo.
4794         * culture-info.h: Definition of structs used in the culture info
4795         tables.
4796         * culture-info-tables.h: Autogenerated tables that contain culture
4797         info data. This file was generated with the locale-builder tool.
4798         * appdomain.c: Incement corlib version number.
4799         
4800 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
4801
4802         * appdomain.c: (mono_runtime_init) move mono_thread_init
4803         to before mono_object_new calls so critical sections
4804         are initialized before use.
4805
4806 2004-04-07  Martin Baulig  <martin@ximian.com>
4807
4808         * icall.c
4809         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
4810         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
4811         (ves_icall_MonoGenericParam_initialize): Removed.
4812         (monogenericparam_icalls): Removed.
4813         (generictypeparambuilder_icalls): Added new table for
4814         System.Reflection.Emit.GenericTypeParameterBuilder.
4815
4816         * reflection.c
4817         (mono_reflection_define_generic_parameter): Removed.
4818         (mono_reflection_initialize_generic_parameter): This is now called
4819         from GenericTypeParameterBuilder's .ctor.
4820
4821 2004-04-06  Martin Baulig  <martin@ximian.com>
4822
4823         * class.c (mono_class_init): Don't inflate nested classes in a
4824         generic instance.
4825         (mono_type_get_name_recurse): Include the generic arguments for
4826         generic instances and generic type declarations.
4827         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
4828         (_mono_class_get_instantiation_name): Removed.
4829         (mono_class_create_generic): Always use `gklass->name' as our name.
4830
4831         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
4832
4833         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
4834         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
4835         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
4836         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
4837         closed generic methods here.
4838
4839         * reflection.c
4840         (mono_reflection_generic_inst_get_nested_types): Removed.
4841         (inflate_mono_method): Copy the generic parameters from the
4842         MonoMethodHeader into out MonoGenericMethod.
4843
4844 2004-04-06  Martin Baulig  <martin@ximian.com>
4845
4846         * row-indexes.h
4847         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
4848
4849         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
4850
4851         * reflection.c (build_compressed_metadata): If we have any entries
4852         in the GenericParam, MethodSpec or GenericParamConstraint tables,
4853         set the header version to 1.1.
4854
4855 2004-04-06  Martin Baulig  <martin@ximian.com>
4856
4857         * class.c (mono_class_init): If we're a generic instance,
4858         initialize our nested classes, too.
4859         (_mono_class_get_instantiation_name): Deal with the new `!%d'
4860         suffix. 
4861
4862 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4863
4864         * process.c: quote the argument passed to the shell on windows.
4865
4866 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
4867
4868         * threads.c (mono_alloc_special_static_data): Allow this to be
4869         called during startup.
4870
4871 2004-04-02  Martin Baulig  <martin@ximian.com>
4872
4873         * icall.c
4874         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
4875
4876 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
4877
4878         * icall.c: Fix build.
4879
4880 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
4881
4882         * Makefile.am: Added security.c|h.
4883         * icall.c: Added icall for get_UserName;
4884         * security.c: New file for security related icalls. Added function
4885         get_UserName for System.Environment (fix #56144).
4886         * security.h: New. Header file for security.c
4887
4888 2004-04-02  Dick Porter  <dick@ximian.com>
4889
4890         * icall.c: Deleted the icalls that were obsoleted some time ago
4891         by the ICU string code, and which were mixed into the icall
4892         rearranging.  Fixes bug 55969.
4893
4894         * string-icalls.h: 
4895         * string-icalls.c: Deleted the code that those icalls reference.
4896
4897 2004-04-01  Martin Baulig  <martin@ximian.com>
4898
4899         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
4900
4901         * class.c (mono_class_from_generic_parameter): Don't set 
4902         TYPE_ATTRIBUTE_INTERFACE.
4903         (my_mono_class_from_generic_parameter): Likewise.
4904
4905 2004-04-01  Martin Baulig  <martin@ximian.com>
4906
4907         * loader.c (find_method): Added an optional `MonoClass *ic'
4908         argument to search in a specific interface.
4909         (mono_get_method_constrained): New public function.
4910
4911 2004-04-01  Martin Baulig  <martin@ximian.com>
4912
4913         * reflection.c (mono_image_get_generic_field_token): Use the
4914         `handleref' cache here.
4915
4916 2004-04-01  Martin Baulig  <martin@ximian.com>
4917
4918         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
4919
4920         * reflection.c (create_generic_typespec): Use the `typespec' hash
4921         here, not the `typeref' one.    
4922
4923 2004-04-01  Martin Baulig  <martin@ximian.com>
4924
4925         * class.c (mono_class_inflate_generic_type): Moved the
4926         functionality into a new static inflate_generic_type() which
4927         returns NULL if it didn't do anything.  Only increment the
4928         `mono_stats.inflated_type_count' if we actually inflated
4929         something.
4930         (mono_class_get_full): Check the classes type to see whether we
4931         need to inflate it; also inflate MONO_TYPE_(M)VAR.
4932
4933 2004-04-01  Jackson Harper  <jackson@ximian.com>
4934
4935         * reflection.c: Set culture for assembly references.
4936         
4937 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
4938
4939         * reflection.[ch], icall.[ch], Fix support for pinning variables.
4940
4941 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4942
4943         * assembly.c:
4944         (do_mono_assembly_open): the critical section also covers
4945         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
4946
4947 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4948
4949         * threads.c:
4950         (mono_manage_threads): abort the background threads when finishing.
4951         Fixes bug #47232.
4952
4953 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4954
4955         * gc.c: only close the done_event handle if there was no timeout.
4956         C-ified comments.
4957
4958 2004-03-30  Martin Baulig  <martin@ximian.com>
4959
4960         * icall.c (icall_entries): It's called "System.Activator", not
4961         "System.Activation".    
4962
4963 2004-03-30  Martin Baulig  <martin@ximian.com>
4964
4965         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
4966         (mono_class_create_from_typespec): Likewise.
4967
4968 2004-03-30  Martin Baulig  <martin@ximian.com>
4969
4970         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
4971         `has_ctor_constraint' and `initialized'.
4972
4973 2004-03-30  Martin Baulig  <martin@ximian.com>
4974
4975         * reflection.c (encode_new_constraint): New static function to add
4976         the constructor constraint attribute to a type parameter.
4977         (encode_constraints): Call encode_new_constraint() if necessary.
4978
4979         * reflection.h
4980         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
4981
4982         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
4983         
4984 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
4985
4986         * reflection.c, icall.c: add support for pinning variables. 
4987
4988 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
4989
4990         * marshal.c (mono_marshal_get_managed_wrapper):
4991         init bool local with zero rather than null.
4992
4993 2004-03-29  Martin Baulig  <martin@ximian.com>
4994
4995         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
4996         the "official" behavior here.
4997         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
4998
4999 2004-03-29  Martin Baulig  <martin@ximian.com>
5000
5001         * icall.c: Reflect latest API changes.
5002
5003 2004-03-29  Martin Baulig  <martin@ximian.com>
5004
5005         * loader.c (mono_get_method_from_token): Also call
5006         mono_metadata_load_generic_params () for abstract and interface
5007         methods; replace the type arguments in the method signature with
5008         the ones which are loaded from the metadata.
5009
5010 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
5011
5012         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
5013         of the lock is not the current thread. MS.NET don't do it, in spite of
5014         what the documentation says. See bug #56157.
5015
5016 2004-03-28  Martin Baulig  <martin@ximian.com>
5017
5018         * class.c (mono_class_init): Don't call init_properties() and
5019         init_events() for generic instances; set `prop->parent' when
5020         inflating properties.
5021
5022         * reflection.c (mono_generic_inst_get_object): Call
5023         `mono_class_init (ginst->klass)'.
5024         (mono_type_get_object): Only create a MonoGenericInst if your
5025         generic type is a TypeBuilder.
5026         (do_mono_reflection_bind_generic_parameters): Only set
5027         `ginst->is_dynamic' if our generic type is a TypeBuilder.
5028
5029 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
5030
5031         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
5032         Fixes #56091.
5033
5034 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5035
5036         * icall.c: added Kill_internal icall.
5037         * process.[ch]: added Kill_internal icall.
5038
5039 2004-03-25  Martin Baulig  <martin@ximian.com>
5040
5041         * class.h (MonoStats): Added `generic_instance_count',
5042         `inflated_method_count', `inflated_type_count' and
5043         `generics_metadata_size'.       
5044
5045 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5046
5047         * reflection.c: no warnings now.
5048
5049 2004-03-25  Martin Baulig  <martin@ximian.com>
5050
5051         * class.c (mono_class_get_full): New public function; does a
5052         mono_class_get(), but also takes a `MonoGenericContext *'.
5053
5054         * loader.c (mono_field_from_memberref): Renamed to
5055         `field_from_memberref', made static and added `MonoGenericContext *'
5056         argument.
5057         (mono_field_from_token): Added `MonoGenericInst *' argument.
5058         (method_from_memberef): Likewise.
5059         (mono_get_method_from_token): Likewise.
5060         (mono_get_method_full): New public function; does a
5061         mono_get_method(), but also takes a `MonoGenericContext *'.
5062
5063         * verify.c (mono_method_verify): Get the method's generic context
5064         and pass it to mono_field_from_token(), mono_get_method_full() and
5065         mono_class_get_full().
5066
5067 2004-03-25  Martin Baulig  <martin@ximian.com>
5068
5069         * class.c (mono_class_inflate_generic_type): Take a
5070         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
5071         `MonoGenericMethod *'.
5072
5073 2004-03-25  Martin Baulig  <martin@ximian.com>
5074
5075         * loader.h (MonoMethodInflated): Store the MonoGenericContext
5076         instead of the MonoGenericMethod here.
5077
5078 2004-03-25  Martin Baulig  <martin@ximian.com>
5079
5080         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
5081         each time we create a new MonoGenericInst, we also create a new
5082         context which points back to us.
5083
5084         * class.c (inflate_method): Use `ginst->context' instead of
5085         creating a new context.
5086
5087         * loader.c (method_from_memberref): Use
5088         `klass->generic_inst->context' instead of creating a new context.
5089
5090 2004-03-25  Martin Baulig  <martin@ximian.com>
5091
5092         * class.h (MonoGenericContext): New struct.
5093         (MonoGenericMethod): Removed `generic_inst'.
5094
5095         * class.c (mono_class_inflate_generic_method): Take a
5096         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
5097
5098 2004-03-25  Martin Baulig  <martin@ximian.com>
5099
5100         * loader.h (MonoMethodInflated): New typedef.
5101
5102         * metadata.h (MonoMethodSignature): Removed `gen_method', make
5103         `generic_param_count' consume just 30 bits, added `is_inflated'
5104         and `has_type_parameters' flags (one bit each).
5105
5106         * class.c (mono_class_inflate_generic_method): Create a
5107         MonoMethodInflated instead of a MonoMethodNormal and set
5108         `is_inflated' in the method signature.
5109
5110         * class.h (MonoGenericMethod): Removed `generic_method'.
5111
5112 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
5113
5114         * image.c: Make sure the name of a MonoImage is always an absolute path.
5115           This fixes bug #54415.
5116
5117 2004-03-24  Martin Baulig  <martin@ximian.com>
5118
5119         * class.c (mono_class_setup_vtable): If we're a generic instance,
5120         use our generic type's vtable size.
5121
5122 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
5123
5124         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
5125         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
5126         problems.
5127
5128 2004-03-23  Martin Baulig  <martin@ximian.com>
5129
5130         * class.h (MonoDynamicGenericInst): Added `int count_events' and
5131         `MonoEvent *events'.
5132
5133         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
5134         (typebuilder_icalls): Added "get_event_info"; calls
5135         mono_reflection_event_builder_get_event_info(). 
5136
5137         * reflection.c (mono_reflection_generic_inst_initialize): Added
5138         `MonoArray *events'.
5139         (mono_reflection_event_builder_get_event_info): New function.
5140
5141 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
5142
5143         * object.h: add mono_type_initialization_init
5144
5145         * object.c (mono_runtime_class_init): 
5146         implement class constructor synchronization rules
5147         to cope with threading issues.  
5148         add mono_type_initialization_init
5149
5150         * appdomain.c (mono_runtime_init): call 
5151         mono_type_initialization_init
5152
5153         * class.h: removing initializing field from MonoVTable
5154
5155 2004-03-23  Martin Baulig  <martin@ximian.com>
5156
5157         * class.c (my_mono_class_from_generic_parameter): Use
5158         `param->name' if it's not NULL. 
5159
5160 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
5161
5162         * class.c: do not insert non-virtual methods in the vtable.
5163         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
5164         that means the method is non-virtual. This never would have
5165         happened before.
5166
5167 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
5168
5169         * profiler.c: Added lock for accessing coverage_hash.
5170
5171 2004-03-22  Martin Baulig  <martin@ximian.com>
5172
5173         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
5174         `method->method->signature->generic_param_count != 0' to make it
5175         work for interface methods.
5176
5177 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5178
5179         * process.c: quote the string passed to the shell using g_shell_quote.
5180
5181 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5182
5183         * threads.c:
5184         (mono_threads_manage): don't remove the finalizer thread and self
5185         from the threads hash table so that mono_thread_manage can be called
5186         more than once.
5187
5188 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5189
5190         * process.c: quote the arguments when UseShellExecute is true. Fixes
5191         bug #55790.
5192
5193 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5194
5195         * threads.c: set mono_thread_detach as a cleanup routine for every
5196         thread. This way it's always executed upon thread termination, either
5197         aborted or finished normally. No more xsp hangs!
5198
5199 2004-03-17  Martin Baulig  <martin@ximian.com>
5200
5201         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
5202         `int count_nested' and a `MonoType **nested'.
5203
5204         * reflection.c (mono_reflection_bind_generic_parameters): Moved
5205         most of the functionality into a new static
5206         do_mono_reflection_bind_generic_parameters() and don't take a
5207         `MonoType *nested_in' argument any more.  Don't compute nested
5208         types here.
5209         (mono_reflection_generic_inst_get_nested_types): New public method
5210         to get nested types.
5211
5212         * class.c (mono_class_create_generic): Set `klass->nested_in' if
5213         we're a nested class.
5214
5215         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
5216         mono_reflection_generic_inst_get_nested_types() to compute the
5217         nested types.
5218
5219 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
5220
5221         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
5222         descriptive error message under windows.
5223         
5224 2004-03-17  Martin Baulig  <martin@ximian.com>
5225
5226         * class.c (dup_type): Added `const MonoType *original' argument;
5227         copy the attrs from the original type.
5228
5229 2004-03-17  Martin Baulig  <martin@ximian.com>
5230
5231         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
5232         `m->generic_inst_cache' here.
5233
5234 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
5235
5236         * exception.h exception.c: Add stack_overflow_exception.
5237
5238 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5239
5240         * threadpool.c:
5241         (overlapped_callback): call SetEvent *after* invoking the callback.
5242         No need to call CloseHandle.
5243
5244 2004-03-16  Martin Baulig  <martin@ximian.com>
5245
5246         * reflection.c (mono_image_get_fieldref_token): Take a
5247         `MonoReflectionField *' instead of a `MonoClassField *' and a
5248         `MonoClass *'; store the `MonoReflectionField *' in the hash.
5249
5250 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5251
5252         * appdomain.c: don't add the culture to the filename we're looking for
5253         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
5254
5255 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5256
5257         * locales.c: don't ignore symbols when doing case insensitive compares.
5258         Thanks Dick! Fixes bug #54046.
5259
5260         * threads.c: surround 'threads' usage with enter/leave in
5261         mono_thread_manage.
5262
5263 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
5264
5265         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
5266         implicitly marshalled as [Out]. Fixes #55450.
5267
5268         (mono_marshal_get_runtime_invoke): Zero out the result if there is
5269         an exception.
5270
5271 2004-03-16  Martin Baulig  <martin@ximian.com>
5272
5273         * class.c (mono_class_from_generic_parameter): Use the actual
5274         parameter name. 
5275
5276 2004-03-16  Martin Baulig  <martin@ximian.com>
5277
5278         * reflection.c (type_get_signature_size): New static function.
5279         Compues the size of the type in a method signature.
5280         (method_get_signature_size): New static function; calls
5281         type_get_signature_size() to compute the actual size of the
5282         method's signature.
5283         (method_encode_signature): Use method_get_signature_size() to get
5284         the signature's size rather than using `nparams * 10'.
5285
5286 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5287
5288         * file-io.h: define here WapiOverlapped on windows. I don't want the
5289         regular OVERLAPPED one.
5290
5291         * file-io.c:
5292         * threadpool.c: somehow, BindIoCompletionCallback is not found.
5293         Disabling AIO on windows.
5294
5295 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5296
5297         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
5298         bug #55385.
5299
5300 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5301
5302         * appdomain.c: upgraded corlib version.
5303
5304         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
5305         and BeginWrite. Allow opening files for asynchrnous operations.
5306
5307         * file-io.h: new struct that maps FileStreamAsyncResult.
5308         * icall.c: added new icalls.
5309         * process.[ch]: support setting child process environment variables
5310         and use the SHELL or COMSPEC when UseShellExecute is true.
5311
5312         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
5313         callback for async. IO is here and also BindHandle.
5314
5315         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
5316         from here.
5317
5318 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
5319
5320         * reflection.c (create_custom_attr): Allow len == 0.
5321
5322         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
5323         computation on big-endian machines.
5324
5325 2004-03-13  Martin Baulig  <martin@ximian.com>
5326
5327         * class.h (MonoGenericInst): Added `int count_ifaces'.
5328
5329         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
5330         `ginst->count_ifaces' instead `klass->interface_count' since we
5331         may get called before the vtable is created.
5332
5333         * loader.c (mono_method_get_param_names): If we're a generic
5334         instance, return and don't initialize the class.
5335
5336         * reflection.c (mono_reflection_setup_generic_class): Don't call
5337         ensure_runtime_vtable().
5338         (mono_reflection_bind_generic_parameters): Set
5339         `ginst->count_ifaces'.
5340
5341 2004-03-11  Jackson Harper <jackson@ximian.com>
5342
5343         * icall.c:
5344         * unicode.c:
5345         * unicode.h: Remove unused System.Char icalls.
5346         
5347 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
5348
5349         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
5350         code when we P/Invoke the first library in Windows.Forms, instead
5351         of when we first open the assembly.
5352
5353         * assembly.c: Drop the lookup from here.
5354
5355 2004-03-10  Martin Baulig  <martin@ximian.com>
5356
5357         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
5358         class for properties, fields and events.  Finally fixes #54945.
5359
5360 2004-03-10  Martin Baulig  <martin@ximian.com>
5361
5362         * metadata.c (mono_metadata_class_equal): New static function;
5363         checks whether two generic instances or two generic parameters are
5364         equal.
5365         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
5366         compare classes.        
5367
5368 2004-03-10  Martin Baulig  <martin@ximian.com>
5369
5370         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
5371
5372         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
5373         argument and write it into the `reflection_info' field.
5374
5375         * icall.c
5376         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
5377         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
5378
5379 2004-03-09  Jackson Harper  <jackson@ximian.com>
5380
5381         * char-conversions.h: use 8 bits for numeric data its all we need
5382         * icall.c: numeric data is only 8 bits now.
5383
5384 2004-03-09  Martin Baulig  <martin@ximian.com>
5385
5386         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
5387
5388         * class.c (init_properties, init_events): Initialize the new
5389         `parent' field.
5390
5391         * reflection.c (typebuilder_setup_properties): Likewise.
5392         (typebuilder_setup_events): Likewise.
5393
5394         * reflection.h (MonoEventInfo): Replaced `parent with
5395         `declaring_type' and `reflected_type'.
5396
5397         * icall.c (ves_icall_get_property_info): Distinguish between
5398         declaring and reflected type.
5399         (ves_icall_get_event_info): Likewise.
5400
5401 2004-03-09  Martin Baulig  <martin@ximian.com>
5402
5403         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
5404         (ves_icall_Type_GetField): Correctly set field->klass.
5405
5406 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
5407
5408         * loader.h: Fix warning.
5409
5410 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
5411
5412         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
5413         library routine if present.  Notice that it will still continue
5414         executing even if its missing, for those working on the Gtk#
5415         edition of Windows.Forms.
5416
5417         * assembly.c (do_mono_assembly_open): If loading the
5418         System.Windows.Forms call mono_loader_wini_init.
5419
5420 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
5421
5422         * class.h: Added MonoRemoteClass struct.
5423         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
5424         function for MonoStrings.
5425         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
5426         Added internal call for getting the proxy type.
5427         * marshal.c: Get the type of transparent proxies from its remote_class.
5428         Added methods that generate the IL for type checks and casts:
5429         mono_marshal_get_isinst, mono_marshal_get_castclass, 
5430         mono_marshal_get_proxy_cancast.
5431         * marshal.h: Declaration of the previous new methods.
5432         * object.c: Added new moethods for creating and updating MonoRemoteClass
5433         instances: mono_remote_class, mono_upgrade_remote_class, 
5434         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
5435         * verify.c: FIx transparent_proxy_fields layout.
5436         * appdomain.c: Bump corlib version.
5437
5438 2004-03-04  Jackson Harper  <jackson@ximian.com>
5439
5440         * icall.c: Add icall to access char conversion tables.
5441         * char-conversions.h: Character conversion tables.
5442         * Makefile.am: Add char-conversions.h private header file.
5443         
5444 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
5445
5446         * appdomain.c (unload_thread_main): Increase unloading timeout to
5447         10 sec as a temporary workaround for Nant problems.
5448
5449 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
5450
5451         * gc.c: Add checks for GC_enable and GC_disable.
5452
5453         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
5454         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
5455         (bug #54988).
5456         
5457 2004-02-27  Martin Baulig  <martin@ximian.com>
5458
5459         * reflection.c (mono_reflection_bind_generic_parameters): Take a
5460         `MonoReflectionType *' instead of a `MonoType *'.
5461
5462 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
5463
5464         * gc.c (run_finalize): Avoid finalizing the object representing the
5465         finalizer thread.
5466         (finalizer_thread): Fix warning.
5467
5468 2004-02-25  Martin Baulig  <martin@ximian.com>
5469
5470         * class.c (_mono_class_get_instantiation_name): Added `int offset'
5471         argument for nested types.
5472         (mono_class_create_generic): Added support for nested generictypes.
5473
5474         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
5475         `GList *nested'.
5476
5477         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
5478
5479         * reflection.c (method_encode_signature): Increase the minimum
5480         value of `size' from 10 to 11.
5481         (mono_reflection_bind_generic_parameters): Take `int type_argc'
5482         and `MonoType **types' arguments instead of the `MonoArray
5483         *types'; added `MonoType *nested_in'.  Recursively instantiate
5484         nested classes. 
5485
5486 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
5487
5488         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
5489         stack_overflow_ex members which are used by exception handling.
5490
5491         * appdomain.c (mono_runtime_init): Initialize the new members.
5492
5493         * gc.c (mono_gc_enable): New helper function.
5494         * gc.c (mono_gc_disable): New helper function.
5495
5496 2004-02-23  Martin Baulig  <martin@ximian.com>
5497
5498         * icall.c: I must have been really stupid - make it actually work
5499         this time ;-)
5500
5501 2004-02-23  Martin Baulig  <martin@ximian.com>
5502
5503         * loader.c (method_from_memberref): Only inflate the method if
5504         it's in another klass.
5505
5506 2004-02-23  Martin Baulig  <martin@ximian.com>
5507
5508         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
5509         (mono_class_init): If we're a generic instance and an interface,
5510         compute `class->interface_id'; also create `class->interfaces'
5511         here and inflate them.
5512
5513         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
5514         `ginst->is_open'.
5515         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
5516
5517         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
5518
5519 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
5520
5521         * reflection.c (method_encode_code): Improved the error message
5522         generated by the exception.
5523
5524 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5525
5526         * icall.c: Martin did not do what he said in the ChangeLog for
5527         2004-02-18, but put back the changes for properties and events.
5528         Commenting those changes out again and adding comment to bug #54518.
5529         
5530         * process.c: removed warning.
5531
5532 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
5533
5534         * marshal.c (emit_struct_conv): Print an error message instead of
5535         asserting when a type does not have the StructLayout attribute.
5536
5537 2004-02-20  Martin Baulig  <martin@ximian.com>
5538
5539         * reflection.c (mono_type_get_object): Also use the cache for
5540         generic instances.
5541         (mono_reflection_bind_generic_parameters): Always compute
5542         `ginst->ifaces'.        
5543
5544 2004-02-20  Martin Baulig  <martin@ximian.com>
5545
5546         * class.h (MonoGenericMethod): Removed `klass'.
5547
5548         * class.c (mono_class_inflate_generic_method): Added `MonoClass
5549         *klass' argument.
5550
5551 2004-02-20  Martin Baulig  <martin@ximian.com>
5552
5553         * reflection.c (method_encode_methodspec): Actually use the
5554         uninflated signature for the memberref.
5555
5556 2004-02-20  Martin Baulig  <martin@ximian.com>
5557
5558         * class.h (MonoGenericMethod): Removed `declaring'.
5559
5560         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
5561         is NULL, compute it here.
5562
5563 2004-02-20  Martin Baulig  <martin@ximian.com>
5564
5565         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
5566
5567         * metadata.c (mono_metadata_generic_inst_hash): New method.
5568         (mono_metadata_generic_inst_equal): New method.
5569
5570         * reflection.c (mono_reflection_bind_generic_parameters): Use the
5571         `klass->image->generic_inst_cache' cache to avoid creating
5572         duplicate MonoGenericInst's.
5573
5574         * class.c (mono_class_inflate_generic_type): Use the cache.
5575
5576 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5577
5578         * object.c: fixed gc descriptor calculation for embedded valuetypes.
5579
5580 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5581
5582         * icall.c: added Socket.WSAIoctl icall.
5583
5584         * socket-io.[ch]: implemented
5585         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
5586
5587 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
5588
5589         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
5590
5591 2004-02-18  Urs C Muff  <umuff@quark.com>
5592
5593         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
5594         this work on PPC and other big-endian architectures.
5595
5596         * debug-mono-symfile.h: Prepended the names of all the `guint32'
5597         fields with an underscore to make sure they're only accessed by
5598         the read32() macro.
5599
5600 2004-02-18  Martin Baulig  <martin@ximian.com>
5601
5602         * icall.c: Put the klass->refclass changes back for methods and
5603         fields, but not for properties and events.  We're currently not
5604         distinguishing between DeclaringType and ReflectedType for
5605         properties and events, that's what caused the regressions.
5606
5607 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5608
5609         * object.c:
5610         (mono_async_result_new): the handle can be NULL.
5611
5612         * threadpool.c: Use an event instead of a semaphore, don't initialize
5613         it until needed. This saves quite a few semaphores from being created
5614         when using the threadpool.
5615
5616 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
5617
5618         * object.c (mono_string_is_interned_lookup): Fix interning of long
5619         strings. Fixes #54473.
5620
5621         * domain.c (ldstr_equal): Optimize if the two strings are equal.
5622
5623         * icall.c: Revert the klass->refclass changes since they introduce
5624         regressions (bug #54518).
5625
5626 2004-02-18  Martin Baulig  <martin@ximian.com>
5627
5628         * class.c (mono_class_init): If we're a generic instance and don't
5629         come from a TypeBuilder, inflate our members here.
5630         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
5631         (mono_class_create_generic): New public method.
5632         (mono_class_initialize_generic): Removed.
5633         (get_instantiation_name): Renamed to
5634         _mono_class_get_instantiation_name() and made it public.
5635
5636 2004-02-18  Martin Baulig  <martin@ximian.com>
5637
5638         * class.c (mono_class_inflate_generic_type): Clear the new
5639         instance's `nginst->klass' when inflating a generic instance.
5640         (mono_class_is_subclass_of): Added (basic) support for generic
5641         instances.
5642
5643 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
5644
5645         * appdomain.h, domain.c: use a MonoCodeManager instead of a
5646         MonoMempool to hold compiled native code.
5647
5648 2004-02-17  Martin Baulig  <martin@ximian.com>
5649
5650         * class.h (MonoDynamicGenericInst): Added `count_properties' and
5651         `properties'.
5652
5653         * reflection.c (mono_reflection_generic_inst_initialize): Added
5654         `MonoArray *properties' argument.
5655
5656         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
5657
5658 2004-02-17  Martin Baulig  <martin@ximian.com>
5659
5660         * icall.c (ves_icall_Type_GetFields): Renamed to
5661         ves_icall_Type_GetFields_internal() and added a
5662         `MonoReflectionType *rtype' argument; pass it to
5663         mono_field_get_object() to set the field's "reflected" type.
5664         (ves_icall_Type_GetConstructors): Likewise.
5665         (ves_icall_Type_GetEvents): Likewise.
5666         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
5667         argument; pass it to mono_method_get_object() to set the method's
5668         "reflected" type.       
5669
5670 2004-02-17  Martin Baulig  <martin@ximian.com>
5671
5672         * class.h (MonoDynamicGenericInst): New type.
5673         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
5674
5675         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
5676         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
5677         (ves_icall_MonoGenericInst_GetFields): New interncall.
5678
5679         * class.c (mono_class_from_generic): Don't call
5680         mono_class_initialize_generic() if this is a dynamic instance;
5681         ie. it's being created from a TypeBuilder.
5682         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
5683         `class->byval_arg.type'.
5684
5685         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
5686         to `inflate_method' and made static.
5687         (mono_reflection_inflate_field): Removed.
5688         (mono_reflection_generic_inst_initialize): New public method.
5689
5690         * reflection.h (MonoReflectionGenericInst): Removed `methods',
5691         `ctors' and `fields'; added `initialized'.
5692
5693 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
5694
5695         * debug-helpers.c (mono_method_full_name): Fix output for empty
5696         namespaces.
5697
5698 2004-02-12  Martin Baulig  <martin@ximian.com>
5699
5700         * class.h (MonoClassField): Added `MonoType *generic_type'.
5701
5702         * reflection.c (mono_image_get_fieldref_token): Added support for
5703         instantiated generic types.
5704         (field_encode_inflated_field): Removed.
5705         (mono_image_get_inflated_field_token): Removed.
5706         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
5707
5708         * reflection.h (MonoReflectionInflatedField): Removed.
5709
5710 2004-02-12  Martin Baulig  <martin@ximian.com>
5711
5712         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
5713         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
5714
5715         * reflection.c (mono_image_get_methodspec_token): Take a
5716         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
5717         (mono_image_create_token): Check whether we have a
5718         `method->signature->gen_method' and call
5719         mono_image_get_methodspec_token() if appropriate.
5720         (inflated_method_get_object): Removed.
5721         (mono_reflection_bind_generic_method_parameters): Return a
5722         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
5723         (mono_reflection_inflate_method_or_ctor): Likewise.
5724
5725         * reflection.h (MonoReflectionInflatedMethod): Removed.
5726
5727 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
5728
5729         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
5730         for custom valuetype marshalling.
5731
5732         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
5733
5734 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5735
5736         * icall.c: fixed WSAGetLastError_internal name.
5737
5738 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
5739
5740         * threads.c (mono_thread_attach): Allow this to be called multiple
5741         times for a thread.
5742         
5743         * threads.c (build_wait_tids): Do not wait for ourselves.
5744
5745         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
5746         appdomain list is empty.
5747
5748         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
5749         memory returned by mono_string_builder_to_utf16, since it points into
5750         managed memory. Thanks to Bernie Solomon for noticing this.
5751
5752         * icall.c: Add AppDomainSetup icalls.
5753
5754         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
5755
5756         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
5757         types.
5758
5759         * reflection.c (reflection_methodbuilder_to_mono_method): Save
5760         custom attributes to the method_aux struct. Also fix array indexes etc.
5761
5762         * loader.c (mono_method_get_param_names): Make dynamic case work again.
5763         
5764 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
5765
5766         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
5767         (both static and runtime) and reduce startup time.
5768
5769 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
5770
5771         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
5772         AsAny marshalling conversion instead of crashing.
5773
5774         * marshal.c: Fix warnings.
5775
5776 2004-02-09  Martin Baulig  <martin@ximian.com>
5777
5778         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
5779
5780         * reflection.h (MonoReflectionInflatedMethod): Removed the
5781         `declaring' field, it's now in the unmanaged MonoGenericMethod.
5782
5783         * reflection.c (method_encode_methodspec): Removed the `method'
5784         argument; we get it from `gmethod->declaring'.
5785         (inflated_method_get_object): Removed the `declaring' argument.
5786
5787 2004-02-09  Martin Baulig  <martin@ximian.com>
5788
5789         * class.h (MonoGenericMethod): New type.
5790         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
5791         `generic_method'.
5792
5793         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
5794         a `MonoGenericMethod *gen_method' one.
5795
5796         * class.c (mono_class_inflate_generic_type): Take an additional
5797         `MonoGenericMethod * argument.  This is only non-NULL if we're
5798         inflating types for a generic method.   
5799         (mono_class_inflate_generic_signature): Renamed to
5800         inflate_generic_signature() and made static; take a
5801         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5802         (inflate_generic_header): Take a `MonoGenericMethod *' argument
5803         instead of a `MonoGenericInst *' one.
5804         (mono_class_inflate_generic_method): Likewise.
5805
5806         * reflection.c (encode_generic_method_sig): Take a
5807         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5808         (method_encode_methodspec): Likewise.
5809         (inflated_method_get_object): Likewise. 
5810
5811         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
5812         field with a `MonoGenericMethod *gmethod' one.  
5813
5814 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
5815
5816         * class.h (mono_class_has_parent): add parens to expansion
5817         so you can ! this.
5818
5819 2004-02-08  Martin Baulig  <martin@ximian.com>
5820
5821         * image.h (MonoImage): Removed `generics_cache'.
5822
5823         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
5824         instead of a `MonoType *' argument; removed the `inflate_methods'
5825         argument.  Don't inflate methods here.
5826
5827         * loader.c (find_method): If it's a generic instance, call
5828         mono_class_init() on the `sclass->generic_inst->generic_type'.
5829
5830         * metadata.c (mono_type_size): Make this work on uninitialized
5831         generic instances; call it on the `ginst->generic_type's class.
5832
5833         * reflection.c (mono_reflection_bind_generic_parameters): Call
5834         mono_class_from_generic() to create the `ginst->klass'.
5835
5836 2004-02-08  Martin Baulig  <martin@ximian.com>
5837
5838         * class.h (MonoClass): Changed type of `generic_inst' from
5839         `MonoType *' to `MonoGenericInst *'.
5840
5841 2004-02-08  Martin Baulig  <martin@ximian.com>
5842
5843         * icall.c (ves_icall_Type_BindGenericParameters): Just call
5844         mono_type_get_object(), this is now creating a `MonoGenericInst'
5845         for MONO_TYPE_GENERICINST.
5846         (ves_icall_MonoGenericInst_GetParentType): Likewise.
5847         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
5848
5849         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
5850         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
5851         (inflated_method_get_object): Added `MonoClass *refclass' argument.
5852         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
5853         and reflected type.
5854
5855         * reflection.h (MonoReflectionInflatedMethod): Removed
5856         `declaring_type' and `reflected_type'.
5857
5858 2004-02-08  Martin Baulig  <martin@ximian.com>
5859
5860         * class.h (MonoGenericInst): Added `MonoType *parent' and
5861         `MonoType **ifaces'.
5862
5863         * reflection.h (MonoReflectionGenericInst): Removed `klass',
5864         `parent' and `interfaces'.
5865
5866         * reflection.c (mono_reflection_bind_generic_parameters): Take a
5867         `MonoType *' argument and return a `MonoType *'.
5868
5869         * icall.c
5870         (ves_icall_MonoGenericInst_GetParentType): New interncall.
5871         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
5872
5873 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
5874
5875         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
5876         valuetype marshalling.
5877
5878 2004-02-06  Martin Baulig  <martin@ximian.com>
5879
5880         * class.c
5881         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
5882         (my_mono_class_from_generic_parameter): Likewise.
5883
5884 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
5885
5886         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
5887         contents of the symbol files lazily.
5888
5889         * object.h (MonoThread): Add 'name' and 'name_len' fields.
5890
5891         * threads.h threads.c icall.c: New icalls for getting and setting the
5892         threads name.
5893
5894 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
5895
5896         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
5897         Raise an exception when the domain is not found.
5898
5899 2004-02-03  Martin Baulig  <martin@ximian.com>
5900
5901         * reflection.c (mono_image_get_methodspec_token): Use the
5902         uninflated signature; fixes gen-33.
5903
5904 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
5905
5906         * gc.c threads.c: Make the finalizer thread a normal managed thread so
5907         the finalizer code can use thread functionality.
5908
5909         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
5910         the finalizer thread.
5911
5912         * threads.c: Make some functions more robust.
5913
5914         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
5915
5916         * metadata.h: Add new marshalling conventions.
5917
5918         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
5919         stringbuilder marshalling. Fixes #53700.
5920
5921         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
5922
5923         * reflection.c (mono_image_get_type_info): Save declarative security
5924         info.
5925
5926         * reflection.c (mono_image_get_field_info): Handle uninitialized 
5927         unmanaged fields as well.
5928
5929         * appdomain.c: Bump corlib version.
5930
5931 2004-02-01  Martin Baulig  <martin@ximian.com>
5932
5933         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
5934         method type arguments.  
5935
5936 2004-01-30  Duncan Mak  <duncan@ximian.com>
5937
5938         * marshal.h: Add prototype for
5939         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
5940         and
5941         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
5942         fix the build.
5943
5944 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
5945
5946         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
5947         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
5948
5949 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
5950
5951         * marshal.c (mono_marshal_get_native_wrapper): Add support for
5952         custom marshalling of valuetypes.
5953
5954         * marshal.c: Fix some warnings.
5955
5956 2004-01-29  Martin Baulig  <martin@ximian.com>
5957
5958         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
5959         for generic method parameters.
5960
5961         * reflection.c (method_encode_methodspec): Write the uninflated
5962         signature into the methodspec table.
5963         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
5964         is always the uninflated method.
5965         (reflection_methodbuilder_to_mono_method): Copy the generic
5966         parameters from the MethodBuilder into `header->gen_params'.
5967
5968 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
5969
5970         * class.c (mono_class_from_generic_parameter): Fix warning.
5971
5972 2004-01-27  Martin Baulig  <martin@ximian.com>
5973
5974         * class.c (mono_class_from_generic_parameter): Don't create
5975         `klass->methods' here.  
5976
5977 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
5978
5979         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
5980         extension since it does not work with libraries named lib<FOO>.dll.so.
5981
5982 2004-01-25  Martin Baulig  <martin@ximian.com>
5983
5984         * class.c (mono_class_inflate_generic_type): Added support for
5985         MONO_TYPE_GENERICINST.
5986
5987         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
5988         inflate methods on open constructed types.      
5989
5990 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5991
5992         * object.c: fire ProcessExit event in the root AppDomain after running
5993         Main. Fixes bug #53299.
5994
5995 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
5996
5997         * socket-io.c: include the new socket-wrappers.h header.
5998         Use the wrappers instead of the unix socket functions to make the code
5999         more clear.
6000
6001 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
6002
6003         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
6004
6005         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6006         Fixes #22532.
6007
6008 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
6009
6010         * reflection.c (mono_image_create_pefile): Handle the case when the
6011         entry point is not a MethodBuilder.
6012
6013         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6014         field to ReflectionMethod since it is not allways a builder.
6015
6016         * reflection.c (type_get_fully_qualified_name): New helper function to
6017         return the fully qualified name of a type.
6018
6019         * reflection.c (encode_marshal_blob): Always emit the fully qualified
6020         type name for custom marshallers.
6021
6022         * reflection.c (mono_marshal_spec_from_builder): Ditto.
6023
6024         * class.c (mono_class_setup_vtable): If a parent class already 
6025         implements an interface, use the implementing methods from that class.
6026         Fixes #53148.
6027
6028 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6029
6030         * threadpool.c: just return instead of ExitThread to allow for thread
6031         clean up earlier.
6032
6033 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
6034
6035         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
6036         when closing resource modules.
6037
6038         * reflection.c (mono_image_create_pefile): Handle the case when the
6039         entry point is not a MethodBuilder.
6040
6041         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6042         field to ReflectionMethod since it is not allways a builder.
6043
6044 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6045
6046         * marshal.c (mono_marshal_get_managed_wrapper): 
6047         mono_marshal_alloc takes native int so CONV_I
6048         the arg for 64bits.
6049
6050 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
6051
6052         * reflection.c (fixup_cattrs): New function to fixup the methoddef
6053         tokens in the cattr table. Fixes #53108.
6054
6055 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6056
6057         * loader.c: don't trim ".dll" before looking up in the config file.
6058         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
6059
6060 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
6061
6062         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
6063         Return the module which contains the resource as well.
6064         (ves_icall_System_Reflection_Module_Close): New icall.
6065
6066         * appdomain.c: Bump corlib version number.
6067
6068         * image.c (mono_image_addref): New public function.
6069
6070         * assembly.c: Call mono_image_addref.
6071
6072         * reflection.c (mono_module_get_object): Increase reference count of 
6073         the image.
6074
6075         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6076         Fixes #22532.
6077
6078         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
6079         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
6080         proper exceptions on DllImport problems.
6081
6082 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
6083
6084         * class.c, metadata.c: eliminate CSIZE macro.
6085
6086 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
6087
6088         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
6089         * object.h: Added async_callback field in MonoAsyncResult.
6090         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
6091         * verify.c: Added async_callback in MonoAsyncResult layout.
6092
6093 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
6094
6095         * reflection.c (mono_reflection_get_custom_attrs): Add support
6096         for Modules.
6097
6098 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
6099
6100         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
6101         marshalling.
6102         (mono_marshal_method_from_wrapper): Add null pointer check.
6103
6104 2004-01-16  Martin Baulig  <martin@ximian.com>
6105
6106         * debug-mono-symfile.h: Set version number to 36 and reflect
6107         latest symbol writer changes.
6108
6109 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
6110
6111         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
6112         multi-dimensional arrays.
6113         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
6114         (mono_class_from_mono_type): Use bounded_array_class_get.
6115         
6116         * class.c (mono_bounded_array_class_get): New function which takes
6117         a 'bounded' bool argument to distinguish vectors from one dimensional
6118         arrays.
6119
6120         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
6121         bounded_array_class_get if the array has bounds.
6122
6123         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
6124         Search modules loaded using AssemblyBuilder:AddModule as well.
6125
6126 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6127
6128         * appdomain.c: increased corlib version.
6129         * filewatcher.c: removed g_print.
6130         * icall.c:
6131         (get_property_info): only allocate what is actually requested.
6132         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
6133
6134 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6135
6136         * Makefile.am: added filewatcher.[ch]
6137         * filewatcher.[ch]: FileSystemWatcher runtime support.
6138         * icall.c: added new FSW icalls.
6139
6140 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
6141
6142         * string-icalls.c: fix stringbuilder regression as suggested by
6143         Iain McCoy <iain@mccoy.id.au>.
6144
6145 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
6146
6147         * process.c (process_read_stringtable_block): Recognize '007f' as
6148         a language neutral stringtable block.
6149
6150 2004-01-12  Patrik Torstensson
6151
6152         * object.h (MonoStringBuilder) : Changed layout to support our
6153         new stringbuilder class.
6154         * marshal.c: Change marshalling to support the new layout of 
6155         string builder.
6156         * appdomain.c: increased version number because new layout of
6157         string builder.
6158
6159 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
6160
6161         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
6162         assembly name as an string instead of an AssemblyName, since it is
6163         easier to extract info from it.
6164
6165         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
6166         the culture subdirectories too. Fixes #52231.
6167
6168 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6169
6170         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
6171         It takes 2 new parameters with an optional name for the method to look
6172         for and case ignoring info.
6173
6174         * threadpool.c: removed unused variable.
6175
6176 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6177
6178         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
6179         It takes 2 new parameters with an optional name for the property to look
6180         for and case ignoring info.
6181         Fixes bug #52753.
6182
6183 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
6184
6185         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
6186         Fix #52451.
6187
6188 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6189
6190         * appdomain.c:
6191         * assembly.c: escape the uri before passing it to g_filename_from_uri.
6192         Fixes bug #52630.
6193
6194 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
6195
6196         * reflection.c: Add support for more than one unmanaged resource.
6197
6198         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
6199         in field->def_value, as done in all other cases.
6200
6201         * reflection.c (mono_reflection_get_custom_attrs): Add support for
6202         TypeBuilders.
6203
6204         * reflection.c (mono_reflection_create_runtime_class): Remove 
6205         errorneous assignment to klass->element_class, since it is already
6206         done in mono_reflection_setup_internal_class.
6207
6208 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6209
6210         * gc.c: added missing LeaveCriticalSection.
6211         * icall.c: indented a couple of lines.
6212         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
6213         if we call EndInvoke inside a callback. Fixes bug #52601.
6214
6215 2004-01-07  Martin Baulig  <martin@ximian.com>
6216
6217         * mono-debug-debugger.h
6218         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
6219
6220 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
6221
6222         * appdomain.c: Use messages in NotImplementedException.
6223
6224         * exception.c (mono_get_exception_not_implemented): Now this takes
6225         a message argument.
6226
6227         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
6228         exception instead of g_asserting an aborting when something is not
6229         implemented.
6230
6231         Add some inline docs.
6232
6233 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
6234
6235         * reflection.h: Update after changes to object layout.
6236
6237         * reflection.c: Implement saving of unmanaged aka win32 resources.
6238
6239         * appdomain.c: Bump version number.
6240
6241         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
6242         Handle missing domains gracefully.
6243
6244 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
6245
6246         * file-io.c : On Windows, there are much more invalid_path_chars.
6247
6248 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
6249
6250         * class.h, object.c: prepare for GetType () speedup.
6251
6252 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
6253
6254         * profiler.c: workaround for --profile null reference exception on
6255           cygwin. Patch by Patrik Torstensson.
6256
6257 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
6258
6259         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
6260         make work for unaligned access.
6261
6262 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
6263
6264         * class.c: small cleanup (class->fields [i] -> field).
6265         * image.c: check address of metadata is valid.
6266
6267 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
6268
6269         * assembly.h assembly.c (mono_assembly_loaded): New public function to
6270         search the list of loaded assemblies.
6271
6272         * reflection.c (mono_reflection_type_from_name): Use 
6273         mono_assembly_loaded instead of mono_image_loaded.
6274
6275         * reflection.c: Fix warnings.
6276
6277 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
6278
6279         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
6280         is dynamic. This is needed since an assembly can contain both dynamic and
6281         non-dynamic images.
6282
6283         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
6284         assembly->dynamic.
6285
6286         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
6287
6288         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
6289         to store modules loaded using AddModule.
6290
6291         * reflection.c (mono_image_fill_file_table): Generalize this so it works
6292         on Modules.
6293
6294         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
6295
6296         * reflection.c (mono_image_fill_export_table_from_module): New function to
6297         fill out the EXPORTEDTYPES table from a module.
6298
6299         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
6300         into a separate function. Also handle loaded non-dynamic modules.
6301
6302         * reflection.c (mono_image_basic_init): Fix memory allocation.
6303
6304         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6305
6306         * assembly.c (mono_assembly_load_references): Make this public.
6307
6308 2003-12-19  Martin Baulig  <martin@ximian.com>
6309
6310         * class.c (mono_class_initialize_generic): Made this static, take
6311         a `MonoGenericInst *' instead of a `MonoClass *'.
6312         (mono_class_from_generic): Call mono_class_initialize_generic()
6313         unless we're already initialized or being called from
6314         do_mono_metadata_parse_generic_inst().
6315
6316         * class.h (MonoGenericInst): Added `initialized' and
6317         `init_pending' flags.
6318
6319         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
6320         `mono_class_init (gklass)' or mono_class_initialize_generic()
6321         here; set `generic_inst->init_pending' while parsing the
6322         `type_argv'.
6323
6324 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
6325
6326         * locales.c: include string.h for memxxx prototypes
6327
6328 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
6329
6330         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
6331         constructor when accessing literal fields.
6332
6333 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
6334
6335         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6336
6337         * reflection.c (assembly_add_resource_manifest): New function to fill
6338         the MANIFESTRESOURCE table.
6339
6340         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
6341
6342         * reflection.h: Update to changes in class layout.
6343
6344         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
6345         Reenable call to mono_runtime_is_shutting_down ().
6346
6347         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
6348         determine if the runtime is shutting down.
6349
6350 2003-12-16  Jackson Harper <jackson@ximian.com>
6351
6352         * icall.c: comment out call to mono_runtime_is_shutting_down to
6353         fix build.
6354         
6355 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
6356
6357         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
6358         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
6359
6360 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
6361
6362         * reflection.c: move definition of swap_with_size
6363         to before its first call
6364
6365 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
6366
6367         * appdomain.c (mono_runtime_is_shutting_down): New public function.
6368
6369         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
6370         icall.
6371
6372         * object.c: Fix warnings.
6373
6374         * icall.c (ves_icall_Type_Get...): Only consider inherited static
6375         members if FlattenHierarchy is set.
6376
6377         * reflection.c (mono_image_add_decl_security): New function to emit
6378         declarative security.
6379
6380         * reflection.h reflection.c: Add support for declarative security.
6381
6382         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6383         
6384 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
6385
6386         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6387         
6388         * appdomain.c verify.c: Moved corlib version checking into its own
6389         function in appdomain.c since it needs to create vtables etc.
6390
6391 2003-12-13  Patrik Torstensson <p@rxc.se>
6392
6393         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
6394         instead of unwrapped server.
6395
6396 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
6397
6398         * verify.c (check_corlib): Fix field index.
6399
6400 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
6401
6402         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
6403         GetGacPath icall.
6404
6405 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
6406
6407         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
6408         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
6409         cope with sizeof(size_t) != sizeof(guint32).
6410
6411 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6412
6413         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
6414         in case of failure.
6415
6416 2003-12-10  Mark Crichton <crichton@gimp.org>
6417
6418         * icall.c: removed the GetNonZeroBytes.  We now handle this case
6419         in managed code.
6420
6421         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
6422
6423 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
6424
6425         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
6426         marked as deleted.
6427
6428 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
6429
6430         * verify.c (check_corlib): Handle the case when the version field is 
6431         initialized by a static constructor.
6432
6433 2003-12-08  Patrik Torstensson  <p@rxc.se>
6434
6435     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
6436
6437 2003-12-08  Martin Baulig  <martin@ximian.com>
6438
6439         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
6440         a MonoReflectionGenericParameter, also take the parameter index
6441         and name as arguments.
6442         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
6443         (ves_icall_MonoGenericParam_initialize): New interncall.
6444         (ves_icall_Type_make_byref_type): New interncall.
6445
6446         * reflection.h (MonoReflectionGenericParam): Derive from
6447         MonoReflectionType, not just from MonoObject.  Added `refobj' and
6448         `index' fields.
6449
6450         * reflection.c (mono_reflection_define_generic_parameter): Create
6451         and return a new MonoReflectionGenericParam; don't initialize the
6452         constraints here.
6453         (mono_reflection_initialize_generic_parameter): New public method;
6454         initializes the constraints and creates the `param->pklass'.
6455
6456 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
6457
6458         * reflection.h reflection.c: Use the new fields 'num_types', 
6459         'num_fields' and 'num_methods' to track the number of types etc.
6460
6461         * verify.c (check_corlib): Check corlib version number.
6462
6463 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
6464
6465         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
6466         function works on all methods.
6467
6468 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
6469
6470         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
6471         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
6472         the custom_type_info flag of the transparent proxy.
6473         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
6474         objects that supports IRemotingTypeInfo.
6475         * object.h: Added custom_type_info field in transparent proxy.
6476
6477 2003-12-06  Martin Baulig  <martin@ximian.com>
6478
6479         * class.c (mono_class_create_from_generic): Removed.
6480         (mono_class_from_generic): Check `ginst->klass' before doing
6481         anything else.  This is important to fully support "recursive"
6482         generic types.
6483
6484         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
6485         empty `generic_inst->klass' before doing anything else.
6486
6487 2003-12-06  Dick Porter  <dick@ximian.com>
6488
6489         * verify.c: 
6490         * object.h:
6491         * icall.c:
6492         * locales.c: Use C structs to access class fields.  Don't do a
6493         conversion between MonoString and UChar because both are
6494         platform-endian UTF-16.  Compare now takes startindex and count
6495         parameters.  Add a char overload for IndexOf.  Speed up the
6496         invariant string IndexOf.
6497
6498 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
6499
6500         * Makefile.am (monosn_LDADD): Fix parallel build.
6501
6502 2003-12-04  Martin Baulig  <martin@ximian.com>
6503
6504         * icall.c
6505         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
6506         (ves_icall_Type_make_array_type): New interncall.       
6507
6508 2003-12-04  Martin Baulig  <martin@ximian.com>
6509
6510         * locales.c: also change it in the !HAVE_ICU case.
6511
6512 2003-12-04  Dick Porter  <dick@ximian.com>
6513
6514         * icall.c:
6515         * locales.c: construct_compareinfo is now in CompareInfo, not
6516         CultureInfo.
6517
6518 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
6519
6520         * image.c (mono_image_load_file_for_image): Cache loaded images in the
6521         image->files array.
6522
6523         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
6524         table as well.
6525
6526         * assembly.c (mono_assembly_load_references): Only load references
6527         once.
6528
6529         * class.c (mono_class_from_name): Avoid linear search of the 
6530         EXPORTEDTYPE table.
6531
6532         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
6533
6534 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
6535
6536         * image.h (MonoImage): Add 'field_cache' field.
6537
6538         * loader.c (mono_field_from_token): Cache field lookups.
6539         
6540         * reflection.c (mono_module_get_object): Fix name property.
6541
6542         * icall.c (ves_icall_get_enum_info): Update after changes to 
6543         mono_metadata_get_constant_index ().
6544
6545         * icall.c: Get rid of get_type_info icall, use a separate icall for
6546         each type property to avoid needless memory allocations. Fixes #51514.
6547
6548         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
6549         to avoid needless binary searches.
6550
6551         * class.c (class_compute_field_layout): Move the initialization of
6552         field->def_value to mono_class_vtable ().
6553
6554         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
6555         non-corlib types.
6556
6557         * object.c (mono_object_allocate): Make it inline.
6558
6559         * object.c (mono_object_allocate_spec): Make it inline.
6560         
6561 2003-12-02  Dick Porter  <dick@ximian.com>
6562
6563         * locales.c (create_NumberFormat): NumberFormatInfo construction.
6564         Patch by Mohammad DAMT (mdamt@cdl2000.com).
6565
6566 2003-12-01  Dick Porter  <dick@ximian.com>
6567
6568         * threads.c: Fix signature and call in CreateMutex and
6569         CreateEvent.
6570
6571 2003-12-01  Dick Porter  <dick@ximian.com>
6572
6573         * icall.c: 
6574         * locales.c: Implement string compares and searching
6575
6576         * object.h: Add extra Thread field
6577
6578 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
6579
6580         * reflection.c (fixup_method): Add support for MonoCMethod.
6581
6582 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
6583
6584         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
6585
6586         * reflection.c (assembly_name_to_aname): Allow extra characters in
6587         assembly names. Fixes #51468.
6588
6589 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
6590
6591         * exception.c (mono_exception_from_name_domain): New helper function.
6592
6593         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
6594         exception object in the correct domain.
6595
6596         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
6597         formatting + make a copy a the input data.
6598
6599         * loader.c (mono_get_method_from_token): Methods which contain
6600         native code do not have entries in the ImplMap.
6601
6602         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
6603         Thanks to Gonzalo for spotting this.
6604         
6605         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
6606         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
6607
6608         * assembly.h (mono_assembly_load_from): Split the second part of 
6609         assembly loading into a new public function.
6610
6611         * exception.h (mono_get_exception_bad_image_format): New function.
6612
6613 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
6614
6615         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
6616         Enumerate all modules inside a dynamic assembly. Fixes #51293.
6617         
6618         * icall.c: Add new icall for creating dynamic methods.
6619
6620         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
6621
6622         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
6623
6624         * reflection.c (mono_reflection_create_dynamic_method): New icall to
6625         create a dynamic method.
6626
6627         * reflection.c (resolve_object): New helper function.
6628
6629         * reflection.c: Generalize ReflectionMethodBuilder and the functions
6630         which manipulate it so they can also work on dynamic methods.
6631
6632         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
6633         creating the MonoReflectionMethodAux structure if it is not needed.
6634         
6635         * reflection.h verify.c: Update after changes to object layout.
6636
6637         * reflection.c (method_builder_encode_signature): Fix compilation on
6638         gcc 2.95.x.
6639
6640 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
6641
6642         * appdomain.h: Added support for context static fields. Added static_data
6643           field to MonoAppContext and renamed thread_static_fields to a more
6644           generic special_static_fields in MonoAppDomain, since it can now contain
6645           context static fields.
6646         * domain.c: Updated hashtable name.
6647         * object.c: Replaced field_is_thread_static() for a more generic
6648           field_is_special_static() which also checks for context static attribute.
6649           In mono_class_vtable(), added support for static context fields.
6650         * threads.c: Changed methods that manage thread static fields to more
6651           generic methods so they can be reused both for thread and context static
6652           data.
6653         * threads.h: Declared some new methods.
6654
6655 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
6656
6657         * reflection.h: Update after changes to the managed types.
6658
6659         * reflection.c (encode_custom_modifiers): New helper function.
6660
6661         * reflection.c (method_encode_signature): Emit custom modifiers.
6662
6663         * reflection.c (field_encode_signature): Emit custom modifiers.
6664
6665 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
6666
6667         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
6668
6669         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
6670         implementation.
6671
6672         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
6673         icall.
6674
6675         * object.c (mono_field_get_value_object): New function.
6676
6677         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
6678         specific.
6679
6680 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
6681
6682         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
6683         return a preallocated out-of-memory exception instance.
6684
6685         * object.c (out_of_memory): Use the new function.
6686
6687         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
6688         flag is before the custom modifiers. Fixes #49802.
6689
6690 2003-11-16  Martin Baulig  <martin@ximian.com>
6691
6692         * class.c (mono_class_is_open_constructed_type): Implemented the
6693         MONO_TYPE_GENERICINST case.
6694
6695 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
6696
6697         * assembly.c (mono_assembly_fill_assembly_name): New function to
6698         fill out the MonoAssemblyName structure.
6699         (mono_assembly_open): Use the new function.
6700
6701         * icall.c (fill_reflection_assembly_name): New helper function.
6702
6703         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
6704         new function.
6705
6706         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
6707
6708 2003-11-15  Martin Baulig  <martin@ximian.com>
6709
6710         * class.c (mono_class_is_open_constructed_type): New public
6711         function; checks whether a type is an open constructed type,
6712         ie. whether it still contains type parameters.
6713         (mono_class_inflate_generic_type): If we're a type parameter and
6714         the inflated type is also a MONO_TYPE_(M)VAR, return the original
6715         type.
6716
6717         * class.h (MonoGenericInst): Added `guint32 is_open'.
6718
6719         * loader.c (method_from_methodspec): Check whether we're an open
6720         or closed constructed type and set `ginst->is_open'.
6721
6722         * reflection.c (mono_reflection_bind_generic_parameters): Check
6723         whether we're an open or closed constructed type and set
6724         `ginst->is_open'.
6725         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
6726         from open constructed types.
6727
6728 2003-11-15  Martin Baulig  <martin@ximian.com>
6729
6730         * reflection.c (mono_reflection_bind_generic_parameters): If we're
6731         a generic instance (instead of a generic type declaration) with
6732         unbound generic parameters, bind them to our actual types.
6733
6734 2003-11-14  Martin Baulig  <martin@ximian.com>
6735
6736         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
6737
6738         * reflection.c (mono_reflection_bind_generic_parameters): If we're
6739         an interface type, populate `res->interfaces' with instantiated
6740         versions of all the interfaces we inherit.
6741
6742 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
6743
6744         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
6745         when MONO_PATH is set but doesn't contain the install dir.
6746
6747 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6748
6749         * icall.c:
6750         (ves_icall_Type_GetInterfaces): don't return an interface twice when
6751         it's also implemented in base classes. Fixes bug #50927.
6752
6753 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
6754
6755         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
6756         if this method is called from a finalizer. Fixes #50913.
6757
6758 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
6759
6760         * threads.c: Implement VolatileRead/VolatileWrite
6761
6762         * icall.c: Add new icalls for VolatileRead/VolatileWrite
6763
6764 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6765
6766         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
6767         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
6768         2.95.3.
6769
6770         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
6771         from Peter Ross (pro@missioncriticalit.com).
6772         
6773 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
6774
6775         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
6776
6777 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6778
6779         * assembly.c (mono_assembly_load_references): Disable check because it
6780         triggers on older corlibs which lots of people have.
6781
6782 2003-11-12  Jackson Harper  <jackson@ximian.com>
6783
6784         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
6785         load corlib.dll if mscorlib.dll is not found.
6786         * assembly.h: Remove corlib name define.
6787         * class.c:
6788         * domain.c:
6789         * image.c: Change corlib name to mscorlib.
6790         
6791 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6792
6793         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
6794
6795 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
6796
6797         * appdomain.h: Added loader_optimization here to sync with the C#
6798         code, and add disallow_binding_redirects field.
6799
6800 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
6801
6802         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
6803
6804         * reflection.c (mono_image_build_metadata): Fix crash on modules
6805         with no types.
6806
6807         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
6808
6809         * icall.c (ves_icall_get_method_info): Return callingConvention as
6810         well.
6811
6812         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
6813         namespaces from the EXPORTEDTYPE table as well.
6814
6815         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
6816         from all modules inside the assembly.
6817         
6818 2003-11-11  Martin Baulig  <martin@ximian.com>
6819
6820         * reflection.c (mono_reflection_bind_generic_parameters): Make
6821         this work for interfaces.
6822
6823 2003-11-11  Martin Baulig  <martin@ximian.com>
6824
6825         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
6826
6827 2003-11-11  Martin Baulig  <martin@ximian.com>
6828
6829         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
6830         "MonoInflatedMethod" and "MonoInflatedCtor".
6831
6832 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
6833
6834         * reflection.c (resolution_scope_from_image): Use the assembly table
6835         from the manifest module, since other modules don't have it.
6836
6837         * debug-helpers.c (mono_type_full_name): New helper function.
6838
6839         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
6840
6841         * image.c (mono_image_load_file_for_image): New public function which
6842         is a replacement for the load_file_for_image in class.c.
6843
6844         * assembly.c (mono_assembly_load_module): A wrapper for the function
6845         above which does assembly association and reference loading too.
6846
6847         * class.c (mono_class_from_name): Call mono_assembly_load_module.
6848
6849 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6850
6851         * appdomain.c: not all of the attributes for the full assembly name
6852         are required and the order doesn't matter. Fixes bug #50787.
6853
6854 2003-11-10  Dick Porter  <dick@ximian.com>
6855
6856         * locales.c: Use platform-endian UTF16
6857
6858 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
6859
6860         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6861         
6862 2003-11-10  Martin Baulig  <martin@ximian.com>
6863
6864         * metadata.c
6865         (mono_metadata_load_generic_params): Make this actually work.
6866
6867         * reflection.c (mono_reflection_bind_generic_parameters): If our
6868         parent is a generic instance, pass all the `types' to it, no
6869         matter whether it has the same number of type parameters or not.
6870
6871 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
6872
6873         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6874
6875         * assembly.c (mono_assembly_load_references): Move the image<->assembly
6876         assignment code to this function so it gets called recursively for all
6877         modules.
6878
6879         * image.c (load_modules): Remove the assembly assignment since it is
6880         now done by mono_assembly_load_references.
6881         
6882         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
6883         Add 'module' argument.
6884         (mono_module_get_types): New helper function.
6885         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
6886
6887 2003-11-08  Martin Baulig  <martin@ximian.com>
6888
6889         * class.c (mono_class_inflate_generic_method): Interface method
6890         don't have a header.
6891
6892         * reflection.c (mono_image_get_methodspec_token): Take an
6893         additional `MonoGenericInst *' argument instead of reading it from
6894         the header; this is necessary to support interfaces.
6895         (mono_image_create_token): Pass the `MonoGenericInst *' from the
6896         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
6897         (inflated_method_get_object): Take an additional `MonoGenericInst *'
6898         argument.
6899
6900         * reflection.h (MonoReflectionInflatedMethod): Added
6901         `MonoGenericInst *ginst'.
6902
6903 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
6904
6905         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
6906
6907 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
6908
6909         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
6910
6911 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
6912
6913         * reflection.c 
6914         (reflection_methodbuilder_from_method_builder):
6915         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
6916         initialize a ReflectionMethodBuilder structure.
6917         (mono_image_get_methodbuilder_token):
6918         (mono_image_get_ctorbuilder_token): New functions to emit memberref
6919         tokens which point to types in another module inside the same assembly.
6920
6921         * reflection.c: Use the new helper functions.
6922         
6923         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
6924
6925         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
6926         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
6927
6928         * reflection.c (resolution_scope_from_image): Emit a moduleref if
6929         neccesary.
6930
6931         * reflection.c (mono_image_build_metadata): Emit metadata only for the
6932         current module. Emit the manifest only for the main module.
6933
6934         * reflection.c (mono_image_create_token): Add assertion when a 
6935         memberref needs to be created.
6936
6937         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
6938
6939         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
6940         larger buffer for the custom attribute blob. Fixes #50637.
6941         
6942 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6943
6944         * threadpool.c: notify listener on async processing handles after
6945         invoking the async callback. Thanks to Zoltan.
6946
6947 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
6948
6949         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
6950         avoid code duplication.
6951
6952         * reflection.h (MonoDynamicImage): New type which is currently unused,
6953         but will be used through the ref.emit code in place of 
6954         MonoDynamicAssembly.
6955
6956         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6957         object layout.
6958
6959         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
6960         a MonoDynamicImage instead of just a MonoImage.
6961         
6962         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
6963         icalls to ModuleBuilder but keep their semantics, so they will work
6964         with moduleb->assemblyb. This will change later.
6965         
6966 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
6967
6968         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6969         object layout.
6970
6971         * reflection.c (mono_image_build_metadata): Avoid creation of a default
6972         main module, since it is now done by the managed code.
6973
6974 2003-11-03  Martin Baulig  <martin@ximian.com>
6975
6976         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
6977         `ginst->klass' here.
6978         (method_encode_methodspec): Don't use the `ginst->generic_method's
6979         klass if it's a generic instance, use `ginst->klass' in this case.
6980
6981 2003-11-03  Martin Baulig  <martin@ximian.com>
6982
6983         * reflection.c (mono_image_get_generic_method_param_info):
6984         Removed, use mono_image_get_generic_param_info() instead.
6985         (mono_image_get_type_info): Write the GenericParam table before
6986         the Method table.  This is neccessary because in the GenericParam
6987         table, type parameters of the class (ie. '!0' etc.) must come
6988         before the ones from its generic methods (ie. '!!0' etc).
6989
6990 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
6991
6992         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
6993
6994 2003-11-02  Martin Baulig  <martin@ximian.com>
6995
6996         * reflection.c (create_generic_typespec): Take a
6997         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
6998         the generic parameters from it.
6999
7000 2003-11-02  Martin Baulig  <martin@ximian.com>
7001
7002         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
7003         instead of a `MonoClassField *' since we just need the type.
7004         (create_generic_typespec): New static function.  Creates a
7005         TypeSpec token for a generic type declaration.
7006         (mono_image_get_generic_field_token): New static function.
7007         (mono_image_create_token): If we're a FieldBuilder in a generic
7008         type declaration, call mono_image_get_generic_field_token() to get
7009         the token.
7010
7011 2003-11-02  Martin Baulig  <martin@ximian.com>
7012
7013         * reflection.h
7014         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
7015         `MonoReflectionGenericInst *declaring_type' and
7016         `MonoReflectionGenericInst *reflected_type' fields.
7017
7018         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
7019         `MonoReflectionGenericInst *declaring_type' and a
7020         `MonoReflectionGenericInst *reflected_type' argument instead of a
7021         single `MonoReflectionGenericInst *type' one.  Set
7022         `res->declaring_type' and `res->reflected_type' from them.
7023         (mono_reflection_inflate_field): Likewise.      
7024
7025 2003-11-02  Martin Baulig  <martin@ximian.com>
7026
7027         * class.c (mono_class_setup_vtable): Don't store generic methods
7028         in the vtable.  
7029
7030 2003-11-02  Martin Baulig  <martin@ximian.com>
7031
7032         * reflection.h (MonoReflectionGenericInst): Added
7033         `MonoReflectionType *declaring_type'.
7034
7035         * reflection.c (mono_reflection_bind_generic_parameters): Use
7036         `if (tb->parent)' instead of `klass->parent'.
7037
7038 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
7039
7040         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
7041         with an empty ASSEMBLY table.
7042
7043         * reflection.c (mono_image_build_metadata): Avoid using the same loop
7044         variable in the inner and outer loops.
7045
7046 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
7047
7048         * metadata.h (mono_metadata_make_token): Put parentheses around macro
7049         argument.
7050
7051         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
7052         
7053         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
7054         icalls. Instead, do everything in managed code. This is needed since
7055         it is hard to restore the original domain etc. in unmanaged code in the
7056         presence of undeniable exceptions.
7057
7058         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
7059         New icalls to push and pop appdomain refs.
7060
7061 2003-10-31  Martin Baulig  <martin@ximian.com>
7062
7063         * class.c (inflate_generic_type): Renamed to
7064         mono_class_inflate_generic_type() and made it public.
7065
7066         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
7067         New interncall.
7068
7069         * loader.c (mono_field_from_memberref): Also set the retklass for
7070         typespecs.
7071
7072         * fielder.c (mono_image_get_inflated_field_token): New static
7073         method; creates a metadata token for an inflated field.
7074         (mono_image_create_token, fixup_method): Added support for
7075         "MonoInflatedField".
7076         (fieldbuilder_to_mono_class_field): New static function.
7077         (mono_reflection_inflate_field): New public function.
7078
7079         * reflection.h
7080         (MonoReflectionGenericInst): Added `MonoArray *fields'.
7081         (MonoReflectionInflatedField): New typedef.     
7082
7083 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
7084
7085         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
7086         for Solaris and other platforms without s6_addr16
7087
7088 2003-10-30  Martin Baulig  <martin@ximian.com>
7089
7090         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
7091         argument instead of two.
7092         (mono_class_inflate_generic_signature): Likewise.
7093         (inflate_generic_header): Likewise.
7094         (mono_class_inflate_generic_method): Likewise.  In addition, if
7095         `ginst->klass' is set, it becomes the new `method->klass'.
7096
7097         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
7098         field.
7099
7100         * reflection.c (encode_generic_method_sig): Write a 0xa as the
7101         first byte. [FIXME]
7102         (method_encode_methodspec): If we have generic parameters, create
7103         a MethodSpec instead of a MethodRef.
7104         (fixup_method): Added support for "MonoInflatedMethod" and
7105         "MonoInflatedCtor".
7106         (mono_image_create_token): Added support for "MonoInflatedMethod"
7107         and "MonoInflatedCtor".
7108         (inflated_method_get_object): New static function; returns a
7109         managed "System.Reflection.MonoInflatedMethod" object.
7110         (mono_reflection_bind_generic_method_parameters): Return a
7111         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
7112         (mono_reflection_inflate_method_or_ctor): Likewise.
7113         (mono_image_get_generic_method_param_info): Initialize unused
7114         fields to zero.
7115         (mono_image_get_generic_param_info): Likewise.
7116
7117         * reflection.h (MonoReflectionInflatedMethod): New public
7118         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
7119         "S.R.MonoInflatedCtor" classes.
7120
7121         * loader.c (method_from_memberref): If we're a TypeSpec and it
7122         resolves to a generic instance, inflate the method.
7123
7124 2003-10-28  Dick Porter  <dick@ximian.com>
7125
7126         * object.c (mono_runtime_run_main): Convert command-line arguments
7127         into utf8, falling back to the user's locale encoding to do so.
7128
7129 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
7130
7131         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
7132         at this time.
7133
7134         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
7135
7136         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
7137         up icalls at method definition time. Partially fixes #33569.
7138
7139 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
7140
7141         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
7142         marshalling of arrays. Fixes #50116.
7143
7144         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
7145
7146         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
7147         points to a vtable in the dying appdomain.
7148
7149         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
7150         listeners into unmanaged code inside the lock.
7151
7152         * object.c (mono_class_vtable): Turn off typed allocation in non-root
7153         domains and add some comments.
7154
7155 2003-10-25  Martin Baulig  <martin@ximian.com>
7156
7157         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
7158
7159         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
7160
7161         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
7162         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
7163         currently parsing.  Create the generic class and store it in
7164         `generic_inst->klass' before parsing the type arguments.  This is
7165         required to support "recursive" definitions; see mcs/tests/gen-23.cs
7166         for an example.
7167         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
7168         to support recursive typespec entries.
7169
7170         * class.c (mono_class_setup_parent): If our parent is a generic
7171         instance, we may get called before it has its name set.
7172         (mono_class_from_generic): Splitted into
7173         mono_class_create_from_generic() and mono_class_initialize_generic().
7174
7175 2003-10-25  Martin Baulig  <martin@ximian.com>
7176
7177         * icall.c (ves_icall_Type_BindGenericParameters): Return a
7178         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
7179         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
7180         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
7181
7182         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
7183         (create_typespec): Likewise.
7184         (mono_reflection_bind_generic_parameters): Return a
7185         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
7186         (mono_reflection_inflate_method_or_ctor): New public function.
7187
7188         * reflection.h (MonoReflectionGenericInst): New typedef.        
7189
7190 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
7191
7192         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
7193         inside the domain lock. Fixes #49993.
7194         
7195         * object.c (mono_class_vtable): When typed allocation is used, 
7196         allocate vtables in the GC heap instead of in the mempool, since the
7197         vtables contain GC descriptors which are used by the collector even
7198         after the domain owning the mempool is unloaded.
7199
7200         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
7201
7202         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
7203         reflect what it does. Also invalidate mempools instead of freeing
7204         them if a define is set.
7205
7206         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
7207         of the appdomain.
7208         
7209         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
7210         hold the finalizable objects in this domain.
7211
7212         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
7213         appdomain.
7214
7215         * appdomain.c (mono_domain_set): New function to set the current
7216         appdomain, but only if it is not being unloaded.
7217
7218         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
7219         appdomain which is being unloaded.
7220         
7221         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
7222         unloading of the root appdomain.
7223
7224         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
7225         icall to execute a method in another appdomain. Intended as a 
7226         replacement for InternalSetDomain, which can confuse the code 
7227         generation in the JIT.
7228
7229         * appdomain.c (mono_domain_is_unloading): New function to determine
7230         whenever an appdomain is unloading.
7231
7232         * appdomain.c (mono_domain_unload): New function to correctly unload
7233         an appdomain.
7234
7235         * assembly.c (mono_assembly_load_references): Check that an assembly
7236         does not references itself.
7237
7238         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
7239         domain manually, it asks the finalizer thread to do it, then waits for
7240         the result. Also added a timeout.
7241
7242         * icall.c: Register the new icalls.
7243
7244         * threads.h threads.c: Export the mono_gc_stop_world and 
7245         mono_gc_start_world functions.
7246         
7247         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
7248         function to fill out the mempool with 0x2a.
7249
7250 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
7251
7252         * reflection.h (MonoReflectionMethodAux): New structure to store
7253         information which is rarely used, thus is not in the MonoMethod
7254         structure.
7255
7256         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
7257         store the aux info.
7258
7259         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
7260         and marshalling info into the aux structure.
7261
7262         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
7263         from the aux structure.
7264
7265         * loader.c (mono_method_get_param_names): Retrieve the param names from
7266         the aux structure.
7267         
7268 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
7269
7270         * exception.h exception.c: Add AppDomainUnloadedException && fix 
7271         warning.
7272
7273 2003-10-21  Dick Porter  <dick@ximian.com>
7274
7275         * socket-io.c
7276         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
7277         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
7278
7279 2003-10-21  Martin Baulig  <martin@ximian.com>
7280
7281         * reflection.c (mono_reflection_bind_generic_parameters):
7282         `klass->parent' is NULL for interfaces.
7283
7284 2003-10-21  Martin Baulig  <martin@ximian.com>
7285
7286         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7287
7288 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
7289
7290         * exception.c (mono_exception_from_name_msg): New helper function for
7291         creating exceptions and initializing their message field.
7292
7293         * exception.c: Simplify functions using the new helper.
7294
7295         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
7296         New function.
7297
7298         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
7299         mono_raise_exception, since otherwise gcc doesn't generate the function
7300         epilog for raise_exception, confusing the stack unwinding in the JIT.
7301         Fixes #45043.
7302
7303         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
7304         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
7305         Fixes #49499.
7306
7307 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7308
7309         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
7310         utf8.
7311
7312 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
7313
7314         * icall.c: Removed GetUninitializedObject method because
7315           AllocateUninitializedClassInstance does the same.
7316
7317 2003-10-18  Martin Baulig  <martin@ximian.com>
7318
7319         * class.c (inflate_generic_signature): Renamed to
7320         mono_class_inflate_generic_signature() and made it public.
7321         (my_mono_class_from_generic_parameter): New static function; if we
7322         don't already have the generic parameter's MonoClass, create a
7323         very simple one which is just used internally in the runtime and
7324         not passed back to managed code.
7325
7326         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
7327
7328         * metadata.h (MonoMethodSignature): Moved the
7329         `MonoGenericParam *gen_params' to the MonoMethodHeader.
7330         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
7331
7332         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
7333         ves_icall_MonoMethod_GetGenericArguments(); this is now an
7334         interncall on the MonoMethod class, not on MethodInfo.
7335         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
7336         calling mono_reflection_bind_generic_method_parameters() directly.
7337
7338         * loader.c (mono_method_get_signature): If this is a MethodSpec;
7339         return the already computed `method->signature'.
7340         (method_from_methodspec): New static function to load a method
7341         from a MethodSpec entry.
7342         (mono_get_method_from_token): Call the new method_from_methodspec()
7343         for MethodSpec tokens.  
7344         (mono_get_method_from_token): If we're a generic method, load the
7345         type parameters.
7346
7347         * reflection.c (mono_image_get_memberref_token): Allow
7348         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
7349         table.
7350         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
7351         (mono_image_create_token): First check whether it's a generic
7352         method (so we'd need to create a MethodSpec), then do the other
7353         two alternatives.
7354         (mono_reflection_bind_generic_method_parameters): Return a
7355         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
7356         called directly from the interncall.
7357
7358 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
7359
7360         * reflection.c (load_public_key): Move loading of the public key
7361         into managed code.
7362
7363         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
7364
7365         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
7366         fields.
7367
7368         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
7369         culture, hash_alg and public_key. Fixes #49555.
7370
7371 2003-10-17  Martin Baulig  <martin@ximian.com>
7372
7373         * class.h (MonoGenericInst): Moved this declaration here and added
7374         `MonoMethod *generic_method'.
7375
7376         * icall.c
7377         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
7378         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
7379
7380         * metadata.c (mono_metadata_type_equal): Two types of
7381         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
7382         index; ie. don't compare the address of the `MonoGenericParam'
7383         structure.
7384         (mono_metadata_load_generic_params): Removed the `MonoMethod
7385         *method' argument.
7386
7387         * metadata.h (MonoGenericInst): Moved declaration to class.h.
7388         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
7389
7390         * reflection.c (method_encode_signature): Encode the number of
7391         generic parameters.
7392         (encode_generic_method_sig): New static function.
7393         (method_encode_methodspec): New static function; creates an entry
7394         in the MethodSpec table for a generic method.
7395         (mono_image_get_methodspec_token): New static function.
7396         (mono_image_create_token): Call mono_image_get_methodspec_token()
7397         for generic methods.
7398         (mono_reflection_bind_generic_method_parameters): New public
7399         function.  Instantiates a generic method.
7400
7401 2003-10-16  Martin Baulig  <martin@ximian.com>
7402
7403         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
7404         *gen_params' here from MonoMethodHeader.
7405
7406         * metadata.c (mono_metadata_parse_method_signature): If we have
7407         generic parameters, initialize `method->gen_params' and then set
7408         the correct `type->data.generic_param' in all the parameters.
7409
7410 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
7411
7412         * threads.c (mono_threads_get_default_stacksize): New function to 
7413         return the default stacksize.
7414
7415         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
7416         termination of the finalizer thread, since the previous method had
7417         race conditions. Fixes #49628.
7418
7419         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
7420         as for the other managed threads.
7421
7422 2003-10-16  Martin Baulig  <martin@ximian.com>
7423
7424         * class.c (inflate_generic_signature): Copy `generic_param_count'
7425         and `gen_params'.
7426
7427         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
7428         New interncall.
7429
7430         * metadata.c (mono_metadata_parse_method_signature): Actually set
7431         the `method->generic_param_count' here.
7432         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
7433
7434 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
7435
7436         * object.h: Add a new field to TypedRef to simplify the implementation
7437         of the REFANY opcodes in the JIT.
7438
7439         * icall.c: Make use of the new field.
7440
7441         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
7442         dynamically.
7443
7444 2003-10-15  Martin Baulig  <martin@ximian.com>
7445
7446         * class.c (mono_class_from_gen_param): Renamed to
7447         mono_class_from_generic_parameter() and moved most of the
7448         functionality from mono_reflection_define_generic_parameter()
7449         here; ie. we create a "real" class here.
7450         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
7451         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
7452         previously been called.
7453
7454         * class.h (MonoGenericParam): Moved the declaration of this struct
7455         here from metadata.h and added `MonoMethod *method'.
7456
7457         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
7458         interncall.
7459
7460         * loader.c (mono_get_method_from_token): If we have any generic
7461         parameters, call mono_metadata_load_generic_params() to read them
7462         from the MONO_TABLE_GENERICPAR.
7463
7464         * metadata.c (mono_metadata_load_generic_params): Added
7465         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
7466
7467         * metadata.h (MonoMethodSignature): Replaced
7468         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
7469         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
7470
7471         * reflection.c (mono_reflection_define_generic_parameter): Moved
7472         most of the functionality into the new
7473         mono_class_from_generic_parameter(); set the `method' field if
7474         we're a method parameter.       
7475
7476 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
7477
7478         * marshal.c (emit_struct_conv): if native size is 0
7479         emit no code.
7480
7481 2003-10-14  Martin Baulig  <martin@ximian.com>
7482
7483         * icall.c: The generics API has changed in the spec since it was
7484         added to System.Type; these modifications make it match the spec
7485         again.
7486         (ves_icall_Type_GetGenericParameters): Renamed to
7487         `ves_icall_Type_GetGenericArguments'.
7488         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
7489         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
7490         `ves_icall_MonoType_get_HasGenericArguments'.
7491         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
7492         `ves_icall_MonoType_get_IsGenericParameter'.
7493         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
7494         this is no interncall anymore.
7495         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
7496         `ves_icall_TypeBuilder_get_IsGenericParameter'.
7497
7498 2003-10-14  Martin Baulig  <martin@ximian.com>
7499
7500         * reflection.c (mono_reflection_bind_generic_parameters): Also
7501         inflate generic methods if we're reading the class from IL.
7502
7503 2003-10-13  Martin Baulig  <martin@ximian.com>
7504
7505         * reflection.c (mono_reflection_define_generic_parameter): This
7506         method isn't called directly from the icall anymore; take a
7507         `MonoReflectionAssemblyBuilder *' so we can use this for type and
7508         method generic parameters.
7509         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
7510         (method_builder_encode_signature): Encode generic parameters.
7511         (mono_image_get_method_info): Write generic params to the
7512         MONO_TABLE_GENERICPARAM table.
7513
7514         * reflection.h (MonoReflectionMethodBuilder): Added
7515         `MonoArray *generic_params'.
7516
7517         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
7518
7519         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
7520         wrapper for mono_reflection_define_generic_parameter().
7521         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
7522
7523 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
7524
7525         * marshal.h: Add missing function to fix build.
7526
7527         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
7528         the SetLastError pinvoke attribute.
7529
7530         * marshal.c (mono_marshal_set_last_error): New helper function called
7531         by the generated code.
7532         
7533         * marshal.c (mono_mb_emit_branch): New helper function.
7534
7535         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
7536
7537         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
7538         classes as parameters and return values of delegates. Fixes #29256. 
7539
7540 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
7541
7542         * locales.c: use gint32 in non HAVE_ICU case
7543
7544 2003-10-11  Martin Baulig  <martin@ximian.com>
7545
7546         * mono-debug.c (mono_debug_add_method): Added a workaround for
7547         bug #48591.
7548
7549 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
7550
7551         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
7552         delegates passed to native code must use the STDCALL calling 
7553         convention. Fixes #35987.
7554
7555 2003-10-10  Martin Baulig  <martin@ximian.com>
7556
7557         * class.c (inflate_generic_type): If we're inflating for a generic
7558         type instance (and not for a generic method), return
7559         MONO_TYPE_MVAR unchanged.
7560
7561 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7562
7563         * string-icalls.c: Join ignores null strings in the source array.
7564         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
7565         * threads.c: GetAvailableTheads is slightly more accurate.
7566
7567 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
7568
7569         * threads.h threads.c : add mono_threads_set_default_stacksize
7570         and pass default to CreateThread calls.
7571
7572 2003-10-09  Dick Porter  <dick@ximian.com>
7573
7574         * icall.c:
7575         * locales.h:
7576         * locales.c: Internal calls for constructing CultureInfo and
7577         related objects from libicu (if its available.)
7578
7579 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
7580
7581         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
7582
7583 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7584
7585         * threadpool.c: added an argument to async_invoke_thread that is the
7586         item to process, pass the MonoAsyncResult to the thread start function
7587         when creating a new thread. This way we don't need to acquire any lock
7588         when we're creating a new thread. Readded a semaphore for faster
7589         response times (instead of that Sleep i added).
7590
7591 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
7592
7593         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
7594         get daylight change dates better on Windows, fix handling
7595         of platforms without tm_gmtoff.
7596
7597 2003-10-06  Martin Baulig  <martin@ximian.com>
7598
7599         * class.c (inflate_generic_method): Renamed to
7600         mono_class_inflate_generic_method() and made public.
7601         (mono_class_init): Don't inflate the generic methods here.
7602         (mono_class_from_generic): Added `gboolean inflate_methods'
7603         argument.  Inflate the methods here.
7604
7605         * loader.c (mono_method_get_param_names): Ignore instances of
7606         generic types for the moment.
7607
7608         * reflection.c (fixup_method): Added support for inflated methods.
7609         (mono_image_create_token): Use mono_image_get_methodref_token()
7610         for inflated methods.
7611         (mono_custom_attrs_from_param): Ignore instances of generic types
7612         for the moment.
7613         (mono_reflection_bind_generic_parameters): New public function.
7614         Moved all the functionality from
7615         ves_icall_Type_BindGenericParameters() here and added support for
7616         dynamic types.
7617         (mono_reflection_define_generic_parameter): Initialize
7618         `klass->methods' here.
7619
7620         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
7621         functionality into mono_reflection_define_generic_parameter().
7622         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
7623         TypeBuilder, return that TypeBuilder.
7624
7625 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7626
7627         * appdomain.c: removed mono_delegate_semaphore.
7628
7629         * threadpool.c:
7630         (mono_thread_pool_add): moved hash table creation inside and the thread 
7631         creation outside of the critical region.
7632         (mono_thread_pool_finish): removed obsolete code.
7633         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
7634         continue or exit the thread depending on the queue.
7635
7636 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
7637
7638         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
7639         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
7640         handle more bool marshalling options
7641
7642 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
7643
7644         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
7645         arrays of structs. Also add a more descriptive error message when
7646         a structure member is marshalled as LPArray.
7647
7648 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
7649
7650         * marshal.c (mono_marshal_get_native_wrapper): Add support for
7651         marshalling arrays of complex types. Fixes #29098. Also remove an
7652         usused and incomplete function.
7653
7654 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
7655
7656         * gc.c: report heap_size - free_bytes as total memory allocated
7657         (bug#49362).
7658
7659 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
7660
7661         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
7662         fix timezone handling problems on Windows.
7663         
7664         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
7665         asserts when the year is outside the range handled by ms the functions.
7666
7667         * class.c (setup_interface_offsets): If the class is an interface,
7668         fill out its interface_offsets slot.
7669
7670 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7671
7672         * threadpool.c: mark threadpool threads as background.
7673
7674 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
7675
7676         * decimal.c - define DECINLINE to nothing if not using GCC
7677
7678 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
7679
7680         * assembly.c: More refcount fixes.
7681
7682 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7683
7684         * string-icalls.c: if we're not trimming, return the same string.
7685         When not splitting, don't create a new string.
7686
7687 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7688
7689         * image.c:
7690         (mono_image_open): increment the ref_count inside the critical section.
7691
7692 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
7693
7694         * image.c (mono_image_open): Fix reference counting bug.
7695
7696 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
7697
7698         * marshal.c (mono_marshal_type_size) struct alignment changed for 
7699         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
7700         64bits. Avoid leak in mono_marshal_get_native_wrapper when
7701         mono_lookup_pinvoke_call throws.        
7702
7703 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
7704
7705         * reflection.c (mono_reflection_parse_type): Fix #49114.
7706
7707         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
7708         temporary workaround for cygwin header problem.
7709
7710         * object.c (mono_object_isinst): Synchronize this with the code
7711         generated by the JIT for casts.
7712
7713 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
7714
7715         * reflection.c (encode_type): Fix #38332.
7716
7717 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
7718
7719         * marshal.c (mono_marshal_method_from_wrapper): New function to return
7720         the original method from the wrapper method.
7721
7722 2003-09-25  Martin Baulig  <martin@ximian.com>
7723
7724         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
7725         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
7726         (ves_icall_Type_get_IsGenericInstance): New interncall.
7727
7728 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
7729
7730         * object.c: fix cast warning in big endian code.
7731
7732 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
7733
7734         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
7735         
7736 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7737
7738         * assembly.c: don't call check_env from mono_assembly_load. It's
7739         already done once in mono_assemblies_init and may cause headaches when
7740         multiple threads are loading assemblies.
7741
7742 2003-09-19  Martin Baulig  <martin@ximian.com>
7743
7744         * reflection.c (mono_reflection_define_generic_parameter): Don't
7745         allocate `klass->methods', set `klass->flags' to
7746         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
7747
7748 2003-09-18  Martin Baulig  <martin@ximian.com>
7749
7750         * class.c (mono_class_init): Don't create `class->methods' if it's
7751         already initialized.
7752
7753         * metadata.c (mono_metadata_load_generic_params): Make this
7754         actually work.
7755
7756         * reflection.c (mono_reflection_define_generic_parameter): Set
7757         parent class and interfaces from the constraints.
7758
7759         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
7760         to keep this struct in sync with the declaration in TypeBuilder.cs.
7761
7762 2003-09-17  Martin Baulig  <martin@ximian.com>
7763
7764         * metadata.h (MonoType): Replaced the data's `int type_param'
7765         field with `MonoGenericParam *generic_param'.
7766         (MonoGenericParam): Added `MonoClass *klass'.
7767
7768         * class.c (mono_class_from_gen_param): Removed the
7769         `MonoImage *image' and `int type_num' arguments.
7770
7771         * metadata.c (mono_metadata_parse_generic_param): New static
7772         method; creates a MonoGenericParam which just contains the index.
7773         (do_mono_metadata_parse_type): Call
7774         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
7775         MONO_TYPE_MVAR.
7776
7777         * reflection.c (mono_image_typedef_or_ref): Generic type
7778         parameters may be in the same assembly, but never use a typedef
7779         for them.
7780         (mono_reflection_define_generic_parameter): We're now creating a
7781         "real" class for the type parameter; it's now safe to call
7782         mono_class_from_mono_type() on the class'es type, it'll do the
7783         right thing.
7784
7785 2003-09-16  Martin Baulig  <martin@ximian.com>
7786
7787         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
7788         `symfile->range_entry_size' and `symfile->class_entry_size' here;
7789         the `symfile' data structure must be fully initialized before it
7790         gets added to the table.
7791
7792 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
7793
7794         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
7795
7796         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
7797         class init trampolines.
7798
7799 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
7800
7801         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
7802         to the built-in profiler to turn off time and allocation profiling
7803         respectively.
7804
7805 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
7806
7807         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
7808         g_direct_equal.
7809
7810         * debug-helpers.c (mono_method_full_name): Print the wrapper type
7811         in human readable form.
7812
7813 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
7814
7815         * reflection.c icall.c: Fixed warnings.
7816
7817         * image.c (load_class_names): Use a temporary hash table to hold the
7818         namespaces in order to avoid doing many string comparisons.
7819
7820         * image.h: Fix typo.
7821
7822         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
7823         Pass NULL instead of g_direct_equal to the GHashTable constructor 
7824         since the NULL case is short-circuited inside g_hash_table_lookup, 
7825         leading to better performance.  
7826
7827         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
7828         obtain the first custom attribute for a given index. Depends on the
7829         CustomAttribute table being sorted by the parent field.
7830
7831         * reflection.c (mono_custom_attrs_from_index): Use the new function 
7832         for better performance.
7833
7834 2003-09-07  Martin Baulig  <martin@ximian.com>
7835
7836         * class.c (mono_class_init): If we're a generic instance, inflate
7837         all our methods instead of loading them from the image.
7838         (mono_class_from_generic): Set `class->methods = gklass->methods'.
7839
7840 2003-09-07  Martin Baulig  <martin@ximian.com>
7841
7842         * mono-debug-debugger.c: Added support for constructors.
7843
7844 2003-09-06  Martin Baulig  <martin@ximian.com>
7845
7846         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
7847         New interncall.
7848
7849         * reflection.c (mono_reflection_setup_generic_class): Call
7850         ensure_runtime_vtable() to create the vtable.
7851
7852 2003-09-05  Martin Baulig  <martin@ximian.com>
7853
7854         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
7855         MONO_TYPE_MVAR.
7856
7857 2003-09-04  Martin Baulig  <martin@ximian.com>
7858
7859         * reflection.c (mono_reflection_define_generic_parameter): Generic
7860         parameters start with zero.
7861
7862 2003-09-04  Martin Baulig  <martin@ximian.com>
7863
7864         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7865
7866         * reflection.h (MonoReflectionGenericParam): New typedef.
7867         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
7868         the generic parameters from the managed TypeBuilder.
7869
7870         * reflection.c (mono_reflection_define_generic_parameter): New function.
7871         (mono_reflection_create_runtime_class): Encode generic parameters.
7872         (mono_reflection_setup_generic_class): New function; this is
7873         called after adding adding all generic params to the TypeBuilder.
7874         (encode_type): Added MONO_TYPE_VAR.
7875
7876 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
7877
7878         * class.h class.c (mono_class_needs_cctor_run): Moved this method
7879         here from the JIT.
7880
7881         * assembly.h assembly.c: Moved the AOT loading code into an assembly
7882         load hook.
7883
7884 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
7885
7886         * reflection.h reflection.c class.h class.c: Delete duplicate 
7887         definition of mono_type_get_name () from reflection.c and export the
7888         one in class.c.
7889
7890         * class.c: Class loading fixes from Bernie Solomon 
7891         (bernard@ugsolutions.com).
7892
7893         * reflection.c: Endianness fixes from Bernie Solomon 
7894         (bernard@ugsolutions.com).
7895         
7896 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
7897
7898         * assembly.h assembly.c: Define a file format version for AOT
7899         libraries.
7900         
7901         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
7902
7903         * appdomain.h (MonoJitInfo): New field to determine whenever the
7904         code is domain neutral.
7905         
7906 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
7907
7908         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
7909
7910 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
7911
7912         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
7913         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
7914         Avoid caching the result since strings must be domain specific. Fixes
7915         #48050.
7916
7917 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
7918
7919         * marshal.c (mono_marshal_init): Make this callable multiple times
7920         since it is hard to find a correct place to call it.
7921
7922         * object.c (mono_runtime_class_init): Execute static constructors in
7923         the correct appdomain.
7924
7925         * image.c (build_guid_table): Handle the case when multiple images have
7926         the same GUID.
7927
7928 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7929
7930         * icall.c: added a couple of icalls for System.Web.
7931
7932 2003-08-28  Martin Baulig  <martin@ximian.com>
7933
7934         * icall.c (ves_icall_Type_BindGenericParameters): Use
7935         `klass->generic_inst' instead of `&klass->byval_arg' in the
7936         mono_type_get_object() call.  The returned type must be
7937         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
7938
7939 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
7940
7941         * NOTES: New file.
7942
7943         * object.c (mono_class_proxy_vtable): Make it thread safe.
7944
7945         * pedump.c: Fix warning.
7946
7947         * object.c appdomain.h: Get rid of metadata_section. 
7948         It is no longer needed and it was causing deadlocks with domain->lock.
7949
7950         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
7951
7952 2003-08-26  Martin Baulig  <martin@ximian.com>
7953
7954         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
7955
7956 2003-08-26  Martin Baulig  <martin@ximian.com>
7957
7958         * pedump.c (main): Call mono_metadata_init(),
7959         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
7960         and mono_loader_init().
7961
7962 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
7963
7964         * loader.h: Add missing include to fix build.
7965
7966         * image.h: mono_image_load_references is no more.
7967
7968         * assembly.c: Reworked assembly loading to make it really thread safe.
7969         After these changes, the assembly returned by mono_assembly_open is
7970         fully initialized, i.e. all its references assemblies are loaded.
7971
7972         * assembly.c (mono_image_load_references): Renamed to 
7973         mono_assembly_load_references, and made private, since clients no
7974         longer need to call it.
7975
7976         * class.c: Removed calls to mono_assembly_load_references, since it was
7977         a source of deadlocks.
7978
7979         * loader.h loader.c class.h class.c: Protect data structures using a 
7980         new lock, the loader lock.
7981
7982         * class.c (mono_class_setup_vtable): Create temporary hash tables and
7983         GPtrArrays only when needed.
7984
7985         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
7986         into empty structures by mcs. Fixes pinvoke7.cs.
7987         
7988         * domain.c (mono_init): Call a new initialization function.
7989
7990         * appdomain.c (mono_runtime_init): Call the new initializer function
7991         of the marshal module.
7992
7993         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
7994         inserted into empty structures by mcs. Fixes pinvoke7.cs.
7995
7996         * marshal.h marshal.c: Added locks around the wrapper caches to make
7997         this module thread safe.
7998
7999         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
8000         this argument. Fixes pinvoke1.exe.
8001
8002 2003-08-25  Lluis Sanchez <lluis@ximian.com>
8003
8004         * object.h: Added call_type field to MonoMethodMessage and the corresponding
8005         enumeration of values. Removed fields to store remote call output values in
8006         MonoAsyncResult. Not needed any more.
8007         * object.c: Initialize call_type and async_result fields in mono_message_init.
8008         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
8009         dispatching the message.
8010         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
8011         async call to finish. To do it use a message with EndInvoke call type.
8012
8013 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
8014
8015         * loader.h loader.c (mono_method_hash_marhal_info): New function which
8016         determines whenever a method has marshalling info.
8017
8018 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8019
8020         * assembly.c: fix the build on windows.
8021
8022 2003-08-22 Lluis Sanchez <lluis@ximian.com>
8023
8024         * object.cs: Fixed bug #47785.
8025
8026 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
8027
8028         * string-icalls.c (StringReplace): If their are no occurances of
8029         the old string found return a reference to the supplied
8030         string. This saves some memory and matches MS behavoir.
8031         
8032 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8033
8034         * socket-io.c: fixed compilation for systems that define AF_INET6
8035         and don't define SOL_IP/SOL_IPV6.
8036
8037 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
8038
8039         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
8040         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
8041
8042         * rawbuffer.c rawbuffer.h: Make this module thread safe.
8043
8044         * domain.c: Make this module thread safe.
8045
8046         * domain.c (mono_init): Call new initialization function.
8047
8048         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
8049         reference types too. Fixes #38812.
8050
8051         * image.c (mono_image_init): Fixed warnings.
8052
8053         * class.c (mono_class_from_typeref): Handle assembly load failure
8054         correctly.
8055
8056         * appdomain.c (add_assemblies_to_domain): Handle the case when
8057         the references of an assembly are not yet loaded.
8058
8059         * metadata.c image.c assembly.c: Moved initialization of global
8060         variables to a separate function called at startup since lazy 
8061         initialization of these variables is not thread safe.
8062         
8063         * image.c assembly.c: Made this module thread safe by adding locks in 
8064         the appropriate places.
8065
8066         * domain.c (mono_init): Call the new initialization functions of the
8067         three modules.
8068
8069 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
8070
8071         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
8072           make a direct call. It is proxy's work to make the call asynchronous.
8073           mono_delegate_end_invoke(): If the targe is a proxy, just collect
8074           the return values.
8075         * object.cs: mono_method_call_message_new(): read AsyncResult and
8076           state object from parameters list, if this info is requested.
8077         * object.h: Added fields to store remote call output values in
8078           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
8079
8080 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8081
8082         * object.h: add needed fields to MonoThread.
8083         * threads.c, threads.h: allow registering a function to cleanup data
8084         allocated per thread by the JIT.
8085
8086 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8087
8088         * loader.h: portability fix by Bernie Solomon
8089         * <bernard@ugsolutions.com>.
8090
8091 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
8092
8093         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
8094         return a MonoArray. This simplifies the code and also ensures that
8095         the cache allways contains an object reference as a value.
8096
8097         * icall.c (ves_icall_get_parameter_info): Simplified using the new
8098         function.
8099
8100 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8101
8102         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
8103         fixes a problem with byte ordering when getting the address family for
8104         a socket.
8105
8106 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
8107
8108         * .cvsignore: Added monosn.
8109
8110         * reflection.h reflection.c loader.c: Added support for parameter
8111         marshalling to dynamically created types. Fixes #47295.
8112
8113 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
8114
8115         * rand.c: remove useless warnings.
8116
8117 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8118
8119         * class.c: implemented ldtoken for methods and fieldrefs.
8120
8121 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8122
8123         * threadpool.c: when mono_async_invoke was called, no one took care of
8124         monitoring the queue. So if the method invoked took some time and we
8125         got new async invoke requests after 500 ms (the thread created waited
8126         that long in WaitForSingleObject), the new async invoke was not called
8127         until the previous one finished.
8128
8129         This is fixed now. Thanks to Totte for helping with it.
8130
8131 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8132
8133         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
8134
8135 2003-08-11  Martin Baulig  <martin@ximian.com>
8136
8137         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
8138
8139 2003-08-06  Martin Baulig  <martin@ximian.com>
8140
8141         * mono-debug-debugger.c: Added support for static fields,
8142         properties and methods.
8143
8144 2003-08-06  Martin Baulig  <martin@ximian.com>
8145
8146         * mono-debug-debugger.c: Don't store the MonoString's vtable to
8147         make this work for applications with multiple application domains.
8148
8149 2003-08-04  Martin Baulig  <martin@ximian.com>
8150
8151         * mono-debug-debugger.c: Completely reworked the type support; the
8152         most important thing is that we're now just using one single
8153         `MonoType' instance per type.
8154
8155 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
8156
8157         * mono-endian.h, mono-endian.c, icall.c: Added icall
8158         ves_icall_System_Double_AssertEndianity to assert double word endianity
8159         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
8160
8161 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8162
8163         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
8164         support, icalls and fixes.
8165
8166 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
8167
8168         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
8169         classes that are a punctuation character in .NET is not the same a
8170         g_unichar_ispunct.
8171
8172 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8173
8174         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
8175
8176 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
8177
8178         * icall.c: Add new MemCopy internalcall.
8179         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
8180         Simplified code; It is not necessary to handle all the cases here,
8181         as the C# code takes care of it.  Only handle the case of the name
8182         resource embedded into the assembly.
8183
8184         Changed signature to return the data pointer and the size of the
8185         data. 
8186
8187 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
8188
8189         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
8190         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
8191
8192 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
8193
8194         * socket-io.c: ignore EINTR error in select.
8195
8196 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8197
8198         * class.h, class.c: removed unused subclasses field in MonoClass.
8199
8200 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
8201
8202         * icall.c: improve fix of get_base_definition(). If the parent class
8203           doesn't have the mehod, look at the parent of the parent.
8204         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
8205           to check if a parameter is an in or out parameter
8206           (PARAM_ATTRIBUTE_IN is not set by default).
8207           mono_method_return_message_restore(): Use mono_class_value_size to
8208           get the size of a value type. mono_type_stack_size (parameterType)
8209           does not return the correct value if parameterType is byRef.
8210           mono_load_remote_field(), mono_load_remote_field_new(),
8211           mono_store_remote_field(), mono_store_remote_field_new():
8212           raise exception if the remote call returns an exception.
8213
8214 2003-07-28  Martin Baulig  <martin@ximian.com>
8215
8216         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
8217         method.  This is a wrapper around mono_runtime_invoke() which
8218         boxes the instance object if neccessary.
8219
8220 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8221
8222         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
8223         metadata.h, row-indexes.h, verify.c: first cut of generics support.
8224
8225 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8226
8227         * icall.c: disable mcs bug workaround.
8228
8229 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
8230
8231         * object.c (mono_runtime_class_init): Take the metadata_section
8232         mutex before obtaining the domain mutex.
8233
8234         * appdomain.h: Added definition of metadata_section mutex here. 
8235
8236         * object.c: define metadata_mutex here.
8237
8238 2003-07-24  Ravi Pratap  <ravi@ximian.com>
8239
8240         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
8241         fixed.
8242
8243 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
8244
8245         * reflection.c: Fix bug #46669
8246
8247 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8248
8249         * exception.c:
8250         * exception.h:
8251         * icall.c:
8252         * object.h: fill in the type name for TypeLoadException.
8253
8254 2003-07-23  Ravi Pratap  <ravi@ximian.com>
8255
8256         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
8257         relationship between TypeBuilders while compiling corlib) and bug
8258         45993 (Array types returned from the runtime while compiling
8259         corlib were from the loaded corlib).
8260
8261 2003-07-22  Martin Baulig  <martin@ximian.com>
8262
8263         * mono-debug-debugger.c: Reworked the type support a bit more;
8264         distinguish between types and classes.
8265
8266 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
8267
8268         * icall.c: add IsArrayImpl icall.
8269
8270 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
8271
8272         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
8273         initializing real_size only once. Also fix bug #46602.
8274
8275 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
8276
8277         * object.c: Renamed mono_metadata_section to metadata_section.
8278
8279 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
8280
8281         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
8282           empty array if the type is an array. Fixed.
8283           ves_icall_MonoMethod_get_base_definition: if the base method
8284           is abstract, get the MethodInfo from the list of methods of
8285           the class.
8286         * reflection.c: ParameterInfo.PositionImpl should be zero-based
8287           and it was 1-based. Fixed in mono_param_get_objects.
8288
8289 2003-07-20  Martin Baulig  <martin@ximian.com>
8290
8291         * mono-debug.h: Set version number to 31.
8292         (mono_debug_init): Added `MonoDomain *' argument.
8293
8294         * mono-debug-debugger.c: Reworked the type support; explicitly
8295         tell the debugger about builtin types; pass the `klass' address to
8296         the debugger.
8297
8298 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
8299
8300         * image.c: Allow new metadata tables to be loaded without a
8301         warning. Also update the warning message to give the new constant value.
8302                 
8303 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
8304
8305         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
8306         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
8307         array type representation changes.
8308
8309 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8310
8311         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
8312         on Environment.Exit () call.
8313
8314 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8315
8316         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
8317         requires a matching corlib.
8318
8319 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
8320
8321         * Changelog: My editor decided to add a CR to each line. Sorry about that.
8322           Committed again without the CRs.
8323         
8324 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
8325
8326         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
8327           getting it from the "this" socket instance. Did not work
8328           if the socket is a subclass of Socket.
8329           Also fixed bug #35371.
8330
8331 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8332
8333         * metadata.c: fixed size for TypedByRef.
8334         * loader.c: when searching for a method, consider the vararg amrker.
8335         * unicode.c, decimal.c: constify some arrays.
8336
8337 2003-07-15  Dick Porter  <dick@ximian.com>
8338
8339         * socket-io.c: Fixed compilation for gcc < 3.2.
8340
8341         Fixed compilation for machines that don't have AF_INET6 (thanks to
8342         Bernie Solomon <bernard@ugsolutions.com> for that part.)
8343
8344         Fixed compile warnings.
8345         
8346         Fixed formatting and line endings.
8347
8348 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
8349
8350         * socket-io.h:
8351         * socket-io.c: Added IPv6 support.
8352
8353 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
8354
8355         * class.c (mono_class_is_assignable_from): New function to implement
8356         the is_assignable_from logic. Used by mono_object_isinst, 
8357         Type::IsAssignableFrom () and the interpreter.
8358
8359         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
8360         Object, even interfaces.
8361         
8362         * object.c (mono_object_isinst): Implement in terms of 
8363         is_assignable_from.
8364
8365         * icall.c (ves_icall_type_is_assignable_from): New icall.
8366
8367 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * domain.c (foreach_domain): fix compiler warning.
8370
8371 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
8372
8373         * image.c (load_metadata_ptrs): use g_strndup because strndup is
8374         not available on all plattforms
8375
8376 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
8377
8378         * image.h image.c: Store the metadata version string in MonoImage.
8379         * icall.c: New icall to retrieve the image version.
8380         * reflection.c (create_dynamic_image): Fill in the image version field
8381         * reflection.c (build_compressed_metadata): Use the image version
8382         from the image structure.
8383
8384 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8385
8386         * appdomain.c: modified comment.
8387         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
8388         That will be its last iteration when mono_gc_cleanup is called from
8389         mono_runtime_cleanup and before the domain is unloaded.
8390
8391         Fixes bug #45962.
8392
8393 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
8394
8395         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
8396         attributes.
8397
8398 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8399
8400         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
8401         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
8402         Bernie Solomon <bernard@ugsolutions.com>.
8403
8404 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8405
8406         * object.c, object.h: provide mono_object_new_fast() for faster
8407         allocation in some special cases.
8408
8409 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
8410
8411         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
8412         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
8413
8414 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
8415
8416         * threadpool.c: fix leaks.
8417
8418 2003-07-01  Dick Porter  <dick@ximian.com>
8419
8420         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
8421         using MonoGHashTables.  Fixes threadpool bug posted to list.
8422
8423 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
8424
8425         * image.h, image.c: added support to load an assembly from a byte array.
8426         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
8427         assembly bundle support.
8428
8429 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
8430
8431         * threadpool.c (mono_thread_pool_add): keep a reference to the
8432         AsyncResult to prevent GC
8433
8434 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
8435
8436         * class.c: leak fix.
8437
8438 2003-06-25  Dick Porter  <dick@ximian.com>
8439
8440         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
8441         for the async object, the WaitHandle object will close the handle.
8442         Fixes bug 45321.
8443
8444 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8445
8446         * class.c: in mono_array_class_get (), lookup from the hash with the
8447         same type we insert: this works around a bug in
8448         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
8449         lluis. The real fix will have to wait for after the release.
8450
8451 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
8452
8453         * icall.c: fix memory leak when getting type members.
8454
8455 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8456
8457         * reflection.c: added more pubtoken special cases.
8458
8459 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
8460
8461         * class.c: handle field offset correctly when class size
8462         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
8463
8464 2003-06-20  Martin Baulig  <martin@ximian.com>
8465
8466         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
8467         *image' field.
8468
8469 2003-06-20  Martin Baulig  <martin@ximian.com>
8470
8471         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
8472
8473 2003-06-20  Martin Baulig  <martin@ximian.com>
8474
8475         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
8476         just distinguish between variables in registers and variables at
8477         an offset relative to a register.
8478
8479 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8480
8481         * icall.c: #ifdef out latest changes until mcs is fixed.
8482
8483 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8484
8485         * icall.c: return members in metadata order.
8486
8487 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8488
8489         * icall.c: avoid infinite loop in GetTimeZoneData.
8490
8491 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
8492
8493         * icall.c: added Marshal.Prelink/All icalls.
8494
8495 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8496
8497         * object.c, object.h: fix warnings and do some overflow checking
8498         when creating arrays.
8499
8500 2003-06-17  Dick Porter  <dick@ximian.com>
8501
8502         * file-io.h:
8503         * file-io.c: File attributes need to be tweaked slightly when
8504         passed from the managed to the w32 world.
8505
8506 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
8507         * profiler.h profiler-private.h profiler.c: Rework last patch
8508         based on suggestion by Paolo.
8509         
8510 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
8511
8512         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
8513         instruction level coverage data collection.
8514         * profiler.h profiler.c (: Added new callback function which can be
8515         used by the profiler to limit which functions should have coverage
8516         instrumentation.
8517         * profiler.c (mono_profiler_load): Call g_module_build_path to
8518         generate the file name of the profiler library.
8519
8520 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8521
8522         * profiler.c, profiler.h, profiler-private.h: added basic block 
8523         coverage profiling API.
8524
8525 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
8526
8527         * reflection.c (mono_reflection_create_runtime_class): Add support
8528         for events in dynamically generated code.
8529
8530         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
8531         not allocated.
8532
8533 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8534
8535         * icall.c: when getting timezone info, return reasonable values if we
8536         can't get the actual data.
8537
8538 2003-06-14  Dick Porter  <dick@ximian.com>
8539
8540         * threads.c (start_wrapper): Remove the reference to the thread
8541         object in the TLS data, so the thread object can be finalized.
8542         This won't be reached if the thread threw an uncaught exception,
8543         so those thread handles will stay referenced :-( (This is due to
8544         missing support for scanning thread-specific data in the Boehm GC
8545         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
8546
8547 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
8548
8549         * reflection.c: ensure streams and tables are first allocated with
8550         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
8551
8552 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8553
8554         * icall.c: fixed GetElementType for byrefs (bug# 44792).
8555
8556 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
8557
8558         * reflection.c (mono_reflection_create_runtime_class): Add support for
8559         properties to dynamically created classes.
8560         * reflection.c: Fix a few places where non-MonoObjects were inserted
8561         into the tokens hashtable.
8562
8563 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8564
8565         * object.c: some support to handle out of memory exceptions.
8566
8567 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
8568
8569         * marshal.c (mono_marshal_get_native_wrapper): support reference
8570         return types
8571
8572 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8573
8574         * object.h, object.c: more portability stuff from Bernie Solomon.
8575         Unexport mono_object_allocate(). Added mono_object_unbox ().
8576         Set exitcode when an unhandled exception is thrown.
8577
8578 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
8579
8580         * marshal.c (mono_marshal_get_native_wrapper): use custom
8581         marshaler for return types.
8582
8583 2003-06-10  Dick Porter  <dick@ximian.com>
8584
8585         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
8586         ip_mreq is available
8587
8588 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
8589
8590         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
8591         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
8592         by Bernie Solomon <bernard@ugsolutions.com>.
8593
8594 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
8595
8596         * gc.c (mono_gc_init): Avoid error message on shutdown when
8597         GC_DONT_GC=1 is used.
8598
8599         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
8600         New icall to return the GUID of a module.
8601
8602 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8603
8604         * class.c: ensure instance size always includes the parent's size
8605         even whem class size is set explicitly (fixes bug#44294).
8606
8607 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8608
8609         * profiler.h, profiler.c: made the simple profiler thread-safe,
8610         get more accurate timing info. Allow the loading of an
8611         externally-developed profiler module.
8612
8613 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
8614
8615         * marshal.c (mono_marshal_get_native_wrapper): improved
8616         class/byref arguments.
8617         (mono_marshal_get_native_wrapper): better string marshaling support.
8618
8619 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
8620
8621         * class.c: ensure .pack and .size are handled correctly and
8622         simplified layout of static fields.
8623
8624 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
8625
8626         * appdomain.c
8627         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
8628
8629         * loader.c (mono_lookup_pinvoke_call): look for modules in the
8630         current directory (fix bug 44008)
8631
8632 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
8633
8634         * marshal.c (mono_marshal_get_native_wrapper): started support for
8635         custom marshalers.
8636         (mono_delegate_to_ftnptr): consider marshalling specifications
8637
8638 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
8639
8640         * reflection.c, reflection.h: emit custom marshal info.
8641
8642 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8643
8644         * object.c: free the GError.
8645         * icall.c: added CloseEvent_internal.
8646         * threads.[ch]:
8647         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
8648         call.
8649
8650 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
8651
8652         * loader.c (mono_method_get_signature): Add support for dynamic
8653         assemblies.
8654
8655 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
8656
8657         * reflection.c: fixed bug #43905.
8658
8659 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8660
8661         * class.c, domain.c, icall.c, metadata.h, object.h: support for
8662         handling TypedReference and ArgIterator.
8663         * loader.c, loader.h: added function to get signature at call site.
8664
8665 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8666
8667         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
8668         data readonly. Buglets and warning fixes. Some MethodSpec support.
8669
8670 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8671
8672         * class.h, class.c, object.c: remove relative numbering support.
8673
8674 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
8675
8676         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
8677         free the string, until we get a chance to fix Gtk#
8678
8679 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8680
8681         * marshal.c: revert last patch.
8682
8683 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
8684
8685         * icall.c: updates for new mono_class_vtable() not calling
8686         the type constructor anymore.
8687
8688 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
8689
8690         * object.h, object.c: separate vtable creation from type
8691         initialization. Make running the .cctor thread safe.
8692
8693 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
8694
8695         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
8696
8697 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
8698
8699         * loader.c (mono_get_method): consider calling convention
8700
8701 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
8702
8703         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
8704         to return the invisible global type for a module.
8705
8706         * reflection.c (mono_image_build_metadata): Emit global fields too.
8707
8708 2003-05-20  Peter Williams  <peterw@ximian.com>
8709
8710         * loader.c (mono_lookup_internal_call): Add a few newlines.
8711
8712 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
8713
8714         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
8715         literal strings.
8716
8717         * appdomain.c (set_domain_search_path): Recalculate search path when
8718         AppDomainSetup.PrivateBinPath changes.
8719
8720         * object.c (mono_class_compute_gc_descriptor): It turns out some
8721         parts of the class libs (like System.Thread) holds pointers to
8722         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
8723         to treat native int a pointer type here.
8724         
8725 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
8726
8727         * appdomain.h, domain.c: add hashtable for jump target resolution.
8728
8729 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
8730
8731         * reflection.h reflection.c icall.c: Added new icalls 
8732         GetManifestResourceInfoInternal, GetModulesInternal and support
8733         infrastructure.
8734
8735 2003-05-16  Dick Porter  <dick@ximian.com>
8736
8737         * icall.c:
8738         * file-io.h:
8739         * file-io.c: Implement System.IO.MonoIO::GetTempPath
8740
8741 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
8742
8743         * object.c: mono_store_remote_field: little fix to previous patch.
8744
8745 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8746
8747         * class.c: add constructors to array classes.
8748         * icall.c: special case array construction for InternalInvoke (),
8749
8750 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
8751
8752         * class.h class.c reflection.c object.c: Added support for field
8753         defaults in dynamically generated classes.
8754
8755 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
8756
8757         * reflection.c: properly encode charset for ddlimport.
8758
8759 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
8760
8761         * threads.c: allow compiling without GC.
8762
8763 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8764
8765         * appdomain.h, object.c, object.h, threads.c, threads.h: added
8766         handling of thread static data.
8767
8768 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8769
8770         * reflection.h, reflection.c: added mono_custom_attrs_free ().
8771
8772 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
8773
8774         * class.c (mono_array_class_get): always set the serializable flags
8775         (mono_array_class_get): always set the SEALED attribute for array types
8776
8777 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
8778
8779         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
8780         attributes (fix for bug 42021).
8781
8782 2003-05-12  Dick Porter  <dick@ximian.com>
8783
8784         * gc.c: Don't run finalizers when the finalizer thread is
8785         finishing up, because the default domain has already been
8786         destroyed.
8787
8788 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
8789
8790         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
8791         value is null, we should throw an exception.   This is slightly
8792         different than the other conventions used for the constructor.
8793
8794 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8795
8796         * socket-io.c: fixed windows build.
8797
8798 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8799
8800         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
8801
8802 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
8803
8804         * object.c (mono_string_new_wrapper): Compatibility fix for MS
8805         compilers.
8806
8807 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
8808
8809         * class.c (mono_class_layout_fields): Add experimental GC aware
8810         auto layout facility. Requires class library changes to work correctly.
8811
8812         (mono_class_setup_vtable): Avoid overriding explicit interface
8813         method implementations. Fixes iface3.exe test.
8814
8815         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
8816         object reference.
8817         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
8818         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
8819
8820         * metadata.h: Add new type classification macro which determines
8821         whenever the type holds an object reference.
8822
8823 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
8824
8825         * marshal.c (mono_marshal_get_native_wrapper): cleanups
8826
8827 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
8828
8829         * gc.c (finalizer_thread): Work around a GC bug.
8830
8831 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
8832
8833         * marshal.c (emit_struct_conv): allow unions
8834
8835         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
8836
8837 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
8838
8839         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
8840
8841 2003-05-06  Martin Baulig  <martin@ximian.com>
8842
8843         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
8844
8845 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8846
8847         * socket-io.c:
8848         (Select_internal): allow NULLs, don't create arrays if not needed.
8849         Coupled with Socket.cs changes.
8850
8851         * threadpool.c:
8852         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
8853         register a finalizer for it that will close the semaphore handle. This
8854         fixes the leak and make Lupus' test run with > 4080 loops.
8855
8856 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
8857
8858         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
8859         Jerome Laban (bug #42287)
8860
8861 2003-05-02  Martin Baulig  <martin@ximian.com>
8862
8863         * debug-mono-symfile.h
8864         (MonoSymbolFile): Moved declaration into mono-debug.h.
8865         (MonoDebugMethodJitInfo): Likewise.
8866         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
8867         argument.
8868         (_mono_debug_address_from_il_offset): Take a
8869         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
8870
8871         * mono-debug.h
8872         (MonoDebugDomainData): New struct.
8873         (mono_debug_get_domain_data): New function.
8874         (mono_debug_add_method): Take an additional `MonoDomain *'
8875         argument.
8876         (mono_debug_source_location_from_address): Likewise.
8877         (mono_debug_il_offset_from_address): Likewise.
8878         (mono_debug_address_from_il_offset): Likewise.
8879
8880 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
8881
8882         * reflection.c: one more check for null type in custom attrs.
8883
8884 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8885
8886         * reflection.c: avoid warning (comparison is always false due to limited
8887         range of data type).
8888
8889 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8890
8891         * icall.c: throw an exception in Type.GetField if the argument 'name'
8892         is NULL.
8893
8894 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
8895
8896         * reflection.c: fixed handling of enums in named arguments to custom
8897         attributes (bug #42123).
8898
8899 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
8900
8901         * reflection.c: use the right array element type and handle
8902         a null for a Type argument, too.
8903
8904 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
8905
8906         * reflection.c: handle arrays as arguments to custom attributes.
8907
8908 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8909
8910         * reflection.c: handle a string value in a custom attr
8911         ctor that takes an object.
8912
8913 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
8914
8915         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
8916         (fix bug #42063)
8917
8918 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
8919
8920         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
8921
8922 2003-04-27  Martin Baulig  <martin@ximian.com>
8923
8924         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
8925         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
8926         MONO_DEBUGGER_EVENT_BREAKPOINT.
8927         (mono_breakpoint_trampoline_code): Removed.
8928         (mono_debugger_event_handler): The last argument is now a
8929         `guint32'.
8930         (mono_debugger_insert_breakpoint_full): Removed the
8931         `use_trampoline' argument.
8932         (mono_debugger_method_has_breakpoint): Likewise.
8933         (mono_debugger_trampoline_breakpoint_callback): Renamed to
8934         mono_debugger_breakpoint_callback(); take the method and
8935         breakpoint number as arguments.
8936
8937 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
8938
8939         * metadata.c: fix off by one when loading parameters attributes.
8940
8941 2003-04-24  Martin Baulig  <martin@ximian.com>
8942
8943         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
8944
8945 2003-04-24  Martin Baulig  <martin@ximian.com>
8946
8947         * mono-debug-debugger.c: Moved all code which interacts with the
8948         Mono Debugger here.
8949
8950         * debug-mono-symfile.c: This code now just deals with the symbol
8951         file itself, the debugger code is now in mono-debug-debugger.c.
8952
8953 2003-04-23  Martin Baulig  <martin@ximian.com>
8954
8955         * mono-debug.c (mono_debug_source_location_from_il_offset):
8956         New method; like mono_debug_source_location_from_address(), but
8957         takes an IL offset instead of a machine address.
8958
8959 2003-04-23  Martin Baulig  <martin@ximian.com>
8960
8961         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
8962         `line' field; this is now computed by the debugger.
8963
8964 2003-04-23  Martin Baulig  <martin@ximian.com>
8965
8966         * mono-debug.[ch]: New files.  This is the new debugging interface.
8967
8968         * mono-debug-debugger.[ch]: New files.  Moved all code which
8969         interacts with the Mono Debugger here.
8970
8971 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
8972
8973         * domain.c (mono_init): initialize mono_defaults.monitor_class
8974
8975 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
8976
8977         * reflection.c (method_encode_code): Add a spicy exception to help
8978         future compiler authors.
8979
8980 2003-04-21  Martin Baulig  <martin@ximian.com>
8981
8982         * icall.c
8983         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8984         Make this work with relative pathnames; g_filename_to_uri() needs
8985         an absolute filename.
8986
8987 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
8988
8989         * icall.c: Track name changes in Object and ValueType.
8990
8991 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
8992
8993         * metadata.c (mono_type_stack_size): size should be a multiple of
8994         sizeof (gpointer)
8995
8996 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8997
8998         * gc.c:
8999         (internal_domain_finalize): moved into mono_domain_finalize. No need
9000         to create another thread because the finalizers will be run in the
9001         finalizer thread.
9002         
9003         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
9004         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
9005         to be run (MS does this too).
9006
9007 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
9008
9009         * object.c (mono_class_compute_gc_descriptor): Update comment.
9010
9011         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
9012
9013         * image.h: Add synchronized wrapper cache.
9014
9015         * image.c (do_mono_image_open): Initialize cache.
9016
9017         * reflection.c (create_dynamic_mono_image): Initialize cache.
9018
9019 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9020
9021         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
9022         ves_icall_System_Buffer_ByteLengthInternal.
9023
9024 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
9025
9026         * reflection.c: setup klass->nested_in earlier. Allow
9027         a dash in the assembly name.
9028
9029 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
9030
9031         * metadata.c (mono_type_to_unmanaged): dont access
9032         type->data.klass for MONO_TYPE_OBJECT
9033         (mono_type_to_unmanaged): consider System.Delegate class
9034
9035 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
9036
9037         * class.c: just setup supertypes in the proper place instead of
9038         initializing the full element class for arrays.
9039
9040 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
9041
9042         * class.c: ensure the element class of arrays is initialized.
9043         Setup the supertype info for array classes, too.
9044
9045 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
9046
9047         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
9048
9049 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9050
9051         * Makefile.am: re-added -m option when running cygpath. This way,
9052         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
9053         separator.
9054         * mono-config.c: same codepath for locating mono config file for WIN32
9055         and the rest.
9056         * assembly.c: if mono_assembly_setrootdir is called, don't override
9057         the value set.
9058
9059 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9060
9061         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
9062         MONO_ASSEMBLIES variable.
9063
9064 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
9065
9066         * icall.c: added Assembly::GetNamespaces() icall.
9067
9068 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9069
9070         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
9071
9072 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
9073
9074         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
9075         * object.c: fixed bug in the construction of vtable for proxies
9076
9077 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
9078
9079         * object.c (mono_array_new): Mark mono_array_new as an icall.
9080
9081 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9082
9083         * class.c: fixed test for public method when overriding interfaces.
9084         Closes bug #40970.
9085
9086 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9087
9088         * appdomain.h, domain.c: added mono_domain_foreach() to
9089         be able to access the currently loaded appdomains.
9090         * object.c: make string interning work across sppdomains.
9091         Mark some functions for use as icalls.
9092
9093 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
9094
9095         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
9096
9097         * reflection.h reflection.c: Allocate long living data using 
9098         GC_MALLOC_ATOMIC so the collector does not need to scan it.
9099
9100         * reflection.c: Double the allocation size in streams instead of
9101         increasing it, to prevent unneccesary copying on large assemblies.
9102         
9103         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
9104         creation if the assembly does not have the Run flag set.
9105
9106 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9107
9108         * class.h: avoid the C++ keywords in header files (Jerome Laban
9109         spotted and fixed this).
9110
9111 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9112
9113         * object.c:
9114         (mono_unhandled_exception): fill in the arguments for the
9115         UnhandledException event. Only trigger that event for the default
9116         domain (as MS does).
9117
9118 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
9119
9120         * object.c: Improve typed allocation stuff based on suggestions from
9121         Paolo. Also turn it on if the GC library supports it.
9122
9123 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
9124
9125         * object.c object.h class.h: Added experimental typed allocation
9126         facility using the interfaces in gc_gcj.h.
9127
9128         * os/gc_wrapper.h: Added new include files.
9129         
9130 2003-04-03  Martin Baulig  <martin@ximian.com>
9131
9132         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
9133         which is not yet enabled by default.
9134
9135         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
9136         functions.
9137         (mono_gc_lock, mono_gc_unlock): New static functions.
9138
9139         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
9140         functions; stop/start the world for the garbage collector.  This
9141         is using the windows API; we need to complete the SuspendThread()/
9142         ResumeThread() implementation in the io-layer to make this work on Unix.
9143         (mono_gc_push_all_stacks): New public function; tells the garbage
9144         collector about the stack pointers from all managed threads.
9145
9146 2003-04-03  Martin Baulig  <martin@ximian.com>
9147
9148         * object.h (MonoThread): Added `gpointer stack_ptr'.
9149
9150         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
9151
9152 2003-04-03  Martin Baulig  <martin@ximian.com>
9153
9154         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
9155
9156 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
9157
9158         * reflection.c (typebuilder_setup_fields): Initialize field.first and
9159         field.last.
9160
9161 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
9162
9163         * loader.c (mono_lookup_internal_call): Report the corlib that is
9164         out of sync.
9165
9166 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
9167
9168         * icall.c (ves_icall_type_GetTypeCode): fixed check for
9169         System.DBNull (it's class not valuetype).
9170
9171 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
9172
9173         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
9174         if the array method was already assigned a token (fixes bug#40646).
9175
9176 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
9177
9178         * reflection.c (mono_reflection_get_type): Attempt type resolve even
9179         if no assembly is given.
9180
9181 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
9182
9183         * metadata.h: Added the new tables.
9184
9185         * row-indexes.h: Added definitions for new tables.
9186
9187         * metadata.c: Add schemas for new tables, and add support for
9188         computing the sizes of them.
9189
9190         * class.c: Update for handling the new type cases.
9191
9192 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
9193
9194         * metadata.h (MONO_TYPE_IS_VOID): new macro
9195
9196 2003-03-31  Martin Baulig  <martin@ximian.com>
9197
9198         * threads.h (MonoThreadCallbacks): Added `thread_created'.
9199
9200         * threads.c (mono_thread_new_init): Call `thread_created' in the
9201         mono_thread_callbacks.
9202
9203 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
9204
9205         * loader.h: added marshalbyrefobject_class to mono_defaults
9206         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
9207         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
9208           generation of output parameters.
9209           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
9210         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
9211           contextbound and the target object belongs to the context of the caller.
9212         * object.h: added context and unwrapped_server variables in MonoRealProxy.
9213         * object.c: Implemented support for interfaces and abstract classes
9214           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
9215           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
9216
9217 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
9218
9219         * class.h class.c (mono_class_is_subclass_of): New function.
9220         
9221         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
9222         routines for most common case (calls from ArrayList::ToArray).
9223
9224         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
9225         routine so programs which call Environment::Exit() can be profiled.
9226
9227         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
9228         Added MONO_ARCH_SAVE_REGS.
9229
9230         * icall.c (ves_icall_type_is_subtype_of): Use new function.
9231
9232 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
9233
9234         * blob.h: Add a couple of new MonoType types definitions.
9235
9236         * tabledefs.h: Add a couple of new call convs.
9237
9238 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
9239
9240         * reflection.h (MonoReflectionDynamicAssembly): track changes in
9241         the layout of the class.
9242
9243         * reflection.c (alloc_table): double the size on overflow to avoid
9244         unnecessary copying.
9245
9246         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
9247         avoid filling out metadata tables and blobs. Also set mb->ilgen to
9248         null so it can be garbage collected.
9249         
9250 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
9251
9252         * reflection.c (mono_reflection_get_type): Return the resolved type
9253         only if it is in the assembly we searched.
9254
9255         * reflection.c (ensure_runtime_vtable): Initialize method slots.
9256
9257         * class.c (mono_class_setup_vtable): Set the slot of the overriding
9258         method.
9259
9260 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9261
9262         * appdomain.c:
9263         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
9264         the right one is 'file:///blah', but MS allows it.
9265         * assembly.c:
9266         (mono_assembly_open): allow 'file://blah'
9267
9268         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
9269
9270 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
9271
9272         * socket-io.c: fixes bug #40310.
9273
9274 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
9275
9276         * reflection.c (mono_reflection_parse_type): handle deeply nested
9277         types correctly.
9278
9279         * reflection.c (mono_image_create_token): Use unique token values
9280         since they will be put into a hash table.
9281
9282         * class.c (mono_class_setup_vtable): If a method occurs in more than
9283         one place in the vtable, and it gets overriden, then change the
9284         other occurances too.
9285
9286         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9287         object as return type.
9288
9289 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
9290
9291         * icall.c: Deleted "ToString" implementation for double and float
9292         because they are full implemented in managed code.
9293
9294 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9295
9296         * reflection.c, reflection.h: implemented and exported functions
9297         to retrieve info about custom attributes.
9298
9299 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9300
9301         * appdomain.c: moved Uri handling to assembly.c
9302         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
9303         work when using a file Uri in *nix and windows.
9304
9305         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
9306         GetReferencedAssemblies.
9307
9308 2003-03-18  Dick Porter  <dick@ximian.com>
9309
9310         * icall.c: Rename a couple of internal calls
9311
9312         * threads.c: Set the thread state to Stopped when a thread exits.
9313         Fixes bug 39377.
9314
9315 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
9316
9317         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
9318         New icall.
9319
9320         * object.c (mono_class_vtable): fix warning.
9321
9322 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
9323
9324         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
9325
9326         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
9327         memory.
9328         (method_encode_clauses): Create exception info structures in the right
9329         order.
9330         (mono_reflection_setup_internal_class): Initialize supertypes field.
9331
9332         * class.c object.c: Handle interfaces which implement other interfaces 
9333         correctly.
9334
9335         * class.h class.c: Move the supertypes array initialization code into 
9336         a separate function so it can be used for dynamic types too. Also call
9337         it earlier, in mono_class_init(), since it can be used before the
9338         type is initialized.
9339
9340 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9341
9342         * Makefile.am:
9343         * assembly.c:
9344         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
9345
9346         * appdomain.c:
9347         * appdomain.h:
9348         * marshal.c:
9349         * object.c: remove warnings.
9350
9351 2003-03-13  Martin Baulig  <martin@ximian.com>
9352
9353         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
9354         (MonoDebugLexicalBlockEntry): New types.
9355
9356         * debug-mono-symfile.c
9357         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
9358
9359 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9360
9361         * process.c: ret can be any non-zero value accroding to MS doc.
9362
9363 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
9364
9365         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
9366         fixing a warning for a miss-used prototype, would have cause
9367         random memory corruption.
9368
9369 2003-03-07  Martin Baulig  <martin@ximian.com>
9370
9371         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
9372         getting really annoying ....
9373
9374 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
9375
9376         * reflection.c (fixup_method): added support for array methods.
9377
9378 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
9379
9380         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
9381         (pointed out by Michael Adams).
9382
9383 2003-03-04  Dick Porter  <dick@ximian.com>
9384
9385         * icall.c: Temporarily reverted the Double and Single ToString()
9386         change, because it broke nunit.
9387
9388 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
9389
9390         * object.h, threads.h: make include files compatible with C++
9391         (patch by Jerome Laban <jlaban@wanadoo.fr>).
9392
9393 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
9394
9395         * icall.c: Erased ToString helper functions for Double and Single.
9396         Now, that implementations ar all in managed code (Double and Single
9397         Formatters).
9398
9399 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
9400
9401         * appdomain.c: Added method for initializing the default context of
9402         a domain. Added internal call for getting the default context.
9403         * appdomain.h: Added context variable in MonoDomain struct.
9404         * domain.c: mono_domain_set also sets the default context of the domain
9405         * icall.c: Mapped internal method InternalGetDefaultContext.
9406         * object.c: mono_object_get_virtual_method returns always a remoting
9407         wrapper if the object is a transparent proxy.
9408         mono_runtime_invoke_array: when creating an object by calling the
9409         constructor, if the created object is a proxy, then the constructor should
9410         be called using the a remoting wrapper.
9411
9412 2003-03-03  Dick Porter  <dick@ximian.com>
9413
9414         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
9415         variable so it compiles on solaris.  Problem spotted by
9416         Christopher Taylor <ct@cs.clemson.edu>
9417
9418 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9419
9420         * appdomain.c:
9421         (get_info_from_assembly_name): don't leak value.
9422
9423         * icall.c:
9424         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
9425         result.
9426
9427 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
9428
9429         * assembly.c: export mono_image_load_references ().
9430         * class.c: handle function pointers. mono_class_from_name() now
9431         supports nested type names directly.
9432
9433 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
9434
9435         * reflection.h reflection.c: Encode already created dynamic methods 
9436         and fields correctly as a DEF instead of a REF.
9437
9438         * reflection.c: Get rid of the force_ref argument to 
9439         mono_image_typedef_or_ref since it was wrong in the first place.
9440
9441         * string-icalls.c: add error checking to string constructors according
9442         to the MSDN docs.
9443
9444         * reflection.c: Emit types in the order their TypeBuilders were 
9445         created. Previously, a new table index was assigned to each type before
9446         the tables were emitted. This was wrong because the signature blob
9447         might already refer to a type by its original table index.
9448
9449 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
9450
9451         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
9452         change.
9453         
9454 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9455
9456         * Makefile.am: make assemblies dir have \ instead of / on windows.
9457
9458 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
9459
9460         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
9461         iterate over the NESTEDCLASS table using a linear search since the
9462         table is not guaranteed to be sorted by the secondary key.
9463
9464         * class.c (mono_class_create_from_typedef): fixed up call to
9465         mono_metadata_nesting_typedef.
9466         
9467 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
9468
9469         * marshal.c (mono_string_to_byvalstr): clear the memory as
9470         suggested by Jerome Laban <jlaban@wanadoo.fr>
9471
9472 2003-02-26  Dick Porter  <dick@ximian.com>
9473
9474         * process.c: Cope with padding in .rsrc blocks
9475
9476 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
9477
9478         * metadata.h: reverted the filter_len change, it breaks reflection
9479         
9480 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
9481
9482         * metadata.h: added a new field to store the filter_len
9483         
9484
9485 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
9486
9487         * reflection.c: handle custom attributes for types and members
9488         created with Reflection.Emit (bug#38422).
9489
9490 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
9491
9492         * reflection.c: define RTSpecialName automatically for constructors for
9493         compatibility with MS.NET.
9494
9495         * reflection.c (mono_reflection_create_runtime_class): initialize
9496         nested_in field of dynamically created classes.
9497
9498 2003-02-22  Martin Baulig  <martin@ximian.com>
9499
9500         * debug-mono-symfile.h: Incremented version number.
9501
9502 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
9503
9504         * object.h icall.c process.c: fix warnings.
9505
9506 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
9507
9508         * appdomain.h appdomain.c:
9509         (mono_domain_try_type_resolve): split the 
9510         name_or_tb argument into a name and a tb argument.
9511         (mono_domain_has_type_resolve): new function to check whenever the
9512         application has registered a TypeResolve event handler.
9513         
9514         * icall.c reflection.h reflection.c: move the type resolve logic into
9515         mono_reflection_get_type () so it will be invoked when 
9516         Assembly::GetType () is called.
9517
9518         * reflection.c:
9519         (mono_reflection_get_type): renamed to get_type_internal.
9520         (mono_reflection_get_type): fixed type name generation so it works 
9521         for nested types too.
9522         (mono_reflection_get_type): call has_type_resolve () to avoid the 
9523         costly type name generation if there is no resolve event handler.
9524
9525 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9526
9527         * class.c, image.c: load exported types from file references.
9528
9529 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
9530
9531         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
9532           used to cache the managed methods used to create proxies and make 
9533           remote invocation of methods.
9534         * class.h: Added in MonoVTable a flag to indicate that a class needs 
9535           to be remotely created.
9536         * object.c: Modified the method mono_class_vtable(). It now initializes 
9537           the remote flag of the vtable. Modified mono_object_new_specific(), 
9538           so now it checks the remote flag.
9539         * icall.c: Added a couple of internal methods, one for enabling instance 
9540           creation interception for a type, and one for creating objects bypassing
9541           the remote check.
9542
9543 2003-02-18  Martin Baulig  <martin@ximian.com>
9544
9545         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
9546         New interncall to get a method's metadata token.
9547
9548         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
9549         New interncall for the debugger.
9550
9551 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
9552
9553         * class.c (mono_class_setup_vtable): allocate supertype array
9554
9555 2003-02-18  Martin Baulig  <martin@ximian.com>
9556
9557         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
9558
9559 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9560
9561         * reflection.c:
9562         (assembly_name_to_aname): jump over unknown properties (i've found
9563         something like: 'type, assembly, version=xxx, custom=null, public...',
9564         so now will ignore custom=null and still get the rest of the values).
9565
9566 2003-02-17  Dick Porter  <dick@ximian.com>
9567
9568         * threads.c: Have Thread.Start() wait for a semaphore to signal
9569         that the thread has set up all its local data.  This fixes bug
9570         34323, where Abort() raced the new thread's TLS data.
9571
9572         Also removes the handle_store() call from start_wrapper, because
9573         threads are now always created suspended and there is no longer a
9574         race between the parent and child threads to store the info.
9575
9576 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
9577
9578         * image.c: explain the #- heap issue in a message, hopefully
9579         avoiding FAQs on mono-list.
9580
9581 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9582
9583         * icall.c:
9584         (GetEntryAssembly): if the domain has not invoked
9585         AppDomain.ExecuteAssembly yet, return the assembly of the default
9586         AppDomain.
9587
9588 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * class.c (mono_ldtoken): make it work in dynamic assemblies.
9591
9592 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
9593
9594         * metadata.c, reflection.c: simple speedup to type hash
9595         and equals code.
9596
9597 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
9598
9599         * image.c, image.h, class.c, assembly.c: move module loading
9600         to MonoImage. When loading metadata, consider alignemnet from
9601         the start of metadata, not from the metadata address in memory.
9602
9603 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
9604
9605         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
9606         AssemblyBuilder objects. Factored out custom attribute creation into
9607         a separate function.
9608         (create_custom_attr): new function to create custom attributes.
9609
9610 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
9611
9612         * Makefile.am: Got tired of typing the full pathname to pedump.
9613         Until there is another option, am installing this.
9614
9615 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
9616
9617         * class.c (class_compute_field_layout): always set field->parent 
9618         (mono_ldtoken): use mono_defaults.fieldhandle_class;
9619
9620 2003-02-11  Dick Porter  <dick@ximian.com>
9621
9622         * threads-types.h:
9623         * monitor.c: Rewrote Monitor, making lock much faster and
9624         Pulse/Wait work as specified.  Also uses much fewer handles, and only
9625         creates them as needed.
9626
9627         * exception.c: Added SynchronizationLockException
9628
9629         * threads.c: Deleted old Monitor implementation.  The new one is
9630         in a new file.
9631
9632 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
9633
9634         * class.c: handled TypedReference type code. Set the correct size for
9635         class data. Setup interface_offsets for interface classes, too.
9636
9637 2003-02-09  Martin Baulig  <martin@ximian.com>
9638
9639         * debug-mono-symfile.h: Reflect latest symbol writer changes.
9640
9641 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
9642
9643         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
9644         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
9645         * object.c: fixed mono_object_get_virtual_method () for interfaces.
9646         * verify.c: check for code that runs after the end of the method.
9647
9648 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
9649
9650         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
9651         "System.Math::Round2".
9652         * sysmath.h: Added Floor, Round and Round2 definitions.
9653         * sysmath.c: Modified certain functions that were not 100% compliant
9654         with MS.NET (math precision) and added the implementation of Floor,
9655         Round and Round2.
9656
9657 2003-02-07  Martin Baulig  <martin@ximian.com>
9658
9659         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
9660
9661 2003-02-07  Martin Baulig  <martin@ximian.com>
9662
9663         * debug-mono-symfile.c: Reflected latest symwriter changes.
9664         (mono_debug_create_mono_symbol_file): Removed.
9665         (mono_debug_open_mono_symbol_file): Take an argument which
9666         specifies whether to create a dynamic symbol file.
9667
9668 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
9669
9670         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
9671
9672 2003-02-05  Martin Baulig  <martin@ximian.com>
9673
9674         * reflection.c (mono_image_build_metadata): Make this public,
9675         protect it against being called multiple times, don't create
9676         resources and don't build the compressed metadata here.
9677         (mono_image_create_pefile): Do this here.
9678
9679         * icall.c
9680         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
9681
9682 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9683
9684         * socket-io.c: fixed bug #36322.
9685
9686 2003-02-06  Piers Haken <piersh@friskit.com>
9687
9688         * appdomain.[ch]:
9689         * class.h:
9690         * debug-mono-symfile.c:
9691         * icall.c:
9692         * loader.c:
9693         * mono-config.c:
9694         * monosn.c:
9695         * reflection.c:
9696         * socket-io.c: warning cleanups
9697
9698 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
9699
9700         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
9701         function. works like remoting invoke, but does a check for the Proxy first.
9702
9703 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
9704
9705         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
9706
9707 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
9708
9709         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
9710         array of pointers.
9711         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
9712         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
9713
9714         * object.c (mono_store_remote_field_new): used by the new jit
9715         instead of mono_store_remote_field
9716         (mono_load_remote_field_new): used by the new jit
9717         instead of mono_load_remote_field
9718
9719 2003-02-05  Patrik Torstensson
9720
9721         * appdomain.c: changed unload to take the domain id instead
9722         of domain
9723         
9724         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
9725
9726
9727 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9728
9729         * appdomain.c: don't look for assemblies in ApplicationBase if
9730         PrivateBinPathProbe is set.
9731
9732 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9733
9734         * object.c: make the first argument in main_args contain the absolute
9735         path to the assembly. Fixes bug #37511.
9736
9737 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9738
9739         * icall.c: get correct UTC offset for countries not using daylight
9740         time saving. Fixes bug #30030.
9741
9742 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9743
9744         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
9745         and 1 are the family).
9746
9747 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
9748
9749         * icall.c (ves_icall_InternalExecute): removed wrong assertion
9750
9751         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
9752
9753 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
9754
9755         * reflection.c: added support for SignatureHelper tokens, which is
9756         needed by the Calli opcode.
9757
9758         * reflection.h: track changes to SignatureHelper class.
9759
9760         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
9761
9762 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9763
9764         * appdomain.c: fixed loading assemblies from PrivateBinPath.
9765
9766 2003-02-03  Patrik Torstensson
9767         * appdomain.[c|h], domain.c : 
9768          - Added support for getting a domain via domain id
9769          - Support for setting and getting domain from System.AppDomain 
9770            (used in cross appdomain channel)
9771          - Added support for get/set for a MonoAppContext on a thread 
9772            (Context class in System.Runtime.Remoting.Contexts),
9773          - Removed hack in Get/SetData and ExecuteAssembly.
9774         
9775         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
9776         the managed world to get control when a proxy is created.
9777
9778         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
9779         
9780 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
9781
9782         * icall.c
9783         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9784         Populate the codebase field as well.
9785
9786 2003-02-02  Martin Baulig  <martin@ximian.com>
9787
9788         * debug-mono-symfile.c
9789         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
9790         (mono_debug_symfile_add_method): Allow interncalls.
9791
9792 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9793
9794         * icall.c: throw parse exception if strtod fails or the string is empty.
9795
9796 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
9797
9798         * marshal.c: handle object type separately from defined
9799         class types.
9800
9801 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
9802
9803         * marshal.c: handle NATIVE_LPSTR for strings when it's
9804         explicitly specified.
9805
9806 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
9807
9808         * reflection.c, reflection.h, icall.c: setup the reflection
9809         handle cache for ModuleBuilders and AssemblyBuilders.
9810
9811 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
9812
9813         * reflection.c (reflection_methodbuilder_to_mono_method): set
9814         pinvoke flag
9815
9816 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9817
9818         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
9819
9820 2003-01-29  Dick Porter  <dick@ximian.com>
9821
9822         * threads.c: No need for the fake_thread kludge now that Thread
9823         doesn't run a class constructor
9824         
9825 2003-01-29  Dick Porter  <dick@ximian.com>
9826
9827         * threads.c: Use g_direct_hash instead of the rather bogus
9828         g_int_hash
9829
9830 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
9831
9832         * marshal.c (mono_marshal_get_native_wrapper): add check for null
9833         (fix pinvoke12.exe)
9834         (mono_marshal_get_struct_to_ptr): generate valid IL code
9835         (mono_marshal_get_ptr_to_struct): generate valid IL code
9836         (*): correctly set sig->pinvoke, we need to memdup the signature
9837         to do that
9838
9839 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9840
9841         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
9842         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
9843
9844 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9845
9846         * profiler.c: provide more callers information.
9847
9848 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
9849
9850         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
9851
9852         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
9853
9854         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
9855
9856 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9857
9858         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
9859         exception instead of going into an infinite loop on dates which it 
9860         can't yet handle.
9861
9862         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
9863         out-of-range exception if needed.
9864
9865         * class.c (mono_class_setup_vtable): allow a virtual method to provide
9866         an implementation for an interface method and to override an inherited
9867         method at the same time. 
9868         Imagine a scenario when a virtual method is used to override a
9869         virtual abstract method in a parent class, and this same method 
9870         provides an implementation for an method inherited from an interface. 
9871         In this case, the interface resolution code will set im->slot, which 
9872         means that the virtual method override pass will skip this method 
9873         which means a pointer to the abstract method inherited from the parent
9874         will remain in the vtable of this non-abstract class.
9875
9876         * class.c: (mono_class_setup_vtable): continue search for a real 
9877         method if only an abstract method is found.     
9878
9879 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9880
9881         * reflection.c: add size to encoding for ByValStr and ByValArray
9882         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
9883
9884 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9885
9886         * class.c (mono_class_setup_vtable): pass the override info as an
9887         argument.
9888
9889         * class.c (mono_class_setup_vtable): set the slot of overriding methods
9890         correctly.
9891         
9892         * reflection.c (ensure_runtime_vtable); add support for method 
9893         overrides.
9894         
9895 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9896
9897         * reflection.c (resolution_scope_from_image): Hack to work to work with
9898         dynamic assemblies.
9899
9900         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
9901         added a 'force_ref' argument to force this function to allways return 
9902         a TypeRef. This is needed by mono_image_get_memberref_token ().
9903         
9904 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9905
9906         * reflection.c (mono_image_get_type_info): interfaces really don't have
9907         a parent.
9908
9909         * reflection.c (mono_image_basic_init): fill out missing fields of
9910         image structure.
9911
9912         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
9913         dynamic assemblies. This is required so dynamic assemblies show up in
9914         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
9915         Type::GetType() etc. This is consistent with MS behaviour.
9916
9917         * image.c image.h reflection.c: add newly created classes to the name 
9918         cache so mono_class_get () will find them.      
9919
9920 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
9921
9922         First part of changes to get IKVM.NET running under mono.
9923         
9924         * appdomain.h, appdomain.c: added new function 
9925         mono_domain_try_type_resolve() which will emit TypeResolve events. 
9926         This function will call AppDomain::DoTypeResolve to do the actual work.
9927
9928         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
9929         moved existing code dealing with dynamic tokens to a new function 
9930         called mono_reflection_lookup_dynamic_token (). This function will 
9931         raise TypeResolve events when appropriate. Since reflection.c is not 
9932         part of libmetadata, a new hook function called 
9933         mono_lookup_dynamic_token() is added to class.c which will call this.
9934
9935         * assembly.h assembly.c: make the invoke_load_hook function public,
9936         so it can be called for dynamic assemblies.
9937
9938         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
9939
9940         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
9941         type isn't found.
9942
9943         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
9944         MonoGHashTable, since it contains pointers to objects which the GC 
9945         needs to track.
9946
9947         * assembly.c (search_loaded): remove unused variable.
9948         
9949 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
9950
9951         * object.c: fixed issue exposed by gcc-generated IL programs
9952         that use RVA data for pointers.
9953
9954 2003-01-25  Martin Baulig  <martin@ximian.com>
9955
9956         * threads.c (start_wrapper): Moved the initialization of
9957         `start_func' above the mono_new_thread_init() call to which we
9958         pass it as argument.
9959
9960 2003-01-24  Martin Baulig  <martin@ximian.com>
9961
9962         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
9963         the MonoThread pointer.
9964
9965 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
9966
9967         * icall.c: Rename `PowImpl' to Pow.
9968
9969 2003-01-23  Dick Porter  <dick@ximian.com>
9970
9971         * threads.c (start_wrapper): Create a Thread object if needed, so
9972         the Main() thread can do the class initialisation in a subthread
9973         that has been set up to allow managed code execution.
9974
9975         Pass the thread ID instead of the MonoThread pointer to the thread
9976         start and attach callbacks.  This change is required, because the
9977         jit thread start callback must be called _before_ the Thread
9978         object can be created.
9979         
9980         (mono_thread_init): Removed much object creation code that is no
9981         longer needed.  No managed code is called from here now.
9982
9983         * object.c (mono_runtime_exec_managed_code): Create a subthread
9984         for Main, and call back to the runtime to use it.
9985         Set the exit code when Main exits.
9986
9987         * gc.c: Make sure domain finalisation happens in a subthread.
9988         Re-enable threaded GC, fixing bug 31333 (again).
9989
9990         * environment.c: System.Environment internall calls (so far just
9991         ExitCode is here, the others are still in icall.c)
9992
9993         * appdomain.c (mono_runtime_cleanup): All threads running managed
9994         code should have finished before mono_runtime_cleanup() is
9995         reached, so no need to clean up threads.
9996
9997 2003-01-22  Martin Baulig  <martin@ximian.com>
9998
9999         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
10000         `gpointer func' arguments.      
10001         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
10002         but added `MonoThread *thread' argument.
10003         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
10004
10005         * threads.c (mono_new_thread_init): Added `gpointer func' argument
10006         and pass it to the mono_thread_start_cb callback.
10007         (mono_install_thread_callbacks): New public function to install a
10008         set of callbacks which are set by the debugger.
10009         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
10010
10011 2003-01-22  Martin Baulig  <martin@ximian.com>
10012
10013         * Makefile.am: Install debug-mono-symfile.h.
10014
10015 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
10016
10017         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
10018
10019 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
10020
10021         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
10022         * class.c (mono_ptr_class_get): correctly set access levels of pointers
10023         (mono_array_class_get): correctly set access levels of arrays
10024
10025 2003-01-20      Patrik Torstensson
10026         * image.h (MonoAssemblyName): changed major, minor, build, revision
10027         from signed to unsigned.
10028
10029 2003-01-20  sean kasun <skasun@azstarnet.com>
10030
10031         * reflection.c (load_cattr_value): Now this handles
10032         MONO_TYPE_SZARRAY.  Fixes bug #35629
10033
10034 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
10035
10036         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
10037         integer value
10038
10039 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10040
10041         * decimal.c: fixed bug #26056.
10042
10043 2003-01-17  Martin Baulig  <martin@ximian.com>
10044
10045         * gc.c: Raise an ExecutionEngineException instead of using g_error().
10046
10047 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10048
10049         * exception.[ch]:
10050         (mono_get_exception_type_initialization): new function.
10051
10052         * object.c: throw a TypeInitializationException when an exception is
10053         thrown invoking the class constructor.
10054
10055 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10056
10057         * reflection.c: fixed attribute reading.
10058
10059 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10060
10061         * icall.c:
10062         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
10063         provided, look for the type in the calling assembly and then in
10064         mscorlib; if the assembly name is provided, only try that one.
10065
10066 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
10067
10068         * object.c: register the vtable before there is a chance it's
10069         queried again recursively.
10070
10071 2003-01-13  Duncan Mak  <duncan@ximian.com>
10072
10073         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
10074         gc-internal.h. 
10075         
10076 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
10077
10078         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
10079
10080 2003-01-11  Martin Baulig  <martin@ximian.com>
10081
10082         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
10083         this to 20 for the release.
10084
10085 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
10086
10087         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
10088
10089         * loader.c (mono_method_get_marshal_info): bug fix
10090
10091         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
10092         structures with explicit layout
10093
10094 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10095
10096         * profiler.c: made the output more readable (and sorted). 
10097         Added caller information for the allocation profiler.
10098
10099 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
10100
10101         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
10102
10103 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10104
10105         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
10106         to get value types.
10107         
10108 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
10109
10110         * object.c, profiler.h, profiler.c, profiler-private.h:
10111         Added object allocation profiler.
10112
10113 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
10114
10115         * reflection.h, reflection.c: handle global methods.
10116         Compress blob entries.
10117
10118 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
10119
10120         * marshal.c: fix compilation.
10121
10122 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
10123
10124         * loader.c (mono_method_get_marshal_info): impl.
10125
10126         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
10127
10128 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10129
10130         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
10131         for reference types.
10132
10133 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
10134
10135         * loader.c: fixed off by one error in loaded parameter names.
10136
10137 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
10138
10139         * marshal.c (mono_marshal_get_icall_wrapper): like
10140         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
10141         instead of a MonoMethod.
10142
10143 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10144
10145         * decimal.c: fixed bug #36537.
10146
10147 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
10148
10149         * marshal.c: throw a missing method exception if a
10150         P/Invoke method is not found.
10151
10152 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10153
10154         * icall.c: allow a null this for constructors.
10155
10156 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
10157
10158         * icall.c: raise the proper exceptions if the arguments to the
10159         internal Invoke are incorrect.
10160
10161 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
10162
10163         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
10164
10165 2003-01-03  Martin Baulig  <martin@ximian.com>
10166
10167         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10168
10169 2002-12-31  Martin Baulig  <martin@ximian.com>
10170
10171         * debug-mono-symfile.c: Completely rewrote the type section.
10172         Instead of using individual malloc()ed fields, we use one big
10173         continuous memory area and offsets into this area.
10174         See the comments in the source code for details.
10175
10176 2002-12-30  Martin Baulig  <martin@ximian.com>
10177
10178         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
10179
10180 2002-12-30  Martin Baulig  <martin@ximian.com>
10181
10182         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
10183         line number table in this data blob instead of using an external
10184         pointer.
10185
10186 2002-12-28  Martin Baulig  <martin@ximian.com>
10187
10188         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10189
10190 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
10191
10192         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
10193         as a boxed return type.
10194
10195 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
10196
10197         * appdomain.c
10198         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
10199         g_build_filename to properly get separators on the filename created.
10200
10201         * object.h: Small change, introduce MonoMarshalByRefObject to
10202         track the layout of that structure in the C# universe as we make
10203         changes there.
10204
10205 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
10206
10207         * object.c: removed assert to allow static fields on interfaces.
10208         * loader.c: a TypeSpec may be used for any type, not just arrays.
10209
10210 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10211
10212         * class.c, class.h: added mono_class_array_element_size ().
10213         Ignore static methods in interfaces.
10214
10215 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10216
10217         * threads.c: fixed the build under cygwin.
10218
10219 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10220
10221         * reflection.c: handle nullref constants. Allocate keys for
10222         reflection handles with the GC.
10223
10224 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10225
10226         * threads.c, threads.h: added mono_thread_get_abort_signal()
10227         to get a suitable signal for thread abort.
10228
10229 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10230
10231         * metadata.c: fix handling of ExportedType table.
10232
10233 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10234
10235         * icall.c: added WriteWindowsDebugString internal call.
10236
10237 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10238
10239         * reflection.h: added fields to match C# implementation.
10240
10241 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10242
10243         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
10244
10245 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
10246
10247         * gc.h, gc-internal.h: Rename header for GC internal calls to
10248         gc-internal.h from gc.h as to not clash with Boehm GC having its
10249         header installed as <gc.h> in outside include paths.
10250         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
10251         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
10252
10253 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10254
10255         * icall.c: assign minor, build and revision in FillName.
10256
10257 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
10258
10259         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
10260         Added support for running code generated by Reflection.Emit.
10261
10262 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10263
10264         * appdomain.c: check for NULL argument in LoadFrom.
10265
10266 2002-12-10  Dick Porter  <dick@ximian.com>
10267
10268         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
10269
10270 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10271
10272         * appdomain.c: fix buglet when building exe file name.  Handle full
10273         assembly name (needed after latest changes to AssemblyName).
10274         * image.c:
10275         (mono_image_close): free some hashtables.
10276
10277 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
10278
10279         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
10280         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
10281         on some systems (redhat 7.3) 
10282
10283 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
10284
10285         * threads.c: delete the critical section of a sync block,
10286         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
10287
10288 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
10289
10290         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
10291
10292 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10293
10294         * appdomain.[ch]: handle the assembly preload event to try loading the
10295         assemblies using the paths we have in the current domain.
10296
10297         * assembly.[ch]: created an assembly preload hook that is called to try
10298         loading the assembly by other means that the ones provided here.
10299
10300         * domain.c: initialize the domain search path.
10301
10302         From now on, assemblies (TODO: except corlib and System) are loaded
10303         according to these rules when using mono_assembly_load ():
10304
10305                 1. It tries to load the assembly from the ApplicationBase
10306                 of the current domain appending .dll and .exe (TODO: have to
10307                 try loading from name/name.dll and name/name.exe).
10308
10309                 2. It tries the search path specified in PrivateBinPath for the
10310                 current domain (if any).
10311
10312                 3. Previous behavior.
10313
10314 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
10315
10316         * icall.c: implemented GetInterfaceMap() related icall.
10317         * domain.c, loader.h: load MethodInfo in mono_defaults.
10318
10319 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10320
10321         * gc.c: disable the finalizer thread for now, untill all the issues
10322         with it are resolved.
10323
10324 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10325
10326         * string-icalls.c: handle embedded nulls in string ctor when the
10327         length is specified.
10328
10329 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10330
10331         * class.c: look for explicit interface implementation in parent
10332         classes, too.
10333
10334 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
10335
10336         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
10337
10338 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10339
10340         * gc.c: protect handles with a critical section.
10341
10342 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10343
10344         * icall.c:
10345         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
10346         parameters. If no assembly specified, try getting the type from all
10347         the assemblies in the current domain, else, load the assembly and get
10348         the type from it.
10349
10350 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10351
10352         * marshal.c: applied patch from Aleksey Demakov that fixes
10353         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
10354
10355 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10356
10357         * icall.c: fixed get_location.
10358
10359 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
10360
10361         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
10362         declarations to make it work with older gcc. 
10363
10364         * loader.c (mono_get_method): set signature->pinvoke for native calls
10365
10366 2002-11-20  Dick Porter  <dick@ximian.com>
10367
10368         * threads.c (mono_thread_init): Set the main thread's handle
10369
10370 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10371
10372         * gc.c: allow compilation without GC support. Changed to match the
10373         mono coding style.
10374
10375 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10376
10377         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
10378
10379 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
10380
10381         * reflection.c: set a public key token on the core assemblies.
10382
10383 2002-11-18  Dick Porter  <dick@ximian.com>
10384
10385         * threads.c: Split out some thread initialisation so that other
10386         files can set the start callback function.
10387
10388         * gc.c: Run finalisers in a separate thread, to avoid stack
10389         overflow.  Fixes bug 31333.
10390
10391         * appdomain.c: Set up GC finalisation thread.
10392
10393         * reflection.c: 
10394         * object.c: 
10395         * domain.c: Use gc.h macros for GC_malloc
10396         
10397 2002-11-15  Dick Porter  <dick@ximian.com>
10398
10399         * threadpool.c: 
10400         * threads.c:
10401         * appdomain.c: Removed mono_runtime_init_with_attach(),
10402         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
10403         merging the extra parameter with the existing function.  Removed
10404         unneeded code in mono_thread_attach().
10405
10406 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
10407
10408         * image.c (mono_image_loaded_by_guid): a method to get loaded
10409         images by guid. 
10410         (load_metadata_ptrs): we store the guid as string.
10411
10412 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
10413
10414         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
10415
10416         * metadata.c (mono_guid_to_string): imported method form Zoltan
10417         Varga (slightly modified)
10418
10419         * assembly.c (mono_assembly_open): load precompiled code
10420
10421         * loader.h (MonoMethod): we store the method token for use in the
10422         aot compiler. 
10423
10424 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10425
10426         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
10427         the hook function called when an assembly is loaded.
10428         
10429         * domain.c: Modified file.
10430         (mono_domain_assembly_load): removed hash table insertion of assemblies.
10431
10432         Fixes bug #33196.
10433
10434 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
10435
10436         * reflection.c: Map PEFileKind to the value expected by the WinNT
10437         image loader. 
10438
10439 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10440
10441         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
10442         Read until the buffer is filled completely.
10443
10444 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10445
10446         * icall.c: implemented MonoType.InternalGetEvent ().
10447
10448 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10449
10450         * appdomain.c: implemented InitAppDomainSetup. Delayed
10451         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
10452         the entry_assembly.
10453
10454         * assembly.c: base_dir is now an absolute path ending with
10455         G_DIR_SEPARATOR.
10456
10457         * icall.c: modified get_location according to the above changes.
10458
10459         * object.c: init AppDomain.SetupInformation for the default domain after
10460         we have the entry assembly.
10461
10462         * domain.c: when unloading a domain, setup = NULL.
10463
10464 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
10465
10466         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
10467
10468 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
10469
10470         * object.h, object.c: introduced mono_object_get_virtual_method ()
10471         to lookup the method invoked on an object when a callvirt is done on
10472         a method.
10473         * icall.c: make MethodInfo::Invoke() always do a virtual call.
10474
10475 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10476
10477         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
10478         current domain when loaded an assembly and failed to load it.
10479
10480         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
10481
10482 2002-10-31  Dick Porter  <dick@ximian.com>
10483
10484         * icall.c: 
10485         * file-io.h: 
10486         * file-io.c: Return the error status in a parameter, as the
10487         GetLastError() value has long since been blown away if we try and
10488         look it up in a subsequent internal call invocation.  Delete the
10489         GetLastError() internal call, because it's useless.
10490
10491 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
10492
10493         * class.[ch]: added cast_class to fix bug 29517
10494
10495 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
10496
10497         * marshal.c: create valid IL code in the filter clause:
10498         the new JIT is less forgiving:-)
10499
10500 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10501
10502         * icall.c: removed get_property internal call.
10503
10504 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
10505
10506         * appdomain.h domain.c: Added an ID to appdomains.
10507         
10508         * threads.c threads.h icall.c: Implement icall
10509         Thread:GetDomainID(), and remove unused icall 
10510         CurrentThreadDomain_internal.
10511
10512 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10513
10514         * icall.c: Don't recurse through the base types in GetConstructor.
10515         Fixes bug #32063. 
10516
10517 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
10518
10519         * mempool.h, mempool.c: added mono_mempool_empty() and
10520         mono_mempool_stats().
10521
10522 2002-10-23  Dick Porter  <dick@ximian.com>
10523
10524         * file-io.c: 
10525         * file-io.h: 
10526         * icall.c: Added MonoIO.GetFileType internal call
10527
10528 2002-10-17  Dick Porter  <dick@ximian.com>
10529
10530         * appdomain.c (mono_runtime_cleanup): Don't signal the async
10531         delegate semaphore before waiting for all threads to finish,
10532         because new threads can also call async delegates.  Fixes bug
10533         32004.
10534
10535         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
10536         of 3 seconds, in case another async job is queued.  (This part is
10537         needed because the bug fix reintroduced the 3s exit lag.)  This
10538         makes the mono_runtime_shutdown flag superfluous.
10539
10540 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
10541
10542         * reflection.c: include ehader size in method section headers.
10543         Really check for suplicated modules entries.
10544
10545 2002-10-17  Martin Baulig  <martin@gnome.org>
10546
10547         * debug-mono-symfile.c: Added back support for locals.
10548
10549 2002-10-14  Martin Baulig  <martin@gnome.org>
10550
10551         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
10552         MONO_TYPE_VOID.
10553
10554 2002-10-14  Martin Baulig  <martin@gnome.org>
10555
10556         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
10557         mono_class_get() instead of looking in the class cache. 
10558
10559 2002-10-13  Martin Baulig  <martin@gnome.org>
10560
10561         * debug-mono-symfile.c: Set version number to 28, include the
10562         signature in method names.
10563
10564 2002-10-13  Martin Baulig  <martin@gnome.org>
10565
10566         * debug-mono-symfile.h: Set version number to 27.
10567
10568 2002-10-11  Martin Baulig  <martin@gnome.org>
10569
10570         * gc.c: Don't register/unregister NULL pointers as disappearing links.
10571
10572 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
10573
10574         * metadata.c, metadata.h: added helper function to allocate signatures.
10575
10576 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10577
10578         * icall.c: added internal call to get the location of machine.config.
10579
10580 2002-10-08  Martin Baulig  <martin@gnome.org>
10581
10582         * debug-mono-symfile.c: Ignore classes with a pending init for the
10583         moment.
10584
10585 2002-10-03  Dick Porter  <dick@ximian.com>
10586
10587         * threads.c: Freebsd pthread_t is a pointer
10588
10589 2002-10-03  Dick Porter  <dick@ximian.com>
10590
10591         * socket-io.c: Implemented GetHostName_internal
10592
10593 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10594
10595         * mono-config.c:
10596         (mono_config_parse_file): don't leak the text.
10597
10598 2002-10-02  Martin Baulig  <martin@gnome.org>
10599
10600         * debug-mono-symfile.c: Added support for methods.
10601
10602 2002-10-01  Martin Baulig  <martin@gnome.org>
10603
10604         * debug-mono-symfile.c: Don't emit methods and line numbers for
10605         the dynamic symbol file, just write the type table.  We can easily
10606         have an external helper program which creates a symbol file for an
10607         IL file.        
10608
10609 2002-10-01  Dick Porter  <dick@ximian.com>
10610
10611         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
10612         Only add the handle to the cleanup array when we're about to
10613         launch the thread.  Bug 31425 deadlocked when the test was run on
10614         mono under w32.
10615
10616 2002-10-01  Martin Baulig  <martin@gnome.org>
10617
10618         * debug-mono-symfile.c: Added support for properties.
10619
10620 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
10621
10622         * reflection.c: unaligned store fix from Mark Crichton
10623         <crichton@gimp.org>.
10624
10625 2002-09-27  Martin Baulig  <martin@gnome.org>
10626
10627         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
10628         New interncall.
10629
10630 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
10631
10632         * assembly.h, assembly.c: use a sane API to hook into the assembly
10633         loading process instead of a useless special-purpouse hack
10634         (ngen needs a hook, too, for example).
10635
10636 2002-09-27  Dick Porter  <dick@ximian.com>
10637
10638         * threads.c (mono_thread_init): Call GetCurrentProcess() so
10639         io-layer can set up some process handle info.  Not needed on w32,
10640         but doesn't hurt either.
10641
10642         * process.c: Pass the program name in the second parameter to
10643         CreateProcess, so the path is searched.  Include the working
10644         directory. Implemented process name, process enumeration, and some
10645         process detail internal calls.
10646         
10647         * icall.c: Added internal calls for process lookup, and some
10648         process details
10649
10650 2002-09-26  Martin Baulig  <martin@gnome.org>
10651
10652         * assembly.c (mono_install_open_assembly_hook): New global
10653         function to install a function to be invoked each time a new
10654         assembly is loaded.
10655         (mono_assembly_open): Run this callback function if set.
10656
10657         * debug-mono-symfile.c: Put back line numbers for the dynamic
10658         symbol file and also record the .il file as source file.  This
10659         allows us to install the temporary symbol file as `file.dbg' just
10660         like a compiler-generated one.
10661
10662 2002-09-26  Nick Zigarovich <nick@chemlab.org>
10663
10664         * Corrected typo in gc.c (BOHEM vs BOEHM).
10665
10666 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10667
10668         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
10669         GetProperties. Also avoid calling g_slist_length in GetProperties and
10670         GetMethods.
10671
10672 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
10673
10674         * reflection.c: avoid unaligned stores (bug spotted by
10675         Mark Crichton  <crichton@gimp.org>).
10676
10677 2002-09-25  Martin Baulig  <martin@gnome.org>
10678
10679         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
10680         instead of guint64 for addresses and added prologue/epilogue info.
10681
10682 2002-09-25  Martin Baulig  <martin@gnome.org>
10683
10684         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
10685         store line number info.  For the dynamic symbol file, we only need
10686         to provide the JIT generated dynamic line number info for the dynamic
10687         symbol file.
10688
10689 2002-09-25  Martin Baulig  <martin@gnome.org>
10690
10691         * debug-mono-symfile.h: Incremented version number.
10692
10693 2002-09-24  Martin Baulig  <martin@gnome.org>
10694
10695         * class.c (mono_debugger_class_init_func): New global function
10696         pointer variable.
10697         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
10698         call it.
10699
10700         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
10701         function.  This is called via the mono_debugger_class_init_func
10702         hook to add all types to the dynamic type table.
10703         (ves_icall_MonoDebugger_GetType): New interncall to get a class
10704         from its metadata token.
10705
10706         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
10707         New interncall for the debugger.
10708
10709 2002-09-24  Nick Drochak <ndrochak@gol.com>
10710
10711         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
10712         before using it in case it is null.
10713         
10714 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10715
10716         * metadata.c: allow custom modifiers in local var signatures
10717         (bug spotted by Zoltan Varga).
10718
10719 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
10720
10721         * class.c: deal with the <Module> class that may have a NULL vtable.
10722         Eliminate warnings.
10723
10724 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10725
10726         * image.c, image.h: more strong name helpers.
10727         * monosn.c: more work: convert pem keys to cryptoapi format.
10728
10729 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
10730
10731         * string-icalls.c: speedup IndexOf.
10732
10733 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10734
10735         * icall.c: updates from Zoltan.2.Varga@nokia.com.
10736
10737 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
10738
10739         * icall.c: cleanup: use mono_object_domain ().
10740
10741 2002-09-23  Martin Baulig  <martin@gnome.org>
10742
10743         * debug-mono-symfile.c: Improved type support.
10744
10745 2002-09-22  Martin Baulig  <martin@gnome.org>
10746
10747         * debug-mono-symfile.c: Added support for reference types and strings.
10748
10749 2002-09-22  Martin Baulig  <martin@gnome.org>
10750
10751         * debug-mono-symfile.c: Started to work on the type table.
10752
10753 2002-09-21  Martin Baulig  <martin@gnome.org>
10754
10755         * debug-mono-symfile.c: Largely reworked the symbol table format.
10756         The symbol table is now incrementally updated each time a new
10757         method is added.  We're now also using our own magic and version
10758         so that you don't need to recompile all your classes if the
10759         dynamic table changes.
10760         (mono_debug_update_mono_symbol_file): Removed.
10761         (mono_debug_symfile_add_method): New function to add a method.
10762
10763 2002-09-21  Martin Baulig  <martin@gnome.org>
10764
10765         * icall.c
10766         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
10767         New interncall.
10768
10769         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
10770         New interncall to get a method from its metadata token.
10771
10772 2002-09-21  Martin Baulig  <martin@gnome.org>
10773
10774         * debug-mono-symfile.c: Create type table.
10775
10776 2002-09-20  Martin Baulig  <martin@gnome.org>
10777
10778         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
10779
10780 2002-09-20  Martin Baulig  <martin@gnome.org>
10781
10782         * debug-mono-symfile.c: Provide information about params and locals.
10783
10784 2002-09-20  Martin Baulig  <martin@gnome.org>
10785
10786         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
10787         New interncall.
10788
10789         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
10790         interncall to get a method from its metadata token.
10791
10792 2002-09-20  Martin Baulig  <martin@gnome.org>
10793
10794         * debug-mono-symfile.c: Added a few checks for method->header
10795         being non-NULL.  This should never happen, but for the moment
10796         let's use a g_warning() rather than a g_assert().
10797
10798 2002-09-19  Mark Crichton  <crichton@gimp.org>
10799
10800         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
10801         even if support for it isn't present.  Added an #ifdef to fix this.
10802
10803         * socket-io.c: Added checks back for Solaris support.
10804
10805 2002-09-19  Martin Baulig  <martin@gnome.org>
10806
10807         * debug-mono-symfile.c (read_string, write_string): Reflect latest
10808         changes in the symbol file format.
10809
10810 2002-09-18  Martin Baulig  <martin@gnome.org>
10811
10812         * debug-mono-symfile.c: Set version number to 21.
10813
10814 2002-09-18  Dick Porter  <dick@ximian.com>
10815
10816         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
10817         on netbsd.  Fixes bug 30051.
10818
10819 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10820
10821         * reflection.c:
10822         (set_version_from_string): little fix.
10823
10824 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10825
10826         * monosn.c, Makefile.am: added strong name utility.
10827         * reflection.h, reflection.c: implemented delayed signing,
10828         locale, version and hash id assembly attributes.
10829
10830 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
10831
10832         * loader.c, metadata.c: load param attributes in signatures.
10833
10834 2002-09-16  Martin Baulig  <martin@gnome.org>
10835
10836         * debug-mono-symfile.c: Added string table with all method names.
10837
10838 2002-09-14  Martin Baulig  <martin@gnome.org>
10839
10840         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
10841         fast method lookup.
10842
10843 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10844
10845         * reflection.c: record the public key token of referenced assemblies.
10846
10847 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
10848
10849         * image.c, image.h: added functions to get the strong name and the
10850         public key of an assembly.
10851         * pedump.c: use them.
10852
10853 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
10854
10855         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
10856
10857 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
10858
10859         * marshal.c (mono_marshal_get_managed_wrapper): Added
10860         MONO_TYPE_BOOLEAN 
10861
10862 2002-09-11  Martin Baulig  <martin@gnome.org>
10863
10864         * gc.c: Call GC_unregister_disappearing_link() on all links when
10865         finalizing them, this is necessary to aviod a crash in boehm's
10866         finalize handler.
10867
10868 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
10869
10870         * gc.c: handle GetTarget for finalized objects spotted and fixed by
10871         nick@chemlab.org.
10872
10873 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
10874
10875         * icall.c: implemented MonoType::Module.
10876         * reflection.c, reflection.h: mono_module_get_object () from
10877         Tomi Pakarinen <tomi.pakarinen@welho.com>.
10878
10879 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
10880
10881         * icall.c: ignore overridden methods in GetMethods ().
10882         Fix for FieldInfo::SetValue().
10883         * object.c: handle float/double in runtime invoke.
10884
10885 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
10886
10887         * object.c: allow a constructor to be called again on an object.
10888
10889 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10890
10891         * class.h, class.c: move field layout code to it's own function and
10892         export it. Get an interface id earlier. Move fields in MonoClass
10893         so they are more cache friendly and align the bitfields.
10894         * loader.c: temporary handle get_param_names() for a runtime method.
10895         * reflection.c, reflection.h: more code to handle runtime creation of
10896         types.
10897
10898 2002-09-09  Martin Baulig  <martin@gnome.org>
10899
10900         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
10901         signature with the pinvoke field being set for the actual call.
10902
10903 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
10904
10905         * icall.c: removed some unused icalls. Start of map of glib charsets
10906         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
10907
10908 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
10909
10910         * debug-helpers.c: break infinite loop (found and fixed by
10911         Holger Arnold <harnold@gmx.de>).
10912
10913 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10914
10915         * icall.c: target may be null in create_delegate.
10916
10917 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10918
10919         * marshal.c: handle a boolean return type.
10920
10921 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10922
10923         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
10924
10925 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
10926
10927         * gc.c: fix weakreferences.
10928
10929 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
10930
10931         * icall.c: added icall to get default codepage.
10932
10933 2002-09-03  Dick Porter  <dick@ximian.com>
10934
10935         * threads.h: 
10936         * threads.c: Use MonoThread instead of MonoObject where
10937         apropriate.
10938
10939         Store running thread objects in a hash table, so that we have all
10940         the info to hand when waiting for them to finish
10941         (means we don't need OpenThread() any more, so mingw builds should
10942         be fully functional again.)
10943
10944         * verify.c:
10945         * object.h: Added thread ID to MonoThread
10946
10947 2002-09-03  Martin Baulig  <martin@gnome.org>
10948
10949         * icall.c (System.Reflection.Assembly::get_location): New interncall.
10950
10951 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10952
10953         * icall.c: fixed leak in get_temp_path. Thanks lupus.
10954
10955 2002-09-03  Martin Baulig  <martin@gnome.org>
10956
10957         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
10958         argument to store the end address of the disassembled instruction.
10959
10960         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
10961         here from debug-symfile.h.
10962         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
10963         JIT into this struct.
10964         (MonoSymbolFile): Added `char *image_file' field.
10965         (MonoDebugGetMethodFunc): Removed.
10966         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
10967         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
10968         (mono_debug_find_method): New method.
10969
10970         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
10971         create a full symbol file.
10972         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
10973         and static symbol files.
10974         (mono_debug_find_method): The symbol file keeps an internal method hash,
10975         call this to get a MonoDebugMethodInfo from a MonoMethod.
10976
10977         * debug-symfile.[ch]: Removed.
10978
10979 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
10980
10981         * image.c (do_mono_image_open): Remove linker version check.
10982
10983 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
10984
10985         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
10986         wrappers for instance methods.
10987         
10988 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10989
10990         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
10991
10992 2002-08-28  Dick Porter  <dick@ximian.com>
10993
10994         * Makefile.am: Export HOST_CC for w32 builds
10995
10996 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
10997
10998         * file-io.c process.c: MonoString are null terminated, no
10999         need for mono_string_to_utf16() anymore.
11000
11001 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11002
11003         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
11004
11005 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
11006
11007         * icall.c, reflection.h: speedup System.MonoType.
11008
11009 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
11010
11011         * reflection.c: allow null as the value of a string argument in
11012         custom attributes constructors.
11013
11014 2002-08-27  Martin Baulig  <martin@gnome.org>
11015
11016         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
11017         `trampoline_address' field.
11018
11019 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
11020
11021         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
11022         check (fixes bug #29486) 
11023
11024 2002-08-27  Martin Baulig  <martin@gnome.org>
11025
11026         * debug-mono-symfile.c: Changed the file format in a way that allows us
11027         open it read-only and to use a specially malloced area for all the
11028         dynamic data.  We can now also generate a symbol file on-the-fly if we're
11029         debugging IL code and there is no MCS generated symbol file for it.
11030
11031 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11032
11033         * object.c: added a define for a good string and array
11034         creation speedup (not enabled by default because we need to deal with
11035         the synch stuff).
11036
11037 2002-08-26  Martin Baulig  <martin@gnome.org>
11038
11039         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
11040         function to create a dynamic symbol file.  This is used by the
11041         debugger to create a symbol file for IL code on-the-fly.
11042
11043 2002-08-26  Martin Baulig  <martin@gnome.org>
11044
11045         * loader.c (mono_lookup_pinvoke_call): Include the error message
11046         from g_module_error() in the error message.
11047
11048 2002-08-24  Martin Baulig  <martin@gnome.org>
11049
11050         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
11051         function to update the symbol file.  The symbol file is mmap()ed
11052         writable, but private.  This allows us to install the symbol file
11053         together with the assembly.
11054
11055 2002-08-24  Martin Baulig  <martin@gnome.org>
11056
11057         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
11058         but they can read the new symbol file format which mcs is now creating.
11059
11060         * debug-symfile.c (mono_debug_find_source_location): Moved to
11061         debug-mono-symfile.c; this is now operating on the new symbol file.
11062
11063 2002-08-23  Martin Baulig  <martin@gnome.org>
11064
11065         * debug-helpers.c (mono_method_desc_from_method): New function to get
11066         a MonoMethodDesc from a MonoMethod.
11067
11068 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
11069
11070         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
11071         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
11072
11073 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11074
11075         * string-icalls.[ch]: make helper methods static.
11076
11077 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11078
11079         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
11080         types to it and to SetValueInternal.
11081
11082         * object.c: Moved handle_enum label to its proper place. This was the
11083         f... bug! ;-)
11084
11085         This time i compiled mcs and gtk-sharp and they both work.
11086
11087 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11088
11089         * icall.c: reverted partially my previous patch until 
11090         object.c:set_value handles enums correcly.
11091
11092 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11093
11094         * icall.c:
11095         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
11096         (ves_icall_System_Environment_get_MachineName): removed warning when
11097         compiling under cygwin.
11098
11099 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11100
11101         * object.c: fixed field_get_value() for reference types.
11102
11103 2002-08-22  Dick Porter  <dick@ximian.com>
11104
11105         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
11106         Don't free a buffer while it's still needed.  Patch from Jonathan
11107         Liger <Jonathan.liger@wanadoo.fr>
11108
11109 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
11110
11111         * icall.c (ves_icall_System_Environment_get_Platform): Add new
11112         internal call.
11113
11114 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
11115
11116         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
11117         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
11118
11119         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
11120         we call unmanaged code which throws exceptions.
11121
11122 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11123
11124         * appdomain.h: added per-domain entry_assembly.
11125         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
11126         arguments.
11127         * icall.c: Assembly::GetEntryAssembly icall.
11128         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
11129         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
11130
11131 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11132
11133         * appdomain.h, gc.c: added mono_domain_finalize ().
11134
11135 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11136
11137         * object.c:
11138         (mono_print_unhandled_exception): changed g_warning by g_printerr
11139         because g_log has a 1024 characters limit (yeah, i got a big stack
11140         trace). Don't print exception name, that should be in ToString 
11141         returned string.
11142
11143 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11144
11145         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
11146         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
11147
11148 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11149
11150         * object.c:
11151         (mono_print_unhandled_exception): after previous commit, i realized
11152         that MS calls ToString on the exception. I changed this function to
11153         do that. This way we get stack_trace for free.
11154
11155 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11156
11157         * object.c:
11158         (mono_print_unhandled_exception): invoke Message property instead of
11159         getting 'message' field from Exception. Don't allocate memory for
11160         'trace' and 'message' if not needed.
11161
11162 2002-08-18  Dick Porter  <dick@ximian.com>
11163
11164         * unicode.c: Fix asserts to match Encoder.cs checks
11165
11166 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11167
11168         * marshal.c: fix unaligned store issue and a few wrong
11169         opcode argument types.
11170
11171 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11172
11173         * icall.c: added GetUninitializedObjectInternal internal call.
11174
11175 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
11176
11177         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
11178         to the right domain.
11179
11180 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
11181
11182         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
11183
11184         * class.c (class_compute_field_layout): set blittable to false for Strings
11185
11186         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
11187
11188 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11189
11190         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
11191         first chunk of code to create types at runtime. Code to
11192         handle ReflectedType/DeclaringType. Make reflection handles
11193         domain specific.
11194
11195 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
11196
11197         * class.c: set correct name in arrays.
11198
11199 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
11200
11201         * appdomain.c (mono_domain_transfer_object): make it work with
11202         valuetypes. bug fixes.
11203
11204 2002-08-12  Dick Porter  <dick@ximian.com>
11205
11206         * object.h: Rename some parameters to avoid c++ keywords (Patch
11207         from Joseph Wenninger <kde@jowenn.at>)
11208
11209 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
11210
11211         * icall.c: added icall to implement Assembly.GetFile*.
11212
11213 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11214
11215         * reflection.h, reflection.c: code to embed managed resources.
11216
11217 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
11218
11219         * class.c: move all the type size stuff into
11220         class_compute_field_layout().
11221
11222 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11223
11224         * class.c: ensure enums have always the correct instance size.
11225         * unicode.c: remove wrong assert.
11226
11227 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11228
11229         * assembly.c: fix mem corruption issue.
11230         * image.h, image.c: added mono_image_get_resource () to access
11231         managed resources.
11232         * icall.c: implemented Assembly.EntryPoint property and some
11233         Managed Resources related internalcalls.
11234
11235
11236 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11237
11238         * image.c, image.h: impemented mono_image_get_entry_point ().
11239         * appdomain.c: use mono_image_get_entry_point.
11240
11241 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11242
11243         * reflection.c: support the object type argument when loading
11244         custom attributes.
11245
11246 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
11247
11248         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
11249         String as return type.
11250
11251 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
11252
11253         * reflection.c: fix encoding of named args for custom attrs to match
11254         the ms implementation. Read them back when instantiating custom
11255         attributes.
11256
11257 2002-08-02  Radek Doulik  <rodo@ximian.com>
11258
11259         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
11260         by Dietmar as quick fix
11261         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
11262         16 as stack size, used on more places as quick fix before Dietmar
11263         will fix it properly
11264
11265 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11266
11267         * object.h, object.c: added accessors for fields and properties.
11268
11269 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11270
11271         * class.c, class.h: made mono_class_get_field_from_name ()
11272         loop on parent types.
11273         Added mono_class_get_property_from_name ().
11274
11275 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11276
11277         * class.c, class.h: move the code to setup the type vtable in its own
11278         function so that it can be reused also for types created at runtime.
11279         Eliminate the "class" identifier from the header file.
11280         * reflection.c: setup the vtable for enums so that we can create
11281         objects for use in SetConstant ().
11282
11283 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
11284
11285         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
11286         instead of the delegate itself as this pointer (bug #28383)
11287
11288 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
11289
11290         * marshal.c (mono_marshal_get_managed_wrapper): added return type
11291         conversions.
11292
11293 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11294
11295         * loader.c: don't set the pinvoke bit on icalls.
11296
11297 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
11298
11299         * debug-helpers.c (mono_method_full_name): only print a number to
11300         indicate wrapper type (so that the output is more readable in traces).
11301
11302 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
11303
11304         * class.c (mono_class_init): include method override patch from Paolo
11305
11306 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
11307
11308         * icall.c: fixed GetTypeCode().
11309
11310 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
11311
11312         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
11313         use real delegate invoke function to make it work with multicast
11314         delegates (fix bug# 28291).
11315
11316 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11317
11318         * object.c: load constant strings.
11319
11320 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11321
11322         * reflection.c: no magic numbers.
11323         * tabledefs.h: security action enum.
11324
11325 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11326
11327         * assembly.c: fix possible memory corruption.
11328
11329 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11330
11331         * reflection.h, reflection.c: added support for linking resources.
11332         * verify.c: check we have an updated corlib.
11333
11334 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
11335
11336         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
11337         string arrays.
11338         (mono_marshal_string_array): null terminate unmanaged string arrays.
11339         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
11340
11341 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11342
11343         * icall.c: Type.GetType () can now return also types from the
11344         calling assembly.
11345
11346 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11347
11348         * loader.h, loader.c: stack walking support.
11349         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
11350         GetCallingAssembly.
11351
11352 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
11353
11354         * marshal.c: added optimisations for blittable types 
11355
11356         * class.c (mono_array_class_get): do not set blittable attribute on arrays
11357         (mono_class_setup_mono_type): set blittable attribute for single
11358         and double.
11359
11360         * marshal.c (mono_string_utf8_to_builder): impl.
11361         (mono_string_builder_to_utf8): impl.
11362         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
11363
11364 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
11365
11366         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
11367         (mono_marshal_get_managed_wrapper): impl. byref types
11368
11369 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11370
11371         * icall.c:
11372         (search_method): don't display debug message. 
11373
11374 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
11375
11376         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
11377
11378 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11379
11380         * appdomain.c: set the missing filename when throwing exception.
11381
11382 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
11383
11384         * metadata.c (mono_type_size): code cleanup
11385         (mono_type_stack_size): removed some test code
11386
11387 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
11388
11389         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
11390         mono_get_exception_file_not_found now.
11391
11392         * exception.c (mono_exception_from_name_two_strings): New version
11393         that will call a constructor with two string arguments. 
11394         (mono_get_exception_file_not_found): New helper routine, used to
11395         report file-not-found errors.
11396
11397 2002-07-20  Dick Porter  <dick@ximian.com>
11398
11399         * process.h:
11400         * process.c: Pass file handles to CreateProcess
11401         
11402         * icall.c:
11403         * file-io.h:
11404         * file-io.c: Implemented CreatePipe
11405
11406 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
11407
11408         * metadata.c (mono_get_param_info): set alignment for value types
11409
11410 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11411
11412         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
11413         Constify mono_domain_assembly_open().
11414         * loader.c: handle null namespace in icalls.
11415
11416 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
11417
11418         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
11419         (emit_str_to_ptr_conv): marshal object as structs
11420
11421         * metadata.c (mono_type_to_unmanaged): marshal object as structs
11422
11423         * marshal.c (mono_marshal_get_runtime_invoke): support value types
11424
11425 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
11426
11427         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
11428         (mono_marshal_get_native_wrapper): we an now return value types
11429
11430 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11431
11432         * verify.c: more checks implemented.
11433
11434 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
11435
11436         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
11437         (fix bug #27695)
11438         (mono_marshal_get_native_wrapper): allow byref arguments
11439         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
11440         impl. PtrToStringXXX methods
11441         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
11442         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
11443         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
11444         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
11445         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
11446
11447 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11448
11449         * reflection.c: fix buglet in parsing an assembly name.
11450
11451 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
11452
11453         * marshal.c (emit_ptr_to_str_conv): first impl.
11454
11455 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11456
11457         * object.c, class.h: cache the vtable in the class as suggested by
11458         vargaz@freemail.hu (Zoltan Varga).
11459
11460 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11461
11462         * class.h, loader.c: added mono_field_from_token().
11463         * verify.c: first cut of type checking code.
11464
11465 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
11466
11467         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
11468
11469 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
11470
11471         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
11472         (fix bug #27782)
11473         (mono_marshal_get_remoting_invoke): impl.
11474         (mono_delegate_begin_invoke): impl.
11475         (mono_mb_emit_save_args): impl.
11476         (mono_delegate_end_invoke): impl.
11477         (mono_marshal_get_delegate_begin_invoke):
11478         (mono_marshal_get_delegate_end_invoke):
11479         (mono_marshal_get_delegate_invoke): generate a special name for
11480         those methods (including the signature) and associate them whith
11481         the delegate class. 
11482
11483 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
11484
11485         * reflection.[ch]: 
11486         (mono_reflection_type_from_name): now it has a MonoImage parameter
11487         which is used as the default image to search the type in. If the image
11488         is NULL or getting the type from it fails, it defaults to corlib.
11489
11490         * icall.c: changed 1 call to mono_reflection_type_from_name to match
11491         new parameter.
11492
11493 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11494
11495         * reflection.c: update the parameter table index.
11496
11497 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11498
11499         * domain.c: don't include the mark byte in the string hash.
11500
11501 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11502
11503         * icall.cs: icall for Type.GetTypeCode ().
11504         * verify: a couple of fixes and disabled local initialization checks.
11505
11506 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
11507
11508         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
11509
11510         * debug-helpers.c (mono_method_full_name): print the type of the
11511         runtime wrapper
11512
11513         * metadata.c (mono_signature_hash): a hash function for signatures
11514         (mono_signature_hash): better hash algorithm
11515
11516         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
11517
11518         * debug-helpers.c (mono_method_full_name): this can now generate
11519         method names with signatures
11520
11521         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
11522         method dont have this pointers.
11523
11524 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
11525
11526         * reflection.c: fixup typebuilder tokens.
11527         * image.c: fix buglet.
11528         * marshal.h: remove whitespace.
11529         * metadata.h, metadata.c: reinstate code that was removed.
11530         * verify.c: handle catch directives and fix another couple of bugs.
11531
11532 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
11533
11534         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
11535         (mono_marshal_get_native_wrapper): make it comp. with the old code
11536         (mono_marshal_get_native_wrapper): support boolean
11537         (mono_marshal_get_managed_wrapper): support more types
11538
11539 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
11540
11541         * class.c (class_compute_field_layout): compute class->blittable attribute.
11542
11543 2002-07-09  Dick Porter  <dick@ximian.com>
11544
11545         * threads.c: Make the thread cleaning up cope with threads that
11546         call ExitThread()
11547
11548 2002-07-08  Radek Doulik  <rodo@ximian.com>
11549
11550         * reflection.c (method_encode_code): use non-translated values to
11551         compute finally_start, this fixes exception handling on ppc, yay!
11552
11553         * decimal.h (struct signscale): fix endianess
11554
11555 2002-07-07  Radek Doulik  <rodo@ximian.com>
11556
11557         * reflection.c: swap box_val and not val
11558
11559 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
11560
11561         * reflection.c, reflection.h: handle full assembly info in type name.
11562         Handle Type arguments when loading custom attributes.
11563         * icall.c: updated to use new mono_reflection_type_from_name () method.
11564
11565 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11566
11567         * loader.c:
11568         (method_from_memberref): also print assembly name when method not found.
11569
11570 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11571
11572         * icall.c:
11573         (ves_icall_TypeGetProperties): fixed bug #27473. 
11574
11575 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11576
11577         * reflection.c: display image name and token when cannot find the
11578         .ctor for an attribute.
11579
11580 2002-07-05  Martin Baulig  <martin@gnome.org>
11581
11582         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11583
11584 2002-07-04  Dick Porter  <dick@ximian.com>
11585
11586         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
11587         compile on mingw.  This will cause mingw builds to not wait for
11588         subthreads to terminate after the main thread does.  I've lodged a
11589         bug with the mingw developers for them to wrap OpenThread().
11590
11591 2002-07-03  Dick Porter  <dick@ximian.com>
11592
11593         * threads.c: Store thread IDs instead of handles, because
11594         GetCurrentThread() returns a pseudohandle and therefore stores
11595         useless values.  mono_thread_cleanup() continues checking the
11596         array of threads until it is empty, to cope with subthreads
11597         spawning new threads after the main thread has finished.
11598
11599         * profiler.h:
11600         * profiler.c:
11601         * profiler-private.h: Pass the thread ID to thread profiler
11602         functions, instead of a handle
11603
11604 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11605
11606         * verify.c: fixes to make it more usable.
11607         * pedump.c: added --verify code to verify IL code in an assembly.
11608
11609 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11610
11611         * reflection.c: turn errors into warnings to allow compiling corlib.
11612
11613 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
11614
11615         * reflection.c: add special cases to compile corlib.
11616
11617 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11618
11619         * reflection.c: handle properties with only a set method.
11620
11621 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11622
11623         * opcodes.h: add enum with opcodes in opval order.
11624
11625 2002-07-01  Dick Porter  <dick@ximian.com>
11626         
11627         * object.h:
11628         * object.c (mono_runtime_run_main): Removed unneeded argument
11629
11630 2002-06-28  Martin Baulig  <martin@gnome.org>
11631
11632         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11633
11634 2002-06-27  Dick Porter  <dick@ximian.com>
11635
11636         * threads.c: Store the handle in both the parent thread and in the
11637         subthread, to minimise the time between starting a new thread and
11638         storing its ID.
11639
11640 2002-06-26  Dick Porter  <dick@ximian.com>
11641
11642         * appdomain.c (mono_runtime_cleanup): Close the socket library
11643         after all the threads have finished, not before
11644
11645 2002-06-26  Martin Baulig  <martin@gnome.org>
11646
11647         * debug-symfile.c (mono_debug_find_source_location): Added
11648         `guint32 *line_number' argument.  If it's not NULL, store the line number
11649         there and return the file name without the line number.
11650
11651 2002-06-25  Dick Porter  <dick@ximian.com>
11652
11653         * icall.c:
11654         * process.h:
11655         * process.c: Process forking and other support functions
11656
11657 2002-06-25  Dick Porter  <dick@ximian.com>
11658
11659         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
11660         things dont happen when the image is closed.
11661         (mono_image_lookup_resource): Walk the resource section looking
11662         for a particular entry
11663
11664         * cil-coff.h: PE resource section decoding
11665
11666 2002-06-25  Dick Porter  <dick@ximian.com>
11667         
11668         * assembly.h:
11669         * assembly.c: 
11670         (mono_assembly_foreach): Accessor functions to walk the list of
11671         loaded assemblies
11672         (mono_assembly_set_main):
11673         (mono_assembly_get_main): Process methods need to know which
11674         assembly is the "main" one
11675
11676         * object.c (mono_runtime_run_main): Record the main assembly
11677
11678         * debug-helpers.c: Fix typo
11679
11680 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
11681
11682         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
11683         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
11684
11685 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11686
11687         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
11688
11689 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
11690
11691         * image.c (do_mono_image_open): Initialize reference count,
11692         otherwise we leak the MonoImage.
11693
11694 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11695
11696         * reflection.c: small tweak to handle self-hosting.
11697
11698 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
11699
11700         * reflection.c: fix type name parse code.
11701
11702 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11703
11704         * reflection.c: break out of the loop.
11705         * image.c: special case corlib.
11706
11707 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11708
11709         * reflection.c: add all the custom attrs at the end to ensure the
11710         ctors have been properly initialized when the attributes are defined
11711         in the current assembly.
11712
11713 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11714
11715         * reflection.c: handle correctly multiple-nested types.
11716
11717 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
11718
11719         * row-indexes.h: fix typos.
11720         * reflection.c: adjust for typos and fix method_def_or_ref
11721         encoding in MethodImpl table.
11722
11723 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11724
11725         * reflection.c: fix entry point patching (thanks Serge!).
11726
11727 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
11728
11729         * verify.c: add check for System.Exception
11730
11731 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11732
11733         * image.c, class.c: minifix for code just c&p'ed.
11734         * reflection.c: warning fix.
11735         * object.h, loader.h, domain.c: load also StringBuilder.
11736
11737 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11738
11739         * marshal.h, marshal.c: some support code to handle complex marshaling.
11740
11741 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11742
11743         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
11744         Better signatures with vtable error dump.
11745
11746 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
11747
11748         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
11749
11750 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
11751
11752         * icall.c (ves_icall_Type_GetField): impl.
11753
11754 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11755
11756         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
11757         to retrieve a marshal description blob for a field or param.
11758
11759 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11760
11761         * reflection.h, reflection.c: change order of nested type emission
11762         to avoid table corruption. The NestedTypes table is sorted.
11763         * icall.c: change order of GetConstructor results to workaround mcs bug.
11764
11765 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11766
11767         * reflection.h, reflection.c: handle field and param marshal
11768         information.
11769
11770 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11771
11772         * icall.c, marshal.c marshal.h: more Marshal class implementation.
11773
11774 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11775
11776         * reflection.c: fix call convention.
11777
11778 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11779
11780         * reflection.h, reflection.c: mono_image_get_memberref_token()
11781         takes a type instead of a class, now. Added
11782         mono_image_get_array_token() to create tokens for the special
11783         multi-dim array methods.
11784
11785 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
11786
11787         * assembly.c: handle modules (no assembly table). Split
11788         loading references in its own function.
11789         * class.c: handle moduleref resolution scope.
11790         * image.c, image.h: cache module name in image.
11791
11792 2002-06-07  Martin Baulig  <martin@gnome.org>
11793
11794         * reflection.c (mono_image_get_type_info): Only add a class layout entry
11795         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
11796
11797 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11798
11799         * icall.c: more signature fixes that used uint instead of int.
11800
11801 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11802
11803         * reflection.c: fixed signature of field refs.
11804
11805 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11806
11807         * class.c, reflection.c: handle typerefs of nested types
11808         (both on read and when writing files).
11809
11810 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
11811
11812         * icall.c: fix method signatures that tried to workaround the previous
11813         typo, d'oh!
11814
11815 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11816
11817         * debug-helpers.c: fix typo.
11818
11819 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11820
11821         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
11822         rewrote the PE/COFF writing code (our programs are understood by the
11823         ms runtime, now).
11824
11825 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11826
11827         * gc.c, gc.h, icall.c: weakreference support.
11828
11829 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11830
11831         * Makefile.am, mono-config.c: use $(sysconfdir).
11832
11833 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11834
11835         * icall.c: changed default precision of Double.ToString() to 15.
11836         Fixed memory leak. Unified with Single.ToString.
11837
11838 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11839
11840         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
11841
11842 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
11843
11844         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
11845         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
11846         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
11847         and myself.
11848
11849 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11850
11851         * debug-symfile.c, sysmath.c: yet more compilation fixes.
11852
11853 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11854
11855         * reflection.c, socket-io.c: more compilation fixes.
11856
11857 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11858
11859         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
11860         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
11861         unicode.c: warning and compiler compatibility fixes.
11862
11863 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
11864
11865         * class.h, metadata.c: fixed warnings/compilation errors.
11866
11867 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11868
11869         * Makefile.am, mono-config.c, mono-config.h: configuration file
11870         support routines.
11871         * loader.c, loader.h: make Dll mapping configurable at runtime in the
11872         config file. Export methods to insert and lookup mappings.
11873
11874 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11875
11876         * reflection.c: handle types and boxed objects in custom attr
11877         constructors.
11878
11879 2002-05-30  Martin Baulig  <martin@gnome.org>
11880
11881         * debug-symfile.c
11882         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
11883
11884 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
11885
11886         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
11887         to lookup the implmap row for a P/Invoke method.
11888         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
11889         P/Invoke method from the runtime on an as needed basis.
11890
11891 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
11892
11893         * metadata.c (mono_metadata_parse_signature): impl.
11894
11895 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11896
11897         * class.c: handle .pack directive.
11898
11899 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
11900
11901         * object.c: initialize static fields with RVA data.
11902
11903 2002-05-25  Martin Baulig  <martin@gnome.org>
11904
11905         * debug-symfile.c
11906         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
11907
11908 2002-05-24  Martin Baulig  <martin@gnome.org>
11909
11910         * debug-symfile.c
11911         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
11912         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
11913         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
11914
11915 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11916
11917         * object.c: special case string ctros in invoke.
11918         * gc.c: silly whitespace changes.
11919
11920 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
11921
11922         * threadpool.[ch]: impl. a threadpool that can
11923         be used by mint and mono.
11924
11925 2002-05-22  Martin Baulig  <martin@gnome.org>
11926
11927         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
11928         The first argument is now a `MonoReflectionModuleBuilder *', the return
11929         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
11930         `methods' field to get the method builder.  The `token' argument is the
11931         unfixed token.
11932
11933         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
11934         invalid characters instead of g_assert_not_reached()ing.  This seems
11935         to be the behaviour of mscorlib.
11936
11937 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
11938
11939         * object.c (mono_runtime_invoke_array): applied patch from Rachel
11940         Hestilow to fix bug #25104
11941
11942 2002-05-21  Martin Baulig  <martin@gnome.org>
11943
11944         * debug-symfile.c (mono_debug_find_source_location): New function.
11945         Looks up an IL offset in the line number table and returns the source
11946         location as a string.
11947
11948 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11949
11950         * icall.c:
11951         (mono_double_ToStringImpl): changed %f by %g until we have something
11952         better.
11953
11954 2002-05-21  Nick Drochak  <ndrochak@gol.com>
11955
11956         * icall.c : Use different name for Math.Pow's icall.  Needed to check
11957         parameters first in C#.
11958
11959 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11960
11961         * icall.c, reflection.h: added icall to get info about an event.
11962
11963 2002-05-20  Radek Doulik  <rodo@ximian.com>
11964
11965         * object.c (mono_value_box): don't use memcpy for boxing on BIG
11966         endian
11967         (mono_value_box): don't use memcpy for small sizes on
11968         architectures with unaligned access
11969
11970 2002-05-20  Martin Baulig  <martin@gnome.org>
11971
11972         * reflection.c (mono_reflection_setup_internal_class): Don't crash
11973         if `tb->parent == NULL'.
11974         (mono_reflection_create_internal_class): New function.  This is
11975         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
11976         for enum types.
11977
11978         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
11979         New interncall.
11980
11981 2002-05-19  Martin Baulig  <martin@gnome.org>
11982
11983         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
11984         argument to get the length, don't default to the array length.
11985
11986 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
11987
11988         * assembly.c (mono_assembly_setrootdir): New function used to
11989         override the MONO_ASSEMBLIES directory.
11990
11991 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
11992
11993         * icall.c: ValueType_GetHashCode() initialize local var.
11994
11995 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11996
11997         * reflection.c: sort custom attributes table.
11998
11999 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12000
12001         * reflection.c: support named args in custom attributes (write support).
12002
12003 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
12004
12005         * reflection.c: fix finally position calculation.
12006
12007 2002-05-15  Radek Doulik  <rodo@ximian.com>
12008
12009         * reflection.c: fixed endianess at many places
12010
12011         * icall.c (ves_icall_InitializeArray): comment out debug msg
12012
12013 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
12014
12015         * object.c (mono_unhandled_exception): new function to handle
12016         unhandled exceptions.
12017         (mono_unhandled_exception): call the UnhandledException event.
12018         (mono_runtime_delegate_invoke): impl.
12019
12020 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
12021
12022         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
12023         returns the RVA, not the direct pointer to the data. Handle the case
12024         when the class size is fixed.
12025
12026 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
12027
12028         * reflection.c: fix some endianess issues.
12029
12030 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
12031
12032         * object.c (mono_runtime_invoke): is now able to catch exceptions.
12033
12034         * threads.c (mono_thread_init): added a callback which is invoked
12035         at thread start.
12036
12037 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
12038         
12039         * icall.c: make GetHashCode return non-negative values.
12040
12041 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
12042
12043         * object.c, icall.c, gc.c: revert to address-based hashcode.
12044
12045 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
12046
12047         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
12048
12049 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12050
12051         * icall.c, class.c: special case <Module>.
12052
12053 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
12054
12055         * icall.c: fix bug in GetNow().
12056
12057 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
12058
12059         * object.c (mono_runtime_class_init): make sure that we call all
12060         static class constructors.
12061
12062 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12063
12064         * reflection.c: sort methodsemantics table.
12065
12066 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12067
12068         * reflection.h, reflection.c: honour init locals setting.
12069
12070 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
12071
12072         * icall.c: copied Double ToStringImpl for Single ToStringImpl
12073
12074 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12075
12076         * reflection.c: support ContructorBuilders in attribute blob creation.
12077
12078 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12079
12080         * reflection.c: some changes to build a binary that can be run
12081         directly in windows.
12082
12083 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12084
12085         * loader.c: print a big message when an icall can't be found.
12086
12087 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12088
12089         * string-icalls.c: fix bug 24248.
12090
12091 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
12092
12093         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
12094         icall.c, reflection.h: separate assembly loading by pathname and by
12095         assembly name. Use the MONO_PATH env var to search for assemblies.
12096
12097 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12098
12099         * assembly.c, image.h: add some support for assemblies
12100         with multiple modules.
12101         * class.c, class.h: export mono_class_from_typeref().
12102         * loader.c: remove duplicated code and use mono_class_from_typeref(),
12103         instead.
12104
12105 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12106
12107         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
12108         documentation says (the ECMA one is correct).
12109
12110 2002-05-02  Dick Porter  <dick@ximian.com>
12111
12112         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
12113         Don't name the synchronisation mutex.
12114
12115 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
12116
12117         * rand.c
12118         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
12119         Make the prototypes match.
12120         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
12121         Same.
12122
12123         * icall.c
12124         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
12125         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
12126         all systems have tm.tm_zone, so use strftime() with %Z to print
12127         the timezone abreviation into a temp string.
12128
12129         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
12130         rather than mono_array_addr() on a MonoString on Big Endian
12131         machines.
12132
12133 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
12134
12135         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
12136         fix bug 24041
12137
12138 2002-04-30  Dick Porter  <dick@ximian.com>
12139
12140         * socket-io.c: Cope with SOCKET being an integer rather than a
12141         pointer now.
12142
12143         * threads.c: Added Thread_free_internal, to deal with thread
12144         handle cleanup.  Moved calls to handle_store() and handle_remove()
12145         to start_wrapper(), so each can only be called once.  Allocate
12146         synchronisation blocks with GC_malloc(), and use GC finalisation
12147         to close the handles.
12148
12149         * icall.c: added System.Threading.Thread::Thread_free_internal
12150
12151 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12152
12153         * icall.c: support Environment.Exit, CommandLineArgs().
12154
12155 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
12156
12157         * object.c, object.h: added mono_runtime_run_main () and
12158         mono_runtime_get_main_args () for use in System.Environment.
12159
12160 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12161
12162         * gc.c: fix thinko, enable actual finalization since the jit is now
12163         fixed.
12164
12165 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12166
12167         * gc.c, object.c: take into account that an object may be offset wrt the address
12168         returned by GC_malloc().
12169
12170 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12171
12172         * image.c: handle files without entries in the assembly table (modules).
12173
12174 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
12175
12176         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
12177         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
12178         allowed to be null when it's System.Object class setup.
12179
12180 2002-04-27  Martin Baulig  <martin@gnome.org>
12181
12182         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
12183         if `tb->parent == NULL' rather than crashing.
12184
12185 2002-04-28  Nick Drochak  <ndrochak@gol.com>
12186
12187         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
12188         calling acos() where asin() should have been called.
12189
12190 2002-04-26  Martin Baulig  <martin@gnome.org>
12191
12192         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
12193         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
12194         there's a subdirectory called `System', but we don't want to read that
12195         subdirectory as an assembly.
12196
12197 2002-04-25  Martin Baulig  <martin@gnome.org>
12198
12199         * debug-symfile.c: Reflect latest MonoString changes.
12200
12201 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12202
12203         * rand.c, rand.h: instance method icalls need to have an explicit
12204         this pointer as first argument in the C implementation.
12205
12206 2002-04-25  Nick Drochak <ndrochak@gol.com>
12207
12208         * icall.c: Fix typo in map for GetNonZeroBytes
12209
12210 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
12211
12212         * string-icalls.c : String does now passes unit tests without any 
12213         errors, the following changes has been made:
12214         
12215         Implemented replace methods.
12216         Renaming of methods to (try) follow the standard.
12217         Fixed compare ordinal
12218         Made all memory allocated directly to function instead of via icall function.
12219         Small performance fix in is_in_array function
12220                         
12221  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
12222
12223         c (mono_string_Internal_ctor_charp_int_int):
12224         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
12225         sindex < 0, throw ArgumentOutOfRangeException instead of
12226         ArgumentNullException.
12227
12228         Added new check for length == 0, however
12229         I need to make it return String.Empty from the C code.
12230         
12231         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
12232         that calculate the length for us here.
12233         
12234         (mono_string_Internal_ctor_sbytep_int_int): Replaced
12235         mono_string_new_utf16 with mono_string_new, since value is utf8.
12236
12237 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12238
12239         * object.c: register the object for finalization if needed.
12240         Allocate one more char in the string for the terminating 0 char.
12241
12242 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12243
12244         * class.c, class.h, image.c: check if a type implemenst a destructor.
12245         Use the proper key for array class lookups.
12246         * icall.c: register the icalls in the System.GC class.
12247         * gc.c, gc.h: GC-related functions and icalls.
12248
12249 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12250
12251         * icall.c:
12252         * socket-io.c:
12253         * unicode.c: free some strings gotten from mono_string_to_utf8 and
12254         changed a couple of free () by g_free ().
12255
12256         * decimal.c: one-liner in the comments for decimal2string ().
12257
12258 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
12259
12260         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
12261
12262 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
12263
12264         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
12265         * object.c (mono_runtime_invoke_array) : handle null in params
12266
12267 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
12268
12269         * string-icalls.c: fixed bug in split (one off bug)
12270
12271 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
12272
12273         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
12274         * icalls.c: added String::Equals as internal method
12275
12276 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
12277
12278         * threads.c: fixed bug in the double interlocked functions
12279
12280 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
12281
12282         * threads.c: implemented all of the new interlocked icalls.
12283         * string-icalls.c: fix a bug in insert.
12284         * icalls.c: added the icalls for interlocked, removed old string functions.
12285         
12286 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12287
12288         * loader.c: fix off-by-one error when reading argument names.
12289
12290 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12291
12292         * profiler.c: win32 counter implementation (untested).
12293         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
12294         (the latter needs testing and more complete impl. from win32 folks).
12295
12296 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
12297
12298         * object.c: mono_array_new_full workaround mono_array_class_get
12299         problem.
12300
12301 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12302
12303         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
12304         * object.h (mono_string_chars): Changed casting type.
12305
12306 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12307
12308         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
12309                            method signatures to use gunichar2 instead of gint16.
12310
12311 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
12312
12313         * object.h, object.c: domain-specific versions of mono_object_new and
12314         mono_array_new.
12315
12316 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
12317
12318         * object.c: changed String layout
12319
12320         * string-icalls.c (mono_string_Internal_ctor_chara): added
12321         internal string constructors.
12322
12323 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
12324
12325         * threads.c: pass 'this' to the thread start routine.
12326
12327 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12328
12329         * string-icalls.c: fix IndexOf and LastIndexOf. Now
12330         InternalCompareStr don't call twice mono_string_cmp_char for the last
12331         character. Improved performance in mono_string_cmp_char.
12332
12333 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12334
12335         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
12336         code into its own library: libmonoruntime.
12337
12338 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
12339
12340         * object.h, object.c: changed array format so that szarrays do not
12341         require a bounds structure.
12342         * icall.c, appdomain.c: support for new szarray format.
12343
12344 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12345
12346         * metadata.c: compare also the retuns type when comparing signatures:
12347         we didn't do this as an optimization since really overloaded methods
12348         must differ also in the arguments, but this doesn't work with
12349         low-level IL code (or when using explicit conversion operators: see
12350         bug#23498 for an example).
12351
12352 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12353
12354         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
12355
12356 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
12357
12358         * icall.c: make MonoType::GetElementType its own icall.
12359
12360 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12361
12362         * icall.c: remove MonoMethod_get_Name().
12363         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
12364         object.
12365
12366 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12367
12368         * string-icalls.c: optimized a few methods.
12369
12370 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
12371
12372         * icall.c: added all new string internal calls
12373         * string-icalls.c: added, new string internal call implementation.
12374         * object.c: added mono_string_new_size for allocating a string a size
12375
12376 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
12377
12378         * object.c (mono_object_isinst): use the same code as in the
12379         optimized x86 version.
12380
12381 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12382
12383         * profiler.c: TSC-based timer code (faster and more accurate).
12384         Not hooked up in configure, yet (set USE_X86TSC to 1).
12385
12386 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
12387
12388         * profiler.c, profiler.h: track time spent compiling methods.
12389         * threads.c: track thread creation/destruction.
12390
12391 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
12392
12393         * profiler.c, profiler.h, profiler-private.h: profiling interface
12394         and sample implementation. Moved here so that it can be used also by
12395         the jit.
12396
12397 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
12398
12399         * reflection.c, reflection.h: keep types and other handles separate in
12400         the hash tables for referred tokens. Add guid for modules.
12401
12402 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
12403
12404         * assembly.c: fix bugs found with valgrind.
12405         * metadata.h, metadata.c: added mono_metadata_guid_heap().
12406
12407 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
12408
12409         * threads: added icall support for getting current domain for
12410                    the thread.
12411  
12412 2002-04-13  Martin Baulig  <martin@gnome.org>
12413
12414         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
12415         (MonoDebugVarInfo): Added `index' field for register based addresses.
12416         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
12417         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
12418         `MonoDebugVarInfo *params' and `guint32 this_offset' with
12419         `MonoDebugVarInfo *this_var'.
12420
12421         * debug-symfile.c (relocate_variable): New static function to write
12422         a location description for a local variable or method parameter.
12423
12424 2002-04-12  Martin Baulig  <martin@gnome.org>
12425
12426         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
12427         stack offset and begin/end scope address of a local variable.
12428         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
12429         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
12430         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
12431
12432         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
12433         Added new relocation types for start/end scope of a local variable.
12434
12435 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12436
12437         * object.h: add mono_object_domain() macro.
12438         * reflection.c: handle typespecs.
12439         * icall.c: MonoMethod::get_Name() implementation.
12440
12441 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12442
12443         * icall.c: String::GetHashCode() icall implementation.
12444
12445 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12446
12447         * icall.c: String::IndexOfAny icall.
12448         * object.c, object.h: make array->max_length more useful.
12449         Intrduced mono_object_class() and mono_string_length() macros.
12450
12451 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12452
12453         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
12454         instead of g_unichar_isdigit.
12455
12456 2002-04-11  Nick Drochak  <ndrochak@gol.com>
12457
12458         * icall.c: Implement a simple Double.ToString().
12459
12460 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12461
12462         * appdomain.h: only io-layer.h is supposed to be included.
12463         * icall.c: explicitly import environ. Fix warning.
12464
12465 2002-04-10  Nick Drochak  <ndrochak@gol.com>
12466
12467         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
12468                 return true even if it's not Daylight Savings time.
12469                 Only return false for the case where the function isn't
12470                 implemented for a plaform (read Windows).
12471
12472 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12473
12474         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
12475         data with a mutex.
12476
12477 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
12478
12479         * mempool.c (mono_mempool_alloc): only use g_malloc when
12480         absolutely necessary.
12481
12482 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
12483
12484         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
12485
12486         * class.c (mono_class_vtable): use domain mempool to allocate vtable
12487         (mono_class_proxy_vtable): use domain mempool
12488
12489 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
12490
12491         * appdomain.h, appdomain.c: split initialization that requires the
12492         execution engine support into mono_runtime_init().
12493
12494 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
12495
12496         * class.c (mono_class_init): don't include vtable inside MonoClass
12497         to save some memory, gather some statistics.
12498         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
12499
12500 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12501
12502         * icall.c: internalcall implementation for ValueType.Equals().
12503
12504 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
12505
12506         * object.c (mono_message_init): moved 
12507         (mono_runtime_exec_main): new arch. independent impl.
12508         (mono_runtime_invoke_array): new method - like
12509         mono_runtime_invoke, but you can pass an array of objects.
12510         (mono_remoting_invoke): new arch. independent impl.
12511         (mono_message_invoke): new arch. independent impl.
12512         (mono_runtime_class_init): new arch. independent impl.
12513         (mono_runtime_object_init): new arch. independent impl.
12514
12515 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12516
12517         * metadata.c, object.c, reflection.c: documented the exported
12518         functions.
12519
12520 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12521
12522         * icall.c: simpler code to pass the assembly builder data to corlib.
12523         Implement GetNestedTypes() internalcall.
12524
12525 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12526
12527         * class.c: warn if a type can't be loaded.
12528
12529 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
12530
12531         * image.h: typedef MonoImageOpenStatus
12532         * types.h: removed unused file
12533         
12534 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
12535
12536         * icall.c: Enum_ToObject accepts enum value arguments.
12537
12538 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
12539
12540         * class.c: move initialization of properties, events and nested
12541         classes, so that they happen for interfaces, too.
12542
12543 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
12544
12545         * icall.c: cleanup some ugly casts in Array_SetValue*.
12546
12547 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12548
12549         * icall.c: the values array fro enums is of the correct type, now.
12550         Implement (correctly) getFullName instead of assQualifiedName for
12551         MonoType.
12552         * reflection.h, reflection.c: added mono_type_get_name ().
12553
12554 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
12555
12556         * assembly.c, image.h: for each MonoImage, record from wich assembly
12557         it was loaded.
12558         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
12559         Make Type.Assembly work.
12560
12561 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
12562
12563         * debug-symfile.h: use char* instead of gpointer to avoid
12564         unnecessary casts.
12565
12566         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
12567
12568         * icall.c (ves_icall_InternalExecute): impl. FielSetter
12569         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
12570
12571 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
12572
12573         * icall.c (mono_message_init): impl. (code cleanup)
12574         (ves_icall_InternalExecute): impl. FieldGetter
12575
12576         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
12577         defined we call all (non-static)methods through the vtable. 
12578
12579 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
12580
12581         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
12582         finalizer even though the memory is still referenced (and the chunk of
12583         memory is not freed).
12584
12585 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
12586
12587         * assembly.c: fix brokeness.
12588
12589 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
12590
12591         * class.c: kill some warnings. Check explicit interface method
12592         implementation also without considering the namespace.
12593         Load also literal strings in static class data.
12594
12595 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
12596
12597         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
12598         (default_assembly_name_resolver): Make the resolver take the
12599         "base" directory where the assembly was originally defined, so we
12600         can load DLLs that are in the same directory as the assembly that
12601         is being referenced.
12602
12603 2002-03-28  Dick Porter  <dick@ximian.com>
12604
12605         * file-io.h: 
12606         * file-io.c:
12607         * socket-io.c: 
12608         * unicode.h: 
12609         * unicode.c: Warning cleanups
12610
12611 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
12612
12613         * object.h, reflection.h: use the correct type instead of MonoObject.
12614
12615 2002-03-28  Martin Baulig  <martin@gnome.org>
12616
12617         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
12618         (mono_debug_update_symbol_file): Initialize classes if necessary.
12619
12620 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12621
12622         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
12623         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
12624
12625 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
12626
12627         * assembly.h: fix function prototype.
12628         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
12629         * mono-endian.h: use const cast.
12630
12631 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
12632
12633         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
12634
12635 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
12636
12637         * loader.c: don't assert when a typeref can't be loaded, give
12638         a chance to the runtime to trow an exception instead.
12639         * loader.h: fix warning.
12640
12641 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
12642
12643         * class.c (mono_class_proxy_vtable): added proxy support
12644
12645 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
12646
12647         * icall.c: removed last of PAL calls, added System.Environment
12648         * file-io.h, file-io.c: MonoIO implementation
12649         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
12650
12651 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
12652
12653         * appdomain.c: do not use the byte marker in ldstr table lookup.
12654         * debug-helpers.c: allow two ':' to separate class and method name.
12655         * object.c: allocate arrays bounds with the GC, too.
12656         * verify: add a few more checks.
12657
12658 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
12659
12660         * reflection.c: output also literal strings. Allocate parameter data
12661         with GC_malloc() (thanks, Martin, for catching this!).
12662
12663 2002-03-26  Martin Baulig  <martin@gnome.org>
12664
12665         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
12666         include the `this' offset in the `param_offsets'.
12667
12668 2002-03-25  Martin Baulig  <martin@gnome.org>
12669
12670         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
12671         mono_debug_get_class() function to get the classes. Added new
12672         relocation types for arrays and strings.
12673         (mono_debug_get_class): New static function to search in all
12674         referenced assemblies for a metadata token.
12675
12676         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
12677
12678 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12679
12680         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
12681         hold gc-allocated objects. Make the string heap a stream like the
12682         others. Removed duplicated code when writing stream info.
12683         Added asserts to catch possible buffer overflows. Set the sorted map
12684         for tables that need sorting. Added some documentation.
12685
12686 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
12687
12688         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
12689         for interned strings and vtables.
12690
12691 2002-03-24  Martin Baulig  <martin@gnome.org>
12692
12693         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
12694         it in the array since it was created with g_slist_prepend().
12695
12696 2002-03-24  Martin Baulig  <martin@gnome.org>
12697
12698         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
12699         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
12700         (mono_debug_method_from_token): Renamed to
12701         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
12702         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
12703
12704         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
12705         relocation types.
12706
12707         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
12708
12709 2002-03-24  Martin Baulig  <martin@gnome.org>
12710
12711         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
12712         (mono_debug_method_from_token): New func.
12713
12714         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
12715         New interncall, calls mono_debug_local_type_from_signature().
12716         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
12717         calls mono_debug_method_from_token().
12718
12719 2002-03-23  Martin Baulig  <martin@gnome.org>
12720
12721         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
12722         specifies the number of bytes to be converted, not the array size.
12723         Return the number of chars, not the number of bytes.
12724         (ves_icall_iconv_get_chars): The `byteCount' argument
12725         specifies the number of bytes to be converted, not the array size.
12726
12727 2002-03-23  Martin Baulig  <martin@gnome.org>
12728
12729         * reflection.h (MonoReflectionSigHelper): New type.
12730
12731         * reflection.c (mono_reflection_sighelper_get_signature_local),
12732         (mono_reflection_sighelper_get_signature_local): New functions.
12733
12734         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
12735         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
12736         interncalls.
12737
12738 2002-03-23  Martin Baulig  <martin@gnome.org>
12739
12740         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
12741         is_writeable is set.
12742         (mono_raw_buffer_update): New function to write the modified map
12743         back to disk.
12744
12745         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
12746
12747         * debug-symfile.c (mono_debug_update_symbol_file): Call
12748         mono_raw_buffer_update() when done writing.
12749
12750 2002-03-23  Martin Baulig  <martin@gnome.org>
12751
12752         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
12753
12754         * debug-symfile.c: Added support for arguments and local variables.
12755
12756 2002-03-23  Dick Porter  <dick@ximian.com>
12757
12758         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
12759         protected by ifdefs, hence breaking the w32 build.
12760
12761 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12762
12763         * object.c: implement is_interned() the right way.
12764
12765 2002-03-21  Martin Baulig  <martin@gnome.org>
12766
12767         * debug-symfile.[ch]: New files to handle debugging information
12768         files. There's also support to dynamically update these symbol
12769         files to include machine dependent information.
12770
12771 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
12772
12773         * threads.c (mono_thread_create): new function to create thread
12774         from C
12775
12776 2002-03-20  Martin Baulig  <martin@gnome.org>
12777
12778         * icall.c (ves_icall_InternalInvoke): Create a new object if the
12779         method is a constructor.
12780         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
12781         points to ves_icall_InternalInvoke().
12782
12783 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
12784
12785         * file-io.c: Flush shouldn't throw exceptions.
12786
12787 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
12788
12789         * file-io.c: FileStream flush support; FileSetLength now
12790         restores file pointer.
12791
12792 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
12793
12794         * class.c: set image for pointer classes.
12795
12796 2002/03/19  Nick Drochak <ndrochak@gol.com>
12797
12798         * sysmath.c: Forgot one.
12799
12800 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
12801
12802         * sysmath.c: Avoid redefining existing names.
12803
12804 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
12805
12806         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
12807         handled by runtime as icall rather than dllimport from libm.so
12808         * file-io.c, file-io.h: fixed handle argument type.
12809
12810 2002-03-18  Dick Porter  <dick@ximian.com>
12811
12812         * reflection.c (mono_image_get_type_info): rename interface to
12813         iface, because of "#define interface struct" on windows.
12814
12815 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
12816
12817         * class.c, class.h: rename and export mono_ptr_class_get().
12818         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
12819         * reflection.c, reflection.h, icall.c: better/saner type name
12820         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
12821         method signatures.
12822
12823 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
12824
12825         * class.c (mono_class_init): removed hardcoded GHC_SLOT
12826
12827         * icall.c (ves_icall_InternalInvoke): impl.
12828
12829 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12830
12831         * reflection.c: output the interface map table, too.
12832
12833 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
12834
12835         * class.c (class_compute_field_layout): separate computation of 
12836         static field layout
12837
12838 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
12839
12840         * icall.c: added System.Buffer support.
12841         * file-io.c: moved file icalls from PAL to FileStream.
12842
12843 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
12844
12845         * icall.c (ves_icall_System_Object_GetHashCode): impl.
12846
12847 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
12848
12849         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
12850
12851 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12852
12853         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
12854
12855 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
12856
12857         * debug-helpers.{c,h}: moved here from monograph some useful functions
12858         to locate a method by name/signature in a class or image. Included
12859         also a small and flexible IL disassembler.
12860
12861 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
12862
12863         * reflection.c: fixup tokens in methods with small header size, too.
12864
12865 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
12866
12867         * object.c (mono_string_to_utf8): remove assert(!error), instead
12868         print a warning. 
12869
12870 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
12871
12872         * icall.c: update to the new mono_Array_class_get interface.
12873
12874 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12875
12876         * appdomain.c, object.c: Boehm-GC enable.
12877         * icall.c: make get_data_chunk() support split data requests.
12878         Ensure a class is initialized in more cases. Return only the first
12879         property found in GetProperties() or the compiler gets confused. 
12880         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
12881         * reflection.h, reflection.c: add fixup mechanism for field and method
12882         tokens. Initialize assembly->typeref in a single place. Output
12883         properties after events. Support custom attributes for events, too.
12884         Typo fix for paramter custom attrs.
12885
12886 2002-03-07  Martin Baulig  <martin@gnome.org>
12887
12888         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
12889
12890 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
12891
12892         * class.c (mono_array_class_get): fix. for multi. dim. arrays
12893
12894 2002-03-06  Martin Baulig  <martin@gnome.org>
12895
12896         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
12897         non-zero lower bounds. See testcases #F10-#F13.
12898
12899 2002-03-05  Martin Baulig  <martin@gnome.org>
12900
12901         * exception.c (mono_get_exception_argument_out_of_range): New exception.
12902
12903         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
12904         ves_icall_System_Array_GetValue(), only calculate the absolute array position
12905         here.
12906         (ves_icall_System_Array_SetValue): Likewise.
12907         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
12908         as argument and does the actual work. This function is used when copying a
12909         multi-dimensional array.
12910         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
12911         now do all the widening conversions of value types.
12912         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
12913
12914 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12915
12916         * class.c: remove some magic numbers and use the smbolic names,
12917         instead. Added init_events() to load event info at class init time.
12918         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
12919         and mono_metadata_methods_from_event().
12920         * reflection.h, reflection.c: added support for writing out the evnets
12921         related information.
12922
12923 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12924
12925         * reflection.h, icall.c: use a different method (GetInterfaces)
12926         to gather interface info and add isbyref, isprimitive and
12927         ispointer to the ves_icall_get_type_info() return value.
12928
12929 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12930
12931         * class.h: stared adding support for events.
12932         * icall.c: split find_members implementation. Added debug icall to get
12933         the address of an object.
12934         * reflection.c: handle TypeBuilders in mono_type_get_object().
12935
12936 2002-03-01  Martin Baulig  <martin@gnome.org>
12937
12938         * icall.c (ves_icall_System_Array_GetLength): This must throw an
12939         ArgumentOutOfRangeException(), not an ArgumentException().
12940         (ves_icall_System_Array_GetLowerBound): Likewise.
12941         (ves_icall_System_Array_GetValue): Improved argument checking.
12942         (ves_icall_System_Array_SetValue): Improved argument checking.
12943
12944 2002-03-01  Martin Baulig  <martin@gnome.org>
12945
12946         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
12947         called with invalid arguments rather than just dying with g_assert().
12948         (ves_icall_System_Array_SetValue): Likewise.
12949         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
12950         raise a NotImplementedException instead.
12951         (ves_icall_System_Array_GetLength): Added argument checking.
12952         (ves_icall_System_Array_GetLowerBound): Added argument checking.
12953
12954 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
12955
12956         * object.h (mono_assert): new macros mono_assert and
12957         mono_assert_not_reached
12958
12959 2002-02-28  Martin Baulig  <martin@gnome.org>
12960
12961         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
12962         and "System::String::IsInterned" to "System::String::_IsInterned".
12963
12964 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
12965
12966         * icall.c: remove hacks for typebuilder. Added icall to create a
12967         modified type from a tybebuilder.
12968         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
12969         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
12970         to create a backing MonoClass for a TypeBuilder.
12971
12972 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12973
12974         * class.c, class.h: more refactoring of class init.
12975         Export mono_class_setup_mono_type() and mono_class_setup_parent().
12976
12977 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
12978
12979         * marshal.c, marshal.h: start of marshaling interface.
12980
12981 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
12982
12983         * icall.c: fix order in assembly qualified name icall.
12984
12985 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
12986
12987         * class.c: do not free str, since we store it in the hash table.
12988         * reflection.h: add label field to MonoILExceptionInfo.
12989         * reflection.c: handle references to more than one assembly. Handle
12990         case when there isn't a module created in the assembly.
12991
12992 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
12993
12994         * class.c: Fix typo. Start refactoring of class init code.
12995
12996 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
12997
12998         * appdomain.c: exit with 1 on error.
12999         * class.c: we already have the name in MonoClassField.
13000         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
13001         MonoStreamHeader instead of an offset of image->raw_metadata.
13002
13003 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
13004
13005         * appdomain.c (mono_init): Be even more descriptive about the error.
13006
13007 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
13008
13009         * appdomain.c: give the user an informative message when corlib can't
13010         be loaded.
13011
13012 2002-02-26  Martin Baulig  <martin@gnome.org>
13013
13014         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13015         New icall to get the time zone data.
13016
13017 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13018
13019         * reflection.c: set virtual and raw size of section correctly.
13020         * threads.c: transfer domain information to newly created threads.
13021
13022 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13023
13024         * class.c: when instancing a class in a domain, load the default
13025         vaules for static fields from the constant table. Fix System.Enum to
13026         not be an enum.
13027         * icall.c: implement Object::GetType() internalcall. Implemented
13028         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
13029         Fixed checking of binding flags in find_members().
13030         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
13031         * reflection.c: handle enumerations when writing to the constant
13032         table. Use a different object cache for types.
13033
13034
13035 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
13036
13037         * object.c (mono_object_isinst): fix for arrays
13038
13039         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
13040
13041 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13042
13043         * object.c: don't use mprotect ()  and fix intern pool hash table
13044         lookup for big endian systems.
13045
13046 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13047
13048         * icall.c: change type_is_subtype_of () signature.
13049
13050 2002-02-21  Mark Crichton  <crichton@gimp.org>
13051
13052         * rand.c, rand.h: Added random number generator for
13053         System.Security.Cryptography classes.
13054
13055         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
13056
13057         * icall.c: Added System.Security.Cryptography calls.
13058
13059 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13060
13061         * class.c, icall.c, metadata.c: better support for pointer types.
13062         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
13063         * reflection.c: Add support for getting custom attrs for properties
13064         and simplify some code.
13065
13066 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13067
13068         * icall.c: change getToken () and add custom attribute GetBlob()helper
13069         method.
13070         * reflection.h: add custom attrs array to the reflection builder structures.
13071         * reflection.c: encode and emit custom attributes for all the relevant
13072         reflection objects. Cache fieldref and methodref tokens. Change
13073         mono_image_create_token() interface to take a MonoDynamicAssembly.
13074         More complete custom attributes decoder. Load custom attributes for
13075         Assembly, Field, Method and Constructor objects, too. Make the
13076         returned array an Attribute[] one, not object[]. Added
13077         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
13078         custom attribute constructor.
13079
13080 2002-02-20  Dick Porter  <dick@ximian.com>
13081
13082         * icall.c:
13083         * rawbuffer.c:
13084         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
13085         problem code out for now).
13086
13087 2002-02-19  Radek Doulik  <rodo@ximian.com>
13088
13089         * object.c (mono_ldstr): use hash table to avoid multiple swapping
13090
13091 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
13092
13093         * icall.c: register the GetCustomAttributes method.
13094         * object.c, object.h: add mono_string_new_len ().
13095         * reflection.h, reflection.c: added mono_runtime_invoke(),
13096         mono_install_runtime_invoke(). Added
13097         mono_reflection_get_custom_attrs () to load custom attributes and
13098         create the attribute objects.
13099
13100 2002-02-19  Dick Porter  <dick@ximian.com>
13101         * threads-dummy-types.c:
13102         * threads-dummy-types.h:
13103         * threads-dummy.c:
13104         * threads-dummy.h:
13105         * threads-pthread-types.c:
13106         * threads-pthread-types.h:
13107         * threads-pthread.c:
13108         * threads-pthread.h:  Deleted obsolete files
13109
13110 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
13111
13112         * class.c (mono_class_vtable): runtime init the class when we
13113         allocate static class data.
13114
13115         * icall.c (ves_icall_System_Array_SetValue): check for null values.
13116
13117         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
13118         and String - but we will need generic marshalling support in the
13119         future. 
13120         (mono_init): set the domain name in a ms compatible way
13121
13122         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
13123         String[].
13124
13125 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
13126
13127         * object.c (mono_array_clone): use alloca() instead of g_malloc  
13128         for sizes
13129
13130         * appdomain.c (mono_domain_unload): impl.
13131
13132 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13133
13134         * appdomain.c, object.c: fix intern pool implementation.
13135         * class.c: fix alignment code.
13136
13137 2002-02-16  Radek Doulik  <rodo@ximian.com>
13138
13139         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
13140         and s2 > s1, just copy lower bytes to be compatible with little
13141         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
13142         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
13143
13144         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
13145         force big_endian to be 1 for big endian machines 
13146         (ves_icall_iconv_new_decoder): ditto
13147
13148 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
13149
13150         * socket-io.c (convert_sockopt_level_and_name): If the system
13151         doesn't define SOL_IP or SOL_TCP, get them by hand using
13152         getprotobyname() and caching the values (because this could be a
13153         slow operation).
13154         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
13155         Use the appropriate struct when the system does support it. Ie,
13156         not all systems have struct ip_mreqn so use struct ip_mreq when
13157         appropriate.
13158
13159 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
13160
13161         * reflection.c: handle finally clauses.
13162
13163 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
13164
13165         * socket-io.c: use g_snprintf() instead of snprintf.
13166
13167 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
13168
13169         * reflection.c (mono_param_get_objects): Cast second argument to
13170         mono_method_get_param_names to a const char** to silence the
13171         compiler warning.
13172
13173         * appdomain.c (mono_domain_assembly_open): Put parens around the
13174         truth statement in the for-loop.
13175
13176         * unicode.c (iconv_convert): Got rid of a compiler warning about
13177         int i being unused when the system has a new iconv.
13178         (iconv_get_length): Same.
13179
13180         * image.c (load_class_names): Cast the second argument to
13181         g_hash_table_insert() to char* to hush compiler warnings about the
13182         arg being a const.
13183         (mono_image_open): Same here.
13184
13185         * socket-io.c: Don't conditionally include sys/filio.h or
13186         sys/sockio.h here anymore since we now get them from
13187         io-layer/io-layer.h
13188         (inet_pton): If the system doesn't support inet_aton, implement
13189         using inet_addr and also #define INADDR_NONE if it isn't defined
13190         by the system.
13191
13192 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13193
13194         * metadata.c, metadata.h: added function to get packing and size info
13195         of a typedef.
13196         * reflection.h, reflection.c: handle field RVA data. Save info about
13197         the table layout if needed. Assign typedef indexes to all the types
13198         before dumping the info about them to avoid forward reference problems.
13199
13200 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
13201
13202         * socket-io.c (convert_sockopt_level_and_name): ifdef
13203         SO_ACCEPTCONN because it is not defined on my system (old debian)
13204
13205 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13206
13207         * opcode.c: use stddef.h to get NULL.
13208
13209 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
13210
13211         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
13212         for FIONBIO, FIONREAD and SIOCATMARK.
13213         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
13214         define INADDR_NONE and besides, inet_addr() is deprecated and
13215         should not be used. Use inet_pton() instead - it also has the
13216         added bonus that it can easily handle IPv6 addresses as well.
13217         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
13218
13219 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
13220
13221         * decimal.c: remove _MSC_VER conditional.
13222
13223 2002-02-13  Dick Porter  <dick@ximian.com>
13224
13225         * socket-io.c: 
13226         * icall.c: Internal calls for Blocking, Select, Shutdown,
13227         GetSocketOption and SetSocketOption
13228
13229 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13230
13231         * assembly.cs: better resolver: use it instead of some kludgy
13232         code.
13233
13234 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
13235
13236         * reflection.c: the best way to speed-up the compiler is to avoid
13237         infinite loops.
13238
13239 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
13240
13241         * class.c (mono_class_vtable): changed the object layout
13242         (obj->vtable->class). 
13243         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
13244
13245 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13246
13247         * assembly.c: look for assemblies in the assembly dir, too.
13248
13249 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13250
13251         * class.c: fix thinko in mono_class_from_type().
13252
13253 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13254
13255         * exception.h, exception.c: added TypeLoadException.
13256         * object.h, object.c: added mono_array_clone ().
13257         * icall.c: handle throwOnError in AssemblyGetType().
13258         Added Array.Clone().
13259         * opcode.h, opcode.c: use a single value for the opcode val.
13260         Compile fix for non-gcc compilers.
13261
13262 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
13263
13264         * opcodes.c, opcodes.h: export interesting info about opcodes.
13265
13266 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
13267
13268         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
13269         icalls. 
13270
13271         * class.c (class_compute_field_layout): set element_class for enums
13272         (mono_class_create_from_typedef): set element_class for normal classes
13273
13274         * icall.c (ves_icall_System_Enum_get_value): impl.
13275
13276         * class.c (mono_class_create_from_typedef): do not set valuetype
13277         flag for System.ValueType and System.Enum
13278
13279 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
13280
13281         * unicode.c (iconv_convert): fix big endian problem.
13282
13283 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13284
13285         * class.c: add asserts if we are ever going to scribble over memory.
13286         * socket-io.c: not all systems have AF_IRDA defined.
13287
13288 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
13289
13290         * class.c (class_compute_field_layout): do not consider static
13291         fields to compute alignment
13292
13293 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
13294
13295         * appdomain.c (mono_appdomain_get): impl.
13296         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
13297
13298 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
13299
13300         * icall.c: ignore "file://" prefix when loading an assembly.
13301
13302 2002-01-23  Dick Porter  <dick@ximian.com>
13303
13304         * socket-io.c:
13305         * icall.c:
13306         * Makefile.am: Added socket support
13307
13308 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
13309
13310         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
13311         code back.  This should return the assemblies that are loaded by
13312         the runtime on behalf of an application domain. 
13313
13314         The current implementation is still broken, it just returns every
13315         assembly loaded, but until we get real applications domain this
13316         will do.
13317
13318 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
13319
13320         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
13321         AppDomain object.
13322
13323 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
13324
13325         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
13326         the mono_class_from_name lookup.
13327         (ves_icall_get_parameter_info): ditto.
13328         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
13329         method.
13330         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
13331
13332 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13333
13334         * class.c: load also nested classes on class init.
13335         System.ValueType instance methods gets passed boxed
13336         values, unless methods in derived classed that get a pointer to the
13337         data.
13338         * icall.c: use better name parsing code in GetType().
13339         * image.c, image.h: add mono_image_loaded ().
13340         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
13341         * reflection.c, reflection.h: added mono_reflection_parse_type().
13342
13343 2002-01-22  Veronica De Santis <veron78@interfree.it>
13344
13345         * icall.c : Added mapping of internal calls for Manual and Auto reset events
13346         * threads.c : Added the implementation of internal calls for events
13347         * threads.h : Added prototypes of internal calls for events
13348         
13349 2002-01-21  Radek Doulik  <rodo@ximian.com>
13350
13351         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
13352
13353 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
13354
13355         * class.c (mono_class_init): set min_align to 1 (instead of 0)
13356         (mono_class_value_size): use min_align
13357
13358 2002-01-20  Dick Porter  <dick@ximian.com>
13359
13360         * threads.h:
13361         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
13362         so it compiles on w32.
13363
13364 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
13365
13366         * metadata.c (mono_type_stack_size): impl.
13367
13368         * class.c (mono_class_get_field): impl. memberref token
13369
13370 2002-01-16 Veronica De Santis <veron78@@interfree.it>
13371
13372         * icall.h : Added the internal calls mapping for CreateMutex_internal
13373                     and ReleaseMutex_internal.
13374         * threads.h : Added the prototype of mutexes internal calls.
13375         * threads.c : Added the implementations of mutexes internal calls.
13376
13377 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13378
13379         * metaparse.h: removed unused file.
13380         * reflection.c, reflection.h: added stream_data_align () function 
13381         to align data in streams and keep stream aligned. Add support for
13382         exception support in method headers.
13383
13384 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
13385
13386         * unicode.c: make iconv_convert () return the number of bytess written
13387         in the output buffer.
13388
13389 2002-01-15  Dick Porter  <dick@ximian.com>
13390         * threads.c: Make the runtime's idea of infinite timeouts coincide
13391         with the class library's
13392
13393         Fix a particularly egregious bug in mono_thread_cleanup(). That
13394         code was so utterly bogus it must have been written on a Monday.
13395
13396 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
13397
13398         * reflection.h: add subtypes field to TypeBuilder.
13399         * reflection.c: encode constants for literal fields.
13400         Handle subtypes. Fix user string token (and add a zero byte)
13401         at the end.
13402         
13403 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
13404
13405         * class.c (mono_class_init): bug fix: assign slot numbers for
13406         abstract methods.
13407
13408 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13409
13410         * reflection.c: don't try to output a code RVA for abstract methods.
13411         Small fixes for method header format. Output parameter info to the
13412         ParamDef table. Save method overriding info to MethodImpl table.
13413         Fix property support. Allow typedef.extends to be a type in the
13414         building assembly.
13415         * verify.c: fix off-by-one error.
13416
13417 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
13418
13419         * class.c: fix mono_class_from_mono_type () for szarray types.
13420         Remove unused cache check in mono_class_from_type_spec().
13421         * icall.c: *type_from_name () functions handle simple arrays and byref.
13422         * reflection.c: handle byref and szarray types. Handle methods without
13423         body (gets P/Invoke compilation working). Handle types and fields in
13424         get_token ().
13425         * reflection.h: add rank to MonoTypeInfo.
13426
13427 2002-01-10  Dick Porter  <dick@ximian.com>
13428
13429         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
13430         internal calls
13431
13432 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13433
13434         * icall.c: initialize class in type_from_handle ().
13435         Loop also in parent classes for get_method ().
13436         * reflection.c: properly encode class and valuetype types.
13437         Start on encoding TypeBuilder types. Handle fieldrefs.
13438         Use correct length when registering a user string.
13439         Handle ConstructorBuilder and MonoMethod in get_token ().
13440         Make mono_type_get_object () aware of cached types.
13441         * object.c: back out change to mono_string_new ().
13442
13443 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
13444         * object.c: mono_string_new should return a NULL when the string 
13445         passed in is NULL -- not try to deference it.
13446         
13447 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
13448
13449         * icall.c: hack to make IsSubType work for TypeBuilders.
13450         * reflection.c: emit constructors before methods.
13451         Retrieve param names in mono_param_get_objects().
13452
13453 2002/01/05  Nick Drochak  <ndrochak@gol.com>
13454
13455         * Makefile.am: fix list of headers and sources so automake 1.5
13456         doesn't complain. Removed \# at end of list.
13457
13458 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
13459
13460         * reflection.c: get token for a method ref. Set return type of
13461         constructor to void.
13462         * loader.c: debug message.
13463         * class.c: typo fix.
13464
13465 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
13466
13467         * icall.c: fix array init with rank > 1. FindMembers
13468         loops in parent class as well.
13469         * image.c: do not insert nested types in name cache.
13470         * reflection.c: warning fix.
13471         * reflection.h: add override method (for interface impl).
13472
13473 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
13474
13475         * metadata.c: fix customattr decoding.
13476
13477 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
13478
13479         * rawbuffer.cs: Added native Win32 implementation, avoids using
13480         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
13481
13482 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
13483
13484         * class.c: make the low-level routines handle the cache.
13485
13486 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
13487
13488         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
13489
13490 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
13491
13492         * class.c: fix mono_array_element_size() for objects.
13493         * class.h, class.c: add properties to MonoClass and load them
13494         at init time.
13495         * icall.c: check with isinst() when assigning a value to an array
13496         instead of requiring the classes to match exactly.
13497         Implemented icall for System.Type::GetType().
13498         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
13499         enums. Handle bindingflags when looking for methods and fields.
13500         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
13501         and mono_metadata_methods_from_property().
13502         * reflection.h, reflection.c: added structures for propreties,
13503         parameters and enums. Implemented mono_property_get_object() and
13504         mono_param_get_objects().
13505
13506 2001-12-18  Dick Porter  <dick@ximian.com>
13507
13508         * file-io.c: Use mono_string_to_utf16() instead of
13509         mono_string_chars()
13510
13511         * object.c: Added mono_string_to_utf16(), which copies the non
13512         NULL-terminated MonoString into a new double-null-terminated
13513         buffer.
13514
13515 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
13516
13517         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
13518
13519 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
13520
13521         * file-io.c: raise exceptions if handle is invalid.
13522
13523 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
13524
13525         * assembly.c: yet another check for mscorlib.
13526         * class.c, class.h: load nesting info for classes.
13527         * icall.c: many new functions to support the Reflection classes.
13528         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
13529         * reflection.h, reflection.c: mono_image_create_token(),
13530         mono_assembly_get_object(), mono_type_get_object(),
13531         mono_method_get_object(), mono_field_get_object(): methods to return
13532         objects that parallel the C representation of assemblies, types,
13533         methods, fields.
13534
13535 2001-12-11  Dick Porter  <dick@ximian.com>
13536
13537         * icall.c:
13538         * file-io.c: Internal calls for file IO.
13539
13540 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
13541
13542         * tabledefs.h: missing FileAttributes.
13543         * verify.h, verify.c: use is_valid_string () to simplify and check for
13544         valid strings more correctly. Fix warnings and speeling.
13545         Check more tables: Filed, File, ModuleRef, StandAloneSig.
13546         Check code: branches, maxstack, method calls.
13547
13548 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
13549
13550         * object.c (mono_object_allocate): removed static, so that the jit
13551         can allocate value types.
13552
13553         * icall.c (ves_icall_System_DateTime_GetNow): impl.
13554
13555 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13556
13557         * class.c: init enum types right away and register the
13558         token->MonoClass map in mono_class_create_from_typedef ().
13559         * verify.h, verify.c: first cut of the verifier.
13560         * pedump.c: add --verify switch to verify metadata tables.
13561         * tabledefs.h: add some missing enums.
13562
13563 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
13564
13565         * class.c (mono_install_runtime_class_init): impl.
13566         (mono_class_init): renamed mono_class_metadata_init to
13567         mono_class_init, also removed the metadata_inited flag
13568
13569         * object.c (mono_object_isinst): use faster algorithm
13570
13571 2001-11-30  Radek Doulik  <rodo@ximian.com>
13572
13573         * mono-endian.h: reverted last change
13574         added function prototypes
13575
13576         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
13577         add mono-endian.c back
13578
13579         * mono-endian.c: returned back, as Paolo pointed out, it's needed
13580         for unaligned access, I've mistaked it with endianess. I am
13581         sorry.
13582         (mono_read16): fix reverted endianess
13583         (mono_read64): ditto
13584         (mono_read32): ditto
13585
13586 2001-11-30  Dick Porter  <dick@ximian.com>
13587
13588         * exception.c: Implement mono_exception_from_name()
13589
13590 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13591
13592         * metadata.h, metadata.c: remove params_size and locals_size and their
13593         calculation from the metadata code: they are only usefult to the
13594         interp.
13595
13596 2001-11-29  Radek Doulik  <rodo@ximian.com>
13597
13598         * object.c (mono_ldstr): swap bytes here, it's probably not the
13599         best place, but works for me now, I'll redo it once I know mono
13600         better, also note that I add PROT_WRITE and don't reset back, also
13601         note that it's only affects big endians, so x86 should be OK
13602
13603         * mono-endian.h (read16): use just glib macros for both endians
13604
13605         * mono-endian.c: removed as glib macros are used in in
13606         mono-endian.h so we don't need to care about endianess for read
13607         macros as glib does that for us already
13608
13609 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
13610
13611         * class.h, class.h: take minimum alignment into consideration so
13612         that the fields of a class remain aligned also when in an array.
13613
13614 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13615
13616         * loader.h, loader.c: add mono_method_get_param_names().
13617         * class.c: 0-init class fields.
13618
13619 2001-11-26  Dick Porter  <dick@ximian.com>
13620
13621         * icall.c:
13622         * threads-types.h:
13623         * threads.c: New file that handles System.Threading on all platforms
13624
13625         * object.c: 
13626         * object.h: Remove the synchronisation struct from MonoObject,
13627         replace it with a pointer that gets initialised on demand
13628
13629         * Makefile.am: Replace all the system-specific threading code with
13630         a single file that uses the new wrapper library
13631
13632 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
13633
13634         * class.c, class.h: add mono_install_trampoline() so that the runtime
13635         can register a function to create a trampoline: removes the ugly
13636         requirement that a runtime needed to export arch_create_jit_trampoline.
13637         * object.h, object.c: added mono_install_handler() so that the runtime
13638         can install an handler for exceptions generated in C code (with
13639         mono_raise_exception()). Added C struct for System.Delegate.
13640         * pedump.c: removed arch_create_jit_trampoline.
13641         * reflection.c: some cleanups to allow registering user strings and
13642         later getting a token for methodrefs and fieldrefs before the assembly
13643         is built.
13644         * row-indexes.h: updates and fixes from the new ECMA specs.
13645
13646 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
13647
13648         * class.h, class.c: add enum_basetype field to MonoClass.
13649         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
13650         to get index in the constant table reated to a field, param or
13651         property.
13652         * reflection.h, reflection.c: handle constructors. Set public-key and
13653         version number of the built assembly to 0.
13654         * row-indexes.h: update from new ECMA spec.
13655
13656 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13657
13658         * class.h, class.c: add a max_interface_id to MonoClass.
13659         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
13660         since it's used to do that. Added mono_type_type_from_obj().
13661         Make GetType() return NULL instead of segfaulting if the type was not
13662         found. Handle simple arrays in assQualifiedName.
13663         * object.h: add a struct to represent an Exception.
13664         * reflection.c: output call convention in method signature.
13665         Add code to support P/Invoke methods and fixed offsets for fields.
13666
13667 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
13668
13669         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
13670         the value.
13671         * icall.c: use mono_array_addr instead of array->vector: fixes the
13672         reflection image writing.
13673         * reflection.c: init call convention byte to 0 in method signature.
13674         Encode the property signature. Don't output property-related methods
13675         twice. Really process the properties for a type (don't cast a field to
13676         a property, my mom always told me that).
13677         Fix 64 bit issues in pointer alignment in a different and more
13678         readable way.
13679
13680 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
13681
13682         * loader.h: Removed type class from MonoDefaults, added monotype
13683
13684         * loader.c: Loaded MonoType, removed loading of Type
13685
13686         * icall.c (my_mono_new_object): Now returns a System.MonoType,
13687         and fills in System.Type._impl with a RuntimeTypeHandle rather
13688         than the actual MonoClass *
13689
13690         (ves_icall_type_from_handle): change from type_class to
13691         monotype_class
13692
13693         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
13694         implemented
13695
13696         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
13697         implemented
13698
13699         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
13700
13701         (ves_icall_System_Reflection_Assembly_GetType): implemented
13702
13703         (ves_icall_System_MonoType_assQualifiedName): implemented
13704
13705         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
13706
13707 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
13708
13709         * assembly.c (mono_assembly_open): Implement a cache for the
13710         assemblies. 
13711
13712         (mono_assembly_close): only destroy the assembly when the last
13713         reference is gone.
13714         
13715 2001-11-09  Dick Porter  <dick@ximian.com>
13716
13717         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
13718
13719 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
13720
13721         * class.c (mono_class_metadata_init): bug fix: compute the right slot
13722
13723 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13724
13725         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
13726         from Martin Weindel.
13727         * object.h: add mono_string_chars ().
13728
13729 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
13730
13731         * reflection.c (build_compressed_metadata): Eliminates warnings
13732         and uses 64-bit clean code.
13733
13734         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
13735         (mono_type_equal): Change signature to eliminate warnings.
13736
13737 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13738
13739         * icall.c, loader.c: remove the internalcall array constructors.
13740         Changes to match the new MonoArray structure.
13741         * object.h, object.c: an array object doesn't allocate an extra
13742         vector. Add mono_array_new_full () to create jagged arrays easily.
13743
13744 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13745
13746         * metadata.h, metadata.c: add mono_metadata_field_info () to
13747         retreive all the info about a field from vairous tables.
13748         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
13749         * class.h, class.c: augment MonoClassField with more info.
13750         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
13751         policy and load a field's RVA if needed.
13752
13753 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
13754
13755         * class.c (mono_class_metadata_init): create a trampoline for all
13756         virtual functions instead of actually compiling them.
13757
13758 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
13759
13760         * class.h, class.c: include name in MonoClassField.
13761         * class.c: fix fundamental type of System.Object and System.String.
13762         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
13763         tokens in ldtoken.
13764         * icall.c: remove internalcalls for the Reflection stuff that is now
13765         done in C# code.
13766         * loader.c: mono_field_from_memberref () implementation.
13767         * mono-endian.c: thinko (s/struct/union/g).
13768         * object.c, object.h: make the mono_string_* prototypes actually use
13769         MonoString instead of MonoObject.
13770         * reflection.c, reflection.h: updates for changes in the reflection
13771         code in corlib: we use C structures that map to the actual C# classes.
13772         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
13773         fat method header if needed and use the info from the ILGenerator for
13774         methods. Handle fields in types. Misc fixes.
13775
13776 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
13777
13778         * class.c (mono_class_metadata_init): bug fix: always allocate
13779         space for static class data
13780
13781 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
13782
13783         * class.c (mono_compute_relative_numbering): use relative
13784         numbering to support fast runtime type checks.
13785
13786 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
13787
13788         * class.c (mono_class_create_from_typeref): added debugging output
13789         to print class name when MonoDummy is returned instead of real class
13790
13791 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
13792
13793         * class.c (mono_class_metadata_init): interface offset table now
13794         contains pointers into the vtable - this is more efficient for the jit
13795
13796 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
13797
13798         * class.c (mono_class_metadata_init): use a temporary vtable (the
13799         old algorithm only worked for the interpreter, but not for the jit)
13800
13801 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
13802
13803         * loader.c (method_from_memberref): use mono_class_get to get the
13804         class of an array instead of using System.Array directly.
13805         (mono_get_method): also add MEMBERREF methods to the method cache
13806         which usefull for arrays.
13807
13808 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
13809
13810         * pedump.c (arch_compile_method): added to compute vtable entry
13811
13812         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
13813         number of interfaces.
13814         
13815         * class.h: merged MonoArrayClass into MonoClass
13816
13817         * class.c (mono_class_create_from_typedef): compute the vtable size and
13818         allocate space to include the vtable inside MonoClass
13819         (mono_class_metadata_init): initialize the vtable
13820
13821 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
13822
13823         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
13824         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
13825         * image.c: endian fixes by Laurent Rioux.
13826         * object.h, object.c: rename MonoStringObject to MonoString and
13827         MonoArrayObject to MonoArray. Change some function names to conform to
13828         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
13829         guint16* as first argument, so don't use char*.
13830         Provide macros to do the interesting things on arrays in a portable way.
13831         * threads-pthread.c: updates for the API changes and #include <sched.h>
13832         (required for sched_yield()).
13833         * icall.c: updates for the API changes above.
13834         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
13835         platforms that need them.
13836
13837 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
13838
13839         * class.c: set the correct type for all the fundamental
13840         type when loading the class.
13841
13842 2001-10-05  Dick Porter  <dick@ximian.com>
13843
13844         * threads-pthread.c (pthread_mutex_timedlock): Simple
13845         compatibility version for C libraries that lack this call.
13846
13847 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13848
13849         * class.c: MonoTypes stored in MonoClass are stored as
13850         fundamental MonoTypes when the class represents a
13851         fundamental type (System.Int32, ...).
13852         The TypeHandle return by ldtoken is a MonoType*.
13853         * icall.c: ves_icall_get_data_chunk () write out all the
13854         PE/COFF stuff. Implement ves_icall_define_method (),
13855         ves_icall_set_method_body (), ves_icall_type_from_handle ().
13856         * image.c: properly skip unknown streams.
13857         * loader.h, loader.c: add type_class to mono_defaults.
13858         * metadata.c, metadata.h: export compute_size () as
13859         mono_metadata_compute_size () with a better interface.
13860         Typo and C&P fixes.
13861         * pedump.c: don't try to print the entry point RVA if there is no entry point.
13862         * reflection.c, reflection.h: many cleanups, fixes, output method
13863         signatures and headers, typedef and typeref info, compress the metadata
13864         tables, output all the heap streams, cli header etc.
13865         * row-indexes.h: typo fixes.
13866
13867 2001-10-04  Dick Porter  <dick@ximian.com>
13868
13869         * object.h: Add a synchronisation mutex struct to MonoObject
13870
13871         * object.c (mono_new_object): Initialise the object
13872         synchronisation mutexes
13873
13874         * icall.c: System.Threading.Monitor internal calls
13875         
13876         * threads-pthread.h:
13877         * threads-pthread.c: System.Threading.Monitor internal calls
13878
13879         * threads-types.h: New file, includes the system-specific thread
13880         structures
13881         
13882         * threads-pthread-types.h:
13883         * threads-pthread-types.c: New files, handle pthread-specific
13884         synchronisation types
13885
13886         * threads-dummy-types.h: 
13887         * threads-dummy-types.c: New files of dummy support for
13888         thread-specific types
13889
13890         * metadata.c:
13891         * image.c:
13892         * pedump.c: include mono-endian.h not endian.h
13893         
13894         * Makefile.am: More threads files.
13895         Name mono-endian.h not endian.h
13896
13897 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
13898
13899         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
13900         stuff and implement a few more bits.
13901         * icall.c: a field needs to be dereferenced twice. Do not use the same
13902         name for two variables in the same scope.
13903         * image.c, image.h: cleanups.
13904
13905 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
13906
13907         * class.c (mono_class_metadata_init): bug fix: compute the right size
13908
13909 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
13910
13911         * icall.c: implemented some of the Reflection internalcalls.
13912         * image.c, image.h: start writing out the PE/COFF image.
13913         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
13914         that does the reverse than decode_blob_size ().
13915         * object.c: use mono_metadata_encode_value (). Move here
13916         temporary implementation of mono_string_to_utf8 ().
13917         * rawbuffer.c: make malloc_map static.
13918
13919 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13920
13921         * metadata.c: fix type comparison for arrays.
13922         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
13923         Added a couple of new classes to monodefaults.
13924         * icall.c: added a couple of Reflection-related internalcalls.
13925         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
13926         Added a byval_arg MonoType to MonoClass.
13927
13928 2001-09-28  Dick Porter  <dick@ximian.com>
13929
13930         * icall.c:
13931         * threads-pthread.h: 
13932         * threads-pthread.c: Implemented internal calls for
13933         LocalDataStoreSlot operations.  Applied mutexes around all shared
13934         data.  Reworked the thread creation and Start() operations to
13935         avoid a race condition.
13936         
13937         * threads-dummy.h:
13938         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
13939
13940 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
13941
13942         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
13943
13944 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
13945
13946         * class.c, loader.c: warn and return NULL instead of erroring out.
13947         * icall.c: added System.AppDomain::getCurDomain().
13948         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
13949
13950 2001-09-25  Dick Porter  <dick@ximian.com>
13951
13952         * threads-pthread.h:
13953         * threads-pthread.c: Implemented timed thread joining and added
13954         System.Threading.Thread::Join_internal internal call
13955
13956         * icall.c: Added System.Threading.Thread::Join_internal internal call
13957
13958         * threads-dummy.h:
13959         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
13960
13961 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
13962
13963         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
13964         mono_string_intern () to implement the semantics of the ldstr opcode
13965         and the interning of System.Strings.
13966         * icall.c: provide hooks to make String::IsIntern and String::Intern
13967         internalcalls.
13968
13969 2001-09-23  Dick Porter  <dick@ximian.com>
13970
13971         * threads-dummy.c: 
13972         * threads-dummy.h: New files of dummy threading routines
13973
13974         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
13975         support code based on system specifics
13976
13977         Rename PTHREAD_LIBS to THREAD_LIBS
13978         
13979 2001-09-23  Dick Porter  <dick@ximian.com>
13980
13981         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
13982         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
13983         internal calls.
13984         (mono_thread_init): Set up a Thread object instance to return when
13985         the main thread calls Thread.CurrentThread
13986         (mono_thread_cleanup): Wait for all subthreads to exit
13987
13988         * icall.c: New internal calls for System.Threading.Thread::Sleep
13989         (including Schedule) and CurrentThread
13990
13991         * threads.h: New file, to insulate thread-specific stuff from the
13992         rest of the code
13993
13994 2001-09-21  Dick Porter  <dick@ximian.com>
13995
13996         * threads-pthread.h: 
13997         * threads-pthread.c: New file, for handling pthreads-style
13998         threading support.  Start() now starts a new thread and executes
13999         the ThreadStart delegate instance.
14000
14001         * icall.c: Added the internalcall for
14002         System.Threading.Thread::Start_internal
14003
14004         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
14005
14006 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
14007
14008         * loader.c: work around the different signatures for delegates
14009         constructors csc generates in compiled code vs the ones compiled in mscorlib.
14010
14011 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14012
14013         * class.h, class.c: add mono_class_get_field_from_name ().
14014         * *: Fix C comments and other ANSI C issues.
14015
14016 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
14017
14018         * endian.h, assembly.c: fix some endianness issues.
14019
14020 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
14021
14022         * loader.h, load.c: add delegate_class to mono_defaults.
14023         Handle runtime provided methods in mono_get_method ().
14024
14025 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
14026
14027         * loader.c (mono_get_method): use pinvoke for internal call
14028
14029         * icall.c: use pinvoke for internal call
14030
14031         * loader.c (method_from_memberref): set the method name
14032
14033 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
14034
14035         * metadata.c: help the compiler generate better code for
14036         mono_class_from_mono_type ().
14037
14038 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
14039
14040         * class.c (mono_class_metadata_init): delayed computing of the
14041         class size to mono_class_metadata_init ()
14042
14043 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
14044
14045         * class.c, class.h: add an interfaces member to MonoClass.
14046         * image.c, image.h: add assembly_name field to MonoImage
14047         from the assembly table.
14048         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
14049
14050 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14051
14052         * class.c: Handle Array in mono_class_from_mono_type ().
14053         * metadata.c, pedump.c: some endian fixes.
14054
14055 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
14056
14057         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
14058         * metadata.c: fix small problem introduced with the latest commit.
14059
14060 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
14061
14062         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
14063         We don't need a MonoMetadata pointer anymore to compare signatures in
14064         mono_metadata_signature_equal (), update callers.
14065         Reduced memory usage an number of allocations for MonoMethodHeader and
14066         MonoMethodSignature.
14067
14068 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
14069
14070         * metadata.c: added compare for szarray.
14071
14072 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
14073
14074         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
14075         and add a couple more types to it and mono_defaults. Give an hint on
14076         classes that need implementing in our corlib and are referenced
14077         in mscorlib.
14078
14079 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
14080
14081         * class.h, class.c: keep track if a class is also an Enum.
14082         * loader.c: Implement a couple more types for use in libffi
14083         marshalling. Gives better diagnostics when failing to dlopen
14084         a library. Set method->klass for P/Invoke methods, too.
14085
14086 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
14087
14088         * class.c, class.h: add a MonoType this_arg to MonoClass that
14089         represents a pointer to an object of the class' type that
14090         can be used by the interpreter and later the type cache.
14091         Add best guess alignment info for valuetype objects.
14092
14093 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
14094
14095         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
14096         into MonoType: one less level of indirection and allocation and
14097         simplifies quite a bit of code. Added cache for MonoTypes that are
14098         used frequently, so that we don't need to allocate them all the time.
14099
14100 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
14101
14102         * class.c (mono_class_create_from_typedef): System.Enum is also a
14103         value type, although it does not derive from System.ValueType
14104         (maybe a bug in the ms compiler?)
14105
14106         * metadata.c (mono_type_size): return the right size for value types
14107
14108         * loader.c (mono_get_method): only initialize method header if not abstract
14109
14110         * class.c (mono_class_from_mono_type): use mono_default values. 
14111
14112 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
14113
14114         * *: use MonoClass pointers instead of <type_tokens>
14115         
14116         * class.h: new flag: metadata_inited.
14117
14118         * class.c (mono_class_metadata_init): impl.
14119         (mono_class_instance_size): impl.
14120         (mono_class_data_size): impl.
14121
14122 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
14123
14124         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
14125         MonoClass now has the name and name_space fields. 
14126         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
14127         mono_get_method () takes and optional MonoClass as argument.
14128         Removed mono_typedef_from_name() and added mono_class_token_from_name()
14129         instead that takes advantage of a map from class names to typedef
14130         tokens in MonoImage.
14131
14132 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
14133
14134         * metadata.c: zero is not a valid alignment boundary.
14135         Merge MONO_TYPE_VOID in default decoding code.
14136
14137 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
14138
14139         * image.h: merged MonoMetadata into MonoImage
14140
14141         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
14142         identify the type of elements.
14143
14144 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
14145
14146         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
14147         * cil-coff.h: split MonoMSDOSHeader and add size info.
14148         * image.c: add some consistency checks.
14149         * metadata.c: fix row size computation: one programmer
14150         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
14151         add explanation for the locator routine.
14152         Fix decoding of size in method header.
14153         
14154 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
14155
14156         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
14157         (g_concat_dir_and_file): Bring g_concat_dir_and_file
14158         function from gnome-libs.  This uses the right path separator
14159         based on the OS, and also works around a bug in some systems where
14160         a double slash is not allowed. 
14161         (default_assembly_name_resolver): Use g_concat_dir_and_file
14162         (mono_assembly_open): ditto.
14163
14164 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
14165
14166         * metadata.c (mono_metadata_signature_equal): impl.
14167
14168         * *: void is now a realy MonoType (instead of using NULL)
14169         
14170         * metadata.c (do_mono_metadata_parse_type): use
14171         mono_metadata_parse_type to parse void value.
14172
14173 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
14174
14175         * metadata.c, metadata.h: in the signature and method header store
14176         only the space required for holding the loca vars and incoming arguments.
14177
14178 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
14179
14180         * metadata.c (do_mono_metadata_parse_type): treat void like any
14181         other type (instead of assigning NULL);
14182
14183 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
14184
14185         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
14186
14187 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
14188
14189         * image.c (do_mono_image_open): added a cache for arrays.
14190
14191 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14192
14193         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
14194         decode a single column from a row in a metadata table and changes
14195         to take advantage of it in the typedef locator (gives a nice speed up).
14196         Store offset info for function params.
14197
14198 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
14199
14200         * image.h (MONO_IMAGE_IS_CORLIB): removed 
14201
14202 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
14203
14204         * assembly.c: how could mono_assembly_close () had ever worked?
14205         * metadata.c, metadata.h: provide offset info for local vars.
14206         Implement mono_type_size () to take care of alignment as well
14207         as size (it was mono_field_type_size in cli/class.c before).
14208
14209 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
14210
14211         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
14212
14213         * assembly.h (CORLIB_NAME): set to corlib.dll
14214
14215         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
14216
14217 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14218
14219         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
14220         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
14221         tokentype.h: massive namespace cleanup.
14222
14223 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14224
14225         * metadata.h, metadata.c: decode exception clauses when parsing method header.
14226
14227 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
14228
14229         * metadata.c (mono_metadata_free_type): added check for type !=
14230         NULL (void) before calling mono_metadata_free_type()
14231
14232 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
14233
14234         * metadata.h, row_indexes.h: added header with enumerations to use
14235         to index in the columns from tables in metadata and to decode coded
14236         tokens: we should start using this instead of embedding magic numbers
14237         all over the code.
14238
14239 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
14240
14241         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
14242         Move metadata_t info from cli_image_info_t to MonoImage, where
14243         it's easily accessible. Changed all the uses accordingly.
14244         Added the method and class caches to MonoImage.
14245         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
14246         and mono_metadata_decode_value () signature to be more consistent
14247         with the other parse functions (and simplify code). Taken advantage
14248         of zero-length array allocation with GCC. Removed reduntant (and
14249         wrong) MonoFieldType struct and use MonoParam instead. Changed
14250         mono_metadata_parse_field_type () to use common code for parsing.
14251         Added mono_metadata_typedef_from_field () and
14252         mono_metadata_typedef_from_method () to lookup a typedef index from a
14253         field or method token.
14254         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
14255
14256 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
14257
14258         * metadata.c (mono_metadata_parse_field_type): Implement. 
14259         (do_mono_metadata_parse_type): Split engine from
14260         mono_metadata_parse_type, so that we can create smaller structures
14261         for things that just have one pointer to the MonoType (look at
14262         the MonoFieldType)
14263
14264 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
14265
14266         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
14267         as Jan Gray found out, it is incorrect. 
14268
14269 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
14270
14271         * assembly.c: Implement asssembly loading.  This loads an image
14272         and loads all the referenced assemblies.  Come to think of it, we
14273         could always do lazy loading of the assemblies. 
14274
14275         * image.c (mono_image_open): Keep loaded images in a hashtable.
14276
14277         * image.h (MonoImage): Add reference count.
14278
14279 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
14280
14281         * assembly.c (mono_assembly_open): Keep track of the file name in
14282         case the assembly has no ASSEMBLY table.
14283
14284         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
14285         from get.c here.
14286
14287 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
14288
14289         * metadata.c, metadata.h: decode local vars in method header
14290         parse function. Change callers accordingly.
14291
14292 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
14293
14294         * metadata.h, cil-coff.h: protect against multiple inclusion.
14295         Added some new structures to hold information decoded from metadata:
14296         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
14297         and relevant decoding/free functions.
14298         * metadata.c: implement decoding functions. Add warning for out of bounds
14299         index in mono_metadata_locate(). Implement mono_get_method () to retreive
14300         all the info about a method signature and invocation. Remove check on
14301         uninitialized local var in parse_mh() and fix memory leak.
14302
14303 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
14304
14305         * metadata.h: More macros.
14306
14307         * tokentype.h: New file.
14308
14309 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
14310
14311         * assembly.c: added a consistency check and initialize
14312         some structures with g_new0().
14313         * metadata.c: fixed a couple more bugs in table size computation
14314         and add other checks for out-of bound access to metadata.
14315
14316 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
14317
14318         * metatada.c: fix bugs computing table sizes. Spew a
14319         warning when index in string heap is out of bounds.
14320
14321 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
14322
14323         * metadata.h: Add a couple of macros to manipulate tokens. 
14324
14325 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14326
14327         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
14328         cli_section_tables).
14329
14330 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
14331
14332         * metadata.c (mono_metadata_user_string): New function, provides
14333         access to the UserString heap. 
14334
14335 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
14336
14337         * metadata.c: Add inline documentation.
14338
14339 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
14340
14341         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
14342         files. 
14343
14344 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
14345
14346         * typeattr.h: New file, TypeAttribute flags. 
14347
14348 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
14349
14350         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
14351         mono_assembly_ensure_section): Section loading code.
14352         (load_section_tables): Load the sections.
14353
14354         * mono/metadata/metadata.c (mono_metadata_locate_token,
14355         mono_metadata_locate): Functions to locate the information
14356         definition given a token or a table and an index.
14357         (mono_metadata_compute_table_bases): New.
14358         (compute_size): New function to compute the sizes of the various
14359         tables.
14360
14361         * mono/metadata/metadata.h: Finish listing the different index
14362         types. 
14363
14364         * mono/metadata/pedump.c: Improve to dump new information.
14365
14366 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
14367
14368         * mono/metadata/metadata.c: Entered all the tables matching
14369         Beta2. 
14370
14371         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
14372