2004-09-06 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
1 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
2
3         * object.c (arith_overflow): Fix warning.
4
5         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
6         calling conventions in method refs. Fixes #65352.
7
8         * reflection.c: Fix warnings.
9
10 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
11
12         * object.c: When allocating an array, we have to throw
13         an overflow exception if any of the lengths are < 0.
14
15 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
16
17         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
18         properly. Also move implementation of string array marshalling to 
19         managed code. Fixes #42316.
20
21 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22
23         * assembly.c: provide more information when loading an assembly fails.
24
25 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26
27         * filewatcher.c: don't expect the development fam package to be
28         installed.
29
30 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
31
32         * marshal.c: Make a copy of the signature cookie since it will be
33         freed by the caller.
34         
35         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
36
37         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
38
39         * metadata.c (mono_metadata_free_marshal_spec): New function to free
40         marshal specs.
41
42         * marshal.c: More refactoring.
43         
44         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
45         smaller functions.
46
47 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
48
49         * object.c: In mono_message_invoke, fill the output parameter array after
50           calling the managed method (it was done before the call). This fixes
51           bug #59299.
52
53 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
54
55         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
56         as well.
57
58 2004-09-02  Martin Baulig  <martin@ximian.com>
59
60         * class.c (mono_class_instance_size): Don't allow generic type
61         definitions or open generic instances.
62         (mono_class_array_element_size): If we're a value type, call
63         mono_class_instance_size() on the original class.
64
65         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
66         handle generic instances.
67
68         * mono-debug-debugger.c (write_type): Handle generic instances
69         like classes.
70
71 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
72
73         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
74         the allocation request fails. Fixes #65089.
75
76         * object.c (mono_runtime_free_method): Do not call mono_free_method.
77         
78         * object.c (mono_runtime_free_method): New function to free a dynamic
79         method.
80
81         * marshal.c (mono_delegate_free_ftnptr): New function to free the
82         delegate trampoline.
83
84         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
85         with hasthis as dynamic,
86
87         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
88
89         * domain.c (mono_jit_info_table_remove): New function to remove an
90         entry from the jit info table.
91
92         * class-internals.h (MonoMethod): Add 'dynamic' field.
93
94         * loader.c: Fix warnings.
95
96 2004-09-01  Martin Baulig  <martin@ximian.com>
97
98         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
99         instead of mono_debugger_lock() because the latter one is a no-op
100         unless running in the debugger.
101
102 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
103
104         * class.c (class_compute_field_layout): Classes with auto-layout or
105         reference fields are not blittable.
106         
107 2004-09-01  Dick Porter  <dick@ximian.com>
108
109         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
110         mono_image_get_filename() to get the assembly location.
111
112         * icall.c:
113         * metadata.h: Fix compile warnings
114
115 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
116
117         * class.c (class_compute_field_layout): System.Object is blittable.
118
119         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
120         as in/out. Fixes #59909.
121
122 2004-09-01  Martin Baulig  <martin@ximian.com>
123
124         * metadata.h (MONO_TYPE_ISREFERENCE): Call
125         mono_metadata_generic_inst_is_valuetype() if we're a generic
126         instance to check whether our underlying type is a reference type.
127
128 2004-09-01  Martin Baulig  <martin@ximian.com>
129
130         * metadata.c (mono_type_size): If we're a generic instance, call
131         mono_class_value_size() for value types.
132
133 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
134
135         * marshal.c: Implement more custom marshalling functionality. Fixes
136         #64915.
137
138 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
139
140         * mono-debug.c, debug-mono-symfile.c: add some locking love.
141
142 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
143
144         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
145
146         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
147
148         * icall.c: Fix some warnings.
149
150         * threads.c (abort_appdomain_thread): Fix unref errors.
151         (mono_thread_current): Fix THREAD_DEBUG define.
152
153 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
154
155         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
156
157         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
158
159 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
160
161         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
162         string arrays.
163
164 2004-08-28  Martin Baulig  <martin@ximian.com>
165
166         * metadata.c
167         (mono_metadata_generic_inst_is_valuetype): New public function.
168
169         * metadata.h (MONO_TYPE_ISSTRUCT): Call
170         mono_metadata_generic_inst_is_valuetype() if we're a generic
171         instance to check whether our underlying type is a valuetype.
172
173 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
174
175         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
176         #63768.
177
178 2004-08-25  Martin Baulig  <martin@ximian.com>
179
180         * loader.c (mono_get_method_from_token): Abstract methods can also
181         be generic and thus have type parameters.
182
183         * metadata-internals.h
184         (MonoDynamicImage): Added `GPtrArray *gen_params'.
185
186         * reflection.c (mono_image_get_generic_param_info): Don't create a
187         metadata row, just add an entry to the `gen_params' array.
188         (build_compressed_metadata): Sort the `gen_params' array and then
189         actually create the metadata.
190
191 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
192
193         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
194
195 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
196
197         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
198
199 2004-08-24  Martin Baulig  <martin@ximian.com>
200
201         * class.cs (mono_class_is_subclass_of): Like an interface, a
202         generic instance also derives from System.Object.
203
204 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
205
206         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
207         custom modifiers to be in any order. Fixes #61990.
208
209 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
210
211         * object.c: Register mono_object_new_fast icall.
212         
213         * object.c (mono_class_get_allocation_ftn): Return to calling
214         mono_object_new_fast, since it seems faster to compute the object 
215         size in unmanaged code than passing it as a parameter.
216
217         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
218
219         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
220         this function with Boehm as the oom handler, so we don't have to check
221         the result of GC_malloc.
222
223         * object.c: Remove checks for oom.
224
225         * object.h object.c (mono_class_get_allocation_ftn): New function to
226         return the icall which can be used to allocate an instance of a given
227         class. 
228
229         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
230
231         * class-internals.h: Add 'enabled' field.
232
233 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
234
235         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
236
237 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
238         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
239         value 0x0010.
240
241 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
242
243         * appdomain.c: use the Tls function for appdomain too,
244         at Zoltan's request. Actually return in mono_context_get
245
246         * appdomain.c, profiler.c, threads.c: use __thread
247
248 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
249
250         * appdomain.c threads.c: Call GC_CreateThread on windows.
251
252         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
253         multiple libraries since this don't work on windows.
254
255 2004-08-18  Martin Baulig  <martin@ximian.com>
256
257         * class-internals.h
258         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
259         MonoMethodHeader.
260
261         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
262         MonoMethodNormal since we also need it for abstract and interface
263         methods.
264
265         * reflection.c
266         (build_compressed_metadata): Sort the GenericParam table.
267         (mono_image_create_token): Added `gboolean create_methodspec'
268         argument; this is false when generating a MethodImpl token.
269         (reflection_methodbuilder_to_mono_method): Abstract and interface
270         methods may also have generic parameters.
271
272 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
273
274         * appdomain.c: thread local alloc
275
276 2004-08-17  Martin Baulig  <martin@ximian.com>
277
278         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
279
280         * icall.c
281         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
282         argument.
283
284         * class.c (mono_type_get_full_name): New public function.
285         (mono_type_get_name): Don't include the type arguments.
286
287 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
288
289         * Makefile.am: Build static versions of libmetadata and libmonoruntime
290         for inclusion into the mono executable.
291
292 2004-08-16  Martin Baulig  <martin@ximian.com>
293
294         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
295         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
296
297 2004-08-14  Martin Baulig  <martin@ximian.com>
298
299         * class.c (dup_type): Also copy the `byref' field.
300
301 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
302
303         * reflection.c (create_dynamic_mono_image): Revert the last change 
304         since it breaks bootstrap.
305
306 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
307
308         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
309
310         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
311         not free them with g_free.
312
313 2004-08-11  Martin Baulig  <martin@ximian.com>
314
315         * reflection.c (mono_reflection_setup_internal_class): Also call
316         mono_class_setup_mono_type() if we already have a `tb->type.type'.
317
318 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
319
320         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
321         called during default (first) AppDomain creation. Keep track of
322         Evidence when loading assemblies.
323
324 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
325
326         * opcodes.c, opcodes.h: reduce runtime relocations.
327
328 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
329
330         * culture-info.h, locales.c: fixes and chages to sue the new
331         optimized format of the locale data.
332         * culture-info-tables.h: regenerated.
333
334 2004-08-06  Geoff Norton <gnorton@customerdna.com>
335         
336         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
337
338 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
339
340         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
341         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
342         * domain-internals.h: icall declaration.
343         * icall.c: icall registration.
344         * object-internals.h: New fields in MonoAssembly for CAS.
345
346 2004-08-05  Duncan Mak  <duncan@ximian.com>
347
348         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
349         CEE_LDELEM_ANY.
350
351 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
352
353         * reflection.c: fix to deal with object[] arrays in custom ctors
354         (bug #62550).
355
356 2004-08-05  Martin Baulig  <martin@ximian.com>
357
358         * class.c (mono_class_array_element_size): Added support for
359         generic instances and correctly handle "recursive" types.
360
361 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
362
363         * assembly.c: Fix warnings.
364
365 2004-08-04  Martin Baulig  <martin@ximian.com>
366
367         * class.c
368         (mono_type_get_name_recurse): Added `gboolean include_arity'
369         argument specifying whether or not we should include the generic
370         arity in the type name.
371         (_mono_type_get_name): New static function.
372         (mono_class_setup_vtable): If we're a generic instance, don't
373         include the generic arity in the names of explicit method
374         implementations.        
375
376 2004-08-03  Martin Baulig  <martin@ximian.com>
377
378         * class.c (mono_type_get_name_recurse): Enclose the generic type
379         arguments in `<', '>'.
380
381 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
382
383         * gc.c: make GC warning messages use the trace API, they are just
384         noise to most of the users.
385
386 2004-08-03  Martin Baulig  <martin@ximian.com>
387
388         * debug-mono-symfile.c (read_string): Correctly read the string.
389
390 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
391
392         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
393         
394         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
395         icalls.
396         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
397
398 2004-07-30  Martin Baulig  <martin@ximian.com>
399
400         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
401         Reflect latest symbol writer changes.   
402
403 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
404
405         * object.c: always create an object if null is passed
406         to Invoke() where a valuetype is expected.
407
408 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
409
410         * marshal.c (mono_marshal_init): make managed
411         signatures match native ones better for 64bits.
412
413 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
414
415         * appdomain.c: hack to build correctly the private bin path on windows.
416         Fixes bug #61991.
417
418 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
419
420         * assembly.c: Load mscorlib from the correct framework directory
421           (mono/<version>/mscorlib.dll).
422         * appdomain.h: Added prototypes for new functions.
423         * internals.h: Added some prototypes.
424         * domain.c: When initializing the runtime, get from the executable and
425           the configuration files the runtime version that the app supports.
426           Added support methods for reading app.exe.config. Added list of versions
427           supported by the JIT. Added two new methods: mono_init_from_assembly,
428           which initializes the runtime and determines the required version from
429           the provided exe file, and mono_init_version, which initializes
430           the runtime using the provided version.
431         * icall.c: Get machine.config from version-specific directory.
432         * reflection.c: When generating an image, embed the version number
433           of the current runtime.
434
435 2004-07-28  Dick Porter  <dick@ximian.com>
436
437         * socket-io.c
438         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
439         returned sockaddr size before creating the remote address object.
440         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
441         61608.
442
443 2004-07-28  Dick Porter  <dick@ximian.com>
444
445         * locales.c (string_invariant_compare_char): Fix invariant char
446         compares between upper and lower cases.  Fixes bug 61458.
447
448 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
449         
450         * marshal.c: actually cache stelem.ref wrappers.
451         
452 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
453
454         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
455         sections and remove the mono_cli_rva_map () function.
456
457 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
458
459         * debug-mono-symfile.c: fix one more endianess issue, from a patch
460         by Geoff Norton (<gnorton@customerdna.com>).
461
462 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
463
464         * class.c: fix class loads for pointer types (typeof(int) !=
465         typeof(int*)).
466
467 2004-07-27  Martin Baulig  <martin@ximian.com>
468
469         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
470         reading the debugging information from an external ".mdb" file.
471
472 2004-07-24  Martin Baulig  <martin@ximian.com>
473
474         * reflection.c (mono_image_get_type_info): Only write a class
475         layout entry if we actually have a size or a packing size.
476
477 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
478
479         * reflection.c (type_get_fully_qualified_name): 
480         insert cast to get type checking of ?: with non-gcc compilers
481
482 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
483
484         * rand.c: use g_getenv for both lookups of
485         MONO_EGD_SOCKET
486
487 2004-07-17  Martin Baulig  <martin@ximian.com>
488
489         * reflection.c (mono_reflection_bind_generic_method_parameters):
490         Set `gmethod->reflection_info'.
491
492 2004-07-17  Martin Baulig  <martin@ximian.com>
493
494         * class.c (mono_class_create_from_typedef): Insert the newly
495         created class into the hash table before computing the interfaces
496         since we could be called recursively.
497
498 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
499
500         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
501         function to implement stelem.ref in managed code
502         * class-internals.h, debug-helpers.c: a new wrapper type
503         for the above.
504
505 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
506
507         * gc.c: allow GC handles to work even when no GC is compiled in.
508         Fix part of bug #61134 (GetAddrOfPinnedObject).
509
510 2004-07-13  Peter Williams  <peter@newton.cx>
511  
512         * process.c (complete_path): Make sure we don't attempt to execute
513         directories.
514  
515 2004-07-12  Geoff Norton <gnorton@customerdna.com>
516
517         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
518           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
519           and will add/subtract the hour if needed
520
521 2004-07-12  Martin Baulig  <martin@ximian.com>
522
523         * reflection.c (mono_field_get_object): If we have
524         `field->generic_info', take the attributes from
525         `field->generic_info->generic_type'.    
526
527 2004-07-12  Martin Baulig  <martin@ximian.com>
528
529         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
530         This function must be called before initializing the runtime.
531         (mono_debug_init_1): New function; call this after initializing
532         the runtime, but before loading the assembly.  It tells the
533         debugger to load corlib and the builtin types.
534
535         * mono-debug-debugger.c: Did some larger changes in the debugging
536         code; support recursive class declarations, make sure we actually
537         add all classes.
538
539 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
540
541         * debug-helpers.c: undo my previous patch and fixed the real issue in
542         ../mini/exceptions-x86.c
543
544 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
545
546         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
547         when no HOME env. variable was set and a NullRef was thrown in a .cctor
548         called from other .cctors.
549
550 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
551
552         * loader.c: Removed the mono_loader_wine_init hack now that we are
553         doing a managed version of Windows.Forms.
554
555 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
556
557         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
558         threadpool.c, threads.c: remove static data from rootset.
559
560 2004-07-09  Dick Porter  <dick@ximian.com>
561
562         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
563         Don't do any more processing if the matched length was 0.  It was
564         increasing the size of the string before.  Fixes bug 61167.
565
566 2004-07-09  Dick Porter  <dick@ximian.com>
567
568         * socket-io.h:
569         * socket-io.c
570         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
571         Add support for SO_PEERCRED if its available.
572
573 2004-07-09  Peter Bartok <pbartok@novell.com>
574         * loader.c: winelib.exe.so error message is now only displayed if
575         MONO_DEBUG is set. To help us avoid questions when people are trying
576         out the new Managed.Windows.Forms.
577
578 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
579
580         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
581         for isinst and castclass wrappers.
582
583         * class-internals.h icall.c: Move registration and lookup of JIT icalls
584         to libmetadata from the JIT, so they could be used by the marshalling
585         code and the interpreter.
586
587         * marshal.c: Register marshalling related JIT icalls here instead of
588         in mini.c. Use CEE_MONO_ICALL instead of the family of 
589         CEE_MONO_PROC<x> opcodes to call marshalling functions.
590
591         * metadata.h: Remove unneeded marshalling conversions.
592
593         * opcodes.c: Update for new opcodes.
594         
595 2004-07-08  Martin Baulig  <martin@ximian.com>
596
597         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
598         (mono_debug_get_domain_data): Make this function static.
599
600 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
601
602         * gc.c, object.h: add nice GC handle API for embedders.
603
604 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
605
606         * reflection.c: more changes for the new api
607
608         * object.c: When we reflect on a field w/ a constant value, it
609         will not have a memory location, so we must access metadata. Also,
610         allow easier reading of strings so that we can read them from
611         the constant data.
612
613         * class.c (mono_class_layout_fields): no need for literal fields here.
614
615         * class-internals.h: api changes for const fields
616
617         * icall.c (ves_icall_get_enum_info): use new apis for const fields
618
619 2004-07-06  Martin Baulig  <martin@ximian.com>
620
621         * mono-debug.h: Increment version number to 44.
622
623         * mono-debug.c (mono_debug_add_wrapper): The second argument is
624         now a gpointer, rewrote this whole method.
625
626         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
627         function.  Add information about the wrapper in a new "misc table".
628
629         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
630         for the new misc table.
631
632 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
633
634         * metadata-internals.h image.c: Add a cache for helper signatures.
635
636         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
637
638 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
639
640         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
641         delegates from a delegate. Fixes #61033.
642         
643         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
644         marshalling of stringbuilder arrays. Fixes #59900.
645
646 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
647
648         * icall.c: Add EnumBuilder:setup_enum_type icall.
649
650 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
651
652         * icall.c: Added a new icall for the property version of
653         OffsetOfStringData.
654
655 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
656
657         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
658         it has a constant size across platforms.
659
660         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
661         stack trace.
662
663 2004-06-29  Martin Baulig  <martin@ximian.com>
664
665         * mono-debug.c (mono_debug_add_method): Protect the whole function
666         in mono_debugger_lock(), not just parts of it.
667
668 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
669
670         * reflection.c: make sure padding bytes in heaps are zeroed.
671
672 2004-06-24  David Waite  <mass@akuma.org>
673
674         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
675         image.c, loader.c, locales.c, marshal.c, metadata.c,
676         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
677         string-icalls.c, threads.c: change to C90-style comments from C99 /
678         C++ -style
679
680 2004-06-24  Dick Porter  <dick@ximian.com>
681
682         * threads.c
683         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
684         return createdNew.  Fixes bug 60412.
685
686         * threads-types.h: 
687         * icall.c: Add createdNew parameter to CreateMutex icall
688
689 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
690
691         * reflection.c, object-internals.h: save default value in params.
692
693 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
694
695         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
696         no need to build a new path combining that with the application base.
697         Fixes bug #60442.
698
699 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
700
701         * reflection.c: fixed minor standard compliance issues.
702
703 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
704
705         * reflection.c: fixed issue with encoding some custom attributes
706         (arrays in properties and fields, bug #60411).
707
708 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
709
710         * reflection.c: fix start address when copying the public key token.
711
712 2004-06-23  Martin Baulig  <martin@ximian.com>
713
714         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
715         the `exc' object in a static object to put it into the GC's root set.
716
717 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
718
719         * reflection.c: make mono_reflection_setup_internal_class ()
720         callable a second time to setup a new parent class.
721
722 2004-06-23  Dick Porter  <dick@ximian.com>
723
724         * threads.c: Check for WAIT_IO_COMPLETION return values.
725
726 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
727
728         * appdomain.c: Removed the g_free on the public key token. Now copy 
729         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
730         * assembly.c: Added public key token string value when loading 
731         assemblies. Fix bug #60439.
732         * icall.c: Added missing informations (like public key) in 
733         GetReferencedAssemblies. Fix #60519.
734         * image.h: Changed definition for public key token from const char*
735         public_tok_value to guchar public_key_token [17];
736         * reflection.c: Updated for changes to public key token.
737
738 2004-06-22  Lluis Sanchez Gual
739
740         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
741         for the field in base classes.
742
743 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
744
745         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
746         mark headers as not supported, they are installed only for use by the
747         debugger.
748
749 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
750
751         * *.c, *.h: avoid namespace pollution in public headers.
752
753 2004-06-21  Martin Baulig  <martin@ximian.com>
754
755         * exception.c (mono_get_exception_security): It's in
756         "System.Security", not in "System".
757
758         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
759         the exception classes.
760
761 2004-06-21  Martin Baulig  <martin@ximian.com>
762
763         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
764         Protect the exception object from being finalized.
765
766 2004-06-21  Martin Baulig  <martin@ximian.com>
767
768         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
769         public function.
770
771 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
772
773         * reflection.c: Load the assembly in mono_reflection_type_from_name,
774         if it was not loaded before. Fix parts of #60439.
775
776 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
777
778         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
779         code that was broken since Ben's change: wrappers are now
780         dependent on the method signature only again.
781
782 2004-06-21  Martin Baulig  <martin@ximian.com>
783
784         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
785         added interface support.
786
787 2004-06-21  Martin Baulig  <martin@ximian.com>
788
789         * class.c (mono_vtable_get_static_field_data): New public method.
790
791 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
792
793         * filewatcher.c : Windows build fix to be compliant with API changes.
794
795 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
796
797         * class.h, class.c: more accessors.
798         * metadata.h, metadata.c: prepare for hiding MonoType and
799         MonoMethodSignature: people should use the accessors from now on
800         outside of the tree.
801
802 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
803
804         * *.c, *.h: more API cleanups.
805
806 2004-06-18  Jackson Harper  <jackson@ximian.com>
807
808         * assembly.c: Trace loading assemblies.
809         * loader.c: Trace loading native libraries.
810         * mono-config.c: Trace loading config files.
811         
812 2004-06-18  Dick Porter  <dick@ximian.com>
813
814         * locales.c: Tell ICU the lengths of strings, it can cope with
815         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
816
817 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
818
819         * image.c: swapped name/filename;
820
821 2004-06-18  Martin Baulig  <martin@ximian.com>
822
823         * mono-debug-debugger.c (write_class): Write the parent class at
824         the end of the header.
825
826 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
827
828         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
829
830 2004-06-17  Raja R Harinath  <rharinath@novell.com>
831
832         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
833         (bundle_obj): New conditional define.
834         (BUILT_SOURCES): Remove.
835         ($(bundle_srcs)): Make parallel-make safe.
836         (libmonoruntime_la_LIBADD): Make unconditional.
837         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
838         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
839
840 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
841
842         * culture-info-tables.h: It was inconsistent with the latest
843           supp info files.
844
845 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
846
847         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
848         be loaded.
849
850         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
851         with gcc 2.95.
852
853 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
854
855         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
856         cleaned up public header threads.h.
857
858 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
859
860         * Makefile.am, *.c, *.h: more API cleanups.
861
862 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
863
864         * Makefile.am: removed monosn from compilation.
865         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
866         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
867         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
868         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
869         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
870         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
871
872 2004-06-15  Jackson Harper  <jackson@ximian.com>
873
874         * assembly.c: Make locales lower case when searching the GAC for
875         assemblies. gacutil will always make locales lowercase when
876         installing so this effectively makes them case insensitive.
877         
878 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
879
880         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
881         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
882           parameter which allows to choose whether the wait can be interrupted or 
883           not. Also added the method mono_monitor_enter(), which locks the monitor
884           using an infinite wait and without allowing interruption.
885           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
886           interrupted.
887         * object.h: Added new fields in MonoThread. suspend_event holds the event
888           used to susped/resume the thread. synch_lock is the lock object to use for
889           modifying the thread state.
890         * threads.c: Use the new synch_lock object for locking, instead of "this",
891           which can generate deadlocks.
892           Moved thread state change in Thread.Sleep and Thread.Join from managed
893           to unmanaged code. This avoids a deadlock when the thread was suspended
894           just after acquiring the thread lock.
895           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
896           Implemented Thread.Suspend using an event instead of ThreadSuspend,
897           which is not fully implemented in the io-layer.
898         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
899
900 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
901
902         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
903         threads-types.h: more API cleanups.
904
905 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
906
907         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
908         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
909         threadpool.c, threads.c: first pass at the exported API cleanup.
910
911 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
912
913         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
914
915 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
916
917         * icall.c: added internalGetHome.
918
919 2004-06-14  Dick Porter  <dick@ximian.com>
920
921         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
922         possible to return successfully when '.' or '..' were the only
923         entries in a directory, but were skipped.  The MonoIOStat was not
924         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
925         Fixes bug 59574.
926
927 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
928
929         * reflection.c: make binaries run on .Net 1.1 by default.
930
931 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
932
933         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
934
935 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
936
937         * marshal.c: keep track of struct size with explicit layout
938         (bug #59979).
939
940 2004-06-12  Martin Baulig  <martin@ximian.com>
941
942         * mono-debug-debugger.c: Comment out a debugging g_message().
943
944 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
945
946         * reflection.c, reflection.h: do not free custom attrs that are cached.
947         * icall.c: use braces to make code clearer.
948
949 2004-06-11  Martin Baulig  <martin@ximian.com>
950
951         * class.h (MonoInflatedField): New type.
952         (MonoClassField): Replaced `MonoType *generic_type' with
953         `MonoInflatedField *generic_info'.
954
955         * icall.c
956         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
957
958 2004-06-11  Martin Baulig  <martin@ximian.com>
959
960         * reflection.c (mono_image_create_method_token): Correctly encode
961         varargs methods.
962
963 2004-06-11  Martin Baulig  <martin@ximian.com>
964
965         * metadata.c (mono_metadata_parse_method_signature): When parsing
966         a MethodDef which has VarArgs, also set sentinelpos if we don't
967         have any parameters.
968
969 2004-06-11  Martin Baulig  <martin@ximian.com>
970
971         * verify.c (mono_method_verify): In CEE_CALL, use
972         mono_method_get_signature() to get the method's signature, unless
973         we're a PInvoke method.
974
975 2004-06-10  Jackson Harper  <jackson@ximian.com>
976
977         * assembly.c: Use <path>/lib/mono/gac for the extra paths
978         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
979         logical name as the supplied path is just a prefix to the gac not
980         the direct path to it.
981         
982 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
983
984         * reflection.c: make the token for a created method match
985         the token of the MethodBuilder it was created from
986         (IKVM requires this behaviour now).
987
988 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
989
990         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
991         reflection.c, socket-io.c: leak fixes.
992
993 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
994
995         * icall.c: handle sentinel pos in vararg methods in position different
996         from 0.
997
998 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
999
1000         * culture-info-tables.h: freshly generated.
1001
1002 2004-06-09  Martin Baulig  <martin@ximian.com>
1003
1004         * loader.c (mono_get_method_constrained): Call `mono_class_init
1005         (constrained_class)'.   
1006
1007 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
1008
1009         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
1010         any methods. Fixes #59629.
1011
1012 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1013
1014         * culture-info-tables.h: reflecting locale-builder updates.
1015
1016 2004-06-08  Dick Porter  <dick@ximian.com>
1017
1018         * object.h:
1019         * locales.c: Fixed compile warnings, including a real bug in
1020         CompareInfo_internal_compare.
1021         
1022 2004-06-08  Dick Porter  <dick@ximian.com>
1023
1024         * locales.c
1025         (ves_icall_System_Globalization_CompareInfo_internal_index):
1026         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1027         Double-check the resuls of usearches, because ICU currently
1028         ignores most of the collator settings here.  Fixes bug 59720.
1029         
1030 2004-06-08  Dick Porter  <dick@ximian.com>
1031
1032         * locales.c
1033         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1034         Fix memory leak and segfault-causing typo.  No idea how this one
1035         lasted so long without being noticed.
1036
1037 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
1038
1039         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
1040         any methods. Fixes #59629.
1041
1042 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1043
1044         * assembly.c:
1045         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
1046         own the critical section before). Removed dead code (that's done
1047         in the preload hook).
1048
1049         (mono_assembly_load_with_partial_name): call the preload hook.
1050
1051 2004-06-08  Martin Baulig  <martin@ximian.com>
1052
1053         * metadata.c (mono_metadata_signature_alloc): Default
1054         `sentinelpos' to -1.
1055
1056         * reflection.c (mono_image_get_array_token): Likewise.
1057
1058 2004-06-08  Martin Baulig  <martin@ximian.com>
1059
1060         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
1061
1062         * metadata.c (mono_metadata_parse_method_signature): When parsing
1063         a MethodDef which has VarArgs, set sentinelpos.
1064
1065         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
1066         `gint16' since we're using -1 for non-varargs methods.
1067
1068         * reflection.c
1069         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
1070         (method_encode_signature): Added varargs support.
1071         (method_builder_encode_signature): Likewise.
1072         (mono_image_get_varargs_method_token): New static method.
1073         (mono_image_create_method_token): New public method; this is
1074         called via an icall instead of mono_image_create_token() when
1075         calling a varargs method.       
1076
1077 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
1078
1079         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
1080
1081 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1082
1083         * culture-info-tables.h : Reflecting the latest locale-builder that
1084           fixed empty array representation ({} to {0}).
1085
1086 2004-06-07  Jackson Harper  <jackson@ximian.com>
1087
1088         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
1089         looking up extra gac paths. This allows MONO_GAC_PATH to act
1090         exactly like a prefix.
1091         
1092 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
1093
1094         * reflection.c (mono_reflection_type_from_name): Make a copy of the
1095         type name before modifying it. Fixes #59405.
1096
1097 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1098
1099         * culture-info.h: added fields for "all datetime patterns".
1100         * locales.c: (  ves_icall_System_Globalization_CultureInfo
1101           _construct_datetime_format ()): fill xxx_patterns fields.
1102         * object.h: added fields for "all datetime patterns" to
1103           MonoDateTimeFormatInfo.
1104         * culture-info-tables.h: reflecting locale-builder updates.
1105
1106 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
1107
1108         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
1109         the event has no add and remove methods. Fixes #59629.
1110
1111 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
1112
1113         * object.c: Fixed possible integer overflow when allocating large
1114         strings.
1115
1116 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
1117
1118         * culture-info-tables.h: reflecting locale-builder updates.
1119
1120 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
1121
1122         * culture-info-tables.h: reflecting locale-builder updates.
1123
1124 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
1125
1126         * culture-info-tables.h: reflecting locale-builder updates.
1127
1128 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
1129
1130         * threads.c: Made Thread.Sleep abortable.
1131
1132 2004-06-02  Martin Baulig  <martin@ximian.com>
1133
1134         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
1135
1136         * debug-mono-symfile.h: Bumped symbol file version number to 37.
1137
1138 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
1139
1140         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
1141
1142 2004-05-30  Jackson Harper  <jackson@ximian.com>
1143
1144         * reflection.c: Do not hardcode assembly versions or public key
1145         tokens anymore. All of this except the corlib section was dead
1146         code anyways.
1147         
1148 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
1149
1150         * object.c (mono_runtime_invoke_array): Automatically create boxed
1151         objects for byref valuetypes if needed. Fixes #59300.
1152         
1153         * object.c (mono_method_return_message_restore): Handle 
1154         MONO_TYPE_OBJECT as well.
1155
1156 2004-05-28  Jackson Harper  <jackson@ximian.com>
1157
1158         * reflection.c: The modified type encoding was causing build
1159         problems. Reverted for now.
1160         
1161 2004-05-28  Jackson Harper  <jackson@ximian.com>
1162
1163         * reflection.c/h: Take an assembly ref so that we dont create
1164         fully qualified names when encoding types in the same assembly as
1165         the custom attribute being emitted.
1166         * appdomain.c: Increment version number.
1167         
1168 2004-05-26  Duncan Mak  <duncan@ximian.com>
1169
1170         * icall.c
1171         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1172         Set the full version number (major, minor, build, revision).
1173
1174 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
1175
1176         * marshal.c (emit_struct_conv): increment src/dst after blit
1177         (mono_marshal_get_managed_wrapper,
1178         mono_marshal_get_native_wrapper): make sure we have marshalling
1179         info before marshalling params (info computation affects
1180         blittable)
1181
1182         * class.c (class_compute_field_layout): correctly deal with
1183         blittable
1184         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
1185         value types (as per what windows dows by default)
1186         (mono_class_setup_mono_type): System.ValueType is blittable
1187         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
1188         blittable
1189
1190         * marshal.c (mono_marshal_load_type_info): flag types  as
1191         non-blittable if the native layout doesn't match the managed
1192         layout
1193
1194 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1195
1196         * appdomain.c: don't add stuff in the private search path that is
1197         above the application base. If application base is not set, there's
1198         no private search path.
1199
1200 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
1201
1202         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
1203         byref struct arguments in native->managed marshalling.
1204
1205 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
1206
1207         * marshal.c (mono_marshal_get_runtime_invoke): correctly
1208         cache methods using signature (special case for methods
1209         that are value type or string class)
1210         
1211         * image.c (mono_image_close): clean up allocated GSList's
1212         in runtime_invoke_cache.
1213
1214 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1215
1216         * mono-config.c: set the correct path for mono_cfg_dir on windows when
1217         there's no MONO_CFG_DIR environment variable defined.
1218
1219 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1220
1221         * threads.c: windows version must be >= 0x0500 to include OpenThread.
1222
1223 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
1224
1225         * threadpool.c: Really wait for 500ms after the async call, even if the wait
1226           is interrumped.
1227         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
1228           before waiting for it, and call CloseHandle after the wait to unref it.
1229           This will make sure that handles are not disposed too early.
1230
1231 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1232
1233         * appdomain.c:
1234         * appdomain.h:
1235         * icall.c: removed
1236         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
1237         needed now.
1238
1239         * object.c: se the application_base only for the domain that runs
1240         Main. Fixes bug #59216,
1241
1242 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1243
1244         * appdomain.c:
1245         * object.c: only the domain in which Main is run have
1246         SetupInformation.ConfigurationFile set, so moved a few lines from
1247         appdomain.c to object.c.
1248
1249 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1250
1251         * appdomain.c: we tried to load [name].(dll|exe), but according
1252         to bug #57710, we must also try [culture]/[name].(dll|exe) and
1253         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
1254         There's a test case attached to bug #58922.
1255
1256 2004-05-27  Dick Porter  <dick@ximian.com>
1257
1258         * icall.c:
1259         * file-io.c: Implemented icalls for locking and unlocking regions
1260         in a file.
1261         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
1262         FALSE on error (fixes both compiler warning and real bug.)
1263
1264 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
1265
1266         * culture-info-tables.h: reflecting locale-builder updates.
1267
1268           (Added missing ChangeLog entry for 05/26)
1269
1270 2004-05-27  Jackson Harper  <jackson@ximian.com>
1271
1272         * locales.c: Fix some cut and paste errors.
1273         
1274 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1275
1276         * mono-config.c: set the correct path for config. directory on windows.
1277
1278 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1279
1280         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
1281           on win32.
1282
1283 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1284
1285         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
1286         from pinvoke functions.
1287         
1288         * marshal.c (mono_ftnptr_to_delegate): Implement this.
1289
1290 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1291
1292         * culture-info-tables.h: reflecting locale-builder updates.
1293
1294 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1295
1296         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
1297         #59086.
1298
1299 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
1300
1301         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
1302         * icall.c: Modified icalls for RNG.
1303         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
1304         Windows (CryptoAPI).
1305
1306 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1307
1308         * locales.c: Fix build.
1309
1310 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1311
1312         * culture-info-tables.h: reflecting locale-builder updates.
1313
1314 2004-05-25  Jackson Harper  <jackson@ximian.com>
1315
1316         * locales.c: When creating the current culture use the $LANGs
1317         specific culture. So DateTimeFormat and NumberFormat entries are created.
1318         
1319 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1320
1321         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
1322         a char array as parameter.
1323
1324 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
1325
1326         * image.c: In mono_image_open(), always use an absolute path name to
1327           look for already loaded images.
1328
1329 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
1330
1331         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
1332         missing in the windows build (like older cygwin include files).
1333
1334 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
1335
1336         * icall.c: Fixed check for possible integer overflow in Buffer_
1337         BlockCopy icall. Replaced comments style // by /* */.
1338
1339 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
1340
1341         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
1342         
1343         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
1344         check after MONO_VTADDR. Fixes pinvoke2.exe.
1345
1346         * marshal.h marshal.c metadata.h: Add beginnings of support for
1347         ftnptr -> delegate marshalling.
1348
1349 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
1350
1351         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
1352         * threads.c: Fix warnings.
1353
1354 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
1355
1356         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
1357         * icall.c: Registered icalls for Suspend and Resume.
1358         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
1359           Thread.Abort.
1360         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
1361         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
1362         * process.c: Use WaitForSingleObjectEx.
1363         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
1364           checkpoints.
1365         * threads.c, threads.h: Make use of new Ex wait methods. Improved
1366           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
1367           for Suspend and Resume. Added new mono_thread_stop, used for stoping
1368           background threads. Added basic support for Abort in Windows.
1369           Start new threads using a managed delegate invoke wrapper. This wrapper
1370           has an interruption checkpoint that is needed since an interruption
1371           can be requested before the thread leaves the unmanaged code that starts 
1372           the thread.
1373         * marshal.c: Added interruption checkpoint after every native call, and
1374           also before managed calls for wrappers called from unmanaged code to
1375           go into managed code.
1376         * object.h: Added new field in MonoThread to keep track of interruption
1377           requests.
1378
1379 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
1380
1381         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
1382         calls.
1383
1384 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1385
1386         * appdomain.c:
1387         * assembly.c:
1388         * gc.c:
1389         * locales.c:
1390         * mono-config.c:
1391         * rand.c: getenv -> g_getenv (windows!)
1392
1393         * process.c: complete_path is also used on non-windows platforms.
1394
1395 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1396
1397         * icall.c: new signature for Process_Start.
1398
1399         * process.[ch]: new signature for Process_Start. If we're on windows
1400         and UseShellExecute is false, we have to search for the program by
1401         ourselves if we don't get a full path.
1402
1403 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
1404
1405         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
1406         marshalling and call CleanUpNativeData if needed. Fixes #58646.
1407
1408 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1409
1410         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
1411         Fixes bug #58373.
1412
1413 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1414
1415         * process.c: use double quotes to quote program name and arguments on
1416         windows. Fixes bug #58575.
1417
1418 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1419
1420         * file-io.c: don't return "." and ".." when using windows Find*File.
1421
1422 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
1423
1424         * marshal.c: Don't pass wrappers to message init because method 
1425         addressed used to lookup metadata. part of remoting[2|3] fix.
1426
1427 2004-05-15  Jackson Harper  <jackson@ximian.com>
1428
1429         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
1430         path is essentially the same as MONO_PATH except that it points to
1431         GACs instead of lib directories.
1432         * loader.h: The user gac is gone so we dont need function to
1433         enable/disable it.
1434         * mono-config.c: user gac option is now gone.
1435         
1436 2004-05-15  Jackson Harper  <jackson@ximian.com>
1437
1438         * culture-info.h: Make defines more consistent, add calendar data
1439         to the culture info table.
1440         * culture-info-tables.h: Add basic calendar data. Basically
1441         everyone gets default gregorian until all the data is
1442         updated.
1443         * locales.c: Use the new consistent defines. Set calendar data for
1444         culture info objects.
1445         * object.h: add a field for calendar data to CultureInfo
1446         
1447 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
1448
1449         * image.c: image->runtime_invoke_cache is keyed on signatures now.
1450         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
1451         a signature.
1452         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
1453         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
1454         an extra param that is the pointer of the method to invoke. The IL for
1455         the invoke method is no longer specific to the method, but to the
1456         signature of the method. Thus, we can share the same code for multiple
1457         methods. This reduces the number of methods that have to be compiled.
1458
1459 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
1460
1461         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
1462
1463         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1464
1465         * icall.c: Optimize Buffer.BlockCopy.
1466
1467 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1468
1469         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
1470         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
1471         quote). Changed them to "MMMM yyyy".
1472
1473 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
1474
1475         * rand.c
1476         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
1477
1478 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
1479
1480         * reflection.h: Updated after changes to managed structures.
1481
1482         * appdomain.c: Bump corlib version.
1483
1484 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1485
1486         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
1487         windows.
1488
1489 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1490
1491         * Makefile.am: link to ../os/libmonoos.la on windows.
1492
1493         * assembly.c:
1494                 -If MONO_DEBUG, warn about non-existing directories in
1495                 MONO_PATH.
1496                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
1497                 compile time variable.
1498                 -Removed init_default_path and call mono_set_rootdir from
1499                 libmonoos.a instead (windows only).
1500
1501         * assembly.h: declare mono_assembly_getrootdir().
1502
1503         * domain.c:
1504         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
1505
1506         * loader.c: s/getenv/g_getenv/
1507
1508 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
1509
1510         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
1511
1512         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
1513
1514         * metadata.h: Add new marshalling conversions.
1515
1516         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
1517         function.
1518
1519         * reflection.c (mono_reflection_get_type): Lookup the type in all
1520         modules of a multi-module assembly. Fixes #58291.
1521
1522 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
1523
1524         * threads.c: Before aborting a background, set the StopRequested
1525         state.  This avoids throwing the Abort exception.
1526         In mono_thread_manage, don't continue with the shutdown until all
1527         aborted threads have actually stopped.
1528
1529 2004-05-10  Jackson Harper  <jackson@ximian.com>
1530
1531         * locales.c: Remove the modifier from culture names.
1532         
1533 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1534
1535         * Makefile.am: monosn is not installed any more. It has been deprecated
1536         in favor of sn.
1537
1538 2004-05-07  Jackson Harper  <jackson@ximian.com>
1539
1540         * locales.c
1541         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
1542         Fix array construction, add bailout if the length is 0.
1543
1544 2004-05-07  Dick Porter  <dick@ximian.com>
1545
1546         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
1547         machine doesn't have a DNS entry.  Patch by Urs Muff
1548         (umuff@quark.com), fixes bug 57928.
1549
1550 2004-05-06  Jackson Harper  <jackson@ximian.com>
1551
1552         * reflection.c: Handle null PublicTokens properly. alloc mem for
1553         assembly names culture so we dont crash when freeing it.
1554         
1555 2004-05-06  Jackson Harper  <jackson@ximian.com>
1556
1557         * assembly.c: Check the usergac when loading with partial names.
1558         
1559 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
1560
1561         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
1562         does nothing for now (not required for Linux/Windows) but the class
1563         library can call it (and a newer or modified runtime could need it).
1564         * icall.c: Registred icall.
1565
1566 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1567
1568         * loader.c: prints a message on module loading error we set MONO_DEBUG
1569         environment variable.
1570
1571 2004-05-05  Jackson Harper  <jackson@ximian.com>
1572
1573         * appdomain.c: Handle PublicKeyToken=null properly.
1574         
1575 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
1576
1577         * environment.c|h: Added icall ves_icall_System_Environment_
1578         GetOSVersionString to get the current OS version as a string.
1579         * icall.c: Registred icall.
1580
1581 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
1582
1583         * object.c: in mono_object_get_virtual_method(), take into account that
1584         non-virtual methods don't have a slot in the vtable. Check needed when
1585         the object is a proxy.
1586
1587 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
1588
1589         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
1590         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
1591
1592         * object.c (mono_class_compute_gc_descriptor): Fix warning.
1593
1594         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
1595         passed when a valuetype is expected.
1596
1597         * object.c (mono_unhandled_exception): Only set the exit code if the
1598         exception happens in the main thread. Fixes thread5.exe.
1599
1600         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
1601         invalid names. Fixes #58047.
1602
1603 2004-05-03  Jackson Harper  <jackson@ximian.com>
1604
1605         * assembly.c: This line was committed accidently and is unneeded.
1606         
1607 2004-05-03  Jackson Harper  <jackson@ximian.com>
1608
1609         * icall.c: Add new icall for Assembly::LoadWithPartialName
1610         * assembly.c/.h: new function that probes the GAC to load partial
1611         assembly names by Paolo Molaro.
1612         
1613 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1614
1615         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
1616         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
1617         (type_get_fully_qualified_name): Added PublicKeyToken when building a
1618         full type name.
1619
1620 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1621
1622         * appdomain.c: fixed check for 'neutral' culture and removed warning.
1623         * reflection.c: fix bug when parsing a full type name and Version is not
1624         the last thing in the string.
1625
1626 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
1627
1628         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
1629         crashes when it is freed.
1630
1631 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1632
1633         * assembly.c: print the compat warning to stderr.
1634
1635 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
1636
1637         * assembly.c (mono_assembly_load_references): Add a compatibility
1638         hack to run old applications that might be still referencing the
1639         3300-based assemblies, only do this for System.xxx.
1640
1641 2004-05-01  Jackson Harper  <jackson@ximian.com>
1642
1643         * appdomain.c: If the culture is neutral we set it to "".
1644         
1645 2004-04-29  Jackson Harper  <jackson@ximian.com>
1646
1647         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
1648
1649 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
1650  
1651         * string-icalls.c: added low overhead function for copying chars
1652         * icall.c: added needed icall for the above function
1653  
1654 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1655
1656         * icall.c: fix return value of get_global_assembly_cache.  Implemented
1657         Environment.GetLogicalDrives.
1658
1659 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
1660
1661         * rand.c: try and talk to egd or prngd
1662         for random bytes if opening devices fail.
1663
1664 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
1665
1666         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
1667         alignment for the type using the native alignment of its members 
1668         instead of using klass->min_align.
1669
1670         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
1671
1672 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1673
1674         * file-io.c:
1675         * socket-io.c: added check for sys/aio.h.
1676
1677 2004-04-28  Dick Porter  <dick@ximian.com>
1678
1679         * threads.c: Don't abort a thread thats already aborting, when
1680         terminating everything.
1681
1682 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1683
1684         * icall.c: added 2 new async calls for Socket.
1685
1686         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
1687         IO on *nix systems.
1688
1689         * threadpool.c: removed unused variable.
1690
1691 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
1692
1693         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
1694
1695 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
1696
1697         * locales.c: put back string_invariant_tolower () and
1698         string_invariant_toupper ().
1699
1700 2004-04-26 David Waite <mass@akuma.org>
1701
1702         * file-io.h:
1703         * socket-io.h:
1704         * threads.h:
1705         * unicode.h: remove comma from end of enumeration declarations
1706
1707 2004-04-26 David Waite <mass@akuma.org>
1708
1709         * debug-mono-symfile.h:
1710         * decimal.c:
1711         * mono_debug.h:
1712         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
1713
1714
1715 2004-04-26  Jackson Harper  <jackson@ximian.com>
1716
1717         * appdomain.c: Increment version number.
1718         
1719 2004-04-26  Jackson Harper  <jackson@ximian.com>
1720
1721         * appdomain.c: Set assembly references public token value when
1722         PublicKeyToken is specified, not the hash_value. Free public token
1723         values when free assembly name data. Previously the public key
1724         token was hex decoded, however we are using hex encoded public key
1725         tokens, so this is not neccasary.
1726         * assembly.c: Lookup assemblies in the gac if their public token
1727         value is set. Add function to allow enabling user gac
1728         lookups. Specify whether or not the assembly was loaded from the
1729         GAC. Compare full assembly names when checking the cache for
1730         assemblies (Temporarily disabled see comment in code). Remove
1731         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
1732         specifies trace-loader they get extra info to stdout on the
1733         loading of assemblies.
1734         * image.h: Add a field for an assembly references public token
1735         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
1736         whether an assembly has been loaded from the GAC.
1737         * image.c: Remove a corlib -> mscorlib name mapping.
1738         * loader.h: Add function to enable/disable the user gac.
1739         * mono-config.c: Check if the usergac is enabled in the config
1740         file.
1741         * icall.c: New icall to determine whether or not an assembly has
1742         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
1743         * tabldefs.h: Add constant for assemblyref flag that specifies a
1744         full public key is used instead of a public token.
1745         * reflection.c: Remove mscorlib -> corlib mappings. Set
1746         PublicTokenValue instead of hash value. This value is a hex
1747         string so it does not need to be expanded.
1748
1749 2004-04-26  Martin Baulig  <martin@ximian.com>
1750
1751         * mono-debug-debugger.c (mono_debugger_initialize): Set
1752         `mono_debugger_initialized' before calling mono_debug_lock().
1753
1754 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
1755
1756         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
1757           InternalToUpper/InternalToLower.
1758         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
1759           removed invariant culture shortcut.  This is now done in managed code.
1760         * locales.c: (string_invariant_toupper/tolower) removed.
1761
1762 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1763
1764         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
1765         Added Poll internal call.
1766
1767         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
1768         call for Poll. Select was too heavy for polling a single socket.
1769
1770         * threadpool.[ch]: added mono_threadpool_cleanup.
1771         * threads.c: use it. Don't use Thread_Abort on windows.
1772
1773 2004-04-23  Martin Baulig  <martin@ximian.com>
1774
1775         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
1776
1777 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
1778
1779         * icall.c: Registred new icalls for key pair protection and added an
1780         icall for Environment.GetFolderPath on Windows.
1781         * security.c|h: Added new icalls for key pair protection.
1782
1783 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1784
1785         * socket-io.c: don't display the non-supported family warning for known
1786         families. Now this is not displayed on windows when checking support
1787         for IPv4/IPv6.
1788
1789 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1790
1791         * class.c: don't display the layout warning for static fields.
1792
1793 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
1794
1795         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
1796         * locales.c, locales.h: Added new icalls for culture-specific
1797         Char.ToLower and Char.ToUpper.
1798
1799 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1800
1801         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
1802         by David Waite.
1803
1804 2004-04-20  Martin Baulig  <martin@ximian.com>
1805
1806         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
1807         of the type name before passing it to mono_reflection_type_from_name().
1808
1809 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
1810
1811         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
1812         encodings here. Fixes #56965.
1813
1814 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
1815
1816         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1817         fix test on strstr result not that I can see anything that
1818         relies on the result.
1819
1820 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
1821
1822         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
1823         Fixes #57081.
1824
1825         * marshal.c (mono_marshal_get_string_encoding): New helper function.
1826
1827         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
1828         function to determine which marshalling to use for strings. Fixes
1829         #56965.
1830
1831         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
1832
1833         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
1834
1835 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
1836
1837         * icall.c: #include mono-config.h
1838
1839 2004-04-15  Jackson Harper  <jackson@ximian.com>
1840
1841         * culture-info-tables.h: Fix date formats for en-US culture.
1842         
1843 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
1844
1845         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
1846         ThreadPool.SetMinThreads.
1847         * threadpool.c: Implemented ThreadPool.GetMinThreads and
1848         ThreadPool.SetMinThreads.
1849
1850 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1851
1852         * mono-config.c: also load the .config file in the directory
1853         where the assembly was found.
1854
1855 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
1856
1857         * assembly.c: load per-assembly config files.
1858         * icall.c: decrapified code to get the config dir and moved to
1859         mono-config.c.
1860         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
1861         per-assembly config files. When doing a dll map lookup give precedence
1862         to the per-assembly data.
1863
1864 2004-04-14  Martin Baulig  <martin@ximian.com>
1865
1866         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
1867         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
1868         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
1869
1870         * mono-debugger-debugger.c: While the debugger is locked, remember
1871         whether the symbol tables have changes and send one single
1872         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
1873
1874 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
1875
1876         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
1877
1878         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
1879         function.
1880
1881         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
1882         account when marshalling string arrays. Fixes #56965.
1883
1884 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
1885
1886         * icall.c: Add new icalls mapping for security.
1887         * security.c|h: Add internal calls for WindowsIdentity,
1888         WindowsImpersonationContext and WindowsPrincipal.
1889
1890 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
1891
1892         * class.c: Added comment to ensure the System.MonoDummy class
1893         is removed when no longer necessary
1894
1895 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
1896
1897         * appdomain.c: Pass arguments to the bootstraping exceptions to
1898         minimize JITed methods at boot
1899
1900         * metadata.c (mono_exception_from_name_two_strings): Allow for the
1901         second string to be null.
1902
1903         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1904         Change the protocol to minimize the JIT methods at startup.  Now
1905         it Returns the internal codepage, if the value of "int_code_page"
1906         is 1 at entry, and we can not compute a suitable code page
1907         number, returns the code page as a string.
1908
1909 2004-04-13  Jackson Harper  <jackson@ximian.com>
1910
1911         * culture-info-tables.h: Fix number of decimal digits for all
1912         english locales.
1913
1914 2004-04-13  Jackson Harper  <jackson@ximian.com>
1915
1916         * icall.c: Clairfy out of sync error message. It is not always
1917         your corlib that is out of sync.
1918
1919 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
1920
1921         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
1922         properties when only the set accessor is overriden. Fixes #55874.
1923
1924 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
1925
1926         * assembly.c (mono_assembly_load_references): Make this thread safe.
1927         Fixes #56327.
1928
1929 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
1930
1931         * monosn.c: Add missing initialization calls.
1932
1933 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
1934
1935         * locales.c:
1936         ves_icall_System_Globalization_CultureInfo_construct_number_format
1937         Fix g_assert so it compiles on fussier compilers re int/ptr
1938         mismatch
1939
1940 2004-04-08  Dick Porter  <dick@ximian.com>
1941
1942         * socket-io.h:
1943         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
1944         53992.  Also rearrange the code so that the internal calls return
1945         an error value and exceptions are thrown from managed code.
1946
1947         * icall.c: Add type info to the socket icalls.
1948
1949 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1950
1951         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
1952         owes me a beer.
1953
1954 2004-04-07  Martin Baulig  <martin@ximian.com>
1955
1956         * class.c (mono_class_from_generic_parameter): Don't default
1957         `klass->parent' to `mono_defaults.object_type'.
1958
1959 2004-04-07  Martin Baulig  <martin@ximian.com>
1960
1961         * reflection.c (mono_reflection_initialize_generic_parameter): Set
1962         `param->pklass->reflection_info'.       
1963
1964 2004-04-07  Jackson Harper  <jackson@ximian.com>
1965
1966         * culture-info-tables.h: Fix date separator symbol.
1967         
1968 2004-04-07  Martin Baulig  <martin@ximian.com>
1969
1970         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
1971         from System.Type to System.MonoType.
1972
1973 2004-04-07  Martin Baulig  <martin@ximian.com>
1974
1975         * reflection.h
1976         (MonoReflectionGenericParam): Added `has_reference_type' and
1977         `has_value_type' fields.
1978
1979         * reflection.c (mono_image_get_generic_param_info): Encode the
1980         correct flags if we have the `class' or `struct' constraint.
1981
1982 2004-04-07  Martin Baulig  <martin@ximian.com>
1983
1984         * reflection.h
1985         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
1986
1987 2004-04-07  Jackson Harper  <jackson@ximian.com>
1988
1989         * appdomain.c: Revert extra patches, just wanted to bump the
1990         version number.
1991         
1992 2004-04-07  Jackson Harper  <jackson@ximian.com>
1993
1994         * Makefile.am: Add culture-info private headers.
1995         * icall.c: Add new icalls for contructing locales.
1996         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
1997         * locales.h: Declare new culture info construction methods.
1998         * object.h: Add new fields used to avoid the CultureMap to
1999         MonoCultureInfo.
2000         * culture-info.h: Definition of structs used in the culture info
2001         tables.
2002         * culture-info-tables.h: Autogenerated tables that contain culture
2003         info data. This file was generated with the locale-builder tool.
2004         * appdomain.c: Incement corlib version number.
2005         
2006 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
2007
2008         * appdomain.c: (mono_runtime_init) move mono_thread_init
2009         to before mono_object_new calls so critical sections
2010         are initialized before use.
2011
2012 2004-04-07  Martin Baulig  <martin@ximian.com>
2013
2014         * icall.c
2015         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
2016         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
2017         (ves_icall_MonoGenericParam_initialize): Removed.
2018         (monogenericparam_icalls): Removed.
2019         (generictypeparambuilder_icalls): Added new table for
2020         System.Reflection.Emit.GenericTypeParameterBuilder.
2021
2022         * reflection.c
2023         (mono_reflection_define_generic_parameter): Removed.
2024         (mono_reflection_initialize_generic_parameter): This is now called
2025         from GenericTypeParameterBuilder's .ctor.
2026
2027 2004-04-06  Martin Baulig  <martin@ximian.com>
2028
2029         * class.c (mono_class_init): Don't inflate nested classes in a
2030         generic instance.
2031         (mono_type_get_name_recurse): Include the generic arguments for
2032         generic instances and generic type declarations.
2033         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
2034         (_mono_class_get_instantiation_name): Removed.
2035         (mono_class_create_generic): Always use `gklass->name' as our name.
2036
2037         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
2038
2039         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
2040         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
2041         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
2042         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
2043         closed generic methods here.
2044
2045         * reflection.c
2046         (mono_reflection_generic_inst_get_nested_types): Removed.
2047         (inflate_mono_method): Copy the generic parameters from the
2048         MonoMethodHeader into out MonoGenericMethod.
2049
2050 2004-04-06  Martin Baulig  <martin@ximian.com>
2051
2052         * row-indexes.h
2053         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
2054
2055         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
2056
2057         * reflection.c (build_compressed_metadata): If we have any entries
2058         in the GenericParam, MethodSpec or GenericParamConstraint tables,
2059         set the header version to 1.1.
2060
2061 2004-04-06  Martin Baulig  <martin@ximian.com>
2062
2063         * class.c (mono_class_init): If we're a generic instance,
2064         initialize our nested classes, too.
2065         (_mono_class_get_instantiation_name): Deal with the new `!%d'
2066         suffix. 
2067
2068 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2069
2070         * process.c: quote the argument passed to the shell on windows.
2071
2072 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
2073
2074         * threads.c (mono_alloc_special_static_data): Allow this to be
2075         called during startup.
2076
2077 2004-04-02  Martin Baulig  <martin@ximian.com>
2078
2079         * icall.c
2080         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
2081
2082 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
2083
2084         * icall.c: Fix build.
2085
2086 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
2087
2088         * Makefile.am: Added security.c|h.
2089         * icall.c: Added icall for get_UserName;
2090         * security.c: New file for security related icalls. Added function
2091         get_UserName for System.Environment (fix #56144).
2092         * security.h: New. Header file for security.c
2093
2094 2004-04-02  Dick Porter  <dick@ximian.com>
2095
2096         * icall.c: Deleted the icalls that were obsoleted some time ago
2097         by the ICU string code, and which were mixed into the icall
2098         rearranging.  Fixes bug 55969.
2099
2100         * string-icalls.h: 
2101         * string-icalls.c: Deleted the code that those icalls reference.
2102
2103 2004-04-01  Martin Baulig  <martin@ximian.com>
2104
2105         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
2106
2107         * class.c (mono_class_from_generic_parameter): Don't set 
2108         TYPE_ATTRIBUTE_INTERFACE.
2109         (my_mono_class_from_generic_parameter): Likewise.
2110
2111 2004-04-01  Martin Baulig  <martin@ximian.com>
2112
2113         * loader.c (find_method): Added an optional `MonoClass *ic'
2114         argument to search in a specific interface.
2115         (mono_get_method_constrained): New public function.
2116
2117 2004-04-01  Martin Baulig  <martin@ximian.com>
2118
2119         * reflection.c (mono_image_get_generic_field_token): Use the
2120         `handleref' cache here.
2121
2122 2004-04-01  Martin Baulig  <martin@ximian.com>
2123
2124         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
2125
2126         * reflection.c (create_generic_typespec): Use the `typespec' hash
2127         here, not the `typeref' one.    
2128
2129 2004-04-01  Martin Baulig  <martin@ximian.com>
2130
2131         * class.c (mono_class_inflate_generic_type): Moved the
2132         functionality into a new static inflate_generic_type() which
2133         returns NULL if it didn't do anything.  Only increment the
2134         `mono_stats.inflated_type_count' if we actually inflated
2135         something.
2136         (mono_class_get_full): Check the classes type to see whether we
2137         need to inflate it; also inflate MONO_TYPE_(M)VAR.
2138
2139 2004-04-01  Jackson Harper  <jackson@ximian.com>
2140
2141         * reflection.c: Set culture for assembly references.
2142         
2143 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
2144
2145         * reflection.[ch], icall.[ch], Fix support for pinning variables.
2146
2147 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2148
2149         * assembly.c:
2150         (do_mono_assembly_open): the critical section also covers
2151         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
2152
2153 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2154
2155         * threads.c:
2156         (mono_manage_threads): abort the background threads when finishing.
2157         Fixes bug #47232.
2158
2159 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2160
2161         * gc.c: only close the done_event handle if there was no timeout.
2162         C-ified comments.
2163
2164 2004-03-30  Martin Baulig  <martin@ximian.com>
2165
2166         * icall.c (icall_entries): It's called "System.Activator", not
2167         "System.Activation".    
2168
2169 2004-03-30  Martin Baulig  <martin@ximian.com>
2170
2171         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
2172         (mono_class_create_from_typespec): Likewise.
2173
2174 2004-03-30  Martin Baulig  <martin@ximian.com>
2175
2176         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
2177         `has_ctor_constraint' and `initialized'.
2178
2179 2004-03-30  Martin Baulig  <martin@ximian.com>
2180
2181         * reflection.c (encode_new_constraint): New static function to add
2182         the constructor constraint attribute to a type parameter.
2183         (encode_constraints): Call encode_new_constraint() if necessary.
2184
2185         * reflection.h
2186         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
2187
2188         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
2189         
2190 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
2191
2192         * reflection.c, icall.c: add support for pinning variables. 
2193
2194 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
2195
2196         * marshal.c (mono_marshal_get_managed_wrapper):
2197         init bool local with zero rather than null.
2198
2199 2004-03-29  Martin Baulig  <martin@ximian.com>
2200
2201         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
2202         the "official" behavior here.
2203         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
2204
2205 2004-03-29  Martin Baulig  <martin@ximian.com>
2206
2207         * icall.c: Reflect latest API changes.
2208
2209 2004-03-29  Martin Baulig  <martin@ximian.com>
2210
2211         * loader.c (mono_get_method_from_token): Also call
2212         mono_metadata_load_generic_params () for abstract and interface
2213         methods; replace the type arguments in the method signature with
2214         the ones which are loaded from the metadata.
2215
2216 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
2217
2218         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
2219         of the lock is not the current thread. MS.NET don't do it, in spite of
2220         what the documentation says. See bug #56157.
2221
2222 2004-03-28  Martin Baulig  <martin@ximian.com>
2223
2224         * class.c (mono_class_init): Don't call init_properties() and
2225         init_events() for generic instances; set `prop->parent' when
2226         inflating properties.
2227
2228         * reflection.c (mono_generic_inst_get_object): Call
2229         `mono_class_init (ginst->klass)'.
2230         (mono_type_get_object): Only create a MonoGenericInst if your
2231         generic type is a TypeBuilder.
2232         (do_mono_reflection_bind_generic_parameters): Only set
2233         `ginst->is_dynamic' if our generic type is a TypeBuilder.
2234
2235 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
2236
2237         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
2238         Fixes #56091.
2239
2240 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2241
2242         * icall.c: added Kill_internal icall.
2243         * process.[ch]: added Kill_internal icall.
2244
2245 2004-03-25  Martin Baulig  <martin@ximian.com>
2246
2247         * class.h (MonoStats): Added `generic_instance_count',
2248         `inflated_method_count', `inflated_type_count' and
2249         `generics_metadata_size'.       
2250
2251 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2252
2253         * reflection.c: no warnings now.
2254
2255 2004-03-25  Martin Baulig  <martin@ximian.com>
2256
2257         * class.c (mono_class_get_full): New public function; does a
2258         mono_class_get(), but also takes a `MonoGenericContext *'.
2259
2260         * loader.c (mono_field_from_memberref): Renamed to
2261         `field_from_memberref', made static and added `MonoGenericContext *'
2262         argument.
2263         (mono_field_from_token): Added `MonoGenericInst *' argument.
2264         (method_from_memberef): Likewise.
2265         (mono_get_method_from_token): Likewise.
2266         (mono_get_method_full): New public function; does a
2267         mono_get_method(), but also takes a `MonoGenericContext *'.
2268
2269         * verify.c (mono_method_verify): Get the method's generic context
2270         and pass it to mono_field_from_token(), mono_get_method_full() and
2271         mono_class_get_full().
2272
2273 2004-03-25  Martin Baulig  <martin@ximian.com>
2274
2275         * class.c (mono_class_inflate_generic_type): Take a
2276         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
2277         `MonoGenericMethod *'.
2278
2279 2004-03-25  Martin Baulig  <martin@ximian.com>
2280
2281         * loader.h (MonoMethodInflated): Store the MonoGenericContext
2282         instead of the MonoGenericMethod here.
2283
2284 2004-03-25  Martin Baulig  <martin@ximian.com>
2285
2286         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
2287         each time we create a new MonoGenericInst, we also create a new
2288         context which points back to us.
2289
2290         * class.c (inflate_method): Use `ginst->context' instead of
2291         creating a new context.
2292
2293         * loader.c (method_from_memberref): Use
2294         `klass->generic_inst->context' instead of creating a new context.
2295
2296 2004-03-25  Martin Baulig  <martin@ximian.com>
2297
2298         * class.h (MonoGenericContext): New struct.
2299         (MonoGenericMethod): Removed `generic_inst'.
2300
2301         * class.c (mono_class_inflate_generic_method): Take a
2302         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
2303
2304 2004-03-25  Martin Baulig  <martin@ximian.com>
2305
2306         * loader.h (MonoMethodInflated): New typedef.
2307
2308         * metadata.h (MonoMethodSignature): Removed `gen_method', make
2309         `generic_param_count' consume just 30 bits, added `is_inflated'
2310         and `has_type_parameters' flags (one bit each).
2311
2312         * class.c (mono_class_inflate_generic_method): Create a
2313         MonoMethodInflated instead of a MonoMethodNormal and set
2314         `is_inflated' in the method signature.
2315
2316         * class.h (MonoGenericMethod): Removed `generic_method'.
2317
2318 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
2319
2320         * image.c: Make sure the name of a MonoImage is always an absolute path.
2321           This fixes bug #54415.
2322
2323 2004-03-24  Martin Baulig  <martin@ximian.com>
2324
2325         * class.c (mono_class_setup_vtable): If we're a generic instance,
2326         use our generic type's vtable size.
2327
2328 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
2329
2330         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
2331         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
2332         problems.
2333
2334 2004-03-23  Martin Baulig  <martin@ximian.com>
2335
2336         * class.h (MonoDynamicGenericInst): Added `int count_events' and
2337         `MonoEvent *events'.
2338
2339         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
2340         (typebuilder_icalls): Added "get_event_info"; calls
2341         mono_reflection_event_builder_get_event_info(). 
2342
2343         * reflection.c (mono_reflection_generic_inst_initialize): Added
2344         `MonoArray *events'.
2345         (mono_reflection_event_builder_get_event_info): New function.
2346
2347 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
2348
2349         * object.h: add mono_type_initialization_init
2350
2351         * object.c (mono_runtime_class_init): 
2352         implement class constructor synchronization rules
2353         to cope with threading issues.  
2354         add mono_type_initialization_init
2355
2356         * appdomain.c (mono_runtime_init): call 
2357         mono_type_initialization_init
2358
2359         * class.h: removing initializing field from MonoVTable
2360
2361 2004-03-23  Martin Baulig  <martin@ximian.com>
2362
2363         * class.c (my_mono_class_from_generic_parameter): Use
2364         `param->name' if it's not NULL. 
2365
2366 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
2367
2368         * class.c: do not insert non-virtual methods in the vtable.
2369         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
2370         that means the method is non-virtual. This never would have
2371         happened before.
2372
2373 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
2374
2375         * profiler.c: Added lock for accessing coverage_hash.
2376
2377 2004-03-22  Martin Baulig  <martin@ximian.com>
2378
2379         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
2380         `method->method->signature->generic_param_count != 0' to make it
2381         work for interface methods.
2382
2383 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2384
2385         * process.c: quote the string passed to the shell using g_shell_quote.
2386
2387 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2388
2389         * threads.c:
2390         (mono_threads_manage): don't remove the finalizer thread and self
2391         from the threads hash table so that mono_thread_manage can be called
2392         more than once.
2393
2394 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2395
2396         * process.c: quote the arguments when UseShellExecute is true. Fixes
2397         bug #55790.
2398
2399 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2400
2401         * threads.c: set mono_thread_detach as a cleanup routine for every
2402         thread. This way it's always executed upon thread termination, either
2403         aborted or finished normally. No more xsp hangs!
2404
2405 2004-03-17  Martin Baulig  <martin@ximian.com>
2406
2407         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
2408         `int count_nested' and a `MonoType **nested'.
2409
2410         * reflection.c (mono_reflection_bind_generic_parameters): Moved
2411         most of the functionality into a new static
2412         do_mono_reflection_bind_generic_parameters() and don't take a
2413         `MonoType *nested_in' argument any more.  Don't compute nested
2414         types here.
2415         (mono_reflection_generic_inst_get_nested_types): New public method
2416         to get nested types.
2417
2418         * class.c (mono_class_create_generic): Set `klass->nested_in' if
2419         we're a nested class.
2420
2421         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
2422         mono_reflection_generic_inst_get_nested_types() to compute the
2423         nested types.
2424
2425 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2426
2427         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
2428         descriptive error message under windows.
2429         
2430 2004-03-17  Martin Baulig  <martin@ximian.com>
2431
2432         * class.c (dup_type): Added `const MonoType *original' argument;
2433         copy the attrs from the original type.
2434
2435 2004-03-17  Martin Baulig  <martin@ximian.com>
2436
2437         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
2438         `m->generic_inst_cache' here.
2439
2440 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2441
2442         * exception.h exception.c: Add stack_overflow_exception.
2443
2444 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2445
2446         * threadpool.c:
2447         (overlapped_callback): call SetEvent *after* invoking the callback.
2448         No need to call CloseHandle.
2449
2450 2004-03-16  Martin Baulig  <martin@ximian.com>
2451
2452         * reflection.c (mono_image_get_fieldref_token): Take a
2453         `MonoReflectionField *' instead of a `MonoClassField *' and a
2454         `MonoClass *'; store the `MonoReflectionField *' in the hash.
2455
2456 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2457
2458         * appdomain.c: don't add the culture to the filename we're looking for
2459         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
2460
2461 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2462
2463         * locales.c: don't ignore symbols when doing case insensitive compares.
2464         Thanks Dick! Fixes bug #54046.
2465
2466         * threads.c: surround 'threads' usage with enter/leave in
2467         mono_thread_manage.
2468
2469 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
2470
2471         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
2472         implicitly marshalled as [Out]. Fixes #55450.
2473
2474         (mono_marshal_get_runtime_invoke): Zero out the result if there is
2475         an exception.
2476
2477 2004-03-16  Martin Baulig  <martin@ximian.com>
2478
2479         * class.c (mono_class_from_generic_parameter): Use the actual
2480         parameter name. 
2481
2482 2004-03-16  Martin Baulig  <martin@ximian.com>
2483
2484         * reflection.c (type_get_signature_size): New static function.
2485         Compues the size of the type in a method signature.
2486         (method_get_signature_size): New static function; calls
2487         type_get_signature_size() to compute the actual size of the
2488         method's signature.
2489         (method_encode_signature): Use method_get_signature_size() to get
2490         the signature's size rather than using `nparams * 10'.
2491
2492 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2493
2494         * file-io.h: define here WapiOverlapped on windows. I don't want the
2495         regular OVERLAPPED one.
2496
2497         * file-io.c:
2498         * threadpool.c: somehow, BindIoCompletionCallback is not found.
2499         Disabling AIO on windows.
2500
2501 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2502
2503         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
2504         bug #55385.
2505
2506 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2507
2508         * appdomain.c: upgraded corlib version.
2509
2510         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
2511         and BeginWrite. Allow opening files for asynchrnous operations.
2512
2513         * file-io.h: new struct that maps FileStreamAsyncResult.
2514         * icall.c: added new icalls.
2515         * process.[ch]: support setting child process environment variables
2516         and use the SHELL or COMSPEC when UseShellExecute is true.
2517
2518         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
2519         callback for async. IO is here and also BindHandle.
2520
2521         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
2522         from here.
2523
2524 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
2525
2526         * reflection.c (create_custom_attr): Allow len == 0.
2527
2528         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
2529         computation on big-endian machines.
2530
2531 2004-03-13  Martin Baulig  <martin@ximian.com>
2532
2533         * class.h (MonoGenericInst): Added `int count_ifaces'.
2534
2535         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
2536         `ginst->count_ifaces' instead `klass->interface_count' since we
2537         may get called before the vtable is created.
2538
2539         * loader.c (mono_method_get_param_names): If we're a generic
2540         instance, return and don't initialize the class.
2541
2542         * reflection.c (mono_reflection_setup_generic_class): Don't call
2543         ensure_runtime_vtable().
2544         (mono_reflection_bind_generic_parameters): Set
2545         `ginst->count_ifaces'.
2546
2547 2004-03-11  Jackson Harper <jackson@ximian.com>
2548
2549         * icall.c:
2550         * unicode.c:
2551         * unicode.h: Remove unused System.Char icalls.
2552         
2553 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
2554
2555         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
2556         code when we P/Invoke the first library in Windows.Forms, instead
2557         of when we first open the assembly.
2558
2559         * assembly.c: Drop the lookup from here.
2560
2561 2004-03-10  Martin Baulig  <martin@ximian.com>
2562
2563         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
2564         class for properties, fields and events.  Finally fixes #54945.
2565
2566 2004-03-10  Martin Baulig  <martin@ximian.com>
2567
2568         * metadata.c (mono_metadata_class_equal): New static function;
2569         checks whether two generic instances or two generic parameters are
2570         equal.
2571         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
2572         compare classes.        
2573
2574 2004-03-10  Martin Baulig  <martin@ximian.com>
2575
2576         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
2577
2578         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
2579         argument and write it into the `reflection_info' field.
2580
2581         * icall.c
2582         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
2583         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
2584
2585 2004-03-09  Jackson Harper  <jackson@ximian.com>
2586
2587         * char-conversions.h: use 8 bits for numeric data its all we need
2588         * icall.c: numeric data is only 8 bits now.
2589
2590 2004-03-09  Martin Baulig  <martin@ximian.com>
2591
2592         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
2593
2594         * class.c (init_properties, init_events): Initialize the new
2595         `parent' field.
2596
2597         * reflection.c (typebuilder_setup_properties): Likewise.
2598         (typebuilder_setup_events): Likewise.
2599
2600         * reflection.h (MonoEventInfo): Replaced `parent with
2601         `declaring_type' and `reflected_type'.
2602
2603         * icall.c (ves_icall_get_property_info): Distinguish between
2604         declaring and reflected type.
2605         (ves_icall_get_event_info): Likewise.
2606
2607 2004-03-09  Martin Baulig  <martin@ximian.com>
2608
2609         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
2610         (ves_icall_Type_GetField): Correctly set field->klass.
2611
2612 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
2613
2614         * loader.h: Fix warning.
2615
2616 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
2617
2618         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
2619         library routine if present.  Notice that it will still continue
2620         executing even if its missing, for those working on the Gtk#
2621         edition of Windows.Forms.
2622
2623         * assembly.c (do_mono_assembly_open): If loading the
2624         System.Windows.Forms call mono_loader_wini_init.
2625
2626 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
2627
2628         * class.h: Added MonoRemoteClass struct.
2629         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
2630         function for MonoStrings.
2631         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
2632         Added internal call for getting the proxy type.
2633         * marshal.c: Get the type of transparent proxies from its remote_class.
2634         Added methods that generate the IL for type checks and casts:
2635         mono_marshal_get_isinst, mono_marshal_get_castclass, 
2636         mono_marshal_get_proxy_cancast.
2637         * marshal.h: Declaration of the previous new methods.
2638         * object.c: Added new moethods for creating and updating MonoRemoteClass
2639         instances: mono_remote_class, mono_upgrade_remote_class, 
2640         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
2641         * verify.c: FIx transparent_proxy_fields layout.
2642         * appdomain.c: Bump corlib version.
2643
2644 2004-03-04  Jackson Harper  <jackson@ximian.com>
2645
2646         * icall.c: Add icall to access char conversion tables.
2647         * char-conversions.h: Character conversion tables.
2648         * Makefile.am: Add char-conversions.h private header file.
2649         
2650 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
2651
2652         * appdomain.c (unload_thread_main): Increase unloading timeout to
2653         10 sec as a temporary workaround for Nant problems.
2654
2655 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
2656
2657         * gc.c: Add checks for GC_enable and GC_disable.
2658
2659         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
2660         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
2661         (bug #54988).
2662         
2663 2004-02-27  Martin Baulig  <martin@ximian.com>
2664
2665         * reflection.c (mono_reflection_bind_generic_parameters): Take a
2666         `MonoReflectionType *' instead of a `MonoType *'.
2667
2668 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
2669
2670         * gc.c (run_finalize): Avoid finalizing the object representing the
2671         finalizer thread.
2672         (finalizer_thread): Fix warning.
2673
2674 2004-02-25  Martin Baulig  <martin@ximian.com>
2675
2676         * class.c (_mono_class_get_instantiation_name): Added `int offset'
2677         argument for nested types.
2678         (mono_class_create_generic): Added support for nested generictypes.
2679
2680         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
2681         `GList *nested'.
2682
2683         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
2684
2685         * reflection.c (method_encode_signature): Increase the minimum
2686         value of `size' from 10 to 11.
2687         (mono_reflection_bind_generic_parameters): Take `int type_argc'
2688         and `MonoType **types' arguments instead of the `MonoArray
2689         *types'; added `MonoType *nested_in'.  Recursively instantiate
2690         nested classes. 
2691
2692 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
2693
2694         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
2695         stack_overflow_ex members which are used by exception handling.
2696
2697         * appdomain.c (mono_runtime_init): Initialize the new members.
2698
2699         * gc.c (mono_gc_enable): New helper function.
2700         * gc.c (mono_gc_disable): New helper function.
2701
2702 2004-02-23  Martin Baulig  <martin@ximian.com>
2703
2704         * icall.c: I must have been really stupid - make it actually work
2705         this time ;-)
2706
2707 2004-02-23  Martin Baulig  <martin@ximian.com>
2708
2709         * loader.c (method_from_memberref): Only inflate the method if
2710         it's in another klass.
2711
2712 2004-02-23  Martin Baulig  <martin@ximian.com>
2713
2714         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
2715         (mono_class_init): If we're a generic instance and an interface,
2716         compute `class->interface_id'; also create `class->interfaces'
2717         here and inflate them.
2718
2719         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
2720         `ginst->is_open'.
2721         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
2722
2723         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
2724
2725 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
2726
2727         * reflection.c (method_encode_code): Improved the error message
2728         generated by the exception.
2729
2730 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2731
2732         * icall.c: Martin did not do what he said in the ChangeLog for
2733         2004-02-18, but put back the changes for properties and events.
2734         Commenting those changes out again and adding comment to bug #54518.
2735         
2736         * process.c: removed warning.
2737
2738 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
2739
2740         * marshal.c (emit_struct_conv): Print an error message instead of
2741         asserting when a type does not have the StructLayout attribute.
2742
2743 2004-02-20  Martin Baulig  <martin@ximian.com>
2744
2745         * reflection.c (mono_type_get_object): Also use the cache for
2746         generic instances.
2747         (mono_reflection_bind_generic_parameters): Always compute
2748         `ginst->ifaces'.        
2749
2750 2004-02-20  Martin Baulig  <martin@ximian.com>
2751
2752         * class.h (MonoGenericMethod): Removed `klass'.
2753
2754         * class.c (mono_class_inflate_generic_method): Added `MonoClass
2755         *klass' argument.
2756
2757 2004-02-20  Martin Baulig  <martin@ximian.com>
2758
2759         * reflection.c (method_encode_methodspec): Actually use the
2760         uninflated signature for the memberref.
2761
2762 2004-02-20  Martin Baulig  <martin@ximian.com>
2763
2764         * class.h (MonoGenericMethod): Removed `declaring'.
2765
2766         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
2767         is NULL, compute it here.
2768
2769 2004-02-20  Martin Baulig  <martin@ximian.com>
2770
2771         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
2772
2773         * metadata.c (mono_metadata_generic_inst_hash): New method.
2774         (mono_metadata_generic_inst_equal): New method.
2775
2776         * reflection.c (mono_reflection_bind_generic_parameters): Use the
2777         `klass->image->generic_inst_cache' cache to avoid creating
2778         duplicate MonoGenericInst's.
2779
2780         * class.c (mono_class_inflate_generic_type): Use the cache.
2781
2782 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
2783
2784         * object.c: fixed gc descriptor calculation for embedded valuetypes.
2785
2786 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2787
2788         * icall.c: added Socket.WSAIoctl icall.
2789
2790         * socket-io.[ch]: implemented
2791         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
2792
2793 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
2794
2795         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
2796
2797 2004-02-18  Urs C Muff  <umuff@quark.com>
2798
2799         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
2800         this work on PPC and other big-endian architectures.
2801
2802         * debug-mono-symfile.h: Prepended the names of all the `guint32'
2803         fields with an underscore to make sure they're only accessed by
2804         the read32() macro.
2805
2806 2004-02-18  Martin Baulig  <martin@ximian.com>
2807
2808         * icall.c: Put the klass->refclass changes back for methods and
2809         fields, but not for properties and events.  We're currently not
2810         distinguishing between DeclaringType and ReflectedType for
2811         properties and events, that's what caused the regressions.
2812
2813 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2814
2815         * object.c:
2816         (mono_async_result_new): the handle can be NULL.
2817
2818         * threadpool.c: Use an event instead of a semaphore, don't initialize
2819         it until needed. This saves quite a few semaphores from being created
2820         when using the threadpool.
2821
2822 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
2823
2824         * object.c (mono_string_is_interned_lookup): Fix interning of long
2825         strings. Fixes #54473.
2826
2827         * domain.c (ldstr_equal): Optimize if the two strings are equal.
2828
2829         * icall.c: Revert the klass->refclass changes since they introduce
2830         regressions (bug #54518).
2831
2832 2004-02-18  Martin Baulig  <martin@ximian.com>
2833
2834         * class.c (mono_class_init): If we're a generic instance and don't
2835         come from a TypeBuilder, inflate our members here.
2836         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
2837         (mono_class_create_generic): New public method.
2838         (mono_class_initialize_generic): Removed.
2839         (get_instantiation_name): Renamed to
2840         _mono_class_get_instantiation_name() and made it public.
2841
2842 2004-02-18  Martin Baulig  <martin@ximian.com>
2843
2844         * class.c (mono_class_inflate_generic_type): Clear the new
2845         instance's `nginst->klass' when inflating a generic instance.
2846         (mono_class_is_subclass_of): Added (basic) support for generic
2847         instances.
2848
2849 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
2850
2851         * appdomain.h, domain.c: use a MonoCodeManager instead of a
2852         MonoMempool to hold compiled native code.
2853
2854 2004-02-17  Martin Baulig  <martin@ximian.com>
2855
2856         * class.h (MonoDynamicGenericInst): Added `count_properties' and
2857         `properties'.
2858
2859         * reflection.c (mono_reflection_generic_inst_initialize): Added
2860         `MonoArray *properties' argument.
2861
2862         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
2863
2864 2004-02-17  Martin Baulig  <martin@ximian.com>
2865
2866         * icall.c (ves_icall_Type_GetFields): Renamed to
2867         ves_icall_Type_GetFields_internal() and added a
2868         `MonoReflectionType *rtype' argument; pass it to
2869         mono_field_get_object() to set the field's "reflected" type.
2870         (ves_icall_Type_GetConstructors): Likewise.
2871         (ves_icall_Type_GetEvents): Likewise.
2872         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
2873         argument; pass it to mono_method_get_object() to set the method's
2874         "reflected" type.       
2875
2876 2004-02-17  Martin Baulig  <martin@ximian.com>
2877
2878         * class.h (MonoDynamicGenericInst): New type.
2879         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
2880
2881         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
2882         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
2883         (ves_icall_MonoGenericInst_GetFields): New interncall.
2884
2885         * class.c (mono_class_from_generic): Don't call
2886         mono_class_initialize_generic() if this is a dynamic instance;
2887         ie. it's being created from a TypeBuilder.
2888         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
2889         `class->byval_arg.type'.
2890
2891         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
2892         to `inflate_method' and made static.
2893         (mono_reflection_inflate_field): Removed.
2894         (mono_reflection_generic_inst_initialize): New public method.
2895
2896         * reflection.h (MonoReflectionGenericInst): Removed `methods',
2897         `ctors' and `fields'; added `initialized'.
2898
2899 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
2900
2901         * debug-helpers.c (mono_method_full_name): Fix output for empty
2902         namespaces.
2903
2904 2004-02-12  Martin Baulig  <martin@ximian.com>
2905
2906         * class.h (MonoClassField): Added `MonoType *generic_type'.
2907
2908         * reflection.c (mono_image_get_fieldref_token): Added support for
2909         instantiated generic types.
2910         (field_encode_inflated_field): Removed.
2911         (mono_image_get_inflated_field_token): Removed.
2912         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
2913
2914         * reflection.h (MonoReflectionInflatedField): Removed.
2915
2916 2004-02-12  Martin Baulig  <martin@ximian.com>
2917
2918         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
2919         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
2920
2921         * reflection.c (mono_image_get_methodspec_token): Take a
2922         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
2923         (mono_image_create_token): Check whether we have a
2924         `method->signature->gen_method' and call
2925         mono_image_get_methodspec_token() if appropriate.
2926         (inflated_method_get_object): Removed.
2927         (mono_reflection_bind_generic_method_parameters): Return a
2928         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
2929         (mono_reflection_inflate_method_or_ctor): Likewise.
2930
2931         * reflection.h (MonoReflectionInflatedMethod): Removed.
2932
2933 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
2934
2935         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
2936         for custom valuetype marshalling.
2937
2938         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
2939
2940 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2941
2942         * icall.c: fixed WSAGetLastError_internal name.
2943
2944 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
2945
2946         * threads.c (mono_thread_attach): Allow this to be called multiple
2947         times for a thread.
2948         
2949         * threads.c (build_wait_tids): Do not wait for ourselves.
2950
2951         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
2952         appdomain list is empty.
2953
2954         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
2955         memory returned by mono_string_builder_to_utf16, since it points into
2956         managed memory. Thanks to Bernie Solomon for noticing this.
2957
2958         * icall.c: Add AppDomainSetup icalls.
2959
2960         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
2961
2962         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
2963         types.
2964
2965         * reflection.c (reflection_methodbuilder_to_mono_method): Save
2966         custom attributes to the method_aux struct. Also fix array indexes etc.
2967
2968         * loader.c (mono_method_get_param_names): Make dynamic case work again.
2969         
2970 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
2971
2972         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
2973         (both static and runtime) and reduce startup time.
2974
2975 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
2976
2977         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
2978         AsAny marshalling conversion instead of crashing.
2979
2980         * marshal.c: Fix warnings.
2981
2982 2004-02-09  Martin Baulig  <martin@ximian.com>
2983
2984         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
2985
2986         * reflection.h (MonoReflectionInflatedMethod): Removed the
2987         `declaring' field, it's now in the unmanaged MonoGenericMethod.
2988
2989         * reflection.c (method_encode_methodspec): Removed the `method'
2990         argument; we get it from `gmethod->declaring'.
2991         (inflated_method_get_object): Removed the `declaring' argument.
2992
2993 2004-02-09  Martin Baulig  <martin@ximian.com>
2994
2995         * class.h (MonoGenericMethod): New type.
2996         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
2997         `generic_method'.
2998
2999         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
3000         a `MonoGenericMethod *gen_method' one.
3001
3002         * class.c (mono_class_inflate_generic_type): Take an additional
3003         `MonoGenericMethod * argument.  This is only non-NULL if we're
3004         inflating types for a generic method.   
3005         (mono_class_inflate_generic_signature): Renamed to
3006         inflate_generic_signature() and made static; take a
3007         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3008         (inflate_generic_header): Take a `MonoGenericMethod *' argument
3009         instead of a `MonoGenericInst *' one.
3010         (mono_class_inflate_generic_method): Likewise.
3011
3012         * reflection.c (encode_generic_method_sig): Take a
3013         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3014         (method_encode_methodspec): Likewise.
3015         (inflated_method_get_object): Likewise. 
3016
3017         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
3018         field with a `MonoGenericMethod *gmethod' one.  
3019
3020 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
3021
3022         * class.h (mono_class_has_parent): add parens to expansion
3023         so you can ! this.
3024
3025 2004-02-08  Martin Baulig  <martin@ximian.com>
3026
3027         * image.h (MonoImage): Removed `generics_cache'.
3028
3029         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
3030         instead of a `MonoType *' argument; removed the `inflate_methods'
3031         argument.  Don't inflate methods here.
3032
3033         * loader.c (find_method): If it's a generic instance, call
3034         mono_class_init() on the `sclass->generic_inst->generic_type'.
3035
3036         * metadata.c (mono_type_size): Make this work on uninitialized
3037         generic instances; call it on the `ginst->generic_type's class.
3038
3039         * reflection.c (mono_reflection_bind_generic_parameters): Call
3040         mono_class_from_generic() to create the `ginst->klass'.
3041
3042 2004-02-08  Martin Baulig  <martin@ximian.com>
3043
3044         * class.h (MonoClass): Changed type of `generic_inst' from
3045         `MonoType *' to `MonoGenericInst *'.
3046
3047 2004-02-08  Martin Baulig  <martin@ximian.com>
3048
3049         * icall.c (ves_icall_Type_BindGenericParameters): Just call
3050         mono_type_get_object(), this is now creating a `MonoGenericInst'
3051         for MONO_TYPE_GENERICINST.
3052         (ves_icall_MonoGenericInst_GetParentType): Likewise.
3053         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3054
3055         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
3056         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
3057         (inflated_method_get_object): Added `MonoClass *refclass' argument.
3058         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
3059         and reflected type.
3060
3061         * reflection.h (MonoReflectionInflatedMethod): Removed
3062         `declaring_type' and `reflected_type'.
3063
3064 2004-02-08  Martin Baulig  <martin@ximian.com>
3065
3066         * class.h (MonoGenericInst): Added `MonoType *parent' and
3067         `MonoType **ifaces'.
3068
3069         * reflection.h (MonoReflectionGenericInst): Removed `klass',
3070         `parent' and `interfaces'.
3071
3072         * reflection.c (mono_reflection_bind_generic_parameters): Take a
3073         `MonoType *' argument and return a `MonoType *'.
3074
3075         * icall.c
3076         (ves_icall_MonoGenericInst_GetParentType): New interncall.
3077         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
3078
3079 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
3080
3081         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
3082         valuetype marshalling.
3083
3084 2004-02-06  Martin Baulig  <martin@ximian.com>
3085
3086         * class.c
3087         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
3088         (my_mono_class_from_generic_parameter): Likewise.
3089
3090 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
3091
3092         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
3093         contents of the symbol files lazily.
3094
3095         * object.h (MonoThread): Add 'name' and 'name_len' fields.
3096
3097         * threads.h threads.c icall.c: New icalls for getting and setting the
3098         threads name.
3099
3100 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
3101
3102         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
3103         Raise an exception when the domain is not found.
3104
3105 2004-02-03  Martin Baulig  <martin@ximian.com>
3106
3107         * reflection.c (mono_image_get_methodspec_token): Use the
3108         uninflated signature; fixes gen-33.
3109
3110 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
3111
3112         * gc.c threads.c: Make the finalizer thread a normal managed thread so
3113         the finalizer code can use thread functionality.
3114
3115         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
3116         the finalizer thread.
3117
3118         * threads.c: Make some functions more robust.
3119
3120         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
3121
3122         * metadata.h: Add new marshalling conventions.
3123
3124         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
3125         stringbuilder marshalling. Fixes #53700.
3126
3127         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
3128
3129         * reflection.c (mono_image_get_type_info): Save declarative security
3130         info.
3131
3132         * reflection.c (mono_image_get_field_info): Handle uninitialized 
3133         unmanaged fields as well.
3134
3135         * appdomain.c: Bump corlib version.
3136
3137 2004-02-01  Martin Baulig  <martin@ximian.com>
3138
3139         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
3140         method type arguments.  
3141
3142 2004-01-30  Duncan Mak  <duncan@ximian.com>
3143
3144         * marshal.h: Add prototype for
3145         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
3146         and
3147         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
3148         fix the build.
3149
3150 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
3151
3152         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
3153         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
3154
3155 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
3156
3157         * marshal.c (mono_marshal_get_native_wrapper): Add support for
3158         custom marshalling of valuetypes.
3159
3160         * marshal.c: Fix some warnings.
3161
3162 2004-01-29  Martin Baulig  <martin@ximian.com>
3163
3164         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
3165         for generic method parameters.
3166
3167         * reflection.c (method_encode_methodspec): Write the uninflated
3168         signature into the methodspec table.
3169         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
3170         is always the uninflated method.
3171         (reflection_methodbuilder_to_mono_method): Copy the generic
3172         parameters from the MethodBuilder into `header->gen_params'.
3173
3174 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
3175
3176         * class.c (mono_class_from_generic_parameter): Fix warning.
3177
3178 2004-01-27  Martin Baulig  <martin@ximian.com>
3179
3180         * class.c (mono_class_from_generic_parameter): Don't create
3181         `klass->methods' here.  
3182
3183 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
3184
3185         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
3186         extension since it does not work with libraries named lib<FOO>.dll.so.
3187
3188 2004-01-25  Martin Baulig  <martin@ximian.com>
3189
3190         * class.c (mono_class_inflate_generic_type): Added support for
3191         MONO_TYPE_GENERICINST.
3192
3193         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
3194         inflate methods on open constructed types.      
3195
3196 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3197
3198         * object.c: fire ProcessExit event in the root AppDomain after running
3199         Main. Fixes bug #53299.
3200
3201 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
3202
3203         * socket-io.c: include the new socket-wrappers.h header.
3204         Use the wrappers instead of the unix socket functions to make the code
3205         more clear.
3206
3207 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
3208
3209         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
3210
3211         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3212         Fixes #22532.
3213
3214 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
3215
3216         * reflection.c (mono_image_create_pefile): Handle the case when the
3217         entry point is not a MethodBuilder.
3218
3219         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3220         field to ReflectionMethod since it is not allways a builder.
3221
3222         * reflection.c (type_get_fully_qualified_name): New helper function to
3223         return the fully qualified name of a type.
3224
3225         * reflection.c (encode_marshal_blob): Always emit the fully qualified
3226         type name for custom marshallers.
3227
3228         * reflection.c (mono_marshal_spec_from_builder): Ditto.
3229
3230         * class.c (mono_class_setup_vtable): If a parent class already 
3231         implements an interface, use the implementing methods from that class.
3232         Fixes #53148.
3233
3234 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3235
3236         * threadpool.c: just return instead of ExitThread to allow for thread
3237         clean up earlier.
3238
3239 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
3240
3241         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
3242         when closing resource modules.
3243
3244         * reflection.c (mono_image_create_pefile): Handle the case when the
3245         entry point is not a MethodBuilder.
3246
3247         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3248         field to ReflectionMethod since it is not allways a builder.
3249
3250 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
3251
3252         * marshal.c (mono_marshal_get_managed_wrapper): 
3253         mono_marshal_alloc takes native int so CONV_I
3254         the arg for 64bits.
3255
3256 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
3257
3258         * reflection.c (fixup_cattrs): New function to fixup the methoddef
3259         tokens in the cattr table. Fixes #53108.
3260
3261 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3262
3263         * loader.c: don't trim ".dll" before looking up in the config file.
3264         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
3265
3266 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
3267
3268         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
3269         Return the module which contains the resource as well.
3270         (ves_icall_System_Reflection_Module_Close): New icall.
3271
3272         * appdomain.c: Bump corlib version number.
3273
3274         * image.c (mono_image_addref): New public function.
3275
3276         * assembly.c: Call mono_image_addref.
3277
3278         * reflection.c (mono_module_get_object): Increase reference count of 
3279         the image.
3280
3281         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3282         Fixes #22532.
3283
3284         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
3285         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
3286         proper exceptions on DllImport problems.
3287
3288 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
3289
3290         * class.c, metadata.c: eliminate CSIZE macro.
3291
3292 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
3293
3294         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
3295         * object.h: Added async_callback field in MonoAsyncResult.
3296         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
3297         * verify.c: Added async_callback in MonoAsyncResult layout.
3298
3299 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
3300
3301         * reflection.c (mono_reflection_get_custom_attrs): Add support
3302         for Modules.
3303
3304 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
3305
3306         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
3307         marshalling.
3308         (mono_marshal_method_from_wrapper): Add null pointer check.
3309
3310 2004-01-16  Martin Baulig  <martin@ximian.com>
3311
3312         * debug-mono-symfile.h: Set version number to 36 and reflect
3313         latest symbol writer changes.
3314
3315 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
3316
3317         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
3318         multi-dimensional arrays.
3319         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
3320         (mono_class_from_mono_type): Use bounded_array_class_get.
3321         
3322         * class.c (mono_bounded_array_class_get): New function which takes
3323         a 'bounded' bool argument to distinguish vectors from one dimensional
3324         arrays.
3325
3326         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
3327         bounded_array_class_get if the array has bounds.
3328
3329         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
3330         Search modules loaded using AssemblyBuilder:AddModule as well.
3331
3332 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3333
3334         * appdomain.c: increased corlib version.
3335         * filewatcher.c: removed g_print.
3336         * icall.c:
3337         (get_property_info): only allocate what is actually requested.
3338         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
3339
3340 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3341
3342         * Makefile.am: added filewatcher.[ch]
3343         * filewatcher.[ch]: FileSystemWatcher runtime support.
3344         * icall.c: added new FSW icalls.
3345
3346 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3347
3348         * string-icalls.c: fix stringbuilder regression as suggested by
3349         Iain McCoy <iain@mccoy.id.au>.
3350
3351 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
3352
3353         * process.c (process_read_stringtable_block): Recognize '007f' as
3354         a language neutral stringtable block.
3355
3356 2004-01-12  Patrik Torstensson
3357
3358         * object.h (MonoStringBuilder) : Changed layout to support our
3359         new stringbuilder class.
3360         * marshal.c: Change marshalling to support the new layout of 
3361         string builder.
3362         * appdomain.c: increased version number because new layout of
3363         string builder.
3364
3365 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
3366
3367         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
3368         assembly name as an string instead of an AssemblyName, since it is
3369         easier to extract info from it.
3370
3371         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
3372         the culture subdirectories too. Fixes #52231.
3373
3374 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3375
3376         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
3377         It takes 2 new parameters with an optional name for the method to look
3378         for and case ignoring info.
3379
3380         * threadpool.c: removed unused variable.
3381
3382 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3383
3384         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
3385         It takes 2 new parameters with an optional name for the property to look
3386         for and case ignoring info.
3387         Fixes bug #52753.
3388
3389 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
3390
3391         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
3392         Fix #52451.
3393
3394 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3395
3396         * appdomain.c:
3397         * assembly.c: escape the uri before passing it to g_filename_from_uri.
3398         Fixes bug #52630.
3399
3400 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
3401
3402         * reflection.c: Add support for more than one unmanaged resource.
3403
3404         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
3405         in field->def_value, as done in all other cases.
3406
3407         * reflection.c (mono_reflection_get_custom_attrs): Add support for
3408         TypeBuilders.
3409
3410         * reflection.c (mono_reflection_create_runtime_class): Remove 
3411         errorneous assignment to klass->element_class, since it is already
3412         done in mono_reflection_setup_internal_class.
3413
3414 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3415
3416         * gc.c: added missing LeaveCriticalSection.
3417         * icall.c: indented a couple of lines.
3418         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
3419         if we call EndInvoke inside a callback. Fixes bug #52601.
3420
3421 2004-01-07  Martin Baulig  <martin@ximian.com>
3422
3423         * mono-debug-debugger.h
3424         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
3425
3426 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
3427
3428         * appdomain.c: Use messages in NotImplementedException.
3429
3430         * exception.c (mono_get_exception_not_implemented): Now this takes
3431         a message argument.
3432
3433         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
3434         exception instead of g_asserting an aborting when something is not
3435         implemented.
3436
3437         Add some inline docs.
3438
3439 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
3440
3441         * reflection.h: Update after changes to object layout.
3442
3443         * reflection.c: Implement saving of unmanaged aka win32 resources.
3444
3445         * appdomain.c: Bump version number.
3446
3447         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
3448         Handle missing domains gracefully.
3449
3450 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
3451
3452         * file-io.c : On Windows, there are much more invalid_path_chars.
3453
3454 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
3455
3456         * class.h, object.c: prepare for GetType () speedup.
3457
3458 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
3459
3460         * profiler.c: workaround for --profile null reference exception on
3461           cygwin. Patch by Patrik Torstensson.
3462
3463 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
3464
3465         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
3466         make work for unaligned access.
3467
3468 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
3469
3470         * class.c: small cleanup (class->fields [i] -> field).
3471         * image.c: check address of metadata is valid.
3472
3473 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
3474
3475         * assembly.h assembly.c (mono_assembly_loaded): New public function to
3476         search the list of loaded assemblies.
3477
3478         * reflection.c (mono_reflection_type_from_name): Use 
3479         mono_assembly_loaded instead of mono_image_loaded.
3480
3481         * reflection.c: Fix warnings.
3482
3483 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
3484
3485         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
3486         is dynamic. This is needed since an assembly can contain both dynamic and
3487         non-dynamic images.
3488
3489         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
3490         assembly->dynamic.
3491
3492         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
3493
3494         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
3495         to store modules loaded using AddModule.
3496
3497         * reflection.c (mono_image_fill_file_table): Generalize this so it works
3498         on Modules.
3499
3500         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
3501
3502         * reflection.c (mono_image_fill_export_table_from_module): New function to
3503         fill out the EXPORTEDTYPES table from a module.
3504
3505         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
3506         into a separate function. Also handle loaded non-dynamic modules.
3507
3508         * reflection.c (mono_image_basic_init): Fix memory allocation.
3509
3510         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3511
3512         * assembly.c (mono_assembly_load_references): Make this public.
3513
3514 2003-12-19  Martin Baulig  <martin@ximian.com>
3515
3516         * class.c (mono_class_initialize_generic): Made this static, take
3517         a `MonoGenericInst *' instead of a `MonoClass *'.
3518         (mono_class_from_generic): Call mono_class_initialize_generic()
3519         unless we're already initialized or being called from
3520         do_mono_metadata_parse_generic_inst().
3521
3522         * class.h (MonoGenericInst): Added `initialized' and
3523         `init_pending' flags.
3524
3525         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
3526         `mono_class_init (gklass)' or mono_class_initialize_generic()
3527         here; set `generic_inst->init_pending' while parsing the
3528         `type_argv'.
3529
3530 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
3531
3532         * locales.c: include string.h for memxxx prototypes
3533
3534 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
3535
3536         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
3537         constructor when accessing literal fields.
3538
3539 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
3540
3541         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3542
3543         * reflection.c (assembly_add_resource_manifest): New function to fill
3544         the MANIFESTRESOURCE table.
3545
3546         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
3547
3548         * reflection.h: Update to changes in class layout.
3549
3550         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
3551         Reenable call to mono_runtime_is_shutting_down ().
3552
3553         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
3554         determine if the runtime is shutting down.
3555
3556 2003-12-16  Jackson Harper <jackson@ximian.com>
3557
3558         * icall.c: comment out call to mono_runtime_is_shutting_down to
3559         fix build.
3560         
3561 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
3562
3563         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
3564         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
3565
3566 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
3567
3568         * reflection.c: move definition of swap_with_size
3569         to before its first call
3570
3571 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
3572
3573         * appdomain.c (mono_runtime_is_shutting_down): New public function.
3574
3575         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
3576         icall.
3577
3578         * object.c: Fix warnings.
3579
3580         * icall.c (ves_icall_Type_Get...): Only consider inherited static
3581         members if FlattenHierarchy is set.
3582
3583         * reflection.c (mono_image_add_decl_security): New function to emit
3584         declarative security.
3585
3586         * reflection.h reflection.c: Add support for declarative security.
3587
3588         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3589         
3590 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
3591
3592         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3593         
3594         * appdomain.c verify.c: Moved corlib version checking into its own
3595         function in appdomain.c since it needs to create vtables etc.
3596
3597 2003-12-13  Patrik Torstensson <p@rxc.se>
3598
3599         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
3600         instead of unwrapped server.
3601
3602 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
3603
3604         * verify.c (check_corlib): Fix field index.
3605
3606 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
3607
3608         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
3609         GetGacPath icall.
3610
3611 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
3612
3613         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
3614         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
3615         cope with sizeof(size_t) != sizeof(guint32).
3616
3617 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3618
3619         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
3620         in case of failure.
3621
3622 2003-12-10  Mark Crichton <crichton@gimp.org>
3623
3624         * icall.c: removed the GetNonZeroBytes.  We now handle this case
3625         in managed code.
3626
3627         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
3628
3629 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
3630
3631         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
3632         marked as deleted.
3633
3634 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
3635
3636         * verify.c (check_corlib): Handle the case when the version field is 
3637         initialized by a static constructor.
3638
3639 2003-12-08  Patrik Torstensson  <p@rxc.se>
3640
3641     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
3642
3643 2003-12-08  Martin Baulig  <martin@ximian.com>
3644
3645         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
3646         a MonoReflectionGenericParameter, also take the parameter index
3647         and name as arguments.
3648         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
3649         (ves_icall_MonoGenericParam_initialize): New interncall.
3650         (ves_icall_Type_make_byref_type): New interncall.
3651
3652         * reflection.h (MonoReflectionGenericParam): Derive from
3653         MonoReflectionType, not just from MonoObject.  Added `refobj' and
3654         `index' fields.
3655
3656         * reflection.c (mono_reflection_define_generic_parameter): Create
3657         and return a new MonoReflectionGenericParam; don't initialize the
3658         constraints here.
3659         (mono_reflection_initialize_generic_parameter): New public method;
3660         initializes the constraints and creates the `param->pklass'.
3661
3662 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
3663
3664         * reflection.h reflection.c: Use the new fields 'num_types', 
3665         'num_fields' and 'num_methods' to track the number of types etc.
3666
3667         * verify.c (check_corlib): Check corlib version number.
3668
3669 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
3670
3671         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
3672         function works on all methods.
3673
3674 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
3675
3676         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
3677         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
3678         the custom_type_info flag of the transparent proxy.
3679         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
3680         objects that supports IRemotingTypeInfo.
3681         * object.h: Added custom_type_info field in transparent proxy.
3682
3683 2003-12-06  Martin Baulig  <martin@ximian.com>
3684
3685         * class.c (mono_class_create_from_generic): Removed.
3686         (mono_class_from_generic): Check `ginst->klass' before doing
3687         anything else.  This is important to fully support "recursive"
3688         generic types.
3689
3690         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
3691         empty `generic_inst->klass' before doing anything else.
3692
3693 2003-12-06  Dick Porter  <dick@ximian.com>
3694
3695         * verify.c: 
3696         * object.h:
3697         * icall.c:
3698         * locales.c: Use C structs to access class fields.  Don't do a
3699         conversion between MonoString and UChar because both are
3700         platform-endian UTF-16.  Compare now takes startindex and count
3701         parameters.  Add a char overload for IndexOf.  Speed up the
3702         invariant string IndexOf.
3703
3704 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
3705
3706         * Makefile.am (monosn_LDADD): Fix parallel build.
3707
3708 2003-12-04  Martin Baulig  <martin@ximian.com>
3709
3710         * icall.c
3711         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3712         (ves_icall_Type_make_array_type): New interncall.       
3713
3714 2003-12-04  Martin Baulig  <martin@ximian.com>
3715
3716         * locales.c: also change it in the !HAVE_ICU case.
3717
3718 2003-12-04  Dick Porter  <dick@ximian.com>
3719
3720         * icall.c:
3721         * locales.c: construct_compareinfo is now in CompareInfo, not
3722         CultureInfo.
3723
3724 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
3725
3726         * image.c (mono_image_load_file_for_image): Cache loaded images in the
3727         image->files array.
3728
3729         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
3730         table as well.
3731
3732         * assembly.c (mono_assembly_load_references): Only load references
3733         once.
3734
3735         * class.c (mono_class_from_name): Avoid linear search of the 
3736         EXPORTEDTYPE table.
3737
3738         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
3739
3740 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
3741
3742         * image.h (MonoImage): Add 'field_cache' field.
3743
3744         * loader.c (mono_field_from_token): Cache field lookups.
3745         
3746         * reflection.c (mono_module_get_object): Fix name property.
3747
3748         * icall.c (ves_icall_get_enum_info): Update after changes to 
3749         mono_metadata_get_constant_index ().
3750
3751         * icall.c: Get rid of get_type_info icall, use a separate icall for
3752         each type property to avoid needless memory allocations. Fixes #51514.
3753
3754         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
3755         to avoid needless binary searches.
3756
3757         * class.c (class_compute_field_layout): Move the initialization of
3758         field->def_value to mono_class_vtable ().
3759
3760         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
3761         non-corlib types.
3762
3763         * object.c (mono_object_allocate): Make it inline.
3764
3765         * object.c (mono_object_allocate_spec): Make it inline.
3766         
3767 2003-12-02  Dick Porter  <dick@ximian.com>
3768
3769         * locales.c (create_NumberFormat): NumberFormatInfo construction.
3770         Patch by Mohammad DAMT (mdamt@cdl2000.com).
3771
3772 2003-12-01  Dick Porter  <dick@ximian.com>
3773
3774         * threads.c: Fix signature and call in CreateMutex and
3775         CreateEvent.
3776
3777 2003-12-01  Dick Porter  <dick@ximian.com>
3778
3779         * icall.c: 
3780         * locales.c: Implement string compares and searching
3781
3782         * object.h: Add extra Thread field
3783
3784 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
3785
3786         * reflection.c (fixup_method): Add support for MonoCMethod.
3787
3788 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
3789
3790         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
3791
3792         * reflection.c (assembly_name_to_aname): Allow extra characters in
3793         assembly names. Fixes #51468.
3794
3795 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
3796
3797         * exception.c (mono_exception_from_name_domain): New helper function.
3798
3799         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
3800         exception object in the correct domain.
3801
3802         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
3803         formatting + make a copy a the input data.
3804
3805         * loader.c (mono_get_method_from_token): Methods which contain
3806         native code do not have entries in the ImplMap.
3807
3808         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
3809         Thanks to Gonzalo for spotting this.
3810         
3811         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
3812         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
3813
3814         * assembly.h (mono_assembly_load_from): Split the second part of 
3815         assembly loading into a new public function.
3816
3817         * exception.h (mono_get_exception_bad_image_format): New function.
3818
3819 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
3820
3821         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
3822         Enumerate all modules inside a dynamic assembly. Fixes #51293.
3823         
3824         * icall.c: Add new icall for creating dynamic methods.
3825
3826         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
3827
3828         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
3829
3830         * reflection.c (mono_reflection_create_dynamic_method): New icall to
3831         create a dynamic method.
3832
3833         * reflection.c (resolve_object): New helper function.
3834
3835         * reflection.c: Generalize ReflectionMethodBuilder and the functions
3836         which manipulate it so they can also work on dynamic methods.
3837
3838         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
3839         creating the MonoReflectionMethodAux structure if it is not needed.
3840         
3841         * reflection.h verify.c: Update after changes to object layout.
3842
3843         * reflection.c (method_builder_encode_signature): Fix compilation on
3844         gcc 2.95.x.
3845
3846 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
3847
3848         * appdomain.h: Added support for context static fields. Added static_data
3849           field to MonoAppContext and renamed thread_static_fields to a more
3850           generic special_static_fields in MonoAppDomain, since it can now contain
3851           context static fields.
3852         * domain.c: Updated hashtable name.
3853         * object.c: Replaced field_is_thread_static() for a more generic
3854           field_is_special_static() which also checks for context static attribute.
3855           In mono_class_vtable(), added support for static context fields.
3856         * threads.c: Changed methods that manage thread static fields to more
3857           generic methods so they can be reused both for thread and context static
3858           data.
3859         * threads.h: Declared some new methods.
3860
3861 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
3862
3863         * reflection.h: Update after changes to the managed types.
3864
3865         * reflection.c (encode_custom_modifiers): New helper function.
3866
3867         * reflection.c (method_encode_signature): Emit custom modifiers.
3868
3869         * reflection.c (field_encode_signature): Emit custom modifiers.
3870
3871 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
3872
3873         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
3874
3875         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
3876         implementation.
3877
3878         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
3879         icall.
3880
3881         * object.c (mono_field_get_value_object): New function.
3882
3883         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
3884         specific.
3885
3886 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
3887
3888         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
3889         return a preallocated out-of-memory exception instance.
3890
3891         * object.c (out_of_memory): Use the new function.
3892
3893         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
3894         flag is before the custom modifiers. Fixes #49802.
3895
3896 2003-11-16  Martin Baulig  <martin@ximian.com>
3897
3898         * class.c (mono_class_is_open_constructed_type): Implemented the
3899         MONO_TYPE_GENERICINST case.
3900
3901 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
3902
3903         * assembly.c (mono_assembly_fill_assembly_name): New function to
3904         fill out the MonoAssemblyName structure.
3905         (mono_assembly_open): Use the new function.
3906
3907         * icall.c (fill_reflection_assembly_name): New helper function.
3908
3909         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
3910         new function.
3911
3912         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
3913
3914 2003-11-15  Martin Baulig  <martin@ximian.com>
3915
3916         * class.c (mono_class_is_open_constructed_type): New public
3917         function; checks whether a type is an open constructed type,
3918         ie. whether it still contains type parameters.
3919         (mono_class_inflate_generic_type): If we're a type parameter and
3920         the inflated type is also a MONO_TYPE_(M)VAR, return the original
3921         type.
3922
3923         * class.h (MonoGenericInst): Added `guint32 is_open'.
3924
3925         * loader.c (method_from_methodspec): Check whether we're an open
3926         or closed constructed type and set `ginst->is_open'.
3927
3928         * reflection.c (mono_reflection_bind_generic_parameters): Check
3929         whether we're an open or closed constructed type and set
3930         `ginst->is_open'.
3931         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
3932         from open constructed types.
3933
3934 2003-11-15  Martin Baulig  <martin@ximian.com>
3935
3936         * reflection.c (mono_reflection_bind_generic_parameters): If we're
3937         a generic instance (instead of a generic type declaration) with
3938         unbound generic parameters, bind them to our actual types.
3939
3940 2003-11-14  Martin Baulig  <martin@ximian.com>
3941
3942         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
3943
3944         * reflection.c (mono_reflection_bind_generic_parameters): If we're
3945         an interface type, populate `res->interfaces' with instantiated
3946         versions of all the interfaces we inherit.
3947
3948 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
3949
3950         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
3951         when MONO_PATH is set but doesn't contain the install dir.
3952
3953 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3954
3955         * icall.c:
3956         (ves_icall_Type_GetInterfaces): don't return an interface twice when
3957         it's also implemented in base classes. Fixes bug #50927.
3958
3959 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
3960
3961         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
3962         if this method is called from a finalizer. Fixes #50913.
3963
3964 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
3965
3966         * threads.c: Implement VolatileRead/VolatileWrite
3967
3968         * icall.c: Add new icalls for VolatileRead/VolatileWrite
3969
3970 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
3971
3972         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
3973         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
3974         2.95.3.
3975
3976         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
3977         from Peter Ross (pro@missioncriticalit.com).
3978         
3979 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
3980
3981         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
3982
3983 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
3984
3985         * assembly.c (mono_assembly_load_references): Disable check because it
3986         triggers on older corlibs which lots of people have.
3987
3988 2003-11-12  Jackson Harper  <jackson@ximian.com>
3989
3990         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
3991         load corlib.dll if mscorlib.dll is not found.
3992         * assembly.h: Remove corlib name define.
3993         * class.c:
3994         * domain.c:
3995         * image.c: Change corlib name to mscorlib.
3996         
3997 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
3998
3999         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
4000
4001 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
4002
4003         * appdomain.h: Added loader_optimization here to sync with the C#
4004         code, and add disallow_binding_redirects field.
4005
4006 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
4007
4008         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
4009
4010         * reflection.c (mono_image_build_metadata): Fix crash on modules
4011         with no types.
4012
4013         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
4014
4015         * icall.c (ves_icall_get_method_info): Return callingConvention as
4016         well.
4017
4018         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
4019         namespaces from the EXPORTEDTYPE table as well.
4020
4021         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
4022         from all modules inside the assembly.
4023         
4024 2003-11-11  Martin Baulig  <martin@ximian.com>
4025
4026         * reflection.c (mono_reflection_bind_generic_parameters): Make
4027         this work for interfaces.
4028
4029 2003-11-11  Martin Baulig  <martin@ximian.com>
4030
4031         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
4032
4033 2003-11-11  Martin Baulig  <martin@ximian.com>
4034
4035         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
4036         "MonoInflatedMethod" and "MonoInflatedCtor".
4037
4038 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
4039
4040         * reflection.c (resolution_scope_from_image): Use the assembly table
4041         from the manifest module, since other modules don't have it.
4042
4043         * debug-helpers.c (mono_type_full_name): New helper function.
4044
4045         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
4046
4047         * image.c (mono_image_load_file_for_image): New public function which
4048         is a replacement for the load_file_for_image in class.c.
4049
4050         * assembly.c (mono_assembly_load_module): A wrapper for the function
4051         above which does assembly association and reference loading too.
4052
4053         * class.c (mono_class_from_name): Call mono_assembly_load_module.
4054
4055 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4056
4057         * appdomain.c: not all of the attributes for the full assembly name
4058         are required and the order doesn't matter. Fixes bug #50787.
4059
4060 2003-11-10  Dick Porter  <dick@ximian.com>
4061
4062         * locales.c: Use platform-endian UTF16
4063
4064 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
4065
4066         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4067         
4068 2003-11-10  Martin Baulig  <martin@ximian.com>
4069
4070         * metadata.c
4071         (mono_metadata_load_generic_params): Make this actually work.
4072
4073         * reflection.c (mono_reflection_bind_generic_parameters): If our
4074         parent is a generic instance, pass all the `types' to it, no
4075         matter whether it has the same number of type parameters or not.
4076
4077 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
4078
4079         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4080
4081         * assembly.c (mono_assembly_load_references): Move the image<->assembly
4082         assignment code to this function so it gets called recursively for all
4083         modules.
4084
4085         * image.c (load_modules): Remove the assembly assignment since it is
4086         now done by mono_assembly_load_references.
4087         
4088         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
4089         Add 'module' argument.
4090         (mono_module_get_types): New helper function.
4091         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
4092
4093 2003-11-08  Martin Baulig  <martin@ximian.com>
4094
4095         * class.c (mono_class_inflate_generic_method): Interface method
4096         don't have a header.
4097
4098         * reflection.c (mono_image_get_methodspec_token): Take an
4099         additional `MonoGenericInst *' argument instead of reading it from
4100         the header; this is necessary to support interfaces.
4101         (mono_image_create_token): Pass the `MonoGenericInst *' from the
4102         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
4103         (inflated_method_get_object): Take an additional `MonoGenericInst *'
4104         argument.
4105
4106         * reflection.h (MonoReflectionInflatedMethod): Added
4107         `MonoGenericInst *ginst'.
4108
4109 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
4110
4111         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
4112
4113 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
4114
4115         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
4116
4117 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
4118
4119         * reflection.c 
4120         (reflection_methodbuilder_from_method_builder):
4121         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
4122         initialize a ReflectionMethodBuilder structure.
4123         (mono_image_get_methodbuilder_token):
4124         (mono_image_get_ctorbuilder_token): New functions to emit memberref
4125         tokens which point to types in another module inside the same assembly.
4126
4127         * reflection.c: Use the new helper functions.
4128         
4129         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
4130
4131         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
4132         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
4133
4134         * reflection.c (resolution_scope_from_image): Emit a moduleref if
4135         neccesary.
4136
4137         * reflection.c (mono_image_build_metadata): Emit metadata only for the
4138         current module. Emit the manifest only for the main module.
4139
4140         * reflection.c (mono_image_create_token): Add assertion when a 
4141         memberref needs to be created.
4142
4143         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
4144
4145         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
4146         larger buffer for the custom attribute blob. Fixes #50637.
4147         
4148 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4149
4150         * threadpool.c: notify listener on async processing handles after
4151         invoking the async callback. Thanks to Zoltan.
4152
4153 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4154
4155         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
4156         avoid code duplication.
4157
4158         * reflection.h (MonoDynamicImage): New type which is currently unused,
4159         but will be used through the ref.emit code in place of 
4160         MonoDynamicAssembly.
4161
4162         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4163         object layout.
4164
4165         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
4166         a MonoDynamicImage instead of just a MonoImage.
4167         
4168         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
4169         icalls to ModuleBuilder but keep their semantics, so they will work
4170         with moduleb->assemblyb. This will change later.
4171         
4172 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4173
4174         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4175         object layout.
4176
4177         * reflection.c (mono_image_build_metadata): Avoid creation of a default
4178         main module, since it is now done by the managed code.
4179
4180 2003-11-03  Martin Baulig  <martin@ximian.com>
4181
4182         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
4183         `ginst->klass' here.
4184         (method_encode_methodspec): Don't use the `ginst->generic_method's
4185         klass if it's a generic instance, use `ginst->klass' in this case.
4186
4187 2003-11-03  Martin Baulig  <martin@ximian.com>
4188
4189         * reflection.c (mono_image_get_generic_method_param_info):
4190         Removed, use mono_image_get_generic_param_info() instead.
4191         (mono_image_get_type_info): Write the GenericParam table before
4192         the Method table.  This is neccessary because in the GenericParam
4193         table, type parameters of the class (ie. '!0' etc.) must come
4194         before the ones from its generic methods (ie. '!!0' etc).
4195
4196 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4197
4198         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
4199
4200 2003-11-02  Martin Baulig  <martin@ximian.com>
4201
4202         * reflection.c (create_generic_typespec): Take a
4203         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
4204         the generic parameters from it.
4205
4206 2003-11-02  Martin Baulig  <martin@ximian.com>
4207
4208         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
4209         instead of a `MonoClassField *' since we just need the type.
4210         (create_generic_typespec): New static function.  Creates a
4211         TypeSpec token for a generic type declaration.
4212         (mono_image_get_generic_field_token): New static function.
4213         (mono_image_create_token): If we're a FieldBuilder in a generic
4214         type declaration, call mono_image_get_generic_field_token() to get
4215         the token.
4216
4217 2003-11-02  Martin Baulig  <martin@ximian.com>
4218
4219         * reflection.h
4220         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
4221         `MonoReflectionGenericInst *declaring_type' and
4222         `MonoReflectionGenericInst *reflected_type' fields.
4223
4224         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
4225         `MonoReflectionGenericInst *declaring_type' and a
4226         `MonoReflectionGenericInst *reflected_type' argument instead of a
4227         single `MonoReflectionGenericInst *type' one.  Set
4228         `res->declaring_type' and `res->reflected_type' from them.
4229         (mono_reflection_inflate_field): Likewise.      
4230
4231 2003-11-02  Martin Baulig  <martin@ximian.com>
4232
4233         * class.c (mono_class_setup_vtable): Don't store generic methods
4234         in the vtable.  
4235
4236 2003-11-02  Martin Baulig  <martin@ximian.com>
4237
4238         * reflection.h (MonoReflectionGenericInst): Added
4239         `MonoReflectionType *declaring_type'.
4240
4241         * reflection.c (mono_reflection_bind_generic_parameters): Use
4242         `if (tb->parent)' instead of `klass->parent'.
4243
4244 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
4245
4246         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
4247         with an empty ASSEMBLY table.
4248
4249         * reflection.c (mono_image_build_metadata): Avoid using the same loop
4250         variable in the inner and outer loops.
4251
4252 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
4253
4254         * metadata.h (mono_metadata_make_token): Put parentheses around macro
4255         argument.
4256
4257         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
4258         
4259         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
4260         icalls. Instead, do everything in managed code. This is needed since
4261         it is hard to restore the original domain etc. in unmanaged code in the
4262         presence of undeniable exceptions.
4263
4264         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
4265         New icalls to push and pop appdomain refs.
4266
4267 2003-10-31  Martin Baulig  <martin@ximian.com>
4268
4269         * class.c (inflate_generic_type): Renamed to
4270         mono_class_inflate_generic_type() and made it public.
4271
4272         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
4273         New interncall.
4274
4275         * loader.c (mono_field_from_memberref): Also set the retklass for
4276         typespecs.
4277
4278         * fielder.c (mono_image_get_inflated_field_token): New static
4279         method; creates a metadata token for an inflated field.
4280         (mono_image_create_token, fixup_method): Added support for
4281         "MonoInflatedField".
4282         (fieldbuilder_to_mono_class_field): New static function.
4283         (mono_reflection_inflate_field): New public function.
4284
4285         * reflection.h
4286         (MonoReflectionGenericInst): Added `MonoArray *fields'.
4287         (MonoReflectionInflatedField): New typedef.     
4288
4289 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
4290
4291         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
4292         for Solaris and other platforms without s6_addr16
4293
4294 2003-10-30  Martin Baulig  <martin@ximian.com>
4295
4296         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
4297         argument instead of two.
4298         (mono_class_inflate_generic_signature): Likewise.
4299         (inflate_generic_header): Likewise.
4300         (mono_class_inflate_generic_method): Likewise.  In addition, if
4301         `ginst->klass' is set, it becomes the new `method->klass'.
4302
4303         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
4304         field.
4305
4306         * reflection.c (encode_generic_method_sig): Write a 0xa as the
4307         first byte. [FIXME]
4308         (method_encode_methodspec): If we have generic parameters, create
4309         a MethodSpec instead of a MethodRef.
4310         (fixup_method): Added support for "MonoInflatedMethod" and
4311         "MonoInflatedCtor".
4312         (mono_image_create_token): Added support for "MonoInflatedMethod"
4313         and "MonoInflatedCtor".
4314         (inflated_method_get_object): New static function; returns a
4315         managed "System.Reflection.MonoInflatedMethod" object.
4316         (mono_reflection_bind_generic_method_parameters): Return a
4317         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
4318         (mono_reflection_inflate_method_or_ctor): Likewise.
4319         (mono_image_get_generic_method_param_info): Initialize unused
4320         fields to zero.
4321         (mono_image_get_generic_param_info): Likewise.
4322
4323         * reflection.h (MonoReflectionInflatedMethod): New public
4324         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
4325         "S.R.MonoInflatedCtor" classes.
4326
4327         * loader.c (method_from_memberref): If we're a TypeSpec and it
4328         resolves to a generic instance, inflate the method.
4329
4330 2003-10-28  Dick Porter  <dick@ximian.com>
4331
4332         * object.c (mono_runtime_run_main): Convert command-line arguments
4333         into utf8, falling back to the user's locale encoding to do so.
4334
4335 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
4336
4337         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
4338         at this time.
4339
4340         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
4341
4342         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
4343         up icalls at method definition time. Partially fixes #33569.
4344
4345 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
4346
4347         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
4348         marshalling of arrays. Fixes #50116.
4349
4350         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
4351
4352         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
4353         points to a vtable in the dying appdomain.
4354
4355         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
4356         listeners into unmanaged code inside the lock.
4357
4358         * object.c (mono_class_vtable): Turn off typed allocation in non-root
4359         domains and add some comments.
4360
4361 2003-10-25  Martin Baulig  <martin@ximian.com>
4362
4363         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
4364
4365         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
4366
4367         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
4368         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
4369         currently parsing.  Create the generic class and store it in
4370         `generic_inst->klass' before parsing the type arguments.  This is
4371         required to support "recursive" definitions; see mcs/tests/gen-23.cs
4372         for an example.
4373         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
4374         to support recursive typespec entries.
4375
4376         * class.c (mono_class_setup_parent): If our parent is a generic
4377         instance, we may get called before it has its name set.
4378         (mono_class_from_generic): Splitted into
4379         mono_class_create_from_generic() and mono_class_initialize_generic().
4380
4381 2003-10-25  Martin Baulig  <martin@ximian.com>
4382
4383         * icall.c (ves_icall_Type_BindGenericParameters): Return a
4384         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
4385         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
4386         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
4387
4388         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
4389         (create_typespec): Likewise.
4390         (mono_reflection_bind_generic_parameters): Return a
4391         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
4392         (mono_reflection_inflate_method_or_ctor): New public function.
4393
4394         * reflection.h (MonoReflectionGenericInst): New typedef.        
4395
4396 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
4397
4398         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
4399         inside the domain lock. Fixes #49993.
4400         
4401         * object.c (mono_class_vtable): When typed allocation is used, 
4402         allocate vtables in the GC heap instead of in the mempool, since the
4403         vtables contain GC descriptors which are used by the collector even
4404         after the domain owning the mempool is unloaded.
4405
4406         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
4407
4408         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
4409         reflect what it does. Also invalidate mempools instead of freeing
4410         them if a define is set.
4411
4412         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
4413         of the appdomain.
4414         
4415         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
4416         hold the finalizable objects in this domain.
4417
4418         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
4419         appdomain.
4420
4421         * appdomain.c (mono_domain_set): New function to set the current
4422         appdomain, but only if it is not being unloaded.
4423
4424         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
4425         appdomain which is being unloaded.
4426         
4427         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
4428         unloading of the root appdomain.
4429
4430         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
4431         icall to execute a method in another appdomain. Intended as a 
4432         replacement for InternalSetDomain, which can confuse the code 
4433         generation in the JIT.
4434
4435         * appdomain.c (mono_domain_is_unloading): New function to determine
4436         whenever an appdomain is unloading.
4437
4438         * appdomain.c (mono_domain_unload): New function to correctly unload
4439         an appdomain.
4440
4441         * assembly.c (mono_assembly_load_references): Check that an assembly
4442         does not references itself.
4443
4444         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
4445         domain manually, it asks the finalizer thread to do it, then waits for
4446         the result. Also added a timeout.
4447
4448         * icall.c: Register the new icalls.
4449
4450         * threads.h threads.c: Export the mono_gc_stop_world and 
4451         mono_gc_start_world functions.
4452         
4453         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
4454         function to fill out the mempool with 0x2a.
4455
4456 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
4457
4458         * reflection.h (MonoReflectionMethodAux): New structure to store
4459         information which is rarely used, thus is not in the MonoMethod
4460         structure.
4461
4462         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
4463         store the aux info.
4464
4465         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
4466         and marshalling info into the aux structure.
4467
4468         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
4469         from the aux structure.
4470
4471         * loader.c (mono_method_get_param_names): Retrieve the param names from
4472         the aux structure.
4473         
4474 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
4475
4476         * exception.h exception.c: Add AppDomainUnloadedException && fix 
4477         warning.
4478
4479 2003-10-21  Dick Porter  <dick@ximian.com>
4480
4481         * socket-io.c
4482         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
4483         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
4484
4485 2003-10-21  Martin Baulig  <martin@ximian.com>
4486
4487         * reflection.c (mono_reflection_bind_generic_parameters):
4488         `klass->parent' is NULL for interfaces.
4489
4490 2003-10-21  Martin Baulig  <martin@ximian.com>
4491
4492         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4493
4494 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
4495
4496         * exception.c (mono_exception_from_name_msg): New helper function for
4497         creating exceptions and initializing their message field.
4498
4499         * exception.c: Simplify functions using the new helper.
4500
4501         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
4502         New function.
4503
4504         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
4505         mono_raise_exception, since otherwise gcc doesn't generate the function
4506         epilog for raise_exception, confusing the stack unwinding in the JIT.
4507         Fixes #45043.
4508
4509         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
4510         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
4511         Fixes #49499.
4512
4513 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4514
4515         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
4516         utf8.
4517
4518 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
4519
4520         * icall.c: Removed GetUninitializedObject method because
4521           AllocateUninitializedClassInstance does the same.
4522
4523 2003-10-18  Martin Baulig  <martin@ximian.com>
4524
4525         * class.c (inflate_generic_signature): Renamed to
4526         mono_class_inflate_generic_signature() and made it public.
4527         (my_mono_class_from_generic_parameter): New static function; if we
4528         don't already have the generic parameter's MonoClass, create a
4529         very simple one which is just used internally in the runtime and
4530         not passed back to managed code.
4531
4532         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
4533
4534         * metadata.h (MonoMethodSignature): Moved the
4535         `MonoGenericParam *gen_params' to the MonoMethodHeader.
4536         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
4537
4538         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
4539         ves_icall_MonoMethod_GetGenericArguments(); this is now an
4540         interncall on the MonoMethod class, not on MethodInfo.
4541         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
4542         calling mono_reflection_bind_generic_method_parameters() directly.
4543
4544         * loader.c (mono_method_get_signature): If this is a MethodSpec;
4545         return the already computed `method->signature'.
4546         (method_from_methodspec): New static function to load a method
4547         from a MethodSpec entry.
4548         (mono_get_method_from_token): Call the new method_from_methodspec()
4549         for MethodSpec tokens.  
4550         (mono_get_method_from_token): If we're a generic method, load the
4551         type parameters.
4552
4553         * reflection.c (mono_image_get_memberref_token): Allow
4554         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
4555         table.
4556         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
4557         (mono_image_create_token): First check whether it's a generic
4558         method (so we'd need to create a MethodSpec), then do the other
4559         two alternatives.
4560         (mono_reflection_bind_generic_method_parameters): Return a
4561         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
4562         called directly from the interncall.
4563
4564 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
4565
4566         * reflection.c (load_public_key): Move loading of the public key
4567         into managed code.
4568
4569         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
4570
4571         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
4572         fields.
4573
4574         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
4575         culture, hash_alg and public_key. Fixes #49555.
4576
4577 2003-10-17  Martin Baulig  <martin@ximian.com>
4578
4579         * class.h (MonoGenericInst): Moved this declaration here and added
4580         `MonoMethod *generic_method'.
4581
4582         * icall.c
4583         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
4584         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
4585
4586         * metadata.c (mono_metadata_type_equal): Two types of
4587         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
4588         index; ie. don't compare the address of the `MonoGenericParam'
4589         structure.
4590         (mono_metadata_load_generic_params): Removed the `MonoMethod
4591         *method' argument.
4592
4593         * metadata.h (MonoGenericInst): Moved declaration to class.h.
4594         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
4595
4596         * reflection.c (method_encode_signature): Encode the number of
4597         generic parameters.
4598         (encode_generic_method_sig): New static function.
4599         (method_encode_methodspec): New static function; creates an entry
4600         in the MethodSpec table for a generic method.
4601         (mono_image_get_methodspec_token): New static function.
4602         (mono_image_create_token): Call mono_image_get_methodspec_token()
4603         for generic methods.
4604         (mono_reflection_bind_generic_method_parameters): New public
4605         function.  Instantiates a generic method.
4606
4607 2003-10-16  Martin Baulig  <martin@ximian.com>
4608
4609         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
4610         *gen_params' here from MonoMethodHeader.
4611
4612         * metadata.c (mono_metadata_parse_method_signature): If we have
4613         generic parameters, initialize `method->gen_params' and then set
4614         the correct `type->data.generic_param' in all the parameters.
4615
4616 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
4617
4618         * threads.c (mono_threads_get_default_stacksize): New function to 
4619         return the default stacksize.
4620
4621         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
4622         termination of the finalizer thread, since the previous method had
4623         race conditions. Fixes #49628.
4624
4625         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
4626         as for the other managed threads.
4627
4628 2003-10-16  Martin Baulig  <martin@ximian.com>
4629
4630         * class.c (inflate_generic_signature): Copy `generic_param_count'
4631         and `gen_params'.
4632
4633         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
4634         New interncall.
4635
4636         * metadata.c (mono_metadata_parse_method_signature): Actually set
4637         the `method->generic_param_count' here.
4638         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
4639
4640 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
4641
4642         * object.h: Add a new field to TypedRef to simplify the implementation
4643         of the REFANY opcodes in the JIT.
4644
4645         * icall.c: Make use of the new field.
4646
4647         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
4648         dynamically.
4649
4650 2003-10-15  Martin Baulig  <martin@ximian.com>
4651
4652         * class.c (mono_class_from_gen_param): Renamed to
4653         mono_class_from_generic_parameter() and moved most of the
4654         functionality from mono_reflection_define_generic_parameter()
4655         here; ie. we create a "real" class here.
4656         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
4657         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
4658         previously been called.
4659
4660         * class.h (MonoGenericParam): Moved the declaration of this struct
4661         here from metadata.h and added `MonoMethod *method'.
4662
4663         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
4664         interncall.
4665
4666         * loader.c (mono_get_method_from_token): If we have any generic
4667         parameters, call mono_metadata_load_generic_params() to read them
4668         from the MONO_TABLE_GENERICPAR.
4669
4670         * metadata.c (mono_metadata_load_generic_params): Added
4671         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
4672
4673         * metadata.h (MonoMethodSignature): Replaced
4674         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
4675         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
4676
4677         * reflection.c (mono_reflection_define_generic_parameter): Moved
4678         most of the functionality into the new
4679         mono_class_from_generic_parameter(); set the `method' field if
4680         we're a method parameter.       
4681
4682 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
4683
4684         * marshal.c (emit_struct_conv): if native size is 0
4685         emit no code.
4686
4687 2003-10-14  Martin Baulig  <martin@ximian.com>
4688
4689         * icall.c: The generics API has changed in the spec since it was
4690         added to System.Type; these modifications make it match the spec
4691         again.
4692         (ves_icall_Type_GetGenericParameters): Renamed to
4693         `ves_icall_Type_GetGenericArguments'.
4694         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
4695         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
4696         `ves_icall_MonoType_get_HasGenericArguments'.
4697         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
4698         `ves_icall_MonoType_get_IsGenericParameter'.
4699         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
4700         this is no interncall anymore.
4701         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
4702         `ves_icall_TypeBuilder_get_IsGenericParameter'.
4703
4704 2003-10-14  Martin Baulig  <martin@ximian.com>
4705
4706         * reflection.c (mono_reflection_bind_generic_parameters): Also
4707         inflate generic methods if we're reading the class from IL.
4708
4709 2003-10-13  Martin Baulig  <martin@ximian.com>
4710
4711         * reflection.c (mono_reflection_define_generic_parameter): This
4712         method isn't called directly from the icall anymore; take a
4713         `MonoReflectionAssemblyBuilder *' so we can use this for type and
4714         method generic parameters.
4715         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
4716         (method_builder_encode_signature): Encode generic parameters.
4717         (mono_image_get_method_info): Write generic params to the
4718         MONO_TABLE_GENERICPARAM table.
4719
4720         * reflection.h (MonoReflectionMethodBuilder): Added
4721         `MonoArray *generic_params'.
4722
4723         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
4724
4725         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
4726         wrapper for mono_reflection_define_generic_parameter().
4727         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
4728
4729 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
4730
4731         * marshal.h: Add missing function to fix build.
4732
4733         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
4734         the SetLastError pinvoke attribute.
4735
4736         * marshal.c (mono_marshal_set_last_error): New helper function called
4737         by the generated code.
4738         
4739         * marshal.c (mono_mb_emit_branch): New helper function.
4740
4741         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
4742
4743         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4744         classes as parameters and return values of delegates. Fixes #29256. 
4745
4746 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
4747
4748         * locales.c: use gint32 in non HAVE_ICU case
4749
4750 2003-10-11  Martin Baulig  <martin@ximian.com>
4751
4752         * mono-debug.c (mono_debug_add_method): Added a workaround for
4753         bug #48591.
4754
4755 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
4756
4757         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
4758         delegates passed to native code must use the STDCALL calling 
4759         convention. Fixes #35987.
4760
4761 2003-10-10  Martin Baulig  <martin@ximian.com>
4762
4763         * class.c (inflate_generic_type): If we're inflating for a generic
4764         type instance (and not for a generic method), return
4765         MONO_TYPE_MVAR unchanged.
4766
4767 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4768
4769         * string-icalls.c: Join ignores null strings in the source array.
4770         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
4771         * threads.c: GetAvailableTheads is slightly more accurate.
4772
4773 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
4774
4775         * threads.h threads.c : add mono_threads_set_default_stacksize
4776         and pass default to CreateThread calls.
4777
4778 2003-10-09  Dick Porter  <dick@ximian.com>
4779
4780         * icall.c:
4781         * locales.h:
4782         * locales.c: Internal calls for constructing CultureInfo and
4783         related objects from libicu (if its available.)
4784
4785 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
4786
4787         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
4788
4789 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4790
4791         * threadpool.c: added an argument to async_invoke_thread that is the
4792         item to process, pass the MonoAsyncResult to the thread start function
4793         when creating a new thread. This way we don't need to acquire any lock
4794         when we're creating a new thread. Readded a semaphore for faster
4795         response times (instead of that Sleep i added).
4796
4797 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
4798
4799         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
4800         get daylight change dates better on Windows, fix handling
4801         of platforms without tm_gmtoff.
4802
4803 2003-10-06  Martin Baulig  <martin@ximian.com>
4804
4805         * class.c (inflate_generic_method): Renamed to
4806         mono_class_inflate_generic_method() and made public.
4807         (mono_class_init): Don't inflate the generic methods here.
4808         (mono_class_from_generic): Added `gboolean inflate_methods'
4809         argument.  Inflate the methods here.
4810
4811         * loader.c (mono_method_get_param_names): Ignore instances of
4812         generic types for the moment.
4813
4814         * reflection.c (fixup_method): Added support for inflated methods.
4815         (mono_image_create_token): Use mono_image_get_methodref_token()
4816         for inflated methods.
4817         (mono_custom_attrs_from_param): Ignore instances of generic types
4818         for the moment.
4819         (mono_reflection_bind_generic_parameters): New public function.
4820         Moved all the functionality from
4821         ves_icall_Type_BindGenericParameters() here and added support for
4822         dynamic types.
4823         (mono_reflection_define_generic_parameter): Initialize
4824         `klass->methods' here.
4825
4826         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
4827         functionality into mono_reflection_define_generic_parameter().
4828         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
4829         TypeBuilder, return that TypeBuilder.
4830
4831 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4832
4833         * appdomain.c: removed mono_delegate_semaphore.
4834
4835         * threadpool.c:
4836         (mono_thread_pool_add): moved hash table creation inside and the thread 
4837         creation outside of the critical region.
4838         (mono_thread_pool_finish): removed obsolete code.
4839         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
4840         continue or exit the thread depending on the queue.
4841
4842 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
4843
4844         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
4845         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
4846         handle more bool marshalling options
4847
4848 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
4849
4850         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
4851         arrays of structs. Also add a more descriptive error message when
4852         a structure member is marshalled as LPArray.
4853
4854 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
4855
4856         * marshal.c (mono_marshal_get_native_wrapper): Add support for
4857         marshalling arrays of complex types. Fixes #29098. Also remove an
4858         usused and incomplete function.
4859
4860 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4861
4862         * gc.c: report heap_size - free_bytes as total memory allocated
4863         (bug#49362).
4864
4865 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
4866
4867         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
4868         fix timezone handling problems on Windows.
4869         
4870         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
4871         asserts when the year is outside the range handled by ms the functions.
4872
4873         * class.c (setup_interface_offsets): If the class is an interface,
4874         fill out its interface_offsets slot.
4875
4876 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4877
4878         * threadpool.c: mark threadpool threads as background.
4879
4880 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
4881
4882         * decimal.c - define DECINLINE to nothing if not using GCC
4883
4884 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
4885
4886         * assembly.c: More refcount fixes.
4887
4888 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4889
4890         * string-icalls.c: if we're not trimming, return the same string.
4891         When not splitting, don't create a new string.
4892
4893 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4894
4895         * image.c:
4896         (mono_image_open): increment the ref_count inside the critical section.
4897
4898 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
4899
4900         * image.c (mono_image_open): Fix reference counting bug.
4901
4902 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
4903
4904         * marshal.c (mono_marshal_type_size) struct alignment changed for 
4905         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
4906         64bits. Avoid leak in mono_marshal_get_native_wrapper when
4907         mono_lookup_pinvoke_call throws.        
4908
4909 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
4910
4911         * reflection.c (mono_reflection_parse_type): Fix #49114.
4912
4913         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
4914         temporary workaround for cygwin header problem.
4915
4916         * object.c (mono_object_isinst): Synchronize this with the code
4917         generated by the JIT for casts.
4918
4919 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
4920
4921         * reflection.c (encode_type): Fix #38332.
4922
4923 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
4924
4925         * marshal.c (mono_marshal_method_from_wrapper): New function to return
4926         the original method from the wrapper method.
4927
4928 2003-09-25  Martin Baulig  <martin@ximian.com>
4929
4930         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
4931         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
4932         (ves_icall_Type_get_IsGenericInstance): New interncall.
4933
4934 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
4935
4936         * object.c: fix cast warning in big endian code.
4937
4938 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
4939
4940         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
4941         
4942 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4943
4944         * assembly.c: don't call check_env from mono_assembly_load. It's
4945         already done once in mono_assemblies_init and may cause headaches when
4946         multiple threads are loading assemblies.
4947
4948 2003-09-19  Martin Baulig  <martin@ximian.com>
4949
4950         * reflection.c (mono_reflection_define_generic_parameter): Don't
4951         allocate `klass->methods', set `klass->flags' to
4952         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
4953
4954 2003-09-18  Martin Baulig  <martin@ximian.com>
4955
4956         * class.c (mono_class_init): Don't create `class->methods' if it's
4957         already initialized.
4958
4959         * metadata.c (mono_metadata_load_generic_params): Make this
4960         actually work.
4961
4962         * reflection.c (mono_reflection_define_generic_parameter): Set
4963         parent class and interfaces from the constraints.
4964
4965         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
4966         to keep this struct in sync with the declaration in TypeBuilder.cs.
4967
4968 2003-09-17  Martin Baulig  <martin@ximian.com>
4969
4970         * metadata.h (MonoType): Replaced the data's `int type_param'
4971         field with `MonoGenericParam *generic_param'.
4972         (MonoGenericParam): Added `MonoClass *klass'.
4973
4974         * class.c (mono_class_from_gen_param): Removed the
4975         `MonoImage *image' and `int type_num' arguments.
4976
4977         * metadata.c (mono_metadata_parse_generic_param): New static
4978         method; creates a MonoGenericParam which just contains the index.
4979         (do_mono_metadata_parse_type): Call
4980         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
4981         MONO_TYPE_MVAR.
4982
4983         * reflection.c (mono_image_typedef_or_ref): Generic type
4984         parameters may be in the same assembly, but never use a typedef
4985         for them.
4986         (mono_reflection_define_generic_parameter): We're now creating a
4987         "real" class for the type parameter; it's now safe to call
4988         mono_class_from_mono_type() on the class'es type, it'll do the
4989         right thing.
4990
4991 2003-09-16  Martin Baulig  <martin@ximian.com>
4992
4993         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
4994         `symfile->range_entry_size' and `symfile->class_entry_size' here;
4995         the `symfile' data structure must be fully initialized before it
4996         gets added to the table.
4997
4998 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
4999
5000         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
5001
5002         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
5003         class init trampolines.
5004
5005 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
5006
5007         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
5008         to the built-in profiler to turn off time and allocation profiling
5009         respectively.
5010
5011 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
5012
5013         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
5014         g_direct_equal.
5015
5016         * debug-helpers.c (mono_method_full_name): Print the wrapper type
5017         in human readable form.
5018
5019 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
5020
5021         * reflection.c icall.c: Fixed warnings.
5022
5023         * image.c (load_class_names): Use a temporary hash table to hold the
5024         namespaces in order to avoid doing many string comparisons.
5025
5026         * image.h: Fix typo.
5027
5028         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
5029         Pass NULL instead of g_direct_equal to the GHashTable constructor 
5030         since the NULL case is short-circuited inside g_hash_table_lookup, 
5031         leading to better performance.  
5032
5033         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
5034         obtain the first custom attribute for a given index. Depends on the
5035         CustomAttribute table being sorted by the parent field.
5036
5037         * reflection.c (mono_custom_attrs_from_index): Use the new function 
5038         for better performance.
5039
5040 2003-09-07  Martin Baulig  <martin@ximian.com>
5041
5042         * class.c (mono_class_init): If we're a generic instance, inflate
5043         all our methods instead of loading them from the image.
5044         (mono_class_from_generic): Set `class->methods = gklass->methods'.
5045
5046 2003-09-07  Martin Baulig  <martin@ximian.com>
5047
5048         * mono-debug-debugger.c: Added support for constructors.
5049
5050 2003-09-06  Martin Baulig  <martin@ximian.com>
5051
5052         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
5053         New interncall.
5054
5055         * reflection.c (mono_reflection_setup_generic_class): Call
5056         ensure_runtime_vtable() to create the vtable.
5057
5058 2003-09-05  Martin Baulig  <martin@ximian.com>
5059
5060         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
5061         MONO_TYPE_MVAR.
5062
5063 2003-09-04  Martin Baulig  <martin@ximian.com>
5064
5065         * reflection.c (mono_reflection_define_generic_parameter): Generic
5066         parameters start with zero.
5067
5068 2003-09-04  Martin Baulig  <martin@ximian.com>
5069
5070         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
5071
5072         * reflection.h (MonoReflectionGenericParam): New typedef.
5073         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
5074         the generic parameters from the managed TypeBuilder.
5075
5076         * reflection.c (mono_reflection_define_generic_parameter): New function.
5077         (mono_reflection_create_runtime_class): Encode generic parameters.
5078         (mono_reflection_setup_generic_class): New function; this is
5079         called after adding adding all generic params to the TypeBuilder.
5080         (encode_type): Added MONO_TYPE_VAR.
5081
5082 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
5083
5084         * class.h class.c (mono_class_needs_cctor_run): Moved this method
5085         here from the JIT.
5086
5087         * assembly.h assembly.c: Moved the AOT loading code into an assembly
5088         load hook.
5089
5090 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
5091
5092         * reflection.h reflection.c class.h class.c: Delete duplicate 
5093         definition of mono_type_get_name () from reflection.c and export the
5094         one in class.c.
5095
5096         * class.c: Class loading fixes from Bernie Solomon 
5097         (bernard@ugsolutions.com).
5098
5099         * reflection.c: Endianness fixes from Bernie Solomon 
5100         (bernard@ugsolutions.com).
5101         
5102 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
5103
5104         * assembly.h assembly.c: Define a file format version for AOT
5105         libraries.
5106         
5107         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
5108
5109         * appdomain.h (MonoJitInfo): New field to determine whenever the
5110         code is domain neutral.
5111         
5112 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
5113
5114         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
5115
5116 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
5117
5118         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
5119         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
5120         Avoid caching the result since strings must be domain specific. Fixes
5121         #48050.
5122
5123 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
5124
5125         * marshal.c (mono_marshal_init): Make this callable multiple times
5126         since it is hard to find a correct place to call it.
5127
5128         * object.c (mono_runtime_class_init): Execute static constructors in
5129         the correct appdomain.
5130
5131         * image.c (build_guid_table): Handle the case when multiple images have
5132         the same GUID.
5133
5134 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5135
5136         * icall.c: added a couple of icalls for System.Web.
5137
5138 2003-08-28  Martin Baulig  <martin@ximian.com>
5139
5140         * icall.c (ves_icall_Type_BindGenericParameters): Use
5141         `klass->generic_inst' instead of `&klass->byval_arg' in the
5142         mono_type_get_object() call.  The returned type must be
5143         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
5144
5145 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
5146
5147         * NOTES: New file.
5148
5149         * object.c (mono_class_proxy_vtable): Make it thread safe.
5150
5151         * pedump.c: Fix warning.
5152
5153         * object.c appdomain.h: Get rid of metadata_section. 
5154         It is no longer needed and it was causing deadlocks with domain->lock.
5155
5156         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
5157
5158 2003-08-26  Martin Baulig  <martin@ximian.com>
5159
5160         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
5161
5162 2003-08-26  Martin Baulig  <martin@ximian.com>
5163
5164         * pedump.c (main): Call mono_metadata_init(),
5165         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
5166         and mono_loader_init().
5167
5168 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
5169
5170         * loader.h: Add missing include to fix build.
5171
5172         * image.h: mono_image_load_references is no more.
5173
5174         * assembly.c: Reworked assembly loading to make it really thread safe.
5175         After these changes, the assembly returned by mono_assembly_open is
5176         fully initialized, i.e. all its references assemblies are loaded.
5177
5178         * assembly.c (mono_image_load_references): Renamed to 
5179         mono_assembly_load_references, and made private, since clients no
5180         longer need to call it.
5181
5182         * class.c: Removed calls to mono_assembly_load_references, since it was
5183         a source of deadlocks.
5184
5185         * loader.h loader.c class.h class.c: Protect data structures using a 
5186         new lock, the loader lock.
5187
5188         * class.c (mono_class_setup_vtable): Create temporary hash tables and
5189         GPtrArrays only when needed.
5190
5191         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
5192         into empty structures by mcs. Fixes pinvoke7.cs.
5193         
5194         * domain.c (mono_init): Call a new initialization function.
5195
5196         * appdomain.c (mono_runtime_init): Call the new initializer function
5197         of the marshal module.
5198
5199         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
5200         inserted into empty structures by mcs. Fixes pinvoke7.cs.
5201
5202         * marshal.h marshal.c: Added locks around the wrapper caches to make
5203         this module thread safe.
5204
5205         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
5206         this argument. Fixes pinvoke1.exe.
5207
5208 2003-08-25  Lluis Sanchez <lluis@ximian.com>
5209
5210         * object.h: Added call_type field to MonoMethodMessage and the corresponding
5211         enumeration of values. Removed fields to store remote call output values in
5212         MonoAsyncResult. Not needed any more.
5213         * object.c: Initialize call_type and async_result fields in mono_message_init.
5214         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
5215         dispatching the message.
5216         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
5217         async call to finish. To do it use a message with EndInvoke call type.
5218
5219 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
5220
5221         * loader.h loader.c (mono_method_hash_marhal_info): New function which
5222         determines whenever a method has marshalling info.
5223
5224 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5225
5226         * assembly.c: fix the build on windows.
5227
5228 2003-08-22 Lluis Sanchez <lluis@ximian.com>
5229
5230         * object.cs: Fixed bug #47785.
5231
5232 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
5233
5234         * string-icalls.c (StringReplace): If their are no occurances of
5235         the old string found return a reference to the supplied
5236         string. This saves some memory and matches MS behavoir.
5237         
5238 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5239
5240         * socket-io.c: fixed compilation for systems that define AF_INET6
5241         and don't define SOL_IP/SOL_IPV6.
5242
5243 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
5244
5245         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
5246         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
5247
5248         * rawbuffer.c rawbuffer.h: Make this module thread safe.
5249
5250         * domain.c: Make this module thread safe.
5251
5252         * domain.c (mono_init): Call new initialization function.
5253
5254         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
5255         reference types too. Fixes #38812.
5256
5257         * image.c (mono_image_init): Fixed warnings.
5258
5259         * class.c (mono_class_from_typeref): Handle assembly load failure
5260         correctly.
5261
5262         * appdomain.c (add_assemblies_to_domain): Handle the case when
5263         the references of an assembly are not yet loaded.
5264
5265         * metadata.c image.c assembly.c: Moved initialization of global
5266         variables to a separate function called at startup since lazy 
5267         initialization of these variables is not thread safe.
5268         
5269         * image.c assembly.c: Made this module thread safe by adding locks in 
5270         the appropriate places.
5271
5272         * domain.c (mono_init): Call the new initialization functions of the
5273         three modules.
5274
5275 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
5276
5277         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
5278           make a direct call. It is proxy's work to make the call asynchronous.
5279           mono_delegate_end_invoke(): If the targe is a proxy, just collect
5280           the return values.
5281         * object.cs: mono_method_call_message_new(): read AsyncResult and
5282           state object from parameters list, if this info is requested.
5283         * object.h: Added fields to store remote call output values in
5284           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
5285
5286 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5287
5288         * object.h: add needed fields to MonoThread.
5289         * threads.c, threads.h: allow registering a function to cleanup data
5290         allocated per thread by the JIT.
5291
5292 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5293
5294         * loader.h: portability fix by Bernie Solomon
5295         * <bernard@ugsolutions.com>.
5296
5297 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
5298
5299         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
5300         return a MonoArray. This simplifies the code and also ensures that
5301         the cache allways contains an object reference as a value.
5302
5303         * icall.c (ves_icall_get_parameter_info): Simplified using the new
5304         function.
5305
5306 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5307
5308         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
5309         fixes a problem with byte ordering when getting the address family for
5310         a socket.
5311
5312 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
5313
5314         * .cvsignore: Added monosn.
5315
5316         * reflection.h reflection.c loader.c: Added support for parameter
5317         marshalling to dynamically created types. Fixes #47295.
5318
5319 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
5320
5321         * rand.c: remove useless warnings.
5322
5323 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5324
5325         * class.c: implemented ldtoken for methods and fieldrefs.
5326
5327 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5328
5329         * threadpool.c: when mono_async_invoke was called, no one took care of
5330         monitoring the queue. So if the method invoked took some time and we
5331         got new async invoke requests after 500 ms (the thread created waited
5332         that long in WaitForSingleObject), the new async invoke was not called
5333         until the previous one finished.
5334
5335         This is fixed now. Thanks to Totte for helping with it.
5336
5337 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5338
5339         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
5340
5341 2003-08-11  Martin Baulig  <martin@ximian.com>
5342
5343         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
5344
5345 2003-08-06  Martin Baulig  <martin@ximian.com>
5346
5347         * mono-debug-debugger.c: Added support for static fields,
5348         properties and methods.
5349
5350 2003-08-06  Martin Baulig  <martin@ximian.com>
5351
5352         * mono-debug-debugger.c: Don't store the MonoString's vtable to
5353         make this work for applications with multiple application domains.
5354
5355 2003-08-04  Martin Baulig  <martin@ximian.com>
5356
5357         * mono-debug-debugger.c: Completely reworked the type support; the
5358         most important thing is that we're now just using one single
5359         `MonoType' instance per type.
5360
5361 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
5362
5363         * mono-endian.h, mono-endian.c, icall.c: Added icall
5364         ves_icall_System_Double_AssertEndianity to assert double word endianity
5365         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
5366
5367 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5368
5369         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
5370         support, icalls and fixes.
5371
5372 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
5373
5374         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
5375         classes that are a punctuation character in .NET is not the same a
5376         g_unichar_ispunct.
5377
5378 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5379
5380         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
5381
5382 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
5383
5384         * icall.c: Add new MemCopy internalcall.
5385         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
5386         Simplified code; It is not necessary to handle all the cases here,
5387         as the C# code takes care of it.  Only handle the case of the name
5388         resource embedded into the assembly.
5389
5390         Changed signature to return the data pointer and the size of the
5391         data. 
5392
5393 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
5394
5395         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
5396         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
5397
5398 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
5399
5400         * socket-io.c: ignore EINTR error in select.
5401
5402 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5403
5404         * class.h, class.c: removed unused subclasses field in MonoClass.
5405
5406 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
5407
5408         * icall.c: improve fix of get_base_definition(). If the parent class
5409           doesn't have the mehod, look at the parent of the parent.
5410         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
5411           to check if a parameter is an in or out parameter
5412           (PARAM_ATTRIBUTE_IN is not set by default).
5413           mono_method_return_message_restore(): Use mono_class_value_size to
5414           get the size of a value type. mono_type_stack_size (parameterType)
5415           does not return the correct value if parameterType is byRef.
5416           mono_load_remote_field(), mono_load_remote_field_new(),
5417           mono_store_remote_field(), mono_store_remote_field_new():
5418           raise exception if the remote call returns an exception.
5419
5420 2003-07-28  Martin Baulig  <martin@ximian.com>
5421
5422         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
5423         method.  This is a wrapper around mono_runtime_invoke() which
5424         boxes the instance object if neccessary.
5425
5426 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5427
5428         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
5429         metadata.h, row-indexes.h, verify.c: first cut of generics support.
5430
5431 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5432
5433         * icall.c: disable mcs bug workaround.
5434
5435 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
5436
5437         * object.c (mono_runtime_class_init): Take the metadata_section
5438         mutex before obtaining the domain mutex.
5439
5440         * appdomain.h: Added definition of metadata_section mutex here. 
5441
5442         * object.c: define metadata_mutex here.
5443
5444 2003-07-24  Ravi Pratap  <ravi@ximian.com>
5445
5446         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
5447         fixed.
5448
5449 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
5450
5451         * reflection.c: Fix bug #46669
5452
5453 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5454
5455         * exception.c:
5456         * exception.h:
5457         * icall.c:
5458         * object.h: fill in the type name for TypeLoadException.
5459
5460 2003-07-23  Ravi Pratap  <ravi@ximian.com>
5461
5462         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
5463         relationship between TypeBuilders while compiling corlib) and bug
5464         45993 (Array types returned from the runtime while compiling
5465         corlib were from the loaded corlib).
5466
5467 2003-07-22  Martin Baulig  <martin@ximian.com>
5468
5469         * mono-debug-debugger.c: Reworked the type support a bit more;
5470         distinguish between types and classes.
5471
5472 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
5473
5474         * icall.c: add IsArrayImpl icall.
5475
5476 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
5477
5478         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
5479         initializing real_size only once. Also fix bug #46602.
5480
5481 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
5482
5483         * object.c: Renamed mono_metadata_section to metadata_section.
5484
5485 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
5486
5487         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
5488           empty array if the type is an array. Fixed.
5489           ves_icall_MonoMethod_get_base_definition: if the base method
5490           is abstract, get the MethodInfo from the list of methods of
5491           the class.
5492         * reflection.c: ParameterInfo.PositionImpl should be zero-based
5493           and it was 1-based. Fixed in mono_param_get_objects.
5494
5495 2003-07-20  Martin Baulig  <martin@ximian.com>
5496
5497         * mono-debug.h: Set version number to 31.
5498         (mono_debug_init): Added `MonoDomain *' argument.
5499
5500         * mono-debug-debugger.c: Reworked the type support; explicitly
5501         tell the debugger about builtin types; pass the `klass' address to
5502         the debugger.
5503
5504 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
5505
5506         * image.c: Allow new metadata tables to be loaded without a
5507         warning. Also update the warning message to give the new constant value.
5508                 
5509 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5510
5511         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
5512         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
5513         array type representation changes.
5514
5515 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5516
5517         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
5518         on Environment.Exit () call.
5519
5520 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5521
5522         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
5523         requires a matching corlib.
5524
5525 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
5526
5527         * Changelog: My editor decided to add a CR to each line. Sorry about that.
5528           Committed again without the CRs.
5529         
5530 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
5531
5532         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
5533           getting it from the "this" socket instance. Did not work
5534           if the socket is a subclass of Socket.
5535           Also fixed bug #35371.
5536
5537 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5538
5539         * metadata.c: fixed size for TypedByRef.
5540         * loader.c: when searching for a method, consider the vararg amrker.
5541         * unicode.c, decimal.c: constify some arrays.
5542
5543 2003-07-15  Dick Porter  <dick@ximian.com>
5544
5545         * socket-io.c: Fixed compilation for gcc < 3.2.
5546
5547         Fixed compilation for machines that don't have AF_INET6 (thanks to
5548         Bernie Solomon <bernard@ugsolutions.com> for that part.)
5549
5550         Fixed compile warnings.
5551         
5552         Fixed formatting and line endings.
5553
5554 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
5555
5556         * socket-io.h:
5557         * socket-io.c: Added IPv6 support.
5558
5559 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
5560
5561         * class.c (mono_class_is_assignable_from): New function to implement
5562         the is_assignable_from logic. Used by mono_object_isinst, 
5563         Type::IsAssignableFrom () and the interpreter.
5564
5565         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
5566         Object, even interfaces.
5567         
5568         * object.c (mono_object_isinst): Implement in terms of 
5569         is_assignable_from.
5570
5571         * icall.c (ves_icall_type_is_assignable_from): New icall.
5572
5573 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
5574
5575         * domain.c (foreach_domain): fix compiler warning.
5576
5577 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
5578
5579         * image.c (load_metadata_ptrs): use g_strndup because strndup is
5580         not available on all plattforms
5581
5582 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
5583
5584         * image.h image.c: Store the metadata version string in MonoImage.
5585         * icall.c: New icall to retrieve the image version.
5586         * reflection.c (create_dynamic_image): Fill in the image version field
5587         * reflection.c (build_compressed_metadata): Use the image version
5588         from the image structure.
5589
5590 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5591
5592         * appdomain.c: modified comment.
5593         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
5594         That will be its last iteration when mono_gc_cleanup is called from
5595         mono_runtime_cleanup and before the domain is unloaded.
5596
5597         Fixes bug #45962.
5598
5599 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
5600
5601         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
5602         attributes.
5603
5604 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5605
5606         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
5607         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
5608         Bernie Solomon <bernard@ugsolutions.com>.
5609
5610 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5611
5612         * object.c, object.h: provide mono_object_new_fast() for faster
5613         allocation in some special cases.
5614
5615 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
5616
5617         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
5618         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
5619
5620 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
5621
5622         * threadpool.c: fix leaks.
5623
5624 2003-07-01  Dick Porter  <dick@ximian.com>
5625
5626         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
5627         using MonoGHashTables.  Fixes threadpool bug posted to list.
5628
5629 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
5630
5631         * image.h, image.c: added support to load an assembly from a byte array.
5632         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
5633         assembly bundle support.
5634
5635 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
5636
5637         * threadpool.c (mono_thread_pool_add): keep a reference to the
5638         AsyncResult to prevent GC
5639
5640 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5641
5642         * class.c: leak fix.
5643
5644 2003-06-25  Dick Porter  <dick@ximian.com>
5645
5646         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
5647         for the async object, the WaitHandle object will close the handle.
5648         Fixes bug 45321.
5649
5650 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5651
5652         * class.c: in mono_array_class_get (), lookup from the hash with the
5653         same type we insert: this works around a bug in
5654         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
5655         lluis. The real fix will have to wait for after the release.
5656
5657 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5658
5659         * icall.c: fix memory leak when getting type members.
5660
5661 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5662
5663         * reflection.c: added more pubtoken special cases.
5664
5665 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
5666
5667         * class.c: handle field offset correctly when class size
5668         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
5669
5670 2003-06-20  Martin Baulig  <martin@ximian.com>
5671
5672         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
5673         *image' field.
5674
5675 2003-06-20  Martin Baulig  <martin@ximian.com>
5676
5677         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
5678
5679 2003-06-20  Martin Baulig  <martin@ximian.com>
5680
5681         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
5682         just distinguish between variables in registers and variables at
5683         an offset relative to a register.
5684
5685 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5686
5687         * icall.c: #ifdef out latest changes until mcs is fixed.
5688
5689 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5690
5691         * icall.c: return members in metadata order.
5692
5693 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5694
5695         * icall.c: avoid infinite loop in GetTimeZoneData.
5696
5697 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
5698
5699         * icall.c: added Marshal.Prelink/All icalls.
5700
5701 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5702
5703         * object.c, object.h: fix warnings and do some overflow checking
5704         when creating arrays.
5705
5706 2003-06-17  Dick Porter  <dick@ximian.com>
5707
5708         * file-io.h:
5709         * file-io.c: File attributes need to be tweaked slightly when
5710         passed from the managed to the w32 world.
5711
5712 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
5713         * profiler.h profiler-private.h profiler.c: Rework last patch
5714         based on suggestion by Paolo.
5715         
5716 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
5717
5718         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
5719         instruction level coverage data collection.
5720         * profiler.h profiler.c (: Added new callback function which can be
5721         used by the profiler to limit which functions should have coverage
5722         instrumentation.
5723         * profiler.c (mono_profiler_load): Call g_module_build_path to
5724         generate the file name of the profiler library.
5725
5726 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5727
5728         * profiler.c, profiler.h, profiler-private.h: added basic block 
5729         coverage profiling API.
5730
5731 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
5732
5733         * reflection.c (mono_reflection_create_runtime_class): Add support
5734         for events in dynamically generated code.
5735
5736         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
5737         not allocated.
5738
5739 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5740
5741         * icall.c: when getting timezone info, return reasonable values if we
5742         can't get the actual data.
5743
5744 2003-06-14  Dick Porter  <dick@ximian.com>
5745
5746         * threads.c (start_wrapper): Remove the reference to the thread
5747         object in the TLS data, so the thread object can be finalized.
5748         This won't be reached if the thread threw an uncaught exception,
5749         so those thread handles will stay referenced :-( (This is due to
5750         missing support for scanning thread-specific data in the Boehm GC
5751         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
5752
5753 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
5754
5755         * reflection.c: ensure streams and tables are first allocated with
5756         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
5757
5758 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5759
5760         * icall.c: fixed GetElementType for byrefs (bug# 44792).
5761
5762 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
5763
5764         * reflection.c (mono_reflection_create_runtime_class): Add support for
5765         properties to dynamically created classes.
5766         * reflection.c: Fix a few places where non-MonoObjects were inserted
5767         into the tokens hashtable.
5768
5769 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5770
5771         * object.c: some support to handle out of memory exceptions.
5772
5773 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
5774
5775         * marshal.c (mono_marshal_get_native_wrapper): support reference
5776         return types
5777
5778 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5779
5780         * object.h, object.c: more portability stuff from Bernie Solomon.
5781         Unexport mono_object_allocate(). Added mono_object_unbox ().
5782         Set exitcode when an unhandled exception is thrown.
5783
5784 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
5785
5786         * marshal.c (mono_marshal_get_native_wrapper): use custom
5787         marshaler for return types.
5788
5789 2003-06-10  Dick Porter  <dick@ximian.com>
5790
5791         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
5792         ip_mreq is available
5793
5794 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
5795
5796         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
5797         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
5798         by Bernie Solomon <bernard@ugsolutions.com>.
5799
5800 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
5801
5802         * gc.c (mono_gc_init): Avoid error message on shutdown when
5803         GC_DONT_GC=1 is used.
5804
5805         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
5806         New icall to return the GUID of a module.
5807
5808 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5809
5810         * class.c: ensure instance size always includes the parent's size
5811         even whem class size is set explicitly (fixes bug#44294).
5812
5813 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5814
5815         * profiler.h, profiler.c: made the simple profiler thread-safe,
5816         get more accurate timing info. Allow the loading of an
5817         externally-developed profiler module.
5818
5819 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
5820
5821         * marshal.c (mono_marshal_get_native_wrapper): improved
5822         class/byref arguments.
5823         (mono_marshal_get_native_wrapper): better string marshaling support.
5824
5825 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5826
5827         * class.c: ensure .pack and .size are handled correctly and
5828         simplified layout of static fields.
5829
5830 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
5831
5832         * appdomain.c
5833         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
5834
5835         * loader.c (mono_lookup_pinvoke_call): look for modules in the
5836         current directory (fix bug 44008)
5837
5838 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
5839
5840         * marshal.c (mono_marshal_get_native_wrapper): started support for
5841         custom marshalers.
5842         (mono_delegate_to_ftnptr): consider marshalling specifications
5843
5844 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5845
5846         * reflection.c, reflection.h: emit custom marshal info.
5847
5848 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5849
5850         * object.c: free the GError.
5851         * icall.c: added CloseEvent_internal.
5852         * threads.[ch]:
5853         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
5854         call.
5855
5856 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
5857
5858         * loader.c (mono_method_get_signature): Add support for dynamic
5859         assemblies.
5860
5861 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5862
5863         * reflection.c: fixed bug #43905.
5864
5865 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5866
5867         * class.c, domain.c, icall.c, metadata.h, object.h: support for
5868         handling TypedReference and ArgIterator.
5869         * loader.c, loader.h: added function to get signature at call site.
5870
5871 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5872
5873         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
5874         data readonly. Buglets and warning fixes. Some MethodSpec support.
5875
5876 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5877
5878         * class.h, class.c, object.c: remove relative numbering support.
5879
5880 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
5881
5882         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
5883         free the string, until we get a chance to fix Gtk#
5884
5885 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5886
5887         * marshal.c: revert last patch.
5888
5889 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5890
5891         * icall.c: updates for new mono_class_vtable() not calling
5892         the type constructor anymore.
5893
5894 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5895
5896         * object.h, object.c: separate vtable creation from type
5897         initialization. Make running the .cctor thread safe.
5898
5899 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
5900
5901         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
5902
5903 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
5904
5905         * loader.c (mono_get_method): consider calling convention
5906
5907 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
5908
5909         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
5910         to return the invisible global type for a module.
5911
5912         * reflection.c (mono_image_build_metadata): Emit global fields too.
5913
5914 2003-05-20  Peter Williams  <peterw@ximian.com>
5915
5916         * loader.c (mono_lookup_internal_call): Add a few newlines.
5917
5918 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
5919
5920         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
5921         literal strings.
5922
5923         * appdomain.c (set_domain_search_path): Recalculate search path when
5924         AppDomainSetup.PrivateBinPath changes.
5925
5926         * object.c (mono_class_compute_gc_descriptor): It turns out some
5927         parts of the class libs (like System.Thread) holds pointers to
5928         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
5929         to treat native int a pointer type here.
5930         
5931 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
5932
5933         * appdomain.h, domain.c: add hashtable for jump target resolution.
5934
5935 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
5936
5937         * reflection.h reflection.c icall.c: Added new icalls 
5938         GetManifestResourceInfoInternal, GetModulesInternal and support
5939         infrastructure.
5940
5941 2003-05-16  Dick Porter  <dick@ximian.com>
5942
5943         * icall.c:
5944         * file-io.h:
5945         * file-io.c: Implement System.IO.MonoIO::GetTempPath
5946
5947 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
5948
5949         * object.c: mono_store_remote_field: little fix to previous patch.
5950
5951 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5952
5953         * class.c: add constructors to array classes.
5954         * icall.c: special case array construction for InternalInvoke (),
5955
5956 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
5957
5958         * class.h class.c reflection.c object.c: Added support for field
5959         defaults in dynamically generated classes.
5960
5961 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5962
5963         * reflection.c: properly encode charset for ddlimport.
5964
5965 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
5966
5967         * threads.c: allow compiling without GC.
5968
5969 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5970
5971         * appdomain.h, object.c, object.h, threads.c, threads.h: added
5972         handling of thread static data.
5973
5974 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5975
5976         * reflection.h, reflection.c: added mono_custom_attrs_free ().
5977
5978 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
5979
5980         * class.c (mono_array_class_get): always set the serializable flags
5981         (mono_array_class_get): always set the SEALED attribute for array types
5982
5983 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
5984
5985         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
5986         attributes (fix for bug 42021).
5987
5988 2003-05-12  Dick Porter  <dick@ximian.com>
5989
5990         * gc.c: Don't run finalizers when the finalizer thread is
5991         finishing up, because the default domain has already been
5992         destroyed.
5993
5994 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
5995
5996         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
5997         value is null, we should throw an exception.   This is slightly
5998         different than the other conventions used for the constructor.
5999
6000 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6001
6002         * socket-io.c: fixed windows build.
6003
6004 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6005
6006         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
6007
6008 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
6009
6010         * object.c (mono_string_new_wrapper): Compatibility fix for MS
6011         compilers.
6012
6013 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
6014
6015         * class.c (mono_class_layout_fields): Add experimental GC aware
6016         auto layout facility. Requires class library changes to work correctly.
6017
6018         (mono_class_setup_vtable): Avoid overriding explicit interface
6019         method implementations. Fixes iface3.exe test.
6020
6021         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
6022         object reference.
6023         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
6024         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
6025
6026         * metadata.h: Add new type classification macro which determines
6027         whenever the type holds an object reference.
6028
6029 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
6030
6031         * marshal.c (mono_marshal_get_native_wrapper): cleanups
6032
6033 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
6034
6035         * gc.c (finalizer_thread): Work around a GC bug.
6036
6037 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
6038
6039         * marshal.c (emit_struct_conv): allow unions
6040
6041         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
6042
6043 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
6044
6045         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
6046
6047 2003-05-06  Martin Baulig  <martin@ximian.com>
6048
6049         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
6050
6051 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6052
6053         * socket-io.c:
6054         (Select_internal): allow NULLs, don't create arrays if not needed.
6055         Coupled with Socket.cs changes.
6056
6057         * threadpool.c:
6058         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
6059         register a finalizer for it that will close the semaphore handle. This
6060         fixes the leak and make Lupus' test run with > 4080 loops.
6061
6062 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
6063
6064         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
6065         Jerome Laban (bug #42287)
6066
6067 2003-05-02  Martin Baulig  <martin@ximian.com>
6068
6069         * debug-mono-symfile.h
6070         (MonoSymbolFile): Moved declaration into mono-debug.h.
6071         (MonoDebugMethodJitInfo): Likewise.
6072         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
6073         argument.
6074         (_mono_debug_address_from_il_offset): Take a
6075         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
6076
6077         * mono-debug.h
6078         (MonoDebugDomainData): New struct.
6079         (mono_debug_get_domain_data): New function.
6080         (mono_debug_add_method): Take an additional `MonoDomain *'
6081         argument.
6082         (mono_debug_source_location_from_address): Likewise.
6083         (mono_debug_il_offset_from_address): Likewise.
6084         (mono_debug_address_from_il_offset): Likewise.
6085
6086 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
6087
6088         * reflection.c: one more check for null type in custom attrs.
6089
6090 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6091
6092         * reflection.c: avoid warning (comparison is always false due to limited
6093         range of data type).
6094
6095 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6096
6097         * icall.c: throw an exception in Type.GetField if the argument 'name'
6098         is NULL.
6099
6100 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
6101
6102         * reflection.c: fixed handling of enums in named arguments to custom
6103         attributes (bug #42123).
6104
6105 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6106
6107         * reflection.c: use the right array element type and handle
6108         a null for a Type argument, too.
6109
6110 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
6111
6112         * reflection.c: handle arrays as arguments to custom attributes.
6113
6114 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
6115
6116         * reflection.c: handle a string value in a custom attr
6117         ctor that takes an object.
6118
6119 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
6120
6121         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
6122         (fix bug #42063)
6123
6124 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
6125
6126         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
6127
6128 2003-04-27  Martin Baulig  <martin@ximian.com>
6129
6130         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
6131         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
6132         MONO_DEBUGGER_EVENT_BREAKPOINT.
6133         (mono_breakpoint_trampoline_code): Removed.
6134         (mono_debugger_event_handler): The last argument is now a
6135         `guint32'.
6136         (mono_debugger_insert_breakpoint_full): Removed the
6137         `use_trampoline' argument.
6138         (mono_debugger_method_has_breakpoint): Likewise.
6139         (mono_debugger_trampoline_breakpoint_callback): Renamed to
6140         mono_debugger_breakpoint_callback(); take the method and
6141         breakpoint number as arguments.
6142
6143 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6144
6145         * metadata.c: fix off by one when loading parameters attributes.
6146
6147 2003-04-24  Martin Baulig  <martin@ximian.com>
6148
6149         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
6150
6151 2003-04-24  Martin Baulig  <martin@ximian.com>
6152
6153         * mono-debug-debugger.c: Moved all code which interacts with the
6154         Mono Debugger here.
6155
6156         * debug-mono-symfile.c: This code now just deals with the symbol
6157         file itself, the debugger code is now in mono-debug-debugger.c.
6158
6159 2003-04-23  Martin Baulig  <martin@ximian.com>
6160
6161         * mono-debug.c (mono_debug_source_location_from_il_offset):
6162         New method; like mono_debug_source_location_from_address(), but
6163         takes an IL offset instead of a machine address.
6164
6165 2003-04-23  Martin Baulig  <martin@ximian.com>
6166
6167         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
6168         `line' field; this is now computed by the debugger.
6169
6170 2003-04-23  Martin Baulig  <martin@ximian.com>
6171
6172         * mono-debug.[ch]: New files.  This is the new debugging interface.
6173
6174         * mono-debug-debugger.[ch]: New files.  Moved all code which
6175         interacts with the Mono Debugger here.
6176
6177 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
6178
6179         * domain.c (mono_init): initialize mono_defaults.monitor_class
6180
6181 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
6182
6183         * reflection.c (method_encode_code): Add a spicy exception to help
6184         future compiler authors.
6185
6186 2003-04-21  Martin Baulig  <martin@ximian.com>
6187
6188         * icall.c
6189         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6190         Make this work with relative pathnames; g_filename_to_uri() needs
6191         an absolute filename.
6192
6193 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
6194
6195         * icall.c: Track name changes in Object and ValueType.
6196
6197 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
6198
6199         * metadata.c (mono_type_stack_size): size should be a multiple of
6200         sizeof (gpointer)
6201
6202 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6203
6204         * gc.c:
6205         (internal_domain_finalize): moved into mono_domain_finalize. No need
6206         to create another thread because the finalizers will be run in the
6207         finalizer thread.
6208         
6209         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
6210         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
6211         to be run (MS does this too).
6212
6213 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
6214
6215         * object.c (mono_class_compute_gc_descriptor): Update comment.
6216
6217         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
6218
6219         * image.h: Add synchronized wrapper cache.
6220
6221         * image.c (do_mono_image_open): Initialize cache.
6222
6223         * reflection.c (create_dynamic_mono_image): Initialize cache.
6224
6225 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6226
6227         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
6228         ves_icall_System_Buffer_ByteLengthInternal.
6229
6230 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6231
6232         * reflection.c: setup klass->nested_in earlier. Allow
6233         a dash in the assembly name.
6234
6235 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
6236
6237         * metadata.c (mono_type_to_unmanaged): dont access
6238         type->data.klass for MONO_TYPE_OBJECT
6239         (mono_type_to_unmanaged): consider System.Delegate class
6240
6241 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
6242
6243         * class.c: just setup supertypes in the proper place instead of
6244         initializing the full element class for arrays.
6245
6246 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6247
6248         * class.c: ensure the element class of arrays is initialized.
6249         Setup the supertype info for array classes, too.
6250
6251 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
6252
6253         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
6254
6255 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6256
6257         * Makefile.am: re-added -m option when running cygpath. This way,
6258         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
6259         separator.
6260         * mono-config.c: same codepath for locating mono config file for WIN32
6261         and the rest.
6262         * assembly.c: if mono_assembly_setrootdir is called, don't override
6263         the value set.
6264
6265 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6266
6267         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
6268         MONO_ASSEMBLIES variable.
6269
6270 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
6271
6272         * icall.c: added Assembly::GetNamespaces() icall.
6273
6274 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6275
6276         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
6277
6278 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
6279
6280         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
6281         * object.c: fixed bug in the construction of vtable for proxies
6282
6283 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
6284
6285         * object.c (mono_array_new): Mark mono_array_new as an icall.
6286
6287 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6288
6289         * class.c: fixed test for public method when overriding interfaces.
6290         Closes bug #40970.
6291
6292 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6293
6294         * appdomain.h, domain.c: added mono_domain_foreach() to
6295         be able to access the currently loaded appdomains.
6296         * object.c: make string interning work across sppdomains.
6297         Mark some functions for use as icalls.
6298
6299 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
6300
6301         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
6302
6303         * reflection.h reflection.c: Allocate long living data using 
6304         GC_MALLOC_ATOMIC so the collector does not need to scan it.
6305
6306         * reflection.c: Double the allocation size in streams instead of
6307         increasing it, to prevent unneccesary copying on large assemblies.
6308         
6309         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
6310         creation if the assembly does not have the Run flag set.
6311
6312 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6313
6314         * class.h: avoid the C++ keywords in header files (Jerome Laban
6315         spotted and fixed this).
6316
6317 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6318
6319         * object.c:
6320         (mono_unhandled_exception): fill in the arguments for the
6321         UnhandledException event. Only trigger that event for the default
6322         domain (as MS does).
6323
6324 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
6325
6326         * object.c: Improve typed allocation stuff based on suggestions from
6327         Paolo. Also turn it on if the GC library supports it.
6328
6329 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
6330
6331         * object.c object.h class.h: Added experimental typed allocation
6332         facility using the interfaces in gc_gcj.h.
6333
6334         * os/gc_wrapper.h: Added new include files.
6335         
6336 2003-04-03  Martin Baulig  <martin@ximian.com>
6337
6338         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
6339         which is not yet enabled by default.
6340
6341         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
6342         functions.
6343         (mono_gc_lock, mono_gc_unlock): New static functions.
6344
6345         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
6346         functions; stop/start the world for the garbage collector.  This
6347         is using the windows API; we need to complete the SuspendThread()/
6348         ResumeThread() implementation in the io-layer to make this work on Unix.
6349         (mono_gc_push_all_stacks): New public function; tells the garbage
6350         collector about the stack pointers from all managed threads.
6351
6352 2003-04-03  Martin Baulig  <martin@ximian.com>
6353
6354         * object.h (MonoThread): Added `gpointer stack_ptr'.
6355
6356         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
6357
6358 2003-04-03  Martin Baulig  <martin@ximian.com>
6359
6360         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
6361
6362 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
6363
6364         * reflection.c (typebuilder_setup_fields): Initialize field.first and
6365         field.last.
6366
6367 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
6368
6369         * loader.c (mono_lookup_internal_call): Report the corlib that is
6370         out of sync.
6371
6372 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
6373
6374         * icall.c (ves_icall_type_GetTypeCode): fixed check for
6375         System.DBNull (it's class not valuetype).
6376
6377 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6378
6379         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
6380         if the array method was already assigned a token (fixes bug#40646).
6381
6382 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
6383
6384         * reflection.c (mono_reflection_get_type): Attempt type resolve even
6385         if no assembly is given.
6386
6387 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
6388
6389         * metadata.h: Added the new tables.
6390
6391         * row-indexes.h: Added definitions for new tables.
6392
6393         * metadata.c: Add schemas for new tables, and add support for
6394         computing the sizes of them.
6395
6396         * class.c: Update for handling the new type cases.
6397
6398 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
6399
6400         * metadata.h (MONO_TYPE_IS_VOID): new macro
6401
6402 2003-03-31  Martin Baulig  <martin@ximian.com>
6403
6404         * threads.h (MonoThreadCallbacks): Added `thread_created'.
6405
6406         * threads.c (mono_thread_new_init): Call `thread_created' in the
6407         mono_thread_callbacks.
6408
6409 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
6410
6411         * loader.h: added marshalbyrefobject_class to mono_defaults
6412         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
6413         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
6414           generation of output parameters.
6415           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
6416         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
6417           contextbound and the target object belongs to the context of the caller.
6418         * object.h: added context and unwrapped_server variables in MonoRealProxy.
6419         * object.c: Implemented support for interfaces and abstract classes
6420           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
6421           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
6422
6423 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
6424
6425         * class.h class.c (mono_class_is_subclass_of): New function.
6426         
6427         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
6428         routines for most common case (calls from ArrayList::ToArray).
6429
6430         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
6431         routine so programs which call Environment::Exit() can be profiled.
6432
6433         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
6434         Added MONO_ARCH_SAVE_REGS.
6435
6436         * icall.c (ves_icall_type_is_subtype_of): Use new function.
6437
6438 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
6439
6440         * blob.h: Add a couple of new MonoType types definitions.
6441
6442         * tabledefs.h: Add a couple of new call convs.
6443
6444 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
6445
6446         * reflection.h (MonoReflectionDynamicAssembly): track changes in
6447         the layout of the class.
6448
6449         * reflection.c (alloc_table): double the size on overflow to avoid
6450         unnecessary copying.
6451
6452         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
6453         avoid filling out metadata tables and blobs. Also set mb->ilgen to
6454         null so it can be garbage collected.
6455         
6456 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
6457
6458         * reflection.c (mono_reflection_get_type): Return the resolved type
6459         only if it is in the assembly we searched.
6460
6461         * reflection.c (ensure_runtime_vtable): Initialize method slots.
6462
6463         * class.c (mono_class_setup_vtable): Set the slot of the overriding
6464         method.
6465
6466 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6467
6468         * appdomain.c:
6469         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
6470         the right one is 'file:///blah', but MS allows it.
6471         * assembly.c:
6472         (mono_assembly_open): allow 'file://blah'
6473
6474         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
6475
6476 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
6477
6478         * socket-io.c: fixes bug #40310.
6479
6480 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
6481
6482         * reflection.c (mono_reflection_parse_type): handle deeply nested
6483         types correctly.
6484
6485         * reflection.c (mono_image_create_token): Use unique token values
6486         since they will be put into a hash table.
6487
6488         * class.c (mono_class_setup_vtable): If a method occurs in more than
6489         one place in the vtable, and it gets overriden, then change the
6490         other occurances too.
6491
6492         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
6493         object as return type.
6494
6495 2003-03-22  Pedro Martínez Juliá  <yoros@wanadoo.es>
6496
6497         * icall.c: Deleted "ToString" implementation for double and float
6498         because they are full implemented in managed code.
6499
6500 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6501
6502         * reflection.c, reflection.h: implemented and exported functions
6503         to retrieve info about custom attributes.
6504
6505 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6506
6507         * appdomain.c: moved Uri handling to assembly.c
6508         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
6509         work when using a file Uri in *nix and windows.
6510
6511         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
6512         GetReferencedAssemblies.
6513
6514 2003-03-18  Dick Porter  <dick@ximian.com>
6515
6516         * icall.c: Rename a couple of internal calls
6517
6518         * threads.c: Set the thread state to Stopped when a thread exits.
6519         Fixes bug 39377.
6520
6521 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
6522
6523         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6524         New icall.
6525
6526         * object.c (mono_class_vtable): fix warning.
6527
6528 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
6529
6530         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
6531
6532         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
6533         memory.
6534         (method_encode_clauses): Create exception info structures in the right
6535         order.
6536         (mono_reflection_setup_internal_class): Initialize supertypes field.
6537
6538         * class.c object.c: Handle interfaces which implement other interfaces 
6539         correctly.
6540
6541         * class.h class.c: Move the supertypes array initialization code into 
6542         a separate function so it can be used for dynamic types too. Also call
6543         it earlier, in mono_class_init(), since it can be used before the
6544         type is initialized.
6545
6546 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6547
6548         * Makefile.am:
6549         * assembly.c:
6550         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
6551
6552         * appdomain.c:
6553         * appdomain.h:
6554         * marshal.c:
6555         * object.c: remove warnings.
6556
6557 2003-03-13  Martin Baulig  <martin@ximian.com>
6558
6559         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
6560         (MonoDebugLexicalBlockEntry): New types.
6561
6562         * debug-mono-symfile.c
6563         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
6564
6565 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6566
6567         * process.c: ret can be any non-zero value accroding to MS doc.
6568
6569 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
6570
6571         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
6572         fixing a warning for a miss-used prototype, would have cause
6573         random memory corruption.
6574
6575 2003-03-07  Martin Baulig  <martin@ximian.com>
6576
6577         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
6578         getting really annoying ....
6579
6580 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
6581
6582         * reflection.c (fixup_method): added support for array methods.
6583
6584 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
6585
6586         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
6587         (pointed out by Michael Adams).
6588
6589 2003-03-04  Dick Porter  <dick@ximian.com>
6590
6591         * icall.c: Temporarily reverted the Double and Single ToString()
6592         change, because it broke nunit.
6593
6594 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
6595
6596         * object.h, threads.h: make include files compatible with C++
6597         (patch by Jerome Laban <jlaban@wanadoo.fr>).
6598
6599 2003-03-04  Pedro Martínez Juliá  <yoros@wanadoo.es>
6600
6601         * icall.c: Erased ToString helper functions for Double and Single.
6602         Now, that implementations ar all in managed code (Double and Single
6603         Formatters).
6604
6605 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
6606
6607         * appdomain.c: Added method for initializing the default context of
6608         a domain. Added internal call for getting the default context.
6609         * appdomain.h: Added context variable in MonoDomain struct.
6610         * domain.c: mono_domain_set also sets the default context of the domain
6611         * icall.c: Mapped internal method InternalGetDefaultContext.
6612         * object.c: mono_object_get_virtual_method returns always a remoting
6613         wrapper if the object is a transparent proxy.
6614         mono_runtime_invoke_array: when creating an object by calling the
6615         constructor, if the created object is a proxy, then the constructor should
6616         be called using the a remoting wrapper.
6617
6618 2003-03-03  Dick Porter  <dick@ximian.com>
6619
6620         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
6621         variable so it compiles on solaris.  Problem spotted by
6622         Christopher Taylor <ct@cs.clemson.edu>
6623
6624 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6625
6626         * appdomain.c:
6627         (get_info_from_assembly_name): don't leak value.
6628
6629         * icall.c:
6630         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
6631         result.
6632
6633 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
6634
6635         * assembly.c: export mono_image_load_references ().
6636         * class.c: handle function pointers. mono_class_from_name() now
6637         supports nested type names directly.
6638
6639 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
6640
6641         * reflection.h reflection.c: Encode already created dynamic methods 
6642         and fields correctly as a DEF instead of a REF.
6643
6644         * reflection.c: Get rid of the force_ref argument to 
6645         mono_image_typedef_or_ref since it was wrong in the first place.
6646
6647         * string-icalls.c: add error checking to string constructors according
6648         to the MSDN docs.
6649
6650         * reflection.c: Emit types in the order their TypeBuilders were 
6651         created. Previously, a new table index was assigned to each type before
6652         the tables were emitted. This was wrong because the signature blob
6653         might already refer to a type by its original table index.
6654
6655 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
6656
6657         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
6658         change.
6659         
6660 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6661
6662         * Makefile.am: make assemblies dir have \ instead of / on windows.
6663
6664 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
6665
6666         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
6667         iterate over the NESTEDCLASS table using a linear search since the
6668         table is not guaranteed to be sorted by the secondary key.
6669
6670         * class.c (mono_class_create_from_typedef): fixed up call to
6671         mono_metadata_nesting_typedef.
6672         
6673 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
6674
6675         * marshal.c (mono_string_to_byvalstr): clear the memory as
6676         suggested by Jerome Laban <jlaban@wanadoo.fr>
6677
6678 2003-02-26  Dick Porter  <dick@ximian.com>
6679
6680         * process.c: Cope with padding in .rsrc blocks
6681
6682 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
6683
6684         * metadata.h: reverted the filter_len change, it breaks reflection
6685         
6686 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
6687
6688         * metadata.h: added a new field to store the filter_len
6689         
6690
6691 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
6692
6693         * reflection.c: handle custom attributes for types and members
6694         created with Reflection.Emit (bug#38422).
6695
6696 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
6697
6698         * reflection.c: define RTSpecialName automatically for constructors for
6699         compatibility with MS.NET.
6700
6701         * reflection.c (mono_reflection_create_runtime_class): initialize
6702         nested_in field of dynamically created classes.
6703
6704 2003-02-22  Martin Baulig  <martin@ximian.com>
6705
6706         * debug-mono-symfile.h: Incremented version number.
6707
6708 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
6709
6710         * object.h icall.c process.c: fix warnings.
6711
6712 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
6713
6714         * appdomain.h appdomain.c:
6715         (mono_domain_try_type_resolve): split the 
6716         name_or_tb argument into a name and a tb argument.
6717         (mono_domain_has_type_resolve): new function to check whenever the
6718         application has registered a TypeResolve event handler.
6719         
6720         * icall.c reflection.h reflection.c: move the type resolve logic into
6721         mono_reflection_get_type () so it will be invoked when 
6722         Assembly::GetType () is called.
6723
6724         * reflection.c:
6725         (mono_reflection_get_type): renamed to get_type_internal.
6726         (mono_reflection_get_type): fixed type name generation so it works 
6727         for nested types too.
6728         (mono_reflection_get_type): call has_type_resolve () to avoid the 
6729         costly type name generation if there is no resolve event handler.
6730
6731 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6732
6733         * class.c, image.c: load exported types from file references.
6734
6735 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
6736
6737         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
6738           used to cache the managed methods used to create proxies and make 
6739           remote invocation of methods.
6740         * class.h: Added in MonoVTable a flag to indicate that a class needs 
6741           to be remotely created.
6742         * object.c: Modified the method mono_class_vtable(). It now initializes 
6743           the remote flag of the vtable. Modified mono_object_new_specific(), 
6744           so now it checks the remote flag.
6745         * icall.c: Added a couple of internal methods, one for enabling instance 
6746           creation interception for a type, and one for creating objects bypassing
6747           the remote check.
6748
6749 2003-02-18  Martin Baulig  <martin@ximian.com>
6750
6751         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
6752         New interncall to get a method's metadata token.
6753
6754         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
6755         New interncall for the debugger.
6756
6757 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
6758
6759         * class.c (mono_class_setup_vtable): allocate supertype array
6760
6761 2003-02-18  Martin Baulig  <martin@ximian.com>
6762
6763         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
6764
6765 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6766
6767         * reflection.c:
6768         (assembly_name_to_aname): jump over unknown properties (i've found
6769         something like: 'type, assembly, version=xxx, custom=null, public...',
6770         so now will ignore custom=null and still get the rest of the values).
6771
6772 2003-02-17  Dick Porter  <dick@ximian.com>
6773
6774         * threads.c: Have Thread.Start() wait for a semaphore to signal
6775         that the thread has set up all its local data.  This fixes bug
6776         34323, where Abort() raced the new thread's TLS data.
6777
6778         Also removes the handle_store() call from start_wrapper, because
6779         threads are now always created suspended and there is no longer a
6780         race between the parent and child threads to store the info.
6781
6782 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
6783
6784         * image.c: explain the #- heap issue in a message, hopefully
6785         avoiding FAQs on mono-list.
6786
6787 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6788
6789         * icall.c:
6790         (GetEntryAssembly): if the domain has not invoked
6791         AppDomain.ExecuteAssembly yet, return the assembly of the default
6792         AppDomain.
6793
6794 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
6795
6796         * class.c (mono_ldtoken): make it work in dynamic assemblies.
6797
6798 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
6799
6800         * metadata.c, reflection.c: simple speedup to type hash
6801         and equals code.
6802
6803 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
6804
6805         * image.c, image.h, class.c, assembly.c: move module loading
6806         to MonoImage. When loading metadata, consider alignemnet from
6807         the start of metadata, not from the metadata address in memory.
6808
6809 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
6810
6811         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
6812         AssemblyBuilder objects. Factored out custom attribute creation into
6813         a separate function.
6814         (create_custom_attr): new function to create custom attributes.
6815
6816 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
6817
6818         * Makefile.am: Got tired of typing the full pathname to pedump.
6819         Until there is another option, am installing this.
6820
6821 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
6822
6823         * class.c (class_compute_field_layout): always set field->parent 
6824         (mono_ldtoken): use mono_defaults.fieldhandle_class;
6825
6826 2003-02-11  Dick Porter  <dick@ximian.com>
6827
6828         * threads-types.h:
6829         * monitor.c: Rewrote Monitor, making lock much faster and
6830         Pulse/Wait work as specified.  Also uses much fewer handles, and only
6831         creates them as needed.
6832
6833         * exception.c: Added SynchronizationLockException
6834
6835         * threads.c: Deleted old Monitor implementation.  The new one is
6836         in a new file.
6837
6838 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
6839
6840         * class.c: handled TypedReference type code. Set the correct size for
6841         class data. Setup interface_offsets for interface classes, too.
6842
6843 2003-02-09  Martin Baulig  <martin@ximian.com>
6844
6845         * debug-mono-symfile.h: Reflect latest symbol writer changes.
6846
6847 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
6848
6849         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
6850         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
6851         * object.c: fixed mono_object_get_virtual_method () for interfaces.
6852         * verify.c: check for code that runs after the end of the method.
6853
6854 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
6855
6856         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
6857         "System.Math::Round2".
6858         * sysmath.h: Added Floor, Round and Round2 definitions.
6859         * sysmath.c: Modified certain functions that were not 100% compliant
6860         with MS.NET (math precision) and added the implementation of Floor,
6861         Round and Round2.
6862
6863 2003-02-07  Martin Baulig  <martin@ximian.com>
6864
6865         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
6866
6867 2003-02-07  Martin Baulig  <martin@ximian.com>
6868
6869         * debug-mono-symfile.c: Reflected latest symwriter changes.
6870         (mono_debug_create_mono_symbol_file): Removed.
6871         (mono_debug_open_mono_symbol_file): Take an argument which
6872         specifies whether to create a dynamic symbol file.
6873
6874 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
6875
6876         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
6877
6878 2003-02-05  Martin Baulig  <martin@ximian.com>
6879
6880         * reflection.c (mono_image_build_metadata): Make this public,
6881         protect it against being called multiple times, don't create
6882         resources and don't build the compressed metadata here.
6883         (mono_image_create_pefile): Do this here.
6884
6885         * icall.c
6886         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
6887
6888 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6889
6890         * socket-io.c: fixed bug #36322.
6891
6892 2003-02-06  Piers Haken <piersh@friskit.com>
6893
6894         * appdomain.[ch]:
6895         * class.h:
6896         * debug-mono-symfile.c:
6897         * icall.c:
6898         * loader.c:
6899         * mono-config.c:
6900         * monosn.c:
6901         * reflection.c:
6902         * socket-io.c: warning cleanups
6903
6904 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
6905
6906         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
6907         function. works like remoting invoke, but does a check for the Proxy first.
6908
6909 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
6910
6911         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
6912
6913 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
6914
6915         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
6916         array of pointers.
6917         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
6918         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
6919
6920         * object.c (mono_store_remote_field_new): used by the new jit
6921         instead of mono_store_remote_field
6922         (mono_load_remote_field_new): used by the new jit
6923         instead of mono_load_remote_field
6924
6925 2003-02-05  Patrik Torstensson
6926
6927         * appdomain.c: changed unload to take the domain id instead
6928         of domain
6929         
6930         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
6931
6932
6933 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6934
6935         * appdomain.c: don't look for assemblies in ApplicationBase if
6936         PrivateBinPathProbe is set.
6937
6938 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6939
6940         * object.c: make the first argument in main_args contain the absolute
6941         path to the assembly. Fixes bug #37511.
6942
6943 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6944
6945         * icall.c: get correct UTC offset for countries not using daylight
6946         time saving. Fixes bug #30030.
6947
6948 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6949
6950         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
6951         and 1 are the family).
6952
6953 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
6954
6955         * icall.c (ves_icall_InternalExecute): removed wrong assertion
6956
6957         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
6958
6959 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
6960
6961         * reflection.c: added support for SignatureHelper tokens, which is
6962         needed by the Calli opcode.
6963
6964         * reflection.h: track changes to SignatureHelper class.
6965
6966         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
6967
6968 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6969
6970         * appdomain.c: fixed loading assemblies from PrivateBinPath.
6971
6972 2003-02-03  Patrik Torstensson
6973         * appdomain.[c|h], domain.c : 
6974          - Added support for getting a domain via domain id
6975          - Support for setting and getting domain from System.AppDomain 
6976            (used in cross appdomain channel)
6977          - Added support for get/set for a MonoAppContext on a thread 
6978            (Context class in System.Runtime.Remoting.Contexts),
6979          - Removed hack in Get/SetData and ExecuteAssembly.
6980         
6981         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
6982         the managed world to get control when a proxy is created.
6983
6984         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
6985         
6986 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
6987
6988         * icall.c
6989         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6990         Populate the codebase field as well.
6991
6992 2003-02-02  Martin Baulig  <martin@ximian.com>
6993
6994         * debug-mono-symfile.c
6995         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
6996         (mono_debug_symfile_add_method): Allow interncalls.
6997
6998 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6999
7000         * icall.c: throw parse exception if strtod fails or the string is empty.
7001
7002 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
7003
7004         * marshal.c: handle object type separately from defined
7005         class types.
7006
7007 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
7008
7009         * marshal.c: handle NATIVE_LPSTR for strings when it's
7010         explicitly specified.
7011
7012 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
7013
7014         * reflection.c, reflection.h, icall.c: setup the reflection
7015         handle cache for ModuleBuilders and AssemblyBuilders.
7016
7017 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
7018
7019         * reflection.c (reflection_methodbuilder_to_mono_method): set
7020         pinvoke flag
7021
7022 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7023
7024         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
7025
7026 2003-01-29  Dick Porter  <dick@ximian.com>
7027
7028         * threads.c: No need for the fake_thread kludge now that Thread
7029         doesn't run a class constructor
7030         
7031 2003-01-29  Dick Porter  <dick@ximian.com>
7032
7033         * threads.c: Use g_direct_hash instead of the rather bogus
7034         g_int_hash
7035
7036 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
7037
7038         * marshal.c (mono_marshal_get_native_wrapper): add check for null
7039         (fix pinvoke12.exe)
7040         (mono_marshal_get_struct_to_ptr): generate valid IL code
7041         (mono_marshal_get_ptr_to_struct): generate valid IL code
7042         (*): correctly set sig->pinvoke, we need to memdup the signature
7043         to do that
7044
7045 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7046
7047         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
7048         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
7049
7050 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7051
7052         * profiler.c: provide more callers information.
7053
7054 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
7055
7056         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
7057
7058         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
7059
7060         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
7061
7062 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7063
7064         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
7065         exception instead of going into an infinite loop on dates which it 
7066         can't yet handle.
7067
7068         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
7069         out-of-range exception if needed.
7070
7071         * class.c (mono_class_setup_vtable): allow a virtual method to provide
7072         an implementation for an interface method and to override an inherited
7073         method at the same time. 
7074         Imagine a scenario when a virtual method is used to override a
7075         virtual abstract method in a parent class, and this same method 
7076         provides an implementation for an method inherited from an interface. 
7077         In this case, the interface resolution code will set im->slot, which 
7078         means that the virtual method override pass will skip this method 
7079         which means a pointer to the abstract method inherited from the parent
7080         will remain in the vtable of this non-abstract class.
7081
7082         * class.c: (mono_class_setup_vtable): continue search for a real 
7083         method if only an abstract method is found.     
7084
7085 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7086
7087         * reflection.c: add size to encoding for ByValStr and ByValArray
7088         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
7089
7090 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7091
7092         * class.c (mono_class_setup_vtable): pass the override info as an
7093         argument.
7094
7095         * class.c (mono_class_setup_vtable): set the slot of overriding methods
7096         correctly.
7097         
7098         * reflection.c (ensure_runtime_vtable); add support for method 
7099         overrides.
7100         
7101 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7102
7103         * reflection.c (resolution_scope_from_image): Hack to work to work with
7104         dynamic assemblies.
7105
7106         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
7107         added a 'force_ref' argument to force this function to allways return 
7108         a TypeRef. This is needed by mono_image_get_memberref_token ().
7109         
7110 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7111
7112         * reflection.c (mono_image_get_type_info): interfaces really don't have
7113         a parent.
7114
7115         * reflection.c (mono_image_basic_init): fill out missing fields of
7116         image structure.
7117
7118         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
7119         dynamic assemblies. This is required so dynamic assemblies show up in
7120         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
7121         Type::GetType() etc. This is consistent with MS behaviour.
7122
7123         * image.c image.h reflection.c: add newly created classes to the name 
7124         cache so mono_class_get () will find them.      
7125
7126 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7127
7128         First part of changes to get IKVM.NET running under mono.
7129         
7130         * appdomain.h, appdomain.c: added new function 
7131         mono_domain_try_type_resolve() which will emit TypeResolve events. 
7132         This function will call AppDomain::DoTypeResolve to do the actual work.
7133
7134         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
7135         moved existing code dealing with dynamic tokens to a new function 
7136         called mono_reflection_lookup_dynamic_token (). This function will 
7137         raise TypeResolve events when appropriate. Since reflection.c is not 
7138         part of libmetadata, a new hook function called 
7139         mono_lookup_dynamic_token() is added to class.c which will call this.
7140
7141         * assembly.h assembly.c: make the invoke_load_hook function public,
7142         so it can be called for dynamic assemblies.
7143
7144         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
7145
7146         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
7147         type isn't found.
7148
7149         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
7150         MonoGHashTable, since it contains pointers to objects which the GC 
7151         needs to track.
7152
7153         * assembly.c (search_loaded): remove unused variable.
7154         
7155 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
7156
7157         * object.c: fixed issue exposed by gcc-generated IL programs
7158         that use RVA data for pointers.
7159
7160 2003-01-25  Martin Baulig  <martin@ximian.com>
7161
7162         * threads.c (start_wrapper): Moved the initialization of
7163         `start_func' above the mono_new_thread_init() call to which we
7164         pass it as argument.
7165
7166 2003-01-24  Martin Baulig  <martin@ximian.com>
7167
7168         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
7169         the MonoThread pointer.
7170
7171 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
7172
7173         * icall.c: Rename `PowImpl' to Pow.
7174
7175 2003-01-23  Dick Porter  <dick@ximian.com>
7176
7177         * threads.c (start_wrapper): Create a Thread object if needed, so
7178         the Main() thread can do the class initialisation in a subthread
7179         that has been set up to allow managed code execution.
7180
7181         Pass the thread ID instead of the MonoThread pointer to the thread
7182         start and attach callbacks.  This change is required, because the
7183         jit thread start callback must be called _before_ the Thread
7184         object can be created.
7185         
7186         (mono_thread_init): Removed much object creation code that is no
7187         longer needed.  No managed code is called from here now.
7188
7189         * object.c (mono_runtime_exec_managed_code): Create a subthread
7190         for Main, and call back to the runtime to use it.
7191         Set the exit code when Main exits.
7192
7193         * gc.c: Make sure domain finalisation happens in a subthread.
7194         Re-enable threaded GC, fixing bug 31333 (again).
7195
7196         * environment.c: System.Environment internall calls (so far just
7197         ExitCode is here, the others are still in icall.c)
7198
7199         * appdomain.c (mono_runtime_cleanup): All threads running managed
7200         code should have finished before mono_runtime_cleanup() is
7201         reached, so no need to clean up threads.
7202
7203 2003-01-22  Martin Baulig  <martin@ximian.com>
7204
7205         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
7206         `gpointer func' arguments.      
7207         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
7208         but added `MonoThread *thread' argument.
7209         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
7210
7211         * threads.c (mono_new_thread_init): Added `gpointer func' argument
7212         and pass it to the mono_thread_start_cb callback.
7213         (mono_install_thread_callbacks): New public function to install a
7214         set of callbacks which are set by the debugger.
7215         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
7216
7217 2003-01-22  Martin Baulig  <martin@ximian.com>
7218
7219         * Makefile.am: Install debug-mono-symfile.h.
7220
7221 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
7222
7223         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
7224
7225 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
7226
7227         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
7228         * class.c (mono_ptr_class_get): correctly set access levels of pointers
7229         (mono_array_class_get): correctly set access levels of arrays
7230
7231 2003-01-20      Patrik Torstensson
7232         * image.h (MonoAssemblyName): changed major, minor, build, revision
7233         from signed to unsigned.
7234
7235 2003-01-20  sean kasun <skasun@azstarnet.com>
7236
7237         * reflection.c (load_cattr_value): Now this handles
7238         MONO_TYPE_SZARRAY.  Fixes bug #35629
7239
7240 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
7241
7242         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
7243         integer value
7244
7245 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7246
7247         * decimal.c: fixed bug #26056.
7248
7249 2003-01-17  Martin Baulig  <martin@ximian.com>
7250
7251         * gc.c: Raise an ExecutionEngineException instead of using g_error().
7252
7253 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7254
7255         * exception.[ch]:
7256         (mono_get_exception_type_initialization): new function.
7257
7258         * object.c: throw a TypeInitializationException when an exception is
7259         thrown invoking the class constructor.
7260
7261 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7262
7263         * reflection.c: fixed attribute reading.
7264
7265 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7266
7267         * icall.c:
7268         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
7269         provided, look for the type in the calling assembly and then in
7270         mscorlib; if the assembly name is provided, only try that one.
7271
7272 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
7273
7274         * object.c: register the vtable before there is a chance it's
7275         queried again recursively.
7276
7277 2003-01-13  Duncan Mak  <duncan@ximian.com>
7278
7279         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
7280         gc-internal.h. 
7281         
7282 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
7283
7284         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
7285
7286 2003-01-11  Martin Baulig  <martin@ximian.com>
7287
7288         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
7289         this to 20 for the release.
7290
7291 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
7292
7293         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
7294
7295         * loader.c (mono_method_get_marshal_info): bug fix
7296
7297         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
7298         structures with explicit layout
7299
7300 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7301
7302         * profiler.c: made the output more readable (and sorted). 
7303         Added caller information for the allocation profiler.
7304
7305 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
7306
7307         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
7308
7309 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7310
7311         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
7312         to get value types.
7313         
7314 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
7315
7316         * object.c, profiler.h, profiler.c, profiler-private.h:
7317         Added object allocation profiler.
7318
7319 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
7320
7321         * reflection.h, reflection.c: handle global methods.
7322         Compress blob entries.
7323
7324 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
7325
7326         * marshal.c: fix compilation.
7327
7328 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
7329
7330         * loader.c (mono_method_get_marshal_info): impl.
7331
7332         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
7333
7334 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7335
7336         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
7337         for reference types.
7338
7339 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
7340
7341         * loader.c: fixed off by one error in loaded parameter names.
7342
7343 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
7344
7345         * marshal.c (mono_marshal_get_icall_wrapper): like
7346         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
7347         instead of a MonoMethod.
7348
7349 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7350
7351         * decimal.c: fixed bug #36537.
7352
7353 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
7354
7355         * marshal.c: throw a missing method exception if a
7356         P/Invoke method is not found.
7357
7358 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7359
7360         * icall.c: allow a null this for constructors.
7361
7362 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
7363
7364         * icall.c: raise the proper exceptions if the arguments to the
7365         internal Invoke are incorrect.
7366
7367 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
7368
7369         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
7370
7371 2003-01-03  Martin Baulig  <martin@ximian.com>
7372
7373         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7374
7375 2002-12-31  Martin Baulig  <martin@ximian.com>
7376
7377         * debug-mono-symfile.c: Completely rewrote the type section.
7378         Instead of using individual malloc()ed fields, we use one big
7379         continuous memory area and offsets into this area.
7380         See the comments in the source code for details.
7381
7382 2002-12-30  Martin Baulig  <martin@ximian.com>
7383
7384         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
7385
7386 2002-12-30  Martin Baulig  <martin@ximian.com>
7387
7388         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
7389         line number table in this data blob instead of using an external
7390         pointer.
7391
7392 2002-12-28  Martin Baulig  <martin@ximian.com>
7393
7394         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7395
7396 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
7397
7398         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
7399         as a boxed return type.
7400
7401 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
7402
7403         * appdomain.c
7404         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
7405         g_build_filename to properly get separators on the filename created.
7406
7407         * object.h: Small change, introduce MonoMarshalByRefObject to
7408         track the layout of that structure in the C# universe as we make
7409         changes there.
7410
7411 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
7412
7413         * object.c: removed assert to allow static fields on interfaces.
7414         * loader.c: a TypeSpec may be used for any type, not just arrays.
7415
7416 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7417
7418         * class.c, class.h: added mono_class_array_element_size ().
7419         Ignore static methods in interfaces.
7420
7421 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7422
7423         * threads.c: fixed the build under cygwin.
7424
7425 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
7426
7427         * reflection.c: handle nullref constants. Allocate keys for
7428         reflection handles with the GC.
7429
7430 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7431
7432         * threads.c, threads.h: added mono_thread_get_abort_signal()
7433         to get a suitable signal for thread abort.
7434
7435 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7436
7437         * metadata.c: fix handling of ExportedType table.
7438
7439 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7440
7441         * icall.c: added WriteWindowsDebugString internal call.
7442
7443 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7444
7445         * reflection.h: added fields to match C# implementation.
7446
7447 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7448
7449         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
7450
7451 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
7452
7453         * gc.h, gc-internal.h: Rename header for GC internal calls to
7454         gc-internal.h from gc.h as to not clash with Boehm GC having its
7455         header installed as <gc.h> in outside include paths.
7456         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
7457         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
7458
7459 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7460
7461         * icall.c: assign minor, build and revision in FillName.
7462
7463 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
7464
7465         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
7466         Added support for running code generated by Reflection.Emit.
7467
7468 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7469
7470         * appdomain.c: check for NULL argument in LoadFrom.
7471
7472 2002-12-10  Dick Porter  <dick@ximian.com>
7473
7474         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
7475
7476 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7477
7478         * appdomain.c: fix buglet when building exe file name.  Handle full
7479         assembly name (needed after latest changes to AssemblyName).
7480         * image.c:
7481         (mono_image_close): free some hashtables.
7482
7483 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
7484
7485         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
7486         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
7487         on some systems (redhat 7.3) 
7488
7489 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
7490
7491         * threads.c: delete the critical section of a sync block,
7492         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
7493
7494 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
7495
7496         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
7497
7498 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7499
7500         * appdomain.[ch]: handle the assembly preload event to try loading the
7501         assemblies using the paths we have in the current domain.
7502
7503         * assembly.[ch]: created an assembly preload hook that is called to try
7504         loading the assembly by other means that the ones provided here.
7505
7506         * domain.c: initialize the domain search path.
7507
7508         From now on, assemblies (TODO: except corlib and System) are loaded
7509         according to these rules when using mono_assembly_load ():
7510
7511                 1. It tries to load the assembly from the ApplicationBase
7512                 of the current domain appending .dll and .exe (TODO: have to
7513                 try loading from name/name.dll and name/name.exe).
7514
7515                 2. It tries the search path specified in PrivateBinPath for the
7516                 current domain (if any).
7517
7518                 3. Previous behavior.
7519
7520 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
7521
7522         * icall.c: implemented GetInterfaceMap() related icall.
7523         * domain.c, loader.h: load MethodInfo in mono_defaults.
7524
7525 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7526
7527         * gc.c: disable the finalizer thread for now, untill all the issues
7528         with it are resolved.
7529
7530 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7531
7532         * string-icalls.c: handle embedded nulls in string ctor when the
7533         length is specified.
7534
7535 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7536
7537         * class.c: look for explicit interface implementation in parent
7538         classes, too.
7539
7540 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
7541
7542         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
7543
7544 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7545
7546         * gc.c: protect handles with a critical section.
7547
7548 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7549
7550         * icall.c:
7551         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
7552         parameters. If no assembly specified, try getting the type from all
7553         the assemblies in the current domain, else, load the assembly and get
7554         the type from it.
7555
7556 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7557
7558         * marshal.c: applied patch from Aleksey Demakov that fixes
7559         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
7560
7561 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7562
7563         * icall.c: fixed get_location.
7564
7565 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
7566
7567         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
7568         declarations to make it work with older gcc. 
7569
7570         * loader.c (mono_get_method): set signature->pinvoke for native calls
7571
7572 2002-11-20  Dick Porter  <dick@ximian.com>
7573
7574         * threads.c (mono_thread_init): Set the main thread's handle
7575
7576 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7577
7578         * gc.c: allow compilation without GC support. Changed to match the
7579         mono coding style.
7580
7581 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7582
7583         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
7584
7585 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
7586
7587         * reflection.c: set a public key token on the core assemblies.
7588
7589 2002-11-18  Dick Porter  <dick@ximian.com>
7590
7591         * threads.c: Split out some thread initialisation so that other
7592         files can set the start callback function.
7593
7594         * gc.c: Run finalisers in a separate thread, to avoid stack
7595         overflow.  Fixes bug 31333.
7596
7597         * appdomain.c: Set up GC finalisation thread.
7598
7599         * reflection.c: 
7600         * object.c: 
7601         * domain.c: Use gc.h macros for GC_malloc
7602         
7603 2002-11-15  Dick Porter  <dick@ximian.com>
7604
7605         * threadpool.c: 
7606         * threads.c:
7607         * appdomain.c: Removed mono_runtime_init_with_attach(),
7608         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
7609         merging the extra parameter with the existing function.  Removed
7610         unneeded code in mono_thread_attach().
7611
7612 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
7613
7614         * image.c (mono_image_loaded_by_guid): a method to get loaded
7615         images by guid. 
7616         (load_metadata_ptrs): we store the guid as string.
7617
7618 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
7619
7620         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
7621
7622         * metadata.c (mono_guid_to_string): imported method form Zoltan
7623         Varga (slightly modified)
7624
7625         * assembly.c (mono_assembly_open): load precompiled code
7626
7627         * loader.h (MonoMethod): we store the method token for use in the
7628         aot compiler. 
7629
7630 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7631
7632         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
7633         the hook function called when an assembly is loaded.
7634         
7635         * domain.c: Modified file.
7636         (mono_domain_assembly_load): removed hash table insertion of assemblies.
7637
7638         Fixes bug #33196.
7639
7640 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
7641
7642         * reflection.c: Map PEFileKind to the value expected by the WinNT
7643         image loader. 
7644
7645 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7646
7647         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
7648         Read until the buffer is filled completely.
7649
7650 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7651
7652         * icall.c: implemented MonoType.InternalGetEvent ().
7653
7654 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7655
7656         * appdomain.c: implemented InitAppDomainSetup. Delayed
7657         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
7658         the entry_assembly.
7659
7660         * assembly.c: base_dir is now an absolute path ending with
7661         G_DIR_SEPARATOR.
7662
7663         * icall.c: modified get_location according to the above changes.
7664
7665         * object.c: init AppDomain.SetupInformation for the default domain after
7666         we have the entry assembly.
7667
7668         * domain.c: when unloading a domain, setup = NULL.
7669
7670 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
7671
7672         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
7673
7674 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
7675
7676         * object.h, object.c: introduced mono_object_get_virtual_method ()
7677         to lookup the method invoked on an object when a callvirt is done on
7678         a method.
7679         * icall.c: make MethodInfo::Invoke() always do a virtual call.
7680
7681 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7682
7683         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
7684         current domain when loaded an assembly and failed to load it.
7685
7686         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
7687
7688 2002-10-31  Dick Porter  <dick@ximian.com>
7689
7690         * icall.c: 
7691         * file-io.h: 
7692         * file-io.c: Return the error status in a parameter, as the
7693         GetLastError() value has long since been blown away if we try and
7694         look it up in a subsequent internal call invocation.  Delete the
7695         GetLastError() internal call, because it's useless.
7696
7697 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
7698
7699         * class.[ch]: added cast_class to fix bug 29517
7700
7701 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
7702
7703         * marshal.c: create valid IL code in the filter clause:
7704         the new JIT is less forgiving:-)
7705
7706 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7707
7708         * icall.c: removed get_property internal call.
7709
7710 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
7711
7712         * appdomain.h domain.c: Added an ID to appdomains.
7713         
7714         * threads.c threads.h icall.c: Implement icall
7715         Thread:GetDomainID(), and remove unused icall 
7716         CurrentThreadDomain_internal.
7717
7718 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7719
7720         * icall.c: Don't recurse through the base types in GetConstructor.
7721         Fixes bug #32063. 
7722
7723 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7724
7725         * mempool.h, mempool.c: added mono_mempool_empty() and
7726         mono_mempool_stats().
7727
7728 2002-10-23  Dick Porter  <dick@ximian.com>
7729
7730         * file-io.c: 
7731         * file-io.h: 
7732         * icall.c: Added MonoIO.GetFileType internal call
7733
7734 2002-10-17  Dick Porter  <dick@ximian.com>
7735
7736         * appdomain.c (mono_runtime_cleanup): Don't signal the async
7737         delegate semaphore before waiting for all threads to finish,
7738         because new threads can also call async delegates.  Fixes bug
7739         32004.
7740
7741         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
7742         of 3 seconds, in case another async job is queued.  (This part is
7743         needed because the bug fix reintroduced the 3s exit lag.)  This
7744         makes the mono_runtime_shutdown flag superfluous.
7745
7746 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7747
7748         * reflection.c: include ehader size in method section headers.
7749         Really check for suplicated modules entries.
7750
7751 2002-10-17  Martin Baulig  <martin@gnome.org>
7752
7753         * debug-mono-symfile.c: Added back support for locals.
7754
7755 2002-10-14  Martin Baulig  <martin@gnome.org>
7756
7757         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
7758         MONO_TYPE_VOID.
7759
7760 2002-10-14  Martin Baulig  <martin@gnome.org>
7761
7762         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
7763         mono_class_get() instead of looking in the class cache. 
7764
7765 2002-10-13  Martin Baulig  <martin@gnome.org>
7766
7767         * debug-mono-symfile.c: Set version number to 28, include the
7768         signature in method names.
7769
7770 2002-10-13  Martin Baulig  <martin@gnome.org>
7771
7772         * debug-mono-symfile.h: Set version number to 27.
7773
7774 2002-10-11  Martin Baulig  <martin@gnome.org>
7775
7776         * gc.c: Don't register/unregister NULL pointers as disappearing links.
7777
7778 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7779
7780         * metadata.c, metadata.h: added helper function to allocate signatures.
7781
7782 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7783
7784         * icall.c: added internal call to get the location of machine.config.
7785
7786 2002-10-08  Martin Baulig  <martin@gnome.org>
7787
7788         * debug-mono-symfile.c: Ignore classes with a pending init for the
7789         moment.
7790
7791 2002-10-03  Dick Porter  <dick@ximian.com>
7792
7793         * threads.c: Freebsd pthread_t is a pointer
7794
7795 2002-10-03  Dick Porter  <dick@ximian.com>
7796
7797         * socket-io.c: Implemented GetHostName_internal
7798
7799 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7800
7801         * mono-config.c:
7802         (mono_config_parse_file): don't leak the text.
7803
7804 2002-10-02  Martin Baulig  <martin@gnome.org>
7805
7806         * debug-mono-symfile.c: Added support for methods.
7807
7808 2002-10-01  Martin Baulig  <martin@gnome.org>
7809
7810         * debug-mono-symfile.c: Don't emit methods and line numbers for
7811         the dynamic symbol file, just write the type table.  We can easily
7812         have an external helper program which creates a symbol file for an
7813         IL file.        
7814
7815 2002-10-01  Dick Porter  <dick@ximian.com>
7816
7817         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
7818         Only add the handle to the cleanup array when we're about to
7819         launch the thread.  Bug 31425 deadlocked when the test was run on
7820         mono under w32.
7821
7822 2002-10-01  Martin Baulig  <martin@gnome.org>
7823
7824         * debug-mono-symfile.c: Added support for properties.
7825
7826 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7827
7828         * reflection.c: unaligned store fix from Mark Crichton
7829         <crichton@gimp.org>.
7830
7831 2002-09-27  Martin Baulig  <martin@gnome.org>
7832
7833         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
7834         New interncall.
7835
7836 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7837
7838         * assembly.h, assembly.c: use a sane API to hook into the assembly
7839         loading process instead of a useless special-purpouse hack
7840         (ngen needs a hook, too, for example).
7841
7842 2002-09-27  Dick Porter  <dick@ximian.com>
7843
7844         * threads.c (mono_thread_init): Call GetCurrentProcess() so
7845         io-layer can set up some process handle info.  Not needed on w32,
7846         but doesn't hurt either.
7847
7848         * process.c: Pass the program name in the second parameter to
7849         CreateProcess, so the path is searched.  Include the working
7850         directory. Implemented process name, process enumeration, and some
7851         process detail internal calls.
7852         
7853         * icall.c: Added internal calls for process lookup, and some
7854         process details
7855
7856 2002-09-26  Martin Baulig  <martin@gnome.org>
7857
7858         * assembly.c (mono_install_open_assembly_hook): New global
7859         function to install a function to be invoked each time a new
7860         assembly is loaded.
7861         (mono_assembly_open): Run this callback function if set.
7862
7863         * debug-mono-symfile.c: Put back line numbers for the dynamic
7864         symbol file and also record the .il file as source file.  This
7865         allows us to install the temporary symbol file as `file.dbg' just
7866         like a compiler-generated one.
7867
7868 2002-09-26  Nick Zigarovich <nick@chemlab.org>
7869
7870         * Corrected typo in gc.c (BOHEM vs BOEHM).
7871
7872 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7873
7874         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
7875         GetProperties. Also avoid calling g_slist_length in GetProperties and
7876         GetMethods.
7877
7878 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7879
7880         * reflection.c: avoid unaligned stores (bug spotted by
7881         Mark Crichton  <crichton@gimp.org>).
7882
7883 2002-09-25  Martin Baulig  <martin@gnome.org>
7884
7885         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
7886         instead of guint64 for addresses and added prologue/epilogue info.
7887
7888 2002-09-25  Martin Baulig  <martin@gnome.org>
7889
7890         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
7891         store line number info.  For the dynamic symbol file, we only need
7892         to provide the JIT generated dynamic line number info for the dynamic
7893         symbol file.
7894
7895 2002-09-25  Martin Baulig  <martin@gnome.org>
7896
7897         * debug-mono-symfile.h: Incremented version number.
7898
7899 2002-09-24  Martin Baulig  <martin@gnome.org>
7900
7901         * class.c (mono_debugger_class_init_func): New global function
7902         pointer variable.
7903         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
7904         call it.
7905
7906         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
7907         function.  This is called via the mono_debugger_class_init_func
7908         hook to add all types to the dynamic type table.
7909         (ves_icall_MonoDebugger_GetType): New interncall to get a class
7910         from its metadata token.
7911
7912         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
7913         New interncall for the debugger.
7914
7915 2002-09-24  Nick Drochak <ndrochak@gol.com>
7916
7917         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
7918         before using it in case it is null.
7919         
7920 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7921
7922         * metadata.c: allow custom modifiers in local var signatures
7923         (bug spotted by Zoltan Varga).
7924
7925 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7926
7927         * class.c: deal with the <Module> class that may have a NULL vtable.
7928         Eliminate warnings.
7929
7930 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7931
7932         * image.c, image.h: more strong name helpers.
7933         * monosn.c: more work: convert pem keys to cryptoapi format.
7934
7935 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7936
7937         * string-icalls.c: speedup IndexOf.
7938
7939 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7940
7941         * icall.c: updates from Zoltan.2.Varga@nokia.com.
7942
7943 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7944
7945         * icall.c: cleanup: use mono_object_domain ().
7946
7947 2002-09-23  Martin Baulig  <martin@gnome.org>
7948
7949         * debug-mono-symfile.c: Improved type support.
7950
7951 2002-09-22  Martin Baulig  <martin@gnome.org>
7952
7953         * debug-mono-symfile.c: Added support for reference types and strings.
7954
7955 2002-09-22  Martin Baulig  <martin@gnome.org>
7956
7957         * debug-mono-symfile.c: Started to work on the type table.
7958
7959 2002-09-21  Martin Baulig  <martin@gnome.org>
7960
7961         * debug-mono-symfile.c: Largely reworked the symbol table format.
7962         The symbol table is now incrementally updated each time a new
7963         method is added.  We're now also using our own magic and version
7964         so that you don't need to recompile all your classes if the
7965         dynamic table changes.
7966         (mono_debug_update_mono_symbol_file): Removed.
7967         (mono_debug_symfile_add_method): New function to add a method.
7968
7969 2002-09-21  Martin Baulig  <martin@gnome.org>
7970
7971         * icall.c
7972         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
7973         New interncall.
7974
7975         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
7976         New interncall to get a method from its metadata token.
7977
7978 2002-09-21  Martin Baulig  <martin@gnome.org>
7979
7980         * debug-mono-symfile.c: Create type table.
7981
7982 2002-09-20  Martin Baulig  <martin@gnome.org>
7983
7984         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
7985
7986 2002-09-20  Martin Baulig  <martin@gnome.org>
7987
7988         * debug-mono-symfile.c: Provide information about params and locals.
7989
7990 2002-09-20  Martin Baulig  <martin@gnome.org>
7991
7992         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
7993         New interncall.
7994
7995         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
7996         interncall to get a method from its metadata token.
7997
7998 2002-09-20  Martin Baulig  <martin@gnome.org>
7999
8000         * debug-mono-symfile.c: Added a few checks for method->header
8001         being non-NULL.  This should never happen, but for the moment
8002         let's use a g_warning() rather than a g_assert().
8003
8004 2002-09-19  Mark Crichton  <crichton@gimp.org>
8005
8006         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
8007         even if support for it isn't present.  Added an #ifdef to fix this.
8008
8009         * socket-io.c: Added checks back for Solaris support.
8010
8011 2002-09-19  Martin Baulig  <martin@gnome.org>
8012
8013         * debug-mono-symfile.c (read_string, write_string): Reflect latest
8014         changes in the symbol file format.
8015
8016 2002-09-18  Martin Baulig  <martin@gnome.org>
8017
8018         * debug-mono-symfile.c: Set version number to 21.
8019
8020 2002-09-18  Dick Porter  <dick@ximian.com>
8021
8022         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
8023         on netbsd.  Fixes bug 30051.
8024
8025 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8026
8027         * reflection.c:
8028         (set_version_from_string): little fix.
8029
8030 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8031
8032         * monosn.c, Makefile.am: added strong name utility.
8033         * reflection.h, reflection.c: implemented delayed signing,
8034         locale, version and hash id assembly attributes.
8035
8036 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8037
8038         * loader.c, metadata.c: load param attributes in signatures.
8039
8040 2002-09-16  Martin Baulig  <martin@gnome.org>
8041
8042         * debug-mono-symfile.c: Added string table with all method names.
8043
8044 2002-09-14  Martin Baulig  <martin@gnome.org>
8045
8046         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
8047         fast method lookup.
8048
8049 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8050
8051         * reflection.c: record the public key token of referenced assemblies.
8052
8053 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8054
8055         * image.c, image.h: added functions to get the strong name and the
8056         public key of an assembly.
8057         * pedump.c: use them.
8058
8059 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
8060
8061         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
8062
8063 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
8064
8065         * marshal.c (mono_marshal_get_managed_wrapper): Added
8066         MONO_TYPE_BOOLEAN 
8067
8068 2002-09-11  Martin Baulig  <martin@gnome.org>
8069
8070         * gc.c: Call GC_unregister_disappearing_link() on all links when
8071         finalizing them, this is necessary to aviod a crash in boehm's
8072         finalize handler.
8073
8074 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8075
8076         * gc.c: handle GetTarget for finalized objects spotted and fixed by
8077         nick@chemlab.org.
8078
8079 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8080
8081         * icall.c: implemented MonoType::Module.
8082         * reflection.c, reflection.h: mono_module_get_object () from
8083         Tomi Pakarinen <tomi.pakarinen@welho.com>.
8084
8085 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8086
8087         * icall.c: ignore overridden methods in GetMethods ().
8088         Fix for FieldInfo::SetValue().
8089         * object.c: handle float/double in runtime invoke.
8090
8091 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8092
8093         * object.c: allow a constructor to be called again on an object.
8094
8095 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8096
8097         * class.h, class.c: move field layout code to it's own function and
8098         export it. Get an interface id earlier. Move fields in MonoClass
8099         so they are more cache friendly and align the bitfields.
8100         * loader.c: temporary handle get_param_names() for a runtime method.
8101         * reflection.c, reflection.h: more code to handle runtime creation of
8102         types.
8103
8104 2002-09-09  Martin Baulig  <martin@gnome.org>
8105
8106         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
8107         signature with the pinvoke field being set for the actual call.
8108
8109 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8110
8111         * icall.c: removed some unused icalls. Start of map of glib charsets
8112         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
8113
8114 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8115
8116         * debug-helpers.c: break infinite loop (found and fixed by
8117         Holger Arnold <harnold@gmx.de>).
8118
8119 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8120
8121         * icall.c: target may be null in create_delegate.
8122
8123 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8124
8125         * marshal.c: handle a boolean return type.
8126
8127 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8128
8129         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
8130
8131 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8132
8133         * gc.c: fix weakreferences.
8134
8135 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8136
8137         * icall.c: added icall to get default codepage.
8138
8139 2002-09-03  Dick Porter  <dick@ximian.com>
8140
8141         * threads.h: 
8142         * threads.c: Use MonoThread instead of MonoObject where
8143         apropriate.
8144
8145         Store running thread objects in a hash table, so that we have all
8146         the info to hand when waiting for them to finish
8147         (means we don't need OpenThread() any more, so mingw builds should
8148         be fully functional again.)
8149
8150         * verify.c:
8151         * object.h: Added thread ID to MonoThread
8152
8153 2002-09-03  Martin Baulig  <martin@gnome.org>
8154
8155         * icall.c (System.Reflection.Assembly::get_location): New interncall.
8156
8157 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8158
8159         * icall.c: fixed leak in get_temp_path. Thanks lupus.
8160
8161 2002-09-03  Martin Baulig  <martin@gnome.org>
8162
8163         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
8164         argument to store the end address of the disassembled instruction.
8165
8166         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
8167         here from debug-symfile.h.
8168         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
8169         JIT into this struct.
8170         (MonoSymbolFile): Added `char *image_file' field.
8171         (MonoDebugGetMethodFunc): Removed.
8172         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
8173         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
8174         (mono_debug_find_method): New method.
8175
8176         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
8177         create a full symbol file.
8178         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
8179         and static symbol files.
8180         (mono_debug_find_method): The symbol file keeps an internal method hash,
8181         call this to get a MonoDebugMethodInfo from a MonoMethod.
8182
8183         * debug-symfile.[ch]: Removed.
8184
8185 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
8186
8187         * image.c (do_mono_image_open): Remove linker version check.
8188
8189 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
8190
8191         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
8192         wrappers for instance methods.
8193         
8194 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8195
8196         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
8197
8198 2002-08-28  Dick Porter  <dick@ximian.com>
8199
8200         * Makefile.am: Export HOST_CC for w32 builds
8201
8202 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8203
8204         * file-io.c process.c: MonoString are null terminated, no
8205         need for mono_string_to_utf16() anymore.
8206
8207 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8208
8209         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
8210
8211 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
8212
8213         * icall.c, reflection.h: speedup System.MonoType.
8214
8215 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8216
8217         * reflection.c: allow null as the value of a string argument in
8218         custom attributes constructors.
8219
8220 2002-08-27  Martin Baulig  <martin@gnome.org>
8221
8222         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
8223         `trampoline_address' field.
8224
8225 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
8226
8227         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
8228         check (fixes bug #29486) 
8229
8230 2002-08-27  Martin Baulig  <martin@gnome.org>
8231
8232         * debug-mono-symfile.c: Changed the file format in a way that allows us
8233         open it read-only and to use a specially malloced area for all the
8234         dynamic data.  We can now also generate a symbol file on-the-fly if we're
8235         debugging IL code and there is no MCS generated symbol file for it.
8236
8237 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8238
8239         * object.c: added a define for a good string and array
8240         creation speedup (not enabled by default because we need to deal with
8241         the synch stuff).
8242
8243 2002-08-26  Martin Baulig  <martin@gnome.org>
8244
8245         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
8246         function to create a dynamic symbol file.  This is used by the
8247         debugger to create a symbol file for IL code on-the-fly.
8248
8249 2002-08-26  Martin Baulig  <martin@gnome.org>
8250
8251         * loader.c (mono_lookup_pinvoke_call): Include the error message
8252         from g_module_error() in the error message.
8253
8254 2002-08-24  Martin Baulig  <martin@gnome.org>
8255
8256         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
8257         function to update the symbol file.  The symbol file is mmap()ed
8258         writable, but private.  This allows us to install the symbol file
8259         together with the assembly.
8260
8261 2002-08-24  Martin Baulig  <martin@gnome.org>
8262
8263         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
8264         but they can read the new symbol file format which mcs is now creating.
8265
8266         * debug-symfile.c (mono_debug_find_source_location): Moved to
8267         debug-mono-symfile.c; this is now operating on the new symbol file.
8268
8269 2002-08-23  Martin Baulig  <martin@gnome.org>
8270
8271         * debug-helpers.c (mono_method_desc_from_method): New function to get
8272         a MonoMethodDesc from a MonoMethod.
8273
8274 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8275
8276         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
8277         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
8278
8279 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8280
8281         * string-icalls.[ch]: make helper methods static.
8282
8283 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8284
8285         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
8286         types to it and to SetValueInternal.
8287
8288         * object.c: Moved handle_enum label to its proper place. This was the
8289         f... bug! ;-)
8290
8291         This time i compiled mcs and gtk-sharp and they both work.
8292
8293 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8294
8295         * icall.c: reverted partially my previous patch until 
8296         object.c:set_value handles enums correcly.
8297
8298 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8299
8300         * icall.c:
8301         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
8302         (ves_icall_System_Environment_get_MachineName): removed warning when
8303         compiling under cygwin.
8304
8305 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8306
8307         * object.c: fixed field_get_value() for reference types.
8308
8309 2002-08-22  Dick Porter  <dick@ximian.com>
8310
8311         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
8312         Don't free a buffer while it's still needed.  Patch from Jonathan
8313         Liger <Jonathan.liger@wanadoo.fr>
8314
8315 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
8316
8317         * icall.c (ves_icall_System_Environment_get_Platform): Add new
8318         internal call.
8319
8320 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
8321
8322         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
8323         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
8324
8325         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
8326         we call unmanaged code which throws exceptions.
8327
8328 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8329
8330         * appdomain.h: added per-domain entry_assembly.
8331         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
8332         arguments.
8333         * icall.c: Assembly::GetEntryAssembly icall.
8334         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
8335         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
8336
8337 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8338
8339         * appdomain.h, gc.c: added mono_domain_finalize ().
8340
8341 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8342
8343         * object.c:
8344         (mono_print_unhandled_exception): changed g_warning by g_printerr
8345         because g_log has a 1024 characters limit (yeah, i got a big stack
8346         trace). Don't print exception name, that should be in ToString 
8347         returned string.
8348
8349 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8350
8351         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
8352         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
8353
8354 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8355
8356         * object.c:
8357         (mono_print_unhandled_exception): after previous commit, i realized
8358         that MS calls ToString on the exception. I changed this function to
8359         do that. This way we get stack_trace for free.
8360
8361 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8362
8363         * object.c:
8364         (mono_print_unhandled_exception): invoke Message property instead of
8365         getting 'message' field from Exception. Don't allocate memory for
8366         'trace' and 'message' if not needed.
8367
8368 2002-08-18  Dick Porter  <dick@ximian.com>
8369
8370         * unicode.c: Fix asserts to match Encoder.cs checks
8371
8372 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8373
8374         * marshal.c: fix unaligned store issue and a few wrong
8375         opcode argument types.
8376
8377 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8378
8379         * icall.c: added GetUninitializedObjectInternal internal call.
8380
8381 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
8382
8383         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
8384         to the right domain.
8385
8386 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
8387
8388         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
8389
8390         * class.c (class_compute_field_layout): set blittable to false for Strings
8391
8392         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
8393
8394 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8395
8396         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
8397         first chunk of code to create types at runtime. Code to
8398         handle ReflectedType/DeclaringType. Make reflection handles
8399         domain specific.
8400
8401 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8402
8403         * class.c: set correct name in arrays.
8404
8405 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
8406
8407         * appdomain.c (mono_domain_transfer_object): make it work with
8408         valuetypes. bug fixes.
8409
8410 2002-08-12  Dick Porter  <dick@ximian.com>
8411
8412         * object.h: Rename some parameters to avoid c++ keywords (Patch
8413         from Joseph Wenninger <kde@jowenn.at>)
8414
8415 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
8416
8417         * icall.c: added icall to implement Assembly.GetFile*.
8418
8419 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8420
8421         * reflection.h, reflection.c: code to embed managed resources.
8422
8423 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8424
8425         * class.c: move all the type size stuff into
8426         class_compute_field_layout().
8427
8428 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8429
8430         * class.c: ensure enums have always the correct instance size.
8431         * unicode.c: remove wrong assert.
8432
8433 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8434
8435         * assembly.c: fix mem corruption issue.
8436         * image.h, image.c: added mono_image_get_resource () to access
8437         managed resources.
8438         * icall.c: implemented Assembly.EntryPoint property and some
8439         Managed Resources related internalcalls.
8440
8441
8442 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8443
8444         * image.c, image.h: impemented mono_image_get_entry_point ().
8445         * appdomain.c: use mono_image_get_entry_point.
8446
8447 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8448
8449         * reflection.c: support the object type argument when loading
8450         custom attributes.
8451
8452 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
8453
8454         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
8455         String as return type.
8456
8457 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
8458
8459         * reflection.c: fix encoding of named args for custom attrs to match
8460         the ms implementation. Read them back when instantiating custom
8461         attributes.
8462
8463 2002-08-02  Radek Doulik  <rodo@ximian.com>
8464
8465         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
8466         by Dietmar as quick fix
8467         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
8468         16 as stack size, used on more places as quick fix before Dietmar
8469         will fix it properly
8470
8471 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8472
8473         * object.h, object.c: added accessors for fields and properties.
8474
8475 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8476
8477         * class.c, class.h: made mono_class_get_field_from_name ()
8478         loop on parent types.
8479         Added mono_class_get_property_from_name ().
8480
8481 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8482
8483         * class.c, class.h: move the code to setup the type vtable in its own
8484         function so that it can be reused also for types created at runtime.
8485         Eliminate the "class" identifier from the header file.
8486         * reflection.c: setup the vtable for enums so that we can create
8487         objects for use in SetConstant ().
8488
8489 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
8490
8491         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
8492         instead of the delegate itself as this pointer (bug #28383)
8493
8494 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
8495
8496         * marshal.c (mono_marshal_get_managed_wrapper): added return type
8497         conversions.
8498
8499 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8500
8501         * loader.c: don't set the pinvoke bit on icalls.
8502
8503 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
8504
8505         * debug-helpers.c (mono_method_full_name): only print a number to
8506         indicate wrapper type (so that the output is more readable in traces).
8507
8508 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
8509
8510         * class.c (mono_class_init): include method override patch from Paolo
8511
8512 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
8513
8514         * icall.c: fixed GetTypeCode().
8515
8516 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
8517
8518         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
8519         use real delegate invoke function to make it work with multicast
8520         delegates (fix bug# 28291).
8521
8522 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8523
8524         * object.c: load constant strings.
8525
8526 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8527
8528         * reflection.c: no magic numbers.
8529         * tabledefs.h: security action enum.
8530
8531 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8532
8533         * assembly.c: fix possible memory corruption.
8534
8535 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8536
8537         * reflection.h, reflection.c: added support for linking resources.
8538         * verify.c: check we have an updated corlib.
8539
8540 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
8541
8542         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
8543         string arrays.
8544         (mono_marshal_string_array): null terminate unmanaged string arrays.
8545         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
8546
8547 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8548
8549         * icall.c: Type.GetType () can now return also types from the
8550         calling assembly.
8551
8552 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8553
8554         * loader.h, loader.c: stack walking support.
8555         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
8556         GetCallingAssembly.
8557
8558 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
8559
8560         * marshal.c: added optimisations for blittable types 
8561
8562         * class.c (mono_array_class_get): do not set blittable attribute on arrays
8563         (mono_class_setup_mono_type): set blittable attribute for single
8564         and double.
8565
8566         * marshal.c (mono_string_utf8_to_builder): impl.
8567         (mono_string_builder_to_utf8): impl.
8568         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
8569
8570 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
8571
8572         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
8573         (mono_marshal_get_managed_wrapper): impl. byref types
8574
8575 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8576
8577         * icall.c:
8578         (search_method): don't display debug message. 
8579
8580 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
8581
8582         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
8583
8584 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8585
8586         * appdomain.c: set the missing filename when throwing exception.
8587
8588 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
8589
8590         * metadata.c (mono_type_size): code cleanup
8591         (mono_type_stack_size): removed some test code
8592
8593 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
8594
8595         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
8596         mono_get_exception_file_not_found now.
8597
8598         * exception.c (mono_exception_from_name_two_strings): New version
8599         that will call a constructor with two string arguments. 
8600         (mono_get_exception_file_not_found): New helper routine, used to
8601         report file-not-found errors.
8602
8603 2002-07-20  Dick Porter  <dick@ximian.com>
8604
8605         * process.h:
8606         * process.c: Pass file handles to CreateProcess
8607         
8608         * icall.c:
8609         * file-io.h:
8610         * file-io.c: Implemented CreatePipe
8611
8612 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
8613
8614         * metadata.c (mono_get_param_info): set alignment for value types
8615
8616 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8617
8618         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
8619         Constify mono_domain_assembly_open().
8620         * loader.c: handle null namespace in icalls.
8621
8622 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
8623
8624         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
8625         (emit_str_to_ptr_conv): marshal object as structs
8626
8627         * metadata.c (mono_type_to_unmanaged): marshal object as structs
8628
8629         * marshal.c (mono_marshal_get_runtime_invoke): support value types
8630
8631 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
8632
8633         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
8634         (mono_marshal_get_native_wrapper): we an now return value types
8635
8636 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8637
8638         * verify.c: more checks implemented.
8639
8640 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
8641
8642         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
8643         (fix bug #27695)
8644         (mono_marshal_get_native_wrapper): allow byref arguments
8645         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
8646         impl. PtrToStringXXX methods
8647         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
8648         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
8649         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
8650         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
8651         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
8652
8653 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8654
8655         * reflection.c: fix buglet in parsing an assembly name.
8656
8657 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
8658
8659         * marshal.c (emit_ptr_to_str_conv): first impl.
8660
8661 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8662
8663         * object.c, class.h: cache the vtable in the class as suggested by
8664         vargaz@freemail.hu (Zoltan Varga).
8665
8666 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8667
8668         * class.h, loader.c: added mono_field_from_token().
8669         * verify.c: first cut of type checking code.
8670
8671 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
8672
8673         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
8674
8675 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
8676
8677         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
8678         (fix bug #27782)
8679         (mono_marshal_get_remoting_invoke): impl.
8680         (mono_delegate_begin_invoke): impl.
8681         (mono_mb_emit_save_args): impl.
8682         (mono_delegate_end_invoke): impl.
8683         (mono_marshal_get_delegate_begin_invoke):
8684         (mono_marshal_get_delegate_end_invoke):
8685         (mono_marshal_get_delegate_invoke): generate a special name for
8686         those methods (including the signature) and associate them whith
8687         the delegate class. 
8688
8689 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
8690
8691         * reflection.[ch]: 
8692         (mono_reflection_type_from_name): now it has a MonoImage parameter
8693         which is used as the default image to search the type in. If the image
8694         is NULL or getting the type from it fails, it defaults to corlib.
8695
8696         * icall.c: changed 1 call to mono_reflection_type_from_name to match
8697         new parameter.
8698
8699 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8700
8701         * reflection.c: update the parameter table index.
8702
8703 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8704
8705         * domain.c: don't include the mark byte in the string hash.
8706
8707 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8708
8709         * icall.cs: icall for Type.GetTypeCode ().
8710         * verify: a couple of fixes and disabled local initialization checks.
8711
8712 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
8713
8714         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
8715
8716         * debug-helpers.c (mono_method_full_name): print the type of the
8717         runtime wrapper
8718
8719         * metadata.c (mono_signature_hash): a hash function for signatures
8720         (mono_signature_hash): better hash algorithm
8721
8722         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
8723
8724         * debug-helpers.c (mono_method_full_name): this can now generate
8725         method names with signatures
8726
8727         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
8728         method dont have this pointers.
8729
8730 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8731
8732         * reflection.c: fixup typebuilder tokens.
8733         * image.c: fix buglet.
8734         * marshal.h: remove whitespace.
8735         * metadata.h, metadata.c: reinstate code that was removed.
8736         * verify.c: handle catch directives and fix another couple of bugs.
8737
8738 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
8739
8740         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
8741         (mono_marshal_get_native_wrapper): make it comp. with the old code
8742         (mono_marshal_get_native_wrapper): support boolean
8743         (mono_marshal_get_managed_wrapper): support more types
8744
8745 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
8746
8747         * class.c (class_compute_field_layout): compute class->blittable attribute.
8748
8749 2002-07-09  Dick Porter  <dick@ximian.com>
8750
8751         * threads.c: Make the thread cleaning up cope with threads that
8752         call ExitThread()
8753
8754 2002-07-08  Radek Doulik  <rodo@ximian.com>
8755
8756         * reflection.c (method_encode_code): use non-translated values to
8757         compute finally_start, this fixes exception handling on ppc, yay!
8758
8759         * decimal.h (struct signscale): fix endianess
8760
8761 2002-07-07  Radek Doulik  <rodo@ximian.com>
8762
8763         * reflection.c: swap box_val and not val
8764
8765 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8766
8767         * reflection.c, reflection.h: handle full assembly info in type name.
8768         Handle Type arguments when loading custom attributes.
8769         * icall.c: updated to use new mono_reflection_type_from_name () method.
8770
8771 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8772
8773         * loader.c:
8774         (method_from_memberref): also print assembly name when method not found.
8775
8776 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8777
8778         * icall.c:
8779         (ves_icall_TypeGetProperties): fixed bug #27473. 
8780
8781 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8782
8783         * reflection.c: display image name and token when cannot find the
8784         .ctor for an attribute.
8785
8786 2002-07-05  Martin Baulig  <martin@gnome.org>
8787
8788         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8789
8790 2002-07-04  Dick Porter  <dick@ximian.com>
8791
8792         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
8793         compile on mingw.  This will cause mingw builds to not wait for
8794         subthreads to terminate after the main thread does.  I've lodged a
8795         bug with the mingw developers for them to wrap OpenThread().
8796
8797 2002-07-03  Dick Porter  <dick@ximian.com>
8798
8799         * threads.c: Store thread IDs instead of handles, because
8800         GetCurrentThread() returns a pseudohandle and therefore stores
8801         useless values.  mono_thread_cleanup() continues checking the
8802         array of threads until it is empty, to cope with subthreads
8803         spawning new threads after the main thread has finished.
8804
8805         * profiler.h:
8806         * profiler.c:
8807         * profiler-private.h: Pass the thread ID to thread profiler
8808         functions, instead of a handle
8809
8810 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8811
8812         * verify.c: fixes to make it more usable.
8813         * pedump.c: added --verify code to verify IL code in an assembly.
8814
8815 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8816
8817         * reflection.c: turn errors into warnings to allow compiling corlib.
8818
8819 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8820
8821         * reflection.c: add special cases to compile corlib.
8822
8823 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8824
8825         * reflection.c: handle properties with only a set method.
8826
8827 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8828
8829         * opcodes.h: add enum with opcodes in opval order.
8830
8831 2002-07-01  Dick Porter  <dick@ximian.com>
8832         
8833         * object.h:
8834         * object.c (mono_runtime_run_main): Removed unneeded argument
8835
8836 2002-06-28  Martin Baulig  <martin@gnome.org>
8837
8838         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8839
8840 2002-06-27  Dick Porter  <dick@ximian.com>
8841
8842         * threads.c: Store the handle in both the parent thread and in the
8843         subthread, to minimise the time between starting a new thread and
8844         storing its ID.
8845
8846 2002-06-26  Dick Porter  <dick@ximian.com>
8847
8848         * appdomain.c (mono_runtime_cleanup): Close the socket library
8849         after all the threads have finished, not before
8850
8851 2002-06-26  Martin Baulig  <martin@gnome.org>
8852
8853         * debug-symfile.c (mono_debug_find_source_location): Added
8854         `guint32 *line_number' argument.  If it's not NULL, store the line number
8855         there and return the file name without the line number.
8856
8857 2002-06-25  Dick Porter  <dick@ximian.com>
8858
8859         * icall.c:
8860         * process.h:
8861         * process.c: Process forking and other support functions
8862
8863 2002-06-25  Dick Porter  <dick@ximian.com>
8864
8865         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
8866         things dont happen when the image is closed.
8867         (mono_image_lookup_resource): Walk the resource section looking
8868         for a particular entry
8869
8870         * cil-coff.h: PE resource section decoding
8871
8872 2002-06-25  Dick Porter  <dick@ximian.com>
8873         
8874         * assembly.h:
8875         * assembly.c: 
8876         (mono_assembly_foreach): Accessor functions to walk the list of
8877         loaded assemblies
8878         (mono_assembly_set_main):
8879         (mono_assembly_get_main): Process methods need to know which
8880         assembly is the "main" one
8881
8882         * object.c (mono_runtime_run_main): Record the main assembly
8883
8884         * debug-helpers.c: Fix typo
8885
8886 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
8887
8888         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
8889         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
8890
8891 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8892
8893         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
8894
8895 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
8896
8897         * image.c (do_mono_image_open): Initialize reference count,
8898         otherwise we leak the MonoImage.
8899
8900 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8901
8902         * reflection.c: small tweak to handle self-hosting.
8903
8904 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8905
8906         * reflection.c: fix type name parse code.
8907
8908 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8909
8910         * reflection.c: break out of the loop.
8911         * image.c: special case corlib.
8912
8913 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8914
8915         * reflection.c: add all the custom attrs at the end to ensure the
8916         ctors have been properly initialized when the attributes are defined
8917         in the current assembly.
8918
8919 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8920
8921         * reflection.c: handle correctly multiple-nested types.
8922
8923 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
8924
8925         * row-indexes.h: fix typos.
8926         * reflection.c: adjust for typos and fix method_def_or_ref
8927         encoding in MethodImpl table.
8928
8929 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8930
8931         * reflection.c: fix entry point patching (thanks Serge!).
8932
8933 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
8934
8935         * verify.c: add check for System.Exception
8936
8937 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8938
8939         * image.c, class.c: minifix for code just c&p'ed.
8940         * reflection.c: warning fix.
8941         * object.h, loader.h, domain.c: load also StringBuilder.
8942
8943 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8944
8945         * marshal.h, marshal.c: some support code to handle complex marshaling.
8946
8947 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8948
8949         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
8950         Better signatures with vtable error dump.
8951
8952 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
8953
8954         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
8955
8956 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
8957
8958         * icall.c (ves_icall_Type_GetField): impl.
8959
8960 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8961
8962         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
8963         to retrieve a marshal description blob for a field or param.
8964
8965 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8966
8967         * reflection.h, reflection.c: change order of nested type emission
8968         to avoid table corruption. The NestedTypes table is sorted.
8969         * icall.c: change order of GetConstructor results to workaround mcs bug.
8970
8971 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8972
8973         * reflection.h, reflection.c: handle field and param marshal
8974         information.
8975
8976 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8977
8978         * icall.c, marshal.c marshal.h: more Marshal class implementation.
8979
8980 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8981
8982         * reflection.c: fix call convention.
8983
8984 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8985
8986         * reflection.h, reflection.c: mono_image_get_memberref_token()
8987         takes a type instead of a class, now. Added
8988         mono_image_get_array_token() to create tokens for the special
8989         multi-dim array methods.
8990
8991 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8992
8993         * assembly.c: handle modules (no assembly table). Split
8994         loading references in its own function.
8995         * class.c: handle moduleref resolution scope.
8996         * image.c, image.h: cache module name in image.
8997
8998 2002-06-07  Martin Baulig  <martin@gnome.org>
8999
9000         * reflection.c (mono_image_get_type_info): Only add a class layout entry
9001         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
9002
9003 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9004
9005         * icall.c: more signature fixes that used uint instead of int.
9006
9007 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9008
9009         * reflection.c: fixed signature of field refs.
9010
9011 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9012
9013         * class.c, reflection.c: handle typerefs of nested types
9014         (both on read and when writing files).
9015
9016 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
9017
9018         * icall.c: fix method signatures that tried to workaround the previous
9019         typo, d'oh!
9020
9021 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9022
9023         * debug-helpers.c: fix typo.
9024
9025 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9026
9027         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
9028         rewrote the PE/COFF writing code (our programs are understood by the
9029         ms runtime, now).
9030
9031 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9032
9033         * gc.c, gc.h, icall.c: weakreference support.
9034
9035 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9036
9037         * Makefile.am, mono-config.c: use $(sysconfdir).
9038
9039 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9040
9041         * icall.c: changed default precision of Double.ToString() to 15.
9042         Fixed memory leak. Unified with Single.ToString.
9043
9044 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
9045
9046         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
9047
9048 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
9049
9050         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
9051         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
9052         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
9053         and myself.
9054
9055 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9056
9057         * debug-symfile.c, sysmath.c: yet more compilation fixes.
9058
9059 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9060
9061         * reflection.c, socket-io.c: more compilation fixes.
9062
9063 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9064
9065         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
9066         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
9067         unicode.c: warning and compiler compatibility fixes.
9068
9069 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9070
9071         * class.h, metadata.c: fixed warnings/compilation errors.
9072
9073 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9074
9075         * Makefile.am, mono-config.c, mono-config.h: configuration file
9076         support routines.
9077         * loader.c, loader.h: make Dll mapping configurable at runtime in the
9078         config file. Export methods to insert and lookup mappings.
9079
9080 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
9081
9082         * reflection.c: handle types and boxed objects in custom attr
9083         constructors.
9084
9085 2002-05-30  Martin Baulig  <martin@gnome.org>
9086
9087         * debug-symfile.c
9088         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
9089
9090 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
9091
9092         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
9093         to lookup the implmap row for a P/Invoke method.
9094         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
9095         P/Invoke method from the runtime on an as needed basis.
9096
9097 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
9098
9099         * metadata.c (mono_metadata_parse_signature): impl.
9100
9101 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9102
9103         * class.c: handle .pack directive.
9104
9105 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
9106
9107         * object.c: initialize static fields with RVA data.
9108
9109 2002-05-25  Martin Baulig  <martin@gnome.org>
9110
9111         * debug-symfile.c
9112         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
9113
9114 2002-05-24  Martin Baulig  <martin@gnome.org>
9115
9116         * debug-symfile.c
9117         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
9118         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
9119         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
9120
9121 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9122
9123         * object.c: special case string ctros in invoke.
9124         * gc.c: silly whitespace changes.
9125
9126 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
9127
9128         * threadpool.[ch]: impl. a threadpool that can
9129         be used by mint and mono.
9130
9131 2002-05-22  Martin Baulig  <martin@gnome.org>
9132
9133         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
9134         The first argument is now a `MonoReflectionModuleBuilder *', the return
9135         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
9136         `methods' field to get the method builder.  The `token' argument is the
9137         unfixed token.
9138
9139         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
9140         invalid characters instead of g_assert_not_reached()ing.  This seems
9141         to be the behaviour of mscorlib.
9142
9143 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
9144
9145         * object.c (mono_runtime_invoke_array): applied patch from Rachel
9146         Hestilow to fix bug #25104
9147
9148 2002-05-21  Martin Baulig  <martin@gnome.org>
9149
9150         * debug-symfile.c (mono_debug_find_source_location): New function.
9151         Looks up an IL offset in the line number table and returns the source
9152         location as a string.
9153
9154 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9155
9156         * icall.c:
9157         (mono_double_ToStringImpl): changed %f by %g until we have something
9158         better.
9159
9160 2002-05-21  Nick Drochak  <ndrochak@gol.com>
9161
9162         * icall.c : Use different name for Math.Pow's icall.  Needed to check
9163         parameters first in C#.
9164
9165 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9166
9167         * icall.c, reflection.h: added icall to get info about an event.
9168
9169 2002-05-20  Radek Doulik  <rodo@ximian.com>
9170
9171         * object.c (mono_value_box): don't use memcpy for boxing on BIG
9172         endian
9173         (mono_value_box): don't use memcpy for small sizes on
9174         architectures with unaligned access
9175
9176 2002-05-20  Martin Baulig  <martin@gnome.org>
9177
9178         * reflection.c (mono_reflection_setup_internal_class): Don't crash
9179         if `tb->parent == NULL'.
9180         (mono_reflection_create_internal_class): New function.  This is
9181         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
9182         for enum types.
9183
9184         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
9185         New interncall.
9186
9187 2002-05-19  Martin Baulig  <martin@gnome.org>
9188
9189         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
9190         argument to get the length, don't default to the array length.
9191
9192 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
9193
9194         * assembly.c (mono_assembly_setrootdir): New function used to
9195         override the MONO_ASSEMBLIES directory.
9196
9197 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9198
9199         * icall.c: ValueType_GetHashCode() initialize local var.
9200
9201 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9202
9203         * reflection.c: sort custom attributes table.
9204
9205 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9206
9207         * reflection.c: support named args in custom attributes (write support).
9208
9209 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9210
9211         * reflection.c: fix finally position calculation.
9212
9213 2002-05-15  Radek Doulik  <rodo@ximian.com>
9214
9215         * reflection.c: fixed endianess at many places
9216
9217         * icall.c (ves_icall_InitializeArray): comment out debug msg
9218
9219 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
9220
9221         * object.c (mono_unhandled_exception): new function to handle
9222         unhandled exceptions.
9223         (mono_unhandled_exception): call the UnhandledException event.
9224         (mono_runtime_delegate_invoke): impl.
9225
9226 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
9227
9228         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
9229         returns the RVA, not the direct pointer to the data. Handle the case
9230         when the class size is fixed.
9231
9232 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
9233
9234         * reflection.c: fix some endianess issues.
9235
9236 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
9237
9238         * object.c (mono_runtime_invoke): is now able to catch exceptions.
9239
9240         * threads.c (mono_thread_init): added a callback which is invoked
9241         at thread start.
9242
9243 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
9244         
9245         * icall.c: make GetHashCode return non-negative values.
9246
9247 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
9248
9249         * object.c, icall.c, gc.c: revert to address-based hashcode.
9250
9251 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
9252
9253         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
9254
9255 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9256
9257         * icall.c, class.c: special case <Module>.
9258
9259 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
9260
9261         * icall.c: fix bug in GetNow().
9262
9263 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
9264
9265         * object.c (mono_runtime_class_init): make sure that we call all
9266         static class constructors.
9267
9268 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9269
9270         * reflection.c: sort methodsemantics table.
9271
9272 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
9273
9274         * reflection.h, reflection.c: honour init locals setting.
9275
9276 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
9277
9278         * icall.c: copied Double ToStringImpl for Single ToStringImpl
9279
9280 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9281
9282         * reflection.c: support ContructorBuilders in attribute blob creation.
9283
9284 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9285
9286         * reflection.c: some changes to build a binary that can be run
9287         directly in windows.
9288
9289 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9290
9291         * loader.c: print a big message when an icall can't be found.
9292
9293 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9294
9295         * string-icalls.c: fix bug 24248.
9296
9297 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
9298
9299         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
9300         icall.c, reflection.h: separate assembly loading by pathname and by
9301         assembly name. Use the MONO_PATH env var to search for assemblies.
9302
9303 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9304
9305         * assembly.c, image.h: add some support for assemblies
9306         with multiple modules.
9307         * class.c, class.h: export mono_class_from_typeref().
9308         * loader.c: remove duplicated code and use mono_class_from_typeref(),
9309         instead.
9310
9311 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9312
9313         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
9314         documentation says (the ECMA one is correct).
9315
9316 2002-05-02  Dick Porter  <dick@ximian.com>
9317
9318         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
9319         Don't name the synchronisation mutex.
9320
9321 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
9322
9323         * rand.c
9324         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
9325         Make the prototypes match.
9326         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
9327         Same.
9328
9329         * icall.c
9330         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
9331         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
9332         all systems have tm.tm_zone, so use strftime() with %Z to print
9333         the timezone abreviation into a temp string.
9334
9335         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
9336         rather than mono_array_addr() on a MonoString on Big Endian
9337         machines.
9338
9339 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
9340
9341         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
9342         fix bug 24041
9343
9344 2002-04-30  Dick Porter  <dick@ximian.com>
9345
9346         * socket-io.c: Cope with SOCKET being an integer rather than a
9347         pointer now.
9348
9349         * threads.c: Added Thread_free_internal, to deal with thread
9350         handle cleanup.  Moved calls to handle_store() and handle_remove()
9351         to start_wrapper(), so each can only be called once.  Allocate
9352         synchronisation blocks with GC_malloc(), and use GC finalisation
9353         to close the handles.
9354
9355         * icall.c: added System.Threading.Thread::Thread_free_internal
9356
9357 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9358
9359         * icall.c: support Environment.Exit, CommandLineArgs().
9360
9361 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9362
9363         * object.c, object.h: added mono_runtime_run_main () and
9364         mono_runtime_get_main_args () for use in System.Environment.
9365
9366 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9367
9368         * gc.c: fix thinko, enable actual finalization since the jit is now
9369         fixed.
9370
9371 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9372
9373         * gc.c, object.c: take into account that an object may be offset wrt the address
9374         returned by GC_malloc().
9375
9376 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
9377
9378         * image.c: handle files without entries in the assembly table (modules).
9379
9380 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
9381
9382         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
9383         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
9384         allowed to be null when it's System.Object class setup.
9385
9386 2002-04-27  Martin Baulig  <martin@gnome.org>
9387
9388         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
9389         if `tb->parent == NULL' rather than crashing.
9390
9391 2002-04-28  Nick Drochak  <ndrochak@gol.com>
9392
9393         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
9394         calling acos() where asin() should have been called.
9395
9396 2002-04-26  Martin Baulig  <martin@gnome.org>
9397
9398         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
9399         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
9400         there's a subdirectory called `System', but we don't want to read that
9401         subdirectory as an assembly.
9402
9403 2002-04-25  Martin Baulig  <martin@gnome.org>
9404
9405         * debug-symfile.c: Reflect latest MonoString changes.
9406
9407 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9408
9409         * rand.c, rand.h: instance method icalls need to have an explicit
9410         this pointer as first argument in the C implementation.
9411
9412 2002-04-25  Nick Drochak <ndrochak@gol.com>
9413
9414         * icall.c: Fix typo in map for GetNonZeroBytes
9415
9416 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9417
9418         * string-icalls.c : String does now passes unit tests without any 
9419         errors, the following changes has been made:
9420         
9421         Implemented replace methods.
9422         Renaming of methods to (try) follow the standard.
9423         Fixed compare ordinal
9424         Made all memory allocated directly to function instead of via icall function.
9425         Small performance fix in is_in_array function
9426                         
9427  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
9428
9429         c (mono_string_Internal_ctor_charp_int_int):
9430         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
9431         sindex < 0, throw ArgumentOutOfRangeException instead of
9432         ArgumentNullException.
9433
9434         Added new check for length == 0, however
9435         I need to make it return String.Empty from the C code.
9436         
9437         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
9438         that calculate the length for us here.
9439         
9440         (mono_string_Internal_ctor_sbytep_int_int): Replaced
9441         mono_string_new_utf16 with mono_string_new, since value is utf8.
9442
9443 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9444
9445         * object.c: register the object for finalization if needed.
9446         Allocate one more char in the string for the terminating 0 char.
9447
9448 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9449
9450         * class.c, class.h, image.c: check if a type implemenst a destructor.
9451         Use the proper key for array class lookups.
9452         * icall.c: register the icalls in the System.GC class.
9453         * gc.c, gc.h: GC-related functions and icalls.
9454
9455 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9456
9457         * icall.c:
9458         * socket-io.c:
9459         * unicode.c: free some strings gotten from mono_string_to_utf8 and
9460         changed a couple of free () by g_free ().
9461
9462         * decimal.c: one-liner in the comments for decimal2string ().
9463
9464 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9465
9466         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
9467
9468 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9469
9470         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
9471         * object.c (mono_runtime_invoke_array) : handle null in params
9472
9473 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9474
9475         * string-icalls.c: fixed bug in split (one off bug)
9476
9477 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9478
9479         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
9480         * icalls.c: added String::Equals as internal method
9481
9482 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9483
9484         * threads.c: fixed bug in the double interlocked functions
9485
9486 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
9487
9488         * threads.c: implemented all of the new interlocked icalls.
9489         * string-icalls.c: fix a bug in insert.
9490         * icalls.c: added the icalls for interlocked, removed old string functions.
9491         
9492 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9493
9494         * loader.c: fix off-by-one error when reading argument names.
9495
9496 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9497
9498         * profiler.c: win32 counter implementation (untested).
9499         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
9500         (the latter needs testing and more complete impl. from win32 folks).
9501
9502 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
9503
9504         * object.c: mono_array_new_full workaround mono_array_class_get
9505         problem.
9506
9507 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9508
9509         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
9510         * object.h (mono_string_chars): Changed casting type.
9511
9512 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9513
9514         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
9515                            method signatures to use gunichar2 instead of gint16.
9516
9517 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
9518
9519         * object.h, object.c: domain-specific versions of mono_object_new and
9520         mono_array_new.
9521
9522 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
9523
9524         * object.c: changed String layout
9525
9526         * string-icalls.c (mono_string_Internal_ctor_chara): added
9527         internal string constructors.
9528
9529 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
9530
9531         * threads.c: pass 'this' to the thread start routine.
9532
9533 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9534
9535         * string-icalls.c: fix IndexOf and LastIndexOf. Now
9536         InternalCompareStr don't call twice mono_string_cmp_char for the last
9537         character. Improved performance in mono_string_cmp_char.
9538
9539 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9540
9541         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
9542         code into its own library: libmonoruntime.
9543
9544 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
9545
9546         * object.h, object.c: changed array format so that szarrays do not
9547         require a bounds structure.
9548         * icall.c, appdomain.c: support for new szarray format.
9549
9550 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9551
9552         * metadata.c: compare also the retuns type when comparing signatures:
9553         we didn't do this as an optimization since really overloaded methods
9554         must differ also in the arguments, but this doesn't work with
9555         low-level IL code (or when using explicit conversion operators: see
9556         bug#23498 for an example).
9557
9558 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9559
9560         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
9561
9562 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
9563
9564         * icall.c: make MonoType::GetElementType its own icall.
9565
9566 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9567
9568         * icall.c: remove MonoMethod_get_Name().
9569         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
9570         object.
9571
9572 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9573
9574         * string-icalls.c: optimized a few methods.
9575
9576 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9577
9578         * icall.c: added all new string internal calls
9579         * string-icalls.c: added, new string internal call implementation.
9580         * object.c: added mono_string_new_size for allocating a string a size
9581
9582 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
9583
9584         * object.c (mono_object_isinst): use the same code as in the
9585         optimized x86 version.
9586
9587 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9588
9589         * profiler.c: TSC-based timer code (faster and more accurate).
9590         Not hooked up in configure, yet (set USE_X86TSC to 1).
9591
9592 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
9593
9594         * profiler.c, profiler.h: track time spent compiling methods.
9595         * threads.c: track thread creation/destruction.
9596
9597 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
9598
9599         * profiler.c, profiler.h, profiler-private.h: profiling interface
9600         and sample implementation. Moved here so that it can be used also by
9601         the jit.
9602
9603 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
9604
9605         * reflection.c, reflection.h: keep types and other handles separate in
9606         the hash tables for referred tokens. Add guid for modules.
9607
9608 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9609
9610         * assembly.c: fix bugs found with valgrind.
9611         * metadata.h, metadata.c: added mono_metadata_guid_heap().
9612
9613 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
9614
9615         * threads: added icall support for getting current domain for
9616                    the thread.
9617  
9618 2002-04-13  Martin Baulig  <martin@gnome.org>
9619
9620         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
9621         (MonoDebugVarInfo): Added `index' field for register based addresses.
9622         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
9623         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
9624         `MonoDebugVarInfo *params' and `guint32 this_offset' with
9625         `MonoDebugVarInfo *this_var'.
9626
9627         * debug-symfile.c (relocate_variable): New static function to write
9628         a location description for a local variable or method parameter.
9629
9630 2002-04-12  Martin Baulig  <martin@gnome.org>
9631
9632         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
9633         stack offset and begin/end scope address of a local variable.
9634         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
9635         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
9636         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
9637
9638         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
9639         Added new relocation types for start/end scope of a local variable.
9640
9641 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9642
9643         * object.h: add mono_object_domain() macro.
9644         * reflection.c: handle typespecs.
9645         * icall.c: MonoMethod::get_Name() implementation.
9646
9647 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9648
9649         * icall.c: String::GetHashCode() icall implementation.
9650
9651 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9652
9653         * icall.c: String::IndexOfAny icall.
9654         * object.c, object.h: make array->max_length more useful.
9655         Intrduced mono_object_class() and mono_string_length() macros.
9656
9657 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9658
9659         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
9660         instead of g_unichar_isdigit.
9661
9662 2002-04-11  Nick Drochak  <ndrochak@gol.com>
9663
9664         * icall.c: Implement a simple Double.ToString().
9665
9666 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9667
9668         * appdomain.h: only io-layer.h is supposed to be included.
9669         * icall.c: explicitly import environ. Fix warning.
9670
9671 2002-04-10  Nick Drochak  <ndrochak@gol.com>
9672
9673         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
9674                 return true even if it's not Daylight Savings time.
9675                 Only return false for the case where the function isn't
9676                 implemented for a plaform (read Windows).
9677
9678 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9679
9680         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
9681         data with a mutex.
9682
9683 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
9684
9685         * mempool.c (mono_mempool_alloc): only use g_malloc when
9686         absolutely necessary.
9687
9688 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
9689
9690         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
9691
9692         * class.c (mono_class_vtable): use domain mempool to allocate vtable
9693         (mono_class_proxy_vtable): use domain mempool
9694
9695 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9696
9697         * appdomain.h, appdomain.c: split initialization that requires the
9698         execution engine support into mono_runtime_init().
9699
9700 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
9701
9702         * class.c (mono_class_init): don't include vtable inside MonoClass
9703         to save some memory, gather some statistics.
9704         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
9705
9706 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9707
9708         * icall.c: internalcall implementation for ValueType.Equals().
9709
9710 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
9711
9712         * object.c (mono_message_init): moved 
9713         (mono_runtime_exec_main): new arch. independent impl.
9714         (mono_runtime_invoke_array): new method - like
9715         mono_runtime_invoke, but you can pass an array of objects.
9716         (mono_remoting_invoke): new arch. independent impl.
9717         (mono_message_invoke): new arch. independent impl.
9718         (mono_runtime_class_init): new arch. independent impl.
9719         (mono_runtime_object_init): new arch. independent impl.
9720
9721 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9722
9723         * metadata.c, object.c, reflection.c: documented the exported
9724         functions.
9725
9726 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
9727
9728         * icall.c: simpler code to pass the assembly builder data to corlib.
9729         Implement GetNestedTypes() internalcall.
9730
9731 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9732
9733         * class.c: warn if a type can't be loaded.
9734
9735 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
9736
9737         * image.h: typedef MonoImageOpenStatus
9738         * types.h: removed unused file
9739         
9740 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
9741
9742         * icall.c: Enum_ToObject accepts enum value arguments.
9743
9744 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9745
9746         * class.c: move initialization of properties, events and nested
9747         classes, so that they happen for interfaces, too.
9748
9749 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9750
9751         * icall.c: cleanup some ugly casts in Array_SetValue*.
9752
9753 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9754
9755         * icall.c: the values array fro enums is of the correct type, now.
9756         Implement (correctly) getFullName instead of assQualifiedName for
9757         MonoType.
9758         * reflection.h, reflection.c: added mono_type_get_name ().
9759
9760 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9761
9762         * assembly.c, image.h: for each MonoImage, record from wich assembly
9763         it was loaded.
9764         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
9765         Make Type.Assembly work.
9766
9767 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
9768
9769         * debug-symfile.h: use char* instead of gpointer to avoid
9770         unnecessary casts.
9771
9772         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
9773
9774         * icall.c (ves_icall_InternalExecute): impl. FielSetter
9775         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
9776
9777 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
9778
9779         * icall.c (mono_message_init): impl. (code cleanup)
9780         (ves_icall_InternalExecute): impl. FieldGetter
9781
9782         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
9783         defined we call all (non-static)methods through the vtable. 
9784
9785 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
9786
9787         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
9788         finalizer even though the memory is still referenced (and the chunk of
9789         memory is not freed).
9790
9791 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9792
9793         * assembly.c: fix brokeness.
9794
9795 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
9796
9797         * class.c: kill some warnings. Check explicit interface method
9798         implementation also without considering the namespace.
9799         Load also literal strings in static class data.
9800
9801 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
9802
9803         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
9804         (default_assembly_name_resolver): Make the resolver take the
9805         "base" directory where the assembly was originally defined, so we
9806         can load DLLs that are in the same directory as the assembly that
9807         is being referenced.
9808
9809 2002-03-28  Dick Porter  <dick@ximian.com>
9810
9811         * file-io.h: 
9812         * file-io.c:
9813         * socket-io.c: 
9814         * unicode.h: 
9815         * unicode.c: Warning cleanups
9816
9817 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
9818
9819         * object.h, reflection.h: use the correct type instead of MonoObject.
9820
9821 2002-03-28  Martin Baulig  <martin@gnome.org>
9822
9823         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
9824         (mono_debug_update_symbol_file): Initialize classes if necessary.
9825
9826 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9827
9828         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
9829         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
9830
9831 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
9832
9833         * assembly.h: fix function prototype.
9834         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
9835         * mono-endian.h: use const cast.
9836
9837 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
9838
9839         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
9840
9841 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9842
9843         * loader.c: don't assert when a typeref can't be loaded, give
9844         a chance to the runtime to trow an exception instead.
9845         * loader.h: fix warning.
9846
9847 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
9848
9849         * class.c (mono_class_proxy_vtable): added proxy support
9850
9851 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
9852
9853         * icall.c: removed last of PAL calls, added System.Environment
9854         * file-io.h, file-io.c: MonoIO implementation
9855         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
9856
9857 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9858
9859         * appdomain.c: do not use the byte marker in ldstr table lookup.
9860         * debug-helpers.c: allow two ':' to separate class and method name.
9861         * object.c: allocate arrays bounds with the GC, too.
9862         * verify: add a few more checks.
9863
9864 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
9865
9866         * reflection.c: output also literal strings. Allocate parameter data
9867         with GC_malloc() (thanks, Martin, for catching this!).
9868
9869 2002-03-26  Martin Baulig  <martin@gnome.org>
9870
9871         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
9872         include the `this' offset in the `param_offsets'.
9873
9874 2002-03-25  Martin Baulig  <martin@gnome.org>
9875
9876         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
9877         mono_debug_get_class() function to get the classes. Added new
9878         relocation types for arrays and strings.
9879         (mono_debug_get_class): New static function to search in all
9880         referenced assemblies for a metadata token.
9881
9882         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
9883
9884 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
9885
9886         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
9887         hold gc-allocated objects. Make the string heap a stream like the
9888         others. Removed duplicated code when writing stream info.
9889         Added asserts to catch possible buffer overflows. Set the sorted map
9890         for tables that need sorting. Added some documentation.
9891
9892 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
9893
9894         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
9895         for interned strings and vtables.
9896
9897 2002-03-24  Martin Baulig  <martin@gnome.org>
9898
9899         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
9900         it in the array since it was created with g_slist_prepend().
9901
9902 2002-03-24  Martin Baulig  <martin@gnome.org>
9903
9904         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
9905         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
9906         (mono_debug_method_from_token): Renamed to
9907         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
9908         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
9909
9910         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
9911         relocation types.
9912
9913         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
9914
9915 2002-03-24  Martin Baulig  <martin@gnome.org>
9916
9917         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
9918         (mono_debug_method_from_token): New func.
9919
9920         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
9921         New interncall, calls mono_debug_local_type_from_signature().
9922         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
9923         calls mono_debug_method_from_token().
9924
9925 2002-03-23  Martin Baulig  <martin@gnome.org>
9926
9927         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
9928         specifies the number of bytes to be converted, not the array size.
9929         Return the number of chars, not the number of bytes.
9930         (ves_icall_iconv_get_chars): The `byteCount' argument
9931         specifies the number of bytes to be converted, not the array size.
9932
9933 2002-03-23  Martin Baulig  <martin@gnome.org>
9934
9935         * reflection.h (MonoReflectionSigHelper): New type.
9936
9937         * reflection.c (mono_reflection_sighelper_get_signature_local),
9938         (mono_reflection_sighelper_get_signature_local): New functions.
9939
9940         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
9941         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
9942         interncalls.
9943
9944 2002-03-23  Martin Baulig  <martin@gnome.org>
9945
9946         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
9947         is_writeable is set.
9948         (mono_raw_buffer_update): New function to write the modified map
9949         back to disk.
9950
9951         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
9952
9953         * debug-symfile.c (mono_debug_update_symbol_file): Call
9954         mono_raw_buffer_update() when done writing.
9955
9956 2002-03-23  Martin Baulig  <martin@gnome.org>
9957
9958         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
9959
9960         * debug-symfile.c: Added support for arguments and local variables.
9961
9962 2002-03-23  Dick Porter  <dick@ximian.com>
9963
9964         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
9965         protected by ifdefs, hence breaking the w32 build.
9966
9967 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9968
9969         * object.c: implement is_interned() the right way.
9970
9971 2002-03-21  Martin Baulig  <martin@gnome.org>
9972
9973         * debug-symfile.[ch]: New files to handle debugging information
9974         files. There's also support to dynamically update these symbol
9975         files to include machine dependent information.
9976
9977 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
9978
9979         * threads.c (mono_thread_create): new function to create thread
9980         from C
9981
9982 2002-03-20  Martin Baulig  <martin@gnome.org>
9983
9984         * icall.c (ves_icall_InternalInvoke): Create a new object if the
9985         method is a constructor.
9986         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
9987         points to ves_icall_InternalInvoke().
9988
9989 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
9990
9991         * file-io.c: Flush shouldn't throw exceptions.
9992
9993 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
9994
9995         * file-io.c: FileStream flush support; FileSetLength now
9996         restores file pointer.
9997
9998 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
9999
10000         * class.c: set image for pointer classes.
10001
10002 2002/03/19  Nick Drochak <ndrochak@gol.com>
10003
10004         * sysmath.c: Forgot one.
10005
10006 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
10007
10008         * sysmath.c: Avoid redefining existing names.
10009
10010 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
10011
10012         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
10013         handled by runtime as icall rather than dllimport from libm.so
10014         * file-io.c, file-io.h: fixed handle argument type.
10015
10016 2002-03-18  Dick Porter  <dick@ximian.com>
10017
10018         * reflection.c (mono_image_get_type_info): rename interface to
10019         iface, because of "#define interface struct" on windows.
10020
10021 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
10022
10023         * class.c, class.h: rename and export mono_ptr_class_get().
10024         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
10025         * reflection.c, reflection.h, icall.c: better/saner type name
10026         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
10027         method signatures.
10028
10029 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
10030
10031         * class.c (mono_class_init): removed hardcoded GHC_SLOT
10032
10033         * icall.c (ves_icall_InternalInvoke): impl.
10034
10035 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10036
10037         * reflection.c: output the interface map table, too.
10038
10039 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
10040
10041         * class.c (class_compute_field_layout): separate computation of 
10042         static field layout
10043
10044 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
10045
10046         * icall.c: added System.Buffer support.
10047         * file-io.c: moved file icalls from PAL to FileStream.
10048
10049 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
10050
10051         * icall.c (ves_icall_System_Object_GetHashCode): impl.
10052
10053 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
10054
10055         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
10056
10057 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10058
10059         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
10060
10061 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10062
10063         * debug-helpers.{c,h}: moved here from monograph some useful functions
10064         to locate a method by name/signature in a class or image. Included
10065         also a small and flexible IL disassembler.
10066
10067 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10068
10069         * reflection.c: fixup tokens in methods with small header size, too.
10070
10071 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
10072
10073         * object.c (mono_string_to_utf8): remove assert(!error), instead
10074         print a warning. 
10075
10076 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
10077
10078         * icall.c: update to the new mono_Array_class_get interface.
10079
10080 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10081
10082         * appdomain.c, object.c: Boehm-GC enable.
10083         * icall.c: make get_data_chunk() support split data requests.
10084         Ensure a class is initialized in more cases. Return only the first
10085         property found in GetProperties() or the compiler gets confused. 
10086         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
10087         * reflection.h, reflection.c: add fixup mechanism for field and method
10088         tokens. Initialize assembly->typeref in a single place. Output
10089         properties after events. Support custom attributes for events, too.
10090         Typo fix for paramter custom attrs.
10091
10092 2002-03-07  Martin Baulig  <martin@gnome.org>
10093
10094         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
10095
10096 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
10097
10098         * class.c (mono_array_class_get): fix. for multi. dim. arrays
10099
10100 2002-03-06  Martin Baulig  <martin@gnome.org>
10101
10102         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
10103         non-zero lower bounds. See testcases #F10-#F13.
10104
10105 2002-03-05  Martin Baulig  <martin@gnome.org>
10106
10107         * exception.c (mono_get_exception_argument_out_of_range): New exception.
10108
10109         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
10110         ves_icall_System_Array_GetValue(), only calculate the absolute array position
10111         here.
10112         (ves_icall_System_Array_SetValue): Likewise.
10113         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
10114         as argument and does the actual work. This function is used when copying a
10115         multi-dimensional array.
10116         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
10117         now do all the widening conversions of value types.
10118         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
10119
10120 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10121
10122         * class.c: remove some magic numbers and use the smbolic names,
10123         instead. Added init_events() to load event info at class init time.
10124         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
10125         and mono_metadata_methods_from_event().
10126         * reflection.h, reflection.c: added support for writing out the evnets
10127         related information.
10128
10129 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10130
10131         * reflection.h, icall.c: use a different method (GetInterfaces)
10132         to gather interface info and add isbyref, isprimitive and
10133         ispointer to the ves_icall_get_type_info() return value.
10134
10135 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10136
10137         * class.h: stared adding support for events.
10138         * icall.c: split find_members implementation. Added debug icall to get
10139         the address of an object.
10140         * reflection.c: handle TypeBuilders in mono_type_get_object().
10141
10142 2002-03-01  Martin Baulig  <martin@gnome.org>
10143
10144         * icall.c (ves_icall_System_Array_GetLength): This must throw an
10145         ArgumentOutOfRangeException(), not an ArgumentException().
10146         (ves_icall_System_Array_GetLowerBound): Likewise.
10147         (ves_icall_System_Array_GetValue): Improved argument checking.
10148         (ves_icall_System_Array_SetValue): Improved argument checking.
10149
10150 2002-03-01  Martin Baulig  <martin@gnome.org>
10151
10152         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
10153         called with invalid arguments rather than just dying with g_assert().
10154         (ves_icall_System_Array_SetValue): Likewise.
10155         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
10156         raise a NotImplementedException instead.
10157         (ves_icall_System_Array_GetLength): Added argument checking.
10158         (ves_icall_System_Array_GetLowerBound): Added argument checking.
10159
10160 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
10161
10162         * object.h (mono_assert): new macros mono_assert and
10163         mono_assert_not_reached
10164
10165 2002-02-28  Martin Baulig  <martin@gnome.org>
10166
10167         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
10168         and "System::String::IsInterned" to "System::String::_IsInterned".
10169
10170 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
10171
10172         * icall.c: remove hacks for typebuilder. Added icall to create a
10173         modified type from a tybebuilder.
10174         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
10175         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
10176         to create a backing MonoClass for a TypeBuilder.
10177
10178 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10179
10180         * class.c, class.h: more refactoring of class init.
10181         Export mono_class_setup_mono_type() and mono_class_setup_parent().
10182
10183 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
10184
10185         * marshal.c, marshal.h: start of marshaling interface.
10186
10187 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10188
10189         * icall.c: fix order in assembly qualified name icall.
10190
10191 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10192
10193         * class.c: do not free str, since we store it in the hash table.
10194         * reflection.h: add label field to MonoILExceptionInfo.
10195         * reflection.c: handle references to more than one assembly. Handle
10196         case when there isn't a module created in the assembly.
10197
10198 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10199
10200         * class.c: Fix typo. Start refactoring of class init code.
10201
10202 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10203
10204         * appdomain.c: exit with 1 on error.
10205         * class.c: we already have the name in MonoClassField.
10206         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
10207         MonoStreamHeader instead of an offset of image->raw_metadata.
10208
10209 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
10210
10211         * appdomain.c (mono_init): Be even more descriptive about the error.
10212
10213 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
10214
10215         * appdomain.c: give the user an informative message when corlib can't
10216         be loaded.
10217
10218 2002-02-26  Martin Baulig  <martin@gnome.org>
10219
10220         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10221         New icall to get the time zone data.
10222
10223 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10224
10225         * reflection.c: set virtual and raw size of section correctly.
10226         * threads.c: transfer domain information to newly created threads.
10227
10228 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10229
10230         * class.c: when instancing a class in a domain, load the default
10231         vaules for static fields from the constant table. Fix System.Enum to
10232         not be an enum.
10233         * icall.c: implement Object::GetType() internalcall. Implemented
10234         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
10235         Fixed checking of binding flags in find_members().
10236         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
10237         * reflection.c: handle enumerations when writing to the constant
10238         table. Use a different object cache for types.
10239
10240
10241 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
10242
10243         * object.c (mono_object_isinst): fix for arrays
10244
10245         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
10246
10247 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10248
10249         * object.c: don't use mprotect ()  and fix intern pool hash table
10250         lookup for big endian systems.
10251
10252 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10253
10254         * icall.c: change type_is_subtype_of () signature.
10255
10256 2002-02-21  Mark Crichton  <crichton@gimp.org>
10257
10258         * rand.c, rand.h: Added random number generator for
10259         System.Security.Cryptography classes.
10260
10261         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
10262
10263         * icall.c: Added System.Security.Cryptography calls.
10264
10265 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10266
10267         * class.c, icall.c, metadata.c: better support for pointer types.
10268         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
10269         * reflection.c: Add support for getting custom attrs for properties
10270         and simplify some code.
10271
10272 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10273
10274         * icall.c: change getToken () and add custom attribute GetBlob()helper
10275         method.
10276         * reflection.h: add custom attrs array to the reflection builder structures.
10277         * reflection.c: encode and emit custom attributes for all the relevant
10278         reflection objects. Cache fieldref and methodref tokens. Change
10279         mono_image_create_token() interface to take a MonoDynamicAssembly.
10280         More complete custom attributes decoder. Load custom attributes for
10281         Assembly, Field, Method and Constructor objects, too. Make the
10282         returned array an Attribute[] one, not object[]. Added
10283         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
10284         custom attribute constructor.
10285
10286 2002-02-20  Dick Porter  <dick@ximian.com>
10287
10288         * icall.c:
10289         * rawbuffer.c:
10290         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
10291         problem code out for now).
10292
10293 2002-02-19  Radek Doulik  <rodo@ximian.com>
10294
10295         * object.c (mono_ldstr): use hash table to avoid multiple swapping
10296
10297 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
10298
10299         * icall.c: register the GetCustomAttributes method.
10300         * object.c, object.h: add mono_string_new_len ().
10301         * reflection.h, reflection.c: added mono_runtime_invoke(),
10302         mono_install_runtime_invoke(). Added
10303         mono_reflection_get_custom_attrs () to load custom attributes and
10304         create the attribute objects.
10305
10306 2002-02-19  Dick Porter  <dick@ximian.com>
10307         * threads-dummy-types.c:
10308         * threads-dummy-types.h:
10309         * threads-dummy.c:
10310         * threads-dummy.h:
10311         * threads-pthread-types.c:
10312         * threads-pthread-types.h:
10313         * threads-pthread.c:
10314         * threads-pthread.h:  Deleted obsolete files
10315
10316 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
10317
10318         * class.c (mono_class_vtable): runtime init the class when we
10319         allocate static class data.
10320
10321         * icall.c (ves_icall_System_Array_SetValue): check for null values.
10322
10323         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
10324         and String - but we will need generic marshalling support in the
10325         future. 
10326         (mono_init): set the domain name in a ms compatible way
10327
10328         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
10329         String[].
10330
10331 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
10332
10333         * object.c (mono_array_clone): use alloca() instead of g_malloc  
10334         for sizes
10335
10336         * appdomain.c (mono_domain_unload): impl.
10337
10338 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10339
10340         * appdomain.c, object.c: fix intern pool implementation.
10341         * class.c: fix alignment code.
10342
10343 2002-02-16  Radek Doulik  <rodo@ximian.com>
10344
10345         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
10346         and s2 > s1, just copy lower bytes to be compatible with little
10347         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
10348         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
10349
10350         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
10351         force big_endian to be 1 for big endian machines 
10352         (ves_icall_iconv_new_decoder): ditto
10353
10354 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
10355
10356         * socket-io.c (convert_sockopt_level_and_name): If the system
10357         doesn't define SOL_IP or SOL_TCP, get them by hand using
10358         getprotobyname() and caching the values (because this could be a
10359         slow operation).
10360         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
10361         Use the appropriate struct when the system does support it. Ie,
10362         not all systems have struct ip_mreqn so use struct ip_mreq when
10363         appropriate.
10364
10365 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
10366
10367         * reflection.c: handle finally clauses.
10368
10369 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
10370
10371         * socket-io.c: use g_snprintf() instead of snprintf.
10372
10373 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
10374
10375         * reflection.c (mono_param_get_objects): Cast second argument to
10376         mono_method_get_param_names to a const char** to silence the
10377         compiler warning.
10378
10379         * appdomain.c (mono_domain_assembly_open): Put parens around the
10380         truth statement in the for-loop.
10381
10382         * unicode.c (iconv_convert): Got rid of a compiler warning about
10383         int i being unused when the system has a new iconv.
10384         (iconv_get_length): Same.
10385
10386         * image.c (load_class_names): Cast the second argument to
10387         g_hash_table_insert() to char* to hush compiler warnings about the
10388         arg being a const.
10389         (mono_image_open): Same here.
10390
10391         * socket-io.c: Don't conditionally include sys/filio.h or
10392         sys/sockio.h here anymore since we now get them from
10393         io-layer/io-layer.h
10394         (inet_pton): If the system doesn't support inet_aton, implement
10395         using inet_addr and also #define INADDR_NONE if it isn't defined
10396         by the system.
10397
10398 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10399
10400         * metadata.c, metadata.h: added function to get packing and size info
10401         of a typedef.
10402         * reflection.h, reflection.c: handle field RVA data. Save info about
10403         the table layout if needed. Assign typedef indexes to all the types
10404         before dumping the info about them to avoid forward reference problems.
10405
10406 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
10407
10408         * socket-io.c (convert_sockopt_level_and_name): ifdef
10409         SO_ACCEPTCONN because it is not defined on my system (old debian)
10410
10411 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10412
10413         * opcode.c: use stddef.h to get NULL.
10414
10415 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
10416
10417         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
10418         for FIONBIO, FIONREAD and SIOCATMARK.
10419         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
10420         define INADDR_NONE and besides, inet_addr() is deprecated and
10421         should not be used. Use inet_pton() instead - it also has the
10422         added bonus that it can easily handle IPv6 addresses as well.
10423         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
10424
10425 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10426
10427         * decimal.c: remove _MSC_VER conditional.
10428
10429 2002-02-13  Dick Porter  <dick@ximian.com>
10430
10431         * socket-io.c: 
10432         * icall.c: Internal calls for Blocking, Select, Shutdown,
10433         GetSocketOption and SetSocketOption
10434
10435 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10436
10437         * assembly.cs: better resolver: use it instead of some kludgy
10438         code.
10439
10440 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
10441
10442         * reflection.c: the best way to speed-up the compiler is to avoid
10443         infinite loops.
10444
10445 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
10446
10447         * class.c (mono_class_vtable): changed the object layout
10448         (obj->vtable->class). 
10449         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
10450
10451 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10452
10453         * assembly.c: look for assemblies in the assembly dir, too.
10454
10455 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10456
10457         * class.c: fix thinko in mono_class_from_type().
10458
10459 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10460
10461         * exception.h, exception.c: added TypeLoadException.
10462         * object.h, object.c: added mono_array_clone ().
10463         * icall.c: handle throwOnError in AssemblyGetType().
10464         Added Array.Clone().
10465         * opcode.h, opcode.c: use a single value for the opcode val.
10466         Compile fix for non-gcc compilers.
10467
10468 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
10469
10470         * opcodes.c, opcodes.h: export interesting info about opcodes.
10471
10472 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
10473
10474         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
10475         icalls. 
10476
10477         * class.c (class_compute_field_layout): set element_class for enums
10478         (mono_class_create_from_typedef): set element_class for normal classes
10479
10480         * icall.c (ves_icall_System_Enum_get_value): impl.
10481
10482         * class.c (mono_class_create_from_typedef): do not set valuetype
10483         flag for System.ValueType and System.Enum
10484
10485 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
10486
10487         * unicode.c (iconv_convert): fix big endian problem.
10488
10489 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10490
10491         * class.c: add asserts if we are ever going to scribble over memory.
10492         * socket-io.c: not all systems have AF_IRDA defined.
10493
10494 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
10495
10496         * class.c (class_compute_field_layout): do not consider static
10497         fields to compute alignment
10498
10499 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
10500
10501         * appdomain.c (mono_appdomain_get): impl.
10502         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
10503
10504 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10505
10506         * icall.c: ignore "file://" prefix when loading an assembly.
10507
10508 2002-01-23  Dick Porter  <dick@ximian.com>
10509
10510         * socket-io.c:
10511         * icall.c:
10512         * Makefile.am: Added socket support
10513
10514 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
10515
10516         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
10517         code back.  This should return the assemblies that are loaded by
10518         the runtime on behalf of an application domain. 
10519
10520         The current implementation is still broken, it just returns every
10521         assembly loaded, but until we get real applications domain this
10522         will do.
10523
10524 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
10525
10526         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
10527         AppDomain object.
10528
10529 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
10530
10531         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
10532         the mono_class_from_name lookup.
10533         (ves_icall_get_parameter_info): ditto.
10534         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
10535         method.
10536         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
10537
10538 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10539
10540         * class.c: load also nested classes on class init.
10541         System.ValueType instance methods gets passed boxed
10542         values, unless methods in derived classed that get a pointer to the
10543         data.
10544         * icall.c: use better name parsing code in GetType().
10545         * image.c, image.h: add mono_image_loaded ().
10546         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
10547         * reflection.c, reflection.h: added mono_reflection_parse_type().
10548
10549 2002-01-22  Veronica De Santis <veron78@interfree.it>
10550
10551         * icall.c : Added mapping of internal calls for Manual and Auto reset events
10552         * threads.c : Added the implementation of internal calls for events
10553         * threads.h : Added prototypes of internal calls for events
10554         
10555 2002-01-21  Radek Doulik  <rodo@ximian.com>
10556
10557         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
10558
10559 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
10560
10561         * class.c (mono_class_init): set min_align to 1 (instead of 0)
10562         (mono_class_value_size): use min_align
10563
10564 2002-01-20  Dick Porter  <dick@ximian.com>
10565
10566         * threads.h:
10567         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
10568         so it compiles on w32.
10569
10570 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
10571
10572         * metadata.c (mono_type_stack_size): impl.
10573
10574         * class.c (mono_class_get_field): impl. memberref token
10575
10576 2002-01-16 Veronica De Santis <veron78@@interfree.it>
10577
10578         * icall.h : Added the internal calls mapping for CreateMutex_internal
10579                     and ReleaseMutex_internal.
10580         * threads.h : Added the prototype of mutexes internal calls.
10581         * threads.c : Added the implementations of mutexes internal calls.
10582
10583 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10584
10585         * metaparse.h: removed unused file.
10586         * reflection.c, reflection.h: added stream_data_align () function 
10587         to align data in streams and keep stream aligned. Add support for
10588         exception support in method headers.
10589
10590 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
10591
10592         * unicode.c: make iconv_convert () return the number of bytess written
10593         in the output buffer.
10594
10595 2002-01-15  Dick Porter  <dick@ximian.com>
10596         * threads.c: Make the runtime's idea of infinite timeouts coincide
10597         with the class library's
10598
10599         Fix a particularly egregious bug in mono_thread_cleanup(). That
10600         code was so utterly bogus it must have been written on a Monday.
10601
10602 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10603
10604         * reflection.h: add subtypes field to TypeBuilder.
10605         * reflection.c: encode constants for literal fields.
10606         Handle subtypes. Fix user string token (and add a zero byte)
10607         at the end.
10608         
10609 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
10610
10611         * class.c (mono_class_init): bug fix: assign slot numbers for
10612         abstract methods.
10613
10614 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10615
10616         * reflection.c: don't try to output a code RVA for abstract methods.
10617         Small fixes for method header format. Output parameter info to the
10618         ParamDef table. Save method overriding info to MethodImpl table.
10619         Fix property support. Allow typedef.extends to be a type in the
10620         building assembly.
10621         * verify.c: fix off-by-one error.
10622
10623 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
10624
10625         * class.c: fix mono_class_from_mono_type () for szarray types.
10626         Remove unused cache check in mono_class_from_type_spec().
10627         * icall.c: *type_from_name () functions handle simple arrays and byref.
10628         * reflection.c: handle byref and szarray types. Handle methods without
10629         body (gets P/Invoke compilation working). Handle types and fields in
10630         get_token ().
10631         * reflection.h: add rank to MonoTypeInfo.
10632
10633 2002-01-10  Dick Porter  <dick@ximian.com>
10634
10635         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
10636         internal calls
10637
10638 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10639
10640         * icall.c: initialize class in type_from_handle ().
10641         Loop also in parent classes for get_method ().
10642         * reflection.c: properly encode class and valuetype types.
10643         Start on encoding TypeBuilder types. Handle fieldrefs.
10644         Use correct length when registering a user string.
10645         Handle ConstructorBuilder and MonoMethod in get_token ().
10646         Make mono_type_get_object () aware of cached types.
10647         * object.c: back out change to mono_string_new ().
10648
10649 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
10650         * object.c: mono_string_new should return a NULL when the string 
10651         passed in is NULL -- not try to deference it.
10652         
10653 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
10654
10655         * icall.c: hack to make IsSubType work for TypeBuilders.
10656         * reflection.c: emit constructors before methods.
10657         Retrieve param names in mono_param_get_objects().
10658
10659 2002/01/05  Nick Drochak  <ndrochak@gol.com>
10660
10661         * Makefile.am: fix list of headers and sources so automake 1.5
10662         doesn't complain. Removed \# at end of list.
10663
10664 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10665
10666         * reflection.c: get token for a method ref. Set return type of
10667         constructor to void.
10668         * loader.c: debug message.
10669         * class.c: typo fix.
10670
10671 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
10672
10673         * icall.c: fix array init with rank > 1. FindMembers
10674         loops in parent class as well.
10675         * image.c: do not insert nested types in name cache.
10676         * reflection.c: warning fix.
10677         * reflection.h: add override method (for interface impl).
10678
10679 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
10680
10681         * metadata.c: fix customattr decoding.
10682
10683 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
10684
10685         * rawbuffer.cs: Added native Win32 implementation, avoids using
10686         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
10687
10688 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
10689
10690         * class.c: make the low-level routines handle the cache.
10691
10692 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
10693
10694         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
10695
10696 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
10697
10698         * class.c: fix mono_array_element_size() for objects.
10699         * class.h, class.c: add properties to MonoClass and load them
10700         at init time.
10701         * icall.c: check with isinst() when assigning a value to an array
10702         instead of requiring the classes to match exactly.
10703         Implemented icall for System.Type::GetType().
10704         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
10705         enums. Handle bindingflags when looking for methods and fields.
10706         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
10707         and mono_metadata_methods_from_property().
10708         * reflection.h, reflection.c: added structures for propreties,
10709         parameters and enums. Implemented mono_property_get_object() and
10710         mono_param_get_objects().
10711
10712 2001-12-18  Dick Porter  <dick@ximian.com>
10713
10714         * file-io.c: Use mono_string_to_utf16() instead of
10715         mono_string_chars()
10716
10717         * object.c: Added mono_string_to_utf16(), which copies the non
10718         NULL-terminated MonoString into a new double-null-terminated
10719         buffer.
10720
10721 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
10722
10723         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
10724
10725 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
10726
10727         * file-io.c: raise exceptions if handle is invalid.
10728
10729 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
10730
10731         * assembly.c: yet another check for mscorlib.
10732         * class.c, class.h: load nesting info for classes.
10733         * icall.c: many new functions to support the Reflection classes.
10734         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
10735         * reflection.h, reflection.c: mono_image_create_token(),
10736         mono_assembly_get_object(), mono_type_get_object(),
10737         mono_method_get_object(), mono_field_get_object(): methods to return
10738         objects that parallel the C representation of assemblies, types,
10739         methods, fields.
10740
10741 2001-12-11  Dick Porter  <dick@ximian.com>
10742
10743         * icall.c:
10744         * file-io.c: Internal calls for file IO.
10745
10746 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
10747
10748         * tabledefs.h: missing FileAttributes.
10749         * verify.h, verify.c: use is_valid_string () to simplify and check for
10750         valid strings more correctly. Fix warnings and speeling.
10751         Check more tables: Filed, File, ModuleRef, StandAloneSig.
10752         Check code: branches, maxstack, method calls.
10753
10754 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
10755
10756         * object.c (mono_object_allocate): removed static, so that the jit
10757         can allocate value types.
10758
10759         * icall.c (ves_icall_System_DateTime_GetNow): impl.
10760
10761 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10762
10763         * class.c: init enum types right away and register the
10764         token->MonoClass map in mono_class_create_from_typedef ().
10765         * verify.h, verify.c: first cut of the verifier.
10766         * pedump.c: add --verify switch to verify metadata tables.
10767         * tabledefs.h: add some missing enums.
10768
10769 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
10770
10771         * class.c (mono_install_runtime_class_init): impl.
10772         (mono_class_init): renamed mono_class_metadata_init to
10773         mono_class_init, also removed the metadata_inited flag
10774
10775         * object.c (mono_object_isinst): use faster algorithm
10776
10777 2001-11-30  Radek Doulik  <rodo@ximian.com>
10778
10779         * mono-endian.h: reverted last change
10780         added function prototypes
10781
10782         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
10783         add mono-endian.c back
10784
10785         * mono-endian.c: returned back, as Paolo pointed out, it's needed
10786         for unaligned access, I've mistaked it with endianess. I am
10787         sorry.
10788         (mono_read16): fix reverted endianess
10789         (mono_read64): ditto
10790         (mono_read32): ditto
10791
10792 2001-11-30  Dick Porter  <dick@ximian.com>
10793
10794         * exception.c: Implement mono_exception_from_name()
10795
10796 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10797
10798         * metadata.h, metadata.c: remove params_size and locals_size and their
10799         calculation from the metadata code: they are only usefult to the
10800         interp.
10801
10802 2001-11-29  Radek Doulik  <rodo@ximian.com>
10803
10804         * object.c (mono_ldstr): swap bytes here, it's probably not the
10805         best place, but works for me now, I'll redo it once I know mono
10806         better, also note that I add PROT_WRITE and don't reset back, also
10807         note that it's only affects big endians, so x86 should be OK
10808
10809         * mono-endian.h (read16): use just glib macros for both endians
10810
10811         * mono-endian.c: removed as glib macros are used in in
10812         mono-endian.h so we don't need to care about endianess for read
10813         macros as glib does that for us already
10814
10815 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
10816
10817         * class.h, class.h: take minimum alignment into consideration so
10818         that the fields of a class remain aligned also when in an array.
10819
10820 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10821
10822         * loader.h, loader.c: add mono_method_get_param_names().
10823         * class.c: 0-init class fields.
10824
10825 2001-11-26  Dick Porter  <dick@ximian.com>
10826
10827         * icall.c:
10828         * threads-types.h:
10829         * threads.c: New file that handles System.Threading on all platforms
10830
10831         * object.c: 
10832         * object.h: Remove the synchronisation struct from MonoObject,
10833         replace it with a pointer that gets initialised on demand
10834
10835         * Makefile.am: Replace all the system-specific threading code with
10836         a single file that uses the new wrapper library
10837
10838 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
10839
10840         * class.c, class.h: add mono_install_trampoline() so that the runtime
10841         can register a function to create a trampoline: removes the ugly
10842         requirement that a runtime needed to export arch_create_jit_trampoline.
10843         * object.h, object.c: added mono_install_handler() so that the runtime
10844         can install an handler for exceptions generated in C code (with
10845         mono_raise_exception()). Added C struct for System.Delegate.
10846         * pedump.c: removed arch_create_jit_trampoline.
10847         * reflection.c: some cleanups to allow registering user strings and
10848         later getting a token for methodrefs and fieldrefs before the assembly
10849         is built.
10850         * row-indexes.h: updates and fixes from the new ECMA specs.
10851
10852 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
10853
10854         * class.h, class.c: add enum_basetype field to MonoClass.
10855         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
10856         to get index in the constant table reated to a field, param or
10857         property.
10858         * reflection.h, reflection.c: handle constructors. Set public-key and
10859         version number of the built assembly to 0.
10860         * row-indexes.h: update from new ECMA spec.
10861
10862 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10863
10864         * class.h, class.c: add a max_interface_id to MonoClass.
10865         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
10866         since it's used to do that. Added mono_type_type_from_obj().
10867         Make GetType() return NULL instead of segfaulting if the type was not
10868         found. Handle simple arrays in assQualifiedName.
10869         * object.h: add a struct to represent an Exception.
10870         * reflection.c: output call convention in method signature.
10871         Add code to support P/Invoke methods and fixed offsets for fields.
10872
10873 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
10874
10875         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
10876         the value.
10877         * icall.c: use mono_array_addr instead of array->vector: fixes the
10878         reflection image writing.
10879         * reflection.c: init call convention byte to 0 in method signature.
10880         Encode the property signature. Don't output property-related methods
10881         twice. Really process the properties for a type (don't cast a field to
10882         a property, my mom always told me that).
10883         Fix 64 bit issues in pointer alignment in a different and more
10884         readable way.
10885
10886 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
10887
10888         * loader.h: Removed type class from MonoDefaults, added monotype
10889
10890         * loader.c: Loaded MonoType, removed loading of Type
10891
10892         * icall.c (my_mono_new_object): Now returns a System.MonoType,
10893         and fills in System.Type._impl with a RuntimeTypeHandle rather
10894         than the actual MonoClass *
10895
10896         (ves_icall_type_from_handle): change from type_class to
10897         monotype_class
10898
10899         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
10900         implemented
10901
10902         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
10903         implemented
10904
10905         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
10906
10907         (ves_icall_System_Reflection_Assembly_GetType): implemented
10908
10909         (ves_icall_System_MonoType_assQualifiedName): implemented
10910
10911         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
10912
10913 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
10914
10915         * assembly.c (mono_assembly_open): Implement a cache for the
10916         assemblies. 
10917
10918         (mono_assembly_close): only destroy the assembly when the last
10919         reference is gone.
10920         
10921 2001-11-09  Dick Porter  <dick@ximian.com>
10922
10923         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
10924
10925 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
10926
10927         * class.c (mono_class_metadata_init): bug fix: compute the right slot
10928
10929 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10930
10931         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
10932         from Martin Weindel.
10933         * object.h: add mono_string_chars ().
10934
10935 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
10936
10937         * reflection.c (build_compressed_metadata): Eliminates warnings
10938         and uses 64-bit clean code.
10939
10940         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
10941         (mono_type_equal): Change signature to eliminate warnings.
10942
10943 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10944
10945         * icall.c, loader.c: remove the internalcall array constructors.
10946         Changes to match the new MonoArray structure.
10947         * object.h, object.c: an array object doesn't allocate an extra
10948         vector. Add mono_array_new_full () to create jagged arrays easily.
10949
10950 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10951
10952         * metadata.h, metadata.c: add mono_metadata_field_info () to
10953         retreive all the info about a field from vairous tables.
10954         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
10955         * class.h, class.c: augment MonoClassField with more info.
10956         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
10957         policy and load a field's RVA if needed.
10958
10959 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
10960
10961         * class.c (mono_class_metadata_init): create a trampoline for all
10962         virtual functions instead of actually compiling them.
10963
10964 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
10965
10966         * class.h, class.c: include name in MonoClassField.
10967         * class.c: fix fundamental type of System.Object and System.String.
10968         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
10969         tokens in ldtoken.
10970         * icall.c: remove internalcalls for the Reflection stuff that is now
10971         done in C# code.
10972         * loader.c: mono_field_from_memberref () implementation.
10973         * mono-endian.c: thinko (s/struct/union/g).
10974         * object.c, object.h: make the mono_string_* prototypes actually use
10975         MonoString instead of MonoObject.
10976         * reflection.c, reflection.h: updates for changes in the reflection
10977         code in corlib: we use C structures that map to the actual C# classes.
10978         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
10979         fat method header if needed and use the info from the ILGenerator for
10980         methods. Handle fields in types. Misc fixes.
10981
10982 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
10983
10984         * class.c (mono_class_metadata_init): bug fix: always allocate
10985         space for static class data
10986
10987 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
10988
10989         * class.c (mono_compute_relative_numbering): use relative
10990         numbering to support fast runtime type checks.
10991
10992 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
10993
10994         * class.c (mono_class_create_from_typeref): added debugging output
10995         to print class name when MonoDummy is returned instead of real class
10996
10997 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
10998
10999         * class.c (mono_class_metadata_init): interface offset table now
11000         contains pointers into the vtable - this is more efficient for the jit
11001
11002 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
11003
11004         * class.c (mono_class_metadata_init): use a temporary vtable (the
11005         old algorithm only worked for the interpreter, but not for the jit)
11006
11007 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
11008
11009         * loader.c (method_from_memberref): use mono_class_get to get the
11010         class of an array instead of using System.Array directly.
11011         (mono_get_method): also add MEMBERREF methods to the method cache
11012         which usefull for arrays.
11013
11014 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
11015
11016         * pedump.c (arch_compile_method): added to compute vtable entry
11017
11018         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
11019         number of interfaces.
11020         
11021         * class.h: merged MonoArrayClass into MonoClass
11022
11023         * class.c (mono_class_create_from_typedef): compute the vtable size and
11024         allocate space to include the vtable inside MonoClass
11025         (mono_class_metadata_init): initialize the vtable
11026
11027 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
11028
11029         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
11030         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
11031         * image.c: endian fixes by Laurent Rioux.
11032         * object.h, object.c: rename MonoStringObject to MonoString and
11033         MonoArrayObject to MonoArray. Change some function names to conform to
11034         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
11035         guint16* as first argument, so don't use char*.
11036         Provide macros to do the interesting things on arrays in a portable way.
11037         * threads-pthread.c: updates for the API changes and #include <sched.h>
11038         (required for sched_yield()).
11039         * icall.c: updates for the API changes above.
11040         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
11041         platforms that need them.
11042
11043 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11044
11045         * class.c: set the correct type for all the fundamental
11046         type when loading the class.
11047
11048 2001-10-05  Dick Porter  <dick@ximian.com>
11049
11050         * threads-pthread.c (pthread_mutex_timedlock): Simple
11051         compatibility version for C libraries that lack this call.
11052
11053 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11054
11055         * class.c: MonoTypes stored in MonoClass are stored as
11056         fundamental MonoTypes when the class represents a
11057         fundamental type (System.Int32, ...).
11058         The TypeHandle return by ldtoken is a MonoType*.
11059         * icall.c: ves_icall_get_data_chunk () write out all the
11060         PE/COFF stuff. Implement ves_icall_define_method (),
11061         ves_icall_set_method_body (), ves_icall_type_from_handle ().
11062         * image.c: properly skip unknown streams.
11063         * loader.h, loader.c: add type_class to mono_defaults.
11064         * metadata.c, metadata.h: export compute_size () as
11065         mono_metadata_compute_size () with a better interface.
11066         Typo and C&P fixes.
11067         * pedump.c: don't try to print the entry point RVA if there is no entry point.
11068         * reflection.c, reflection.h: many cleanups, fixes, output method
11069         signatures and headers, typedef and typeref info, compress the metadata
11070         tables, output all the heap streams, cli header etc.
11071         * row-indexes.h: typo fixes.
11072
11073 2001-10-04  Dick Porter  <dick@ximian.com>
11074
11075         * object.h: Add a synchronisation mutex struct to MonoObject
11076
11077         * object.c (mono_new_object): Initialise the object
11078         synchronisation mutexes
11079
11080         * icall.c: System.Threading.Monitor internal calls
11081         
11082         * threads-pthread.h:
11083         * threads-pthread.c: System.Threading.Monitor internal calls
11084
11085         * threads-types.h: New file, includes the system-specific thread
11086         structures
11087         
11088         * threads-pthread-types.h:
11089         * threads-pthread-types.c: New files, handle pthread-specific
11090         synchronisation types
11091
11092         * threads-dummy-types.h: 
11093         * threads-dummy-types.c: New files of dummy support for
11094         thread-specific types
11095
11096         * metadata.c:
11097         * image.c:
11098         * pedump.c: include mono-endian.h not endian.h
11099         
11100         * Makefile.am: More threads files.
11101         Name mono-endian.h not endian.h
11102
11103 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
11104
11105         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
11106         stuff and implement a few more bits.
11107         * icall.c: a field needs to be dereferenced twice. Do not use the same
11108         name for two variables in the same scope.
11109         * image.c, image.h: cleanups.
11110
11111 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
11112
11113         * class.c (mono_class_metadata_init): bug fix: compute the right size
11114
11115 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
11116
11117         * icall.c: implemented some of the Reflection internalcalls.
11118         * image.c, image.h: start writing out the PE/COFF image.
11119         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
11120         that does the reverse than decode_blob_size ().
11121         * object.c: use mono_metadata_encode_value (). Move here
11122         temporary implementation of mono_string_to_utf8 ().
11123         * rawbuffer.c: make malloc_map static.
11124
11125 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11126
11127         * metadata.c: fix type comparison for arrays.
11128         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
11129         Added a couple of new classes to monodefaults.
11130         * icall.c: added a couple of Reflection-related internalcalls.
11131         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
11132         Added a byval_arg MonoType to MonoClass.
11133
11134 2001-09-28  Dick Porter  <dick@ximian.com>
11135
11136         * icall.c:
11137         * threads-pthread.h: 
11138         * threads-pthread.c: Implemented internal calls for
11139         LocalDataStoreSlot operations.  Applied mutexes around all shared
11140         data.  Reworked the thread creation and Start() operations to
11141         avoid a race condition.
11142         
11143         * threads-dummy.h:
11144         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
11145
11146 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
11147
11148         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
11149
11150 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
11151
11152         * class.c, loader.c: warn and return NULL instead of erroring out.
11153         * icall.c: added System.AppDomain::getCurDomain().
11154         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
11155
11156 2001-09-25  Dick Porter  <dick@ximian.com>
11157
11158         * threads-pthread.h:
11159         * threads-pthread.c: Implemented timed thread joining and added
11160         System.Threading.Thread::Join_internal internal call
11161
11162         * icall.c: Added System.Threading.Thread::Join_internal internal call
11163
11164         * threads-dummy.h:
11165         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
11166
11167 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
11168
11169         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
11170         mono_string_intern () to implement the semantics of the ldstr opcode
11171         and the interning of System.Strings.
11172         * icall.c: provide hooks to make String::IsIntern and String::Intern
11173         internalcalls.
11174
11175 2001-09-23  Dick Porter  <dick@ximian.com>
11176
11177         * threads-dummy.c: 
11178         * threads-dummy.h: New files of dummy threading routines
11179
11180         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
11181         support code based on system specifics
11182
11183         Rename PTHREAD_LIBS to THREAD_LIBS
11184         
11185 2001-09-23  Dick Porter  <dick@ximian.com>
11186
11187         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
11188         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
11189         internal calls.
11190         (mono_thread_init): Set up a Thread object instance to return when
11191         the main thread calls Thread.CurrentThread
11192         (mono_thread_cleanup): Wait for all subthreads to exit
11193
11194         * icall.c: New internal calls for System.Threading.Thread::Sleep
11195         (including Schedule) and CurrentThread
11196
11197         * threads.h: New file, to insulate thread-specific stuff from the
11198         rest of the code
11199
11200 2001-09-21  Dick Porter  <dick@ximian.com>
11201
11202         * threads-pthread.h: 
11203         * threads-pthread.c: New file, for handling pthreads-style
11204         threading support.  Start() now starts a new thread and executes
11205         the ThreadStart delegate instance.
11206
11207         * icall.c: Added the internalcall for
11208         System.Threading.Thread::Start_internal
11209
11210         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
11211
11212 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
11213
11214         * loader.c: work around the different signatures for delegates
11215         constructors csc generates in compiled code vs the ones compiled in mscorlib.
11216
11217 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11218
11219         * class.h, class.c: add mono_class_get_field_from_name ().
11220         * *: Fix C comments and other ANSI C issues.
11221
11222 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
11223
11224         * endian.h, assembly.c: fix some endianness issues.
11225
11226 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
11227
11228         * loader.h, load.c: add delegate_class to mono_defaults.
11229         Handle runtime provided methods in mono_get_method ().
11230
11231 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
11232
11233         * loader.c (mono_get_method): use pinvoke for internal call
11234
11235         * icall.c: use pinvoke for internal call
11236
11237         * loader.c (method_from_memberref): set the method name
11238
11239 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
11240
11241         * metadata.c: help the compiler generate better code for
11242         mono_class_from_mono_type ().
11243
11244 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
11245
11246         * class.c (mono_class_metadata_init): delayed computing of the
11247         class size to mono_class_metadata_init ()
11248
11249 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
11250
11251         * class.c, class.h: add an interfaces member to MonoClass.
11252         * image.c, image.h: add assembly_name field to MonoImage
11253         from the assembly table.
11254         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
11255
11256 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11257
11258         * class.c: Handle Array in mono_class_from_mono_type ().
11259         * metadata.c, pedump.c: some endian fixes.
11260
11261 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11262
11263         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
11264         * metadata.c: fix small problem introduced with the latest commit.
11265
11266 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
11267
11268         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
11269         We don't need a MonoMetadata pointer anymore to compare signatures in
11270         mono_metadata_signature_equal (), update callers.
11271         Reduced memory usage an number of allocations for MonoMethodHeader and
11272         MonoMethodSignature.
11273
11274 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
11275
11276         * metadata.c: added compare for szarray.
11277
11278 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
11279
11280         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
11281         and add a couple more types to it and mono_defaults. Give an hint on
11282         classes that need implementing in our corlib and are referenced
11283         in mscorlib.
11284
11285 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
11286
11287         * class.h, class.c: keep track if a class is also an Enum.
11288         * loader.c: Implement a couple more types for use in libffi
11289         marshalling. Gives better diagnostics when failing to dlopen
11290         a library. Set method->klass for P/Invoke methods, too.
11291
11292 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
11293
11294         * class.c, class.h: add a MonoType this_arg to MonoClass that
11295         represents a pointer to an object of the class' type that
11296         can be used by the interpreter and later the type cache.
11297         Add best guess alignment info for valuetype objects.
11298
11299 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
11300
11301         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
11302         into MonoType: one less level of indirection and allocation and
11303         simplifies quite a bit of code. Added cache for MonoTypes that are
11304         used frequently, so that we don't need to allocate them all the time.
11305
11306 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
11307
11308         * class.c (mono_class_create_from_typedef): System.Enum is also a
11309         value type, although it does not derive from System.ValueType
11310         (maybe a bug in the ms compiler?)
11311
11312         * metadata.c (mono_type_size): return the right size for value types
11313
11314         * loader.c (mono_get_method): only initialize method header if not abstract
11315
11316         * class.c (mono_class_from_mono_type): use mono_default values. 
11317
11318 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
11319
11320         * *: use MonoClass pointers instead of <type_tokens>
11321         
11322         * class.h: new flag: metadata_inited.
11323
11324         * class.c (mono_class_metadata_init): impl.
11325         (mono_class_instance_size): impl.
11326         (mono_class_data_size): impl.
11327
11328 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11329
11330         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
11331         MonoClass now has the name and name_space fields. 
11332         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
11333         mono_get_method () takes and optional MonoClass as argument.
11334         Removed mono_typedef_from_name() and added mono_class_token_from_name()
11335         instead that takes advantage of a map from class names to typedef
11336         tokens in MonoImage.
11337
11338 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
11339
11340         * metadata.c: zero is not a valid alignment boundary.
11341         Merge MONO_TYPE_VOID in default decoding code.
11342
11343 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
11344
11345         * image.h: merged MonoMetadata into MonoImage
11346
11347         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
11348         identify the type of elements.
11349
11350 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
11351
11352         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
11353         * cil-coff.h: split MonoMSDOSHeader and add size info.
11354         * image.c: add some consistency checks.
11355         * metadata.c: fix row size computation: one programmer
11356         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
11357         add explanation for the locator routine.
11358         Fix decoding of size in method header.
11359         
11360 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
11361
11362         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
11363         (g_concat_dir_and_file): Bring g_concat_dir_and_file
11364         function from gnome-libs.  This uses the right path separator
11365         based on the OS, and also works around a bug in some systems where
11366         a double slash is not allowed. 
11367         (default_assembly_name_resolver): Use g_concat_dir_and_file
11368         (mono_assembly_open): ditto.
11369
11370 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
11371
11372         * metadata.c (mono_metadata_signature_equal): impl.
11373
11374         * *: void is now a realy MonoType (instead of using NULL)
11375         
11376         * metadata.c (do_mono_metadata_parse_type): use
11377         mono_metadata_parse_type to parse void value.
11378
11379 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
11380
11381         * metadata.c, metadata.h: in the signature and method header store
11382         only the space required for holding the loca vars and incoming arguments.
11383
11384 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
11385
11386         * metadata.c (do_mono_metadata_parse_type): treat void like any
11387         other type (instead of assigning NULL);
11388
11389 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
11390
11391         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
11392
11393 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
11394
11395         * image.c (do_mono_image_open): added a cache for arrays.
11396
11397 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11398
11399         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
11400         decode a single column from a row in a metadata table and changes
11401         to take advantage of it in the typedef locator (gives a nice speed up).
11402         Store offset info for function params.
11403
11404 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
11405
11406         * image.h (MONO_IMAGE_IS_CORLIB): removed 
11407
11408 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
11409
11410         * assembly.c: how could mono_assembly_close () had ever worked?
11411         * metadata.c, metadata.h: provide offset info for local vars.
11412         Implement mono_type_size () to take care of alignment as well
11413         as size (it was mono_field_type_size in cli/class.c before).
11414
11415 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
11416
11417         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
11418
11419         * assembly.h (CORLIB_NAME): set to corlib.dll
11420
11421         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
11422
11423 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11424
11425         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
11426         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
11427         tokentype.h: massive namespace cleanup.
11428
11429 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11430
11431         * metadata.h, metadata.c: decode exception clauses when parsing method header.
11432
11433 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
11434
11435         * metadata.c (mono_metadata_free_type): added check for type !=
11436         NULL (void) before calling mono_metadata_free_type()
11437
11438 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
11439
11440         * metadata.h, row_indexes.h: added header with enumerations to use
11441         to index in the columns from tables in metadata and to decode coded
11442         tokens: we should start using this instead of embedding magic numbers
11443         all over the code.
11444
11445 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
11446
11447         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
11448         Move metadata_t info from cli_image_info_t to MonoImage, where
11449         it's easily accessible. Changed all the uses accordingly.
11450         Added the method and class caches to MonoImage.
11451         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
11452         and mono_metadata_decode_value () signature to be more consistent
11453         with the other parse functions (and simplify code). Taken advantage
11454         of zero-length array allocation with GCC. Removed reduntant (and
11455         wrong) MonoFieldType struct and use MonoParam instead. Changed
11456         mono_metadata_parse_field_type () to use common code for parsing.
11457         Added mono_metadata_typedef_from_field () and
11458         mono_metadata_typedef_from_method () to lookup a typedef index from a
11459         field or method token.
11460         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
11461
11462 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
11463
11464         * metadata.c (mono_metadata_parse_field_type): Implement. 
11465         (do_mono_metadata_parse_type): Split engine from
11466         mono_metadata_parse_type, so that we can create smaller structures
11467         for things that just have one pointer to the MonoType (look at
11468         the MonoFieldType)
11469
11470 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
11471
11472         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
11473         as Jan Gray found out, it is incorrect. 
11474
11475 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
11476
11477         * assembly.c: Implement asssembly loading.  This loads an image
11478         and loads all the referenced assemblies.  Come to think of it, we
11479         could always do lazy loading of the assemblies. 
11480
11481         * image.c (mono_image_open): Keep loaded images in a hashtable.
11482
11483         * image.h (MonoImage): Add reference count.
11484
11485 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
11486
11487         * assembly.c (mono_assembly_open): Keep track of the file name in
11488         case the assembly has no ASSEMBLY table.
11489
11490         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
11491         from get.c here.
11492
11493 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
11494
11495         * metadata.c, metadata.h: decode local vars in method header
11496         parse function. Change callers accordingly.
11497
11498 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
11499
11500         * metadata.h, cil-coff.h: protect against multiple inclusion.
11501         Added some new structures to hold information decoded from metadata:
11502         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
11503         and relevant decoding/free functions.
11504         * metadata.c: implement decoding functions. Add warning for out of bounds
11505         index in mono_metadata_locate(). Implement mono_get_method () to retreive
11506         all the info about a method signature and invocation. Remove check on
11507         uninitialized local var in parse_mh() and fix memory leak.
11508
11509 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
11510
11511         * metadata.h: More macros.
11512
11513         * tokentype.h: New file.
11514
11515 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
11516
11517         * assembly.c: added a consistency check and initialize
11518         some structures with g_new0().
11519         * metadata.c: fixed a couple more bugs in table size computation
11520         and add other checks for out-of bound access to metadata.
11521
11522 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
11523
11524         * metatada.c: fix bugs computing table sizes. Spew a
11525         warning when index in string heap is out of bounds.
11526
11527 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
11528
11529         * metadata.h: Add a couple of macros to manipulate tokens. 
11530
11531 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11532
11533         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
11534         cli_section_tables).
11535
11536 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
11537
11538         * metadata.c (mono_metadata_user_string): New function, provides
11539         access to the UserString heap. 
11540
11541 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
11542
11543         * metadata.c: Add inline documentation.
11544
11545 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
11546
11547         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
11548         files. 
11549
11550 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
11551
11552         * typeattr.h: New file, TypeAttribute flags. 
11553
11554 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
11555
11556         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
11557         mono_assembly_ensure_section): Section loading code.
11558         (load_section_tables): Load the sections.
11559
11560         * mono/metadata/metadata.c (mono_metadata_locate_token,
11561         mono_metadata_locate): Functions to locate the information
11562         definition given a token or a table and an index.
11563         (mono_metadata_compute_table_bases): New.
11564         (compute_size): New function to compute the sizes of the various
11565         tables.
11566
11567         * mono/metadata/metadata.h: Finish listing the different index
11568         types. 
11569
11570         * mono/metadata/pedump.c: Improve to dump new information.
11571
11572 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
11573
11574         * mono/metadata/metadata.c: Entered all the tables matching
11575         Beta2. 
11576
11577         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
11578