Some docs.
[mono.git] / mono / metadata / ChangeLog
1 2004-09-09  Geoff Norton <gnorton@customerndna.com>
2
3         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
4         Fix GetTypes() to support dynamically created assemblies.
5
6 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7
8         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
9         
10         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
11         previous patch.
12
13         * reflection.h reflection.c loader.c: Allow dynamic construction of
14         pinvoke methods. Fixes #65571.
15         
16         * reflection.c (mono_reflection_get_type): Revert previous change since
17         it causes regressions.
18
19 2004-09-08  Martin Baulig  <martin@ximian.com>
20
21         * class.c (class_compute_field_layout): Don't call
22         mono_class_layout_fields() for open generic instances.
23
24 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
25         * threads.c appdomain.c: fix typo in GC macro
26
27 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28
29         * threads.c: don't call mono_thread_detach() in start_wrapper(),
30         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
31
32 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
33
34         * image.c (mono_image_close): Applied patch from 
35         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
36         assembly is loaded multiple times from data.
37         
38         * image.c (mono_image_open): Fix warning.
39
40 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
41
42         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
43         once. Fixes #58334.
44         
45         * reflection.c (mono_reflection_create_runtime_class): Initialize
46         klass->nested_classes. Fixes #61224.
47
48 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
49
50         * threads.c: sched_yield() on exit, to allow threads to quit.
51
52 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
53
54         * object.c (mono_unhandled_exception): Remove leftover debug code.
55
56 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
57
58         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
59
60 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
61
62         * marshal.c (emit_marshal_array): Really null terminate string arrays.
63         
64         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
65
66 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
67
68         * marshal.c (emit_marshal_array): Null terminate string arrays.
69         
70         * marshal.c (raise_auto_layout_exception): Fix warning.
71
72         * reflection.c (mono_param_get_objects): Initialize the default value
73         with DBNull.Value, not null. Fixes #62123.
74
75 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
76
77         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
78         throw an exception with a cute explanation.
79
80 2004-09-06  Dick Porter  <dick@ximian.com>
81
82         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
83         Close the new process's thread handle, as we don't use it.  The
84         handle stays around forever otherwise.
85
86 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
87
88         * object.c (arith_overflow): Fix warning.
89
90         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
91         calling conventions in method refs. Fixes #65352.
92
93         * reflection.c: Fix warnings.
94
95 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
96
97         * icall.c: Add a new icall for Array.Clear
98
99 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
100
101         * object.c: When allocating an array, we have to throw
102         an overflow exception if any of the lengths are < 0.
103
104 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
105
106         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
107         properly. Also move implementation of string array marshalling to 
108         managed code. Fixes #42316.
109
110 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
111
112         * assembly.c: provide more information when loading an assembly fails.
113
114 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
115
116         * filewatcher.c: don't expect the development fam package to be
117         installed.
118
119 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
120
121         * marshal.c: Make a copy of the signature cookie since it will be
122         freed by the caller.
123         
124         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
125
126         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
127
128         * metadata.c (mono_metadata_free_marshal_spec): New function to free
129         marshal specs.
130
131         * marshal.c: More refactoring.
132         
133         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
134         smaller functions.
135
136 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
137
138         * object.c: In mono_message_invoke, fill the output parameter array after
139           calling the managed method (it was done before the call). This fixes
140           bug #59299.
141
142 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
143
144         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
145         as well.
146
147 2004-09-02  Martin Baulig  <martin@ximian.com>
148
149         * class.c (mono_class_instance_size): Don't allow generic type
150         definitions or open generic instances.
151         (mono_class_array_element_size): If we're a value type, call
152         mono_class_instance_size() on the original class.
153
154         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
155         handle generic instances.
156
157         * mono-debug-debugger.c (write_type): Handle generic instances
158         like classes.
159
160 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
161
162         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
163         the allocation request fails. Fixes #65089.
164
165         * object.c (mono_runtime_free_method): Do not call mono_free_method.
166         
167         * object.c (mono_runtime_free_method): New function to free a dynamic
168         method.
169
170         * marshal.c (mono_delegate_free_ftnptr): New function to free the
171         delegate trampoline.
172
173         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
174         with hasthis as dynamic,
175
176         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
177
178         * domain.c (mono_jit_info_table_remove): New function to remove an
179         entry from the jit info table.
180
181         * class-internals.h (MonoMethod): Add 'dynamic' field.
182
183         * loader.c: Fix warnings.
184
185 2004-09-01  Martin Baulig  <martin@ximian.com>
186
187         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
188         instead of mono_debugger_lock() because the latter one is a no-op
189         unless running in the debugger.
190
191 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
192
193         * class.c (class_compute_field_layout): Classes with auto-layout or
194         reference fields are not blittable.
195         
196 2004-09-01  Dick Porter  <dick@ximian.com>
197
198         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
199         mono_image_get_filename() to get the assembly location.
200
201         * icall.c:
202         * metadata.h: Fix compile warnings
203
204 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
205
206         * class.c (class_compute_field_layout): System.Object is blittable.
207
208         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
209         as in/out. Fixes #59909.
210
211 2004-09-01  Martin Baulig  <martin@ximian.com>
212
213         * metadata.h (MONO_TYPE_ISREFERENCE): Call
214         mono_metadata_generic_inst_is_valuetype() if we're a generic
215         instance to check whether our underlying type is a reference type.
216
217 2004-09-01  Martin Baulig  <martin@ximian.com>
218
219         * metadata.c (mono_type_size): If we're a generic instance, call
220         mono_class_value_size() for value types.
221
222 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
223
224         * marshal.c: Implement more custom marshalling functionality. Fixes
225         #64915.
226
227 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
228
229         * mono-debug.c, debug-mono-symfile.c: add some locking love.
230
231 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
232
233         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
234
235         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
236
237         * icall.c: Fix some warnings.
238
239         * threads.c (abort_appdomain_thread): Fix unref errors.
240         (mono_thread_current): Fix THREAD_DEBUG define.
241
242 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
243
244         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
245
246         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
247
248 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
249
250         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
251         string arrays.
252
253 2004-08-28  Martin Baulig  <martin@ximian.com>
254
255         * metadata.c
256         (mono_metadata_generic_inst_is_valuetype): New public function.
257
258         * metadata.h (MONO_TYPE_ISSTRUCT): Call
259         mono_metadata_generic_inst_is_valuetype() if we're a generic
260         instance to check whether our underlying type is a valuetype.
261
262 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
263
264         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
265         #63768.
266
267 2004-08-25  Martin Baulig  <martin@ximian.com>
268
269         * loader.c (mono_get_method_from_token): Abstract methods can also
270         be generic and thus have type parameters.
271
272         * metadata-internals.h
273         (MonoDynamicImage): Added `GPtrArray *gen_params'.
274
275         * reflection.c (mono_image_get_generic_param_info): Don't create a
276         metadata row, just add an entry to the `gen_params' array.
277         (build_compressed_metadata): Sort the `gen_params' array and then
278         actually create the metadata.
279
280 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
281
282         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
283
284 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
285
286         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
287
288 2004-08-24  Martin Baulig  <martin@ximian.com>
289
290         * class.cs (mono_class_is_subclass_of): Like an interface, a
291         generic instance also derives from System.Object.
292
293 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
294
295         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
296         custom modifiers to be in any order. Fixes #61990.
297
298 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
299
300         * object.c: Register mono_object_new_fast icall.
301         
302         * object.c (mono_class_get_allocation_ftn): Return to calling
303         mono_object_new_fast, since it seems faster to compute the object 
304         size in unmanaged code than passing it as a parameter.
305
306         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
307
308         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
309         this function with Boehm as the oom handler, so we don't have to check
310         the result of GC_malloc.
311
312         * object.c: Remove checks for oom.
313
314         * object.h object.c (mono_class_get_allocation_ftn): New function to
315         return the icall which can be used to allocate an instance of a given
316         class. 
317
318         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
319
320         * class-internals.h: Add 'enabled' field.
321
322 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
323
324         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
325
326 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
327         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
328         value 0x0010.
329
330 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
331
332         * appdomain.c: use the Tls function for appdomain too,
333         at Zoltan's request. Actually return in mono_context_get
334
335         * appdomain.c, profiler.c, threads.c: use __thread
336
337 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
338
339         * appdomain.c threads.c: Call GC_CreateThread on windows.
340
341         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
342         multiple libraries since this don't work on windows.
343
344 2004-08-18  Martin Baulig  <martin@ximian.com>
345
346         * class-internals.h
347         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
348         MonoMethodHeader.
349
350         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
351         MonoMethodNormal since we also need it for abstract and interface
352         methods.
353
354         * reflection.c
355         (build_compressed_metadata): Sort the GenericParam table.
356         (mono_image_create_token): Added `gboolean create_methodspec'
357         argument; this is false when generating a MethodImpl token.
358         (reflection_methodbuilder_to_mono_method): Abstract and interface
359         methods may also have generic parameters.
360
361 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
362
363         * appdomain.c: thread local alloc
364
365 2004-08-17  Martin Baulig  <martin@ximian.com>
366
367         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
368
369         * icall.c
370         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
371         argument.
372
373         * class.c (mono_type_get_full_name): New public function.
374         (mono_type_get_name): Don't include the type arguments.
375
376 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
377
378         * Makefile.am: Build static versions of libmetadata and libmonoruntime
379         for inclusion into the mono executable.
380
381 2004-08-16  Martin Baulig  <martin@ximian.com>
382
383         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
384         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
385
386 2004-08-14  Martin Baulig  <martin@ximian.com>
387
388         * class.c (dup_type): Also copy the `byref' field.
389
390 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
391
392         * reflection.c (create_dynamic_mono_image): Revert the last change 
393         since it breaks bootstrap.
394
395 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
396
397         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
398
399         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
400         not free them with g_free.
401
402 2004-08-11  Martin Baulig  <martin@ximian.com>
403
404         * reflection.c (mono_reflection_setup_internal_class): Also call
405         mono_class_setup_mono_type() if we already have a `tb->type.type'.
406
407 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
408
409         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
410         called during default (first) AppDomain creation. Keep track of
411         Evidence when loading assemblies.
412
413 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
414
415         * opcodes.c, opcodes.h: reduce runtime relocations.
416
417 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
418
419         * culture-info.h, locales.c: fixes and chages to sue the new
420         optimized format of the locale data.
421         * culture-info-tables.h: regenerated.
422
423 2004-08-06  Geoff Norton <gnorton@customerdna.com>
424         
425         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
426
427 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
428
429         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
430         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
431         * domain-internals.h: icall declaration.
432         * icall.c: icall registration.
433         * object-internals.h: New fields in MonoAssembly for CAS.
434
435 2004-08-05  Duncan Mak  <duncan@ximian.com>
436
437         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
438         CEE_LDELEM_ANY.
439
440 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
441
442         * reflection.c: fix to deal with object[] arrays in custom ctors
443         (bug #62550).
444
445 2004-08-05  Martin Baulig  <martin@ximian.com>
446
447         * class.c (mono_class_array_element_size): Added support for
448         generic instances and correctly handle "recursive" types.
449
450 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
451
452         * assembly.c: Fix warnings.
453
454 2004-08-04  Martin Baulig  <martin@ximian.com>
455
456         * class.c
457         (mono_type_get_name_recurse): Added `gboolean include_arity'
458         argument specifying whether or not we should include the generic
459         arity in the type name.
460         (_mono_type_get_name): New static function.
461         (mono_class_setup_vtable): If we're a generic instance, don't
462         include the generic arity in the names of explicit method
463         implementations.        
464
465 2004-08-03  Martin Baulig  <martin@ximian.com>
466
467         * class.c (mono_type_get_name_recurse): Enclose the generic type
468         arguments in `<', '>'.
469
470 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
471
472         * gc.c: make GC warning messages use the trace API, they are just
473         noise to most of the users.
474
475 2004-08-03  Martin Baulig  <martin@ximian.com>
476
477         * debug-mono-symfile.c (read_string): Correctly read the string.
478
479 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
480
481         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
482         
483         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
484         icalls.
485         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
486
487 2004-07-30  Martin Baulig  <martin@ximian.com>
488
489         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
490         Reflect latest symbol writer changes.   
491
492 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
493
494         * object.c: always create an object if null is passed
495         to Invoke() where a valuetype is expected.
496
497 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
498
499         * marshal.c (mono_marshal_init): make managed
500         signatures match native ones better for 64bits.
501
502 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
503
504         * appdomain.c: hack to build correctly the private bin path on windows.
505         Fixes bug #61991.
506
507 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
508
509         * assembly.c: Load mscorlib from the correct framework directory
510           (mono/<version>/mscorlib.dll).
511         * appdomain.h: Added prototypes for new functions.
512         * internals.h: Added some prototypes.
513         * domain.c: When initializing the runtime, get from the executable and
514           the configuration files the runtime version that the app supports.
515           Added support methods for reading app.exe.config. Added list of versions
516           supported by the JIT. Added two new methods: mono_init_from_assembly,
517           which initializes the runtime and determines the required version from
518           the provided exe file, and mono_init_version, which initializes
519           the runtime using the provided version.
520         * icall.c: Get machine.config from version-specific directory.
521         * reflection.c: When generating an image, embed the version number
522           of the current runtime.
523
524 2004-07-28  Dick Porter  <dick@ximian.com>
525
526         * socket-io.c
527         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
528         returned sockaddr size before creating the remote address object.
529         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
530         61608.
531
532 2004-07-28  Dick Porter  <dick@ximian.com>
533
534         * locales.c (string_invariant_compare_char): Fix invariant char
535         compares between upper and lower cases.  Fixes bug 61458.
536
537 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
538         
539         * marshal.c: actually cache stelem.ref wrappers.
540         
541 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
542
543         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
544         sections and remove the mono_cli_rva_map () function.
545
546 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
547
548         * debug-mono-symfile.c: fix one more endianess issue, from a patch
549         by Geoff Norton (<gnorton@customerdna.com>).
550
551 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
552
553         * class.c: fix class loads for pointer types (typeof(int) !=
554         typeof(int*)).
555
556 2004-07-27  Martin Baulig  <martin@ximian.com>
557
558         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
559         reading the debugging information from an external ".mdb" file.
560
561 2004-07-24  Martin Baulig  <martin@ximian.com>
562
563         * reflection.c (mono_image_get_type_info): Only write a class
564         layout entry if we actually have a size or a packing size.
565
566 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
567
568         * reflection.c (type_get_fully_qualified_name): 
569         insert cast to get type checking of ?: with non-gcc compilers
570
571 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
572
573         * rand.c: use g_getenv for both lookups of
574         MONO_EGD_SOCKET
575
576 2004-07-17  Martin Baulig  <martin@ximian.com>
577
578         * reflection.c (mono_reflection_bind_generic_method_parameters):
579         Set `gmethod->reflection_info'.
580
581 2004-07-17  Martin Baulig  <martin@ximian.com>
582
583         * class.c (mono_class_create_from_typedef): Insert the newly
584         created class into the hash table before computing the interfaces
585         since we could be called recursively.
586
587 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
588
589         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
590         function to implement stelem.ref in managed code
591         * class-internals.h, debug-helpers.c: a new wrapper type
592         for the above.
593
594 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
595
596         * gc.c: allow GC handles to work even when no GC is compiled in.
597         Fix part of bug #61134 (GetAddrOfPinnedObject).
598
599 2004-07-13  Peter Williams  <peter@newton.cx>
600  
601         * process.c (complete_path): Make sure we don't attempt to execute
602         directories.
603  
604 2004-07-12  Geoff Norton <gnorton@customerdna.com>
605
606         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
607           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
608           and will add/subtract the hour if needed
609
610 2004-07-12  Martin Baulig  <martin@ximian.com>
611
612         * reflection.c (mono_field_get_object): If we have
613         `field->generic_info', take the attributes from
614         `field->generic_info->generic_type'.    
615
616 2004-07-12  Martin Baulig  <martin@ximian.com>
617
618         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
619         This function must be called before initializing the runtime.
620         (mono_debug_init_1): New function; call this after initializing
621         the runtime, but before loading the assembly.  It tells the
622         debugger to load corlib and the builtin types.
623
624         * mono-debug-debugger.c: Did some larger changes in the debugging
625         code; support recursive class declarations, make sure we actually
626         add all classes.
627
628 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
629
630         * debug-helpers.c: undo my previous patch and fixed the real issue in
631         ../mini/exceptions-x86.c
632
633 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
634
635         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
636         when no HOME env. variable was set and a NullRef was thrown in a .cctor
637         called from other .cctors.
638
639 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
640
641         * loader.c: Removed the mono_loader_wine_init hack now that we are
642         doing a managed version of Windows.Forms.
643
644 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
645
646         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
647         threadpool.c, threads.c: remove static data from rootset.
648
649 2004-07-09  Dick Porter  <dick@ximian.com>
650
651         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
652         Don't do any more processing if the matched length was 0.  It was
653         increasing the size of the string before.  Fixes bug 61167.
654
655 2004-07-09  Dick Porter  <dick@ximian.com>
656
657         * socket-io.h:
658         * socket-io.c
659         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
660         Add support for SO_PEERCRED if its available.
661
662 2004-07-09  Peter Bartok <pbartok@novell.com>
663         * loader.c: winelib.exe.so error message is now only displayed if
664         MONO_DEBUG is set. To help us avoid questions when people are trying
665         out the new Managed.Windows.Forms.
666
667 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
668
669         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
670         for isinst and castclass wrappers.
671
672         * class-internals.h icall.c: Move registration and lookup of JIT icalls
673         to libmetadata from the JIT, so they could be used by the marshalling
674         code and the interpreter.
675
676         * marshal.c: Register marshalling related JIT icalls here instead of
677         in mini.c. Use CEE_MONO_ICALL instead of the family of 
678         CEE_MONO_PROC<x> opcodes to call marshalling functions.
679
680         * metadata.h: Remove unneeded marshalling conversions.
681
682         * opcodes.c: Update for new opcodes.
683         
684 2004-07-08  Martin Baulig  <martin@ximian.com>
685
686         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
687         (mono_debug_get_domain_data): Make this function static.
688
689 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
690
691         * gc.c, object.h: add nice GC handle API for embedders.
692
693 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
694
695         * reflection.c: more changes for the new api
696
697         * object.c: When we reflect on a field w/ a constant value, it
698         will not have a memory location, so we must access metadata. Also,
699         allow easier reading of strings so that we can read them from
700         the constant data.
701
702         * class.c (mono_class_layout_fields): no need for literal fields here.
703
704         * class-internals.h: api changes for const fields
705
706         * icall.c (ves_icall_get_enum_info): use new apis for const fields
707
708 2004-07-06  Martin Baulig  <martin@ximian.com>
709
710         * mono-debug.h: Increment version number to 44.
711
712         * mono-debug.c (mono_debug_add_wrapper): The second argument is
713         now a gpointer, rewrote this whole method.
714
715         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
716         function.  Add information about the wrapper in a new "misc table".
717
718         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
719         for the new misc table.
720
721 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
722
723         * metadata-internals.h image.c: Add a cache for helper signatures.
724
725         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
726
727 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
728
729         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
730         delegates from a delegate. Fixes #61033.
731         
732         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
733         marshalling of stringbuilder arrays. Fixes #59900.
734
735 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
736
737         * icall.c: Add EnumBuilder:setup_enum_type icall.
738
739 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
740
741         * icall.c: Added a new icall for the property version of
742         OffsetOfStringData.
743
744 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
745
746         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
747         it has a constant size across platforms.
748
749         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
750         stack trace.
751
752 2004-06-29  Martin Baulig  <martin@ximian.com>
753
754         * mono-debug.c (mono_debug_add_method): Protect the whole function
755         in mono_debugger_lock(), not just parts of it.
756
757 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
758
759         * reflection.c: make sure padding bytes in heaps are zeroed.
760
761 2004-06-24  David Waite  <mass@akuma.org>
762
763         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
764         image.c, loader.c, locales.c, marshal.c, metadata.c,
765         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
766         string-icalls.c, threads.c: change to C90-style comments from C99 /
767         C++ -style
768
769 2004-06-24  Dick Porter  <dick@ximian.com>
770
771         * threads.c
772         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
773         return createdNew.  Fixes bug 60412.
774
775         * threads-types.h: 
776         * icall.c: Add createdNew parameter to CreateMutex icall
777
778 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
779
780         * reflection.c, object-internals.h: save default value in params.
781
782 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
783
784         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
785         no need to build a new path combining that with the application base.
786         Fixes bug #60442.
787
788 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
789
790         * reflection.c: fixed minor standard compliance issues.
791
792 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
793
794         * reflection.c: fixed issue with encoding some custom attributes
795         (arrays in properties and fields, bug #60411).
796
797 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
798
799         * reflection.c: fix start address when copying the public key token.
800
801 2004-06-23  Martin Baulig  <martin@ximian.com>
802
803         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
804         the `exc' object in a static object to put it into the GC's root set.
805
806 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
807
808         * reflection.c: make mono_reflection_setup_internal_class ()
809         callable a second time to setup a new parent class.
810
811 2004-06-23  Dick Porter  <dick@ximian.com>
812
813         * threads.c: Check for WAIT_IO_COMPLETION return values.
814
815 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
816
817         * appdomain.c: Removed the g_free on the public key token. Now copy 
818         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
819         * assembly.c: Added public key token string value when loading 
820         assemblies. Fix bug #60439.
821         * icall.c: Added missing informations (like public key) in 
822         GetReferencedAssemblies. Fix #60519.
823         * image.h: Changed definition for public key token from const char*
824         public_tok_value to guchar public_key_token [17];
825         * reflection.c: Updated for changes to public key token.
826
827 2004-06-22  Lluis Sanchez Gual
828
829         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
830         for the field in base classes.
831
832 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
833
834         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
835         mark headers as not supported, they are installed only for use by the
836         debugger.
837
838 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
839
840         * *.c, *.h: avoid namespace pollution in public headers.
841
842 2004-06-21  Martin Baulig  <martin@ximian.com>
843
844         * exception.c (mono_get_exception_security): It's in
845         "System.Security", not in "System".
846
847         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
848         the exception classes.
849
850 2004-06-21  Martin Baulig  <martin@ximian.com>
851
852         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
853         Protect the exception object from being finalized.
854
855 2004-06-21  Martin Baulig  <martin@ximian.com>
856
857         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
858         public function.
859
860 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
861
862         * reflection.c: Load the assembly in mono_reflection_type_from_name,
863         if it was not loaded before. Fix parts of #60439.
864
865 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
866
867         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
868         code that was broken since Ben's change: wrappers are now
869         dependent on the method signature only again.
870
871 2004-06-21  Martin Baulig  <martin@ximian.com>
872
873         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
874         added interface support.
875
876 2004-06-21  Martin Baulig  <martin@ximian.com>
877
878         * class.c (mono_vtable_get_static_field_data): New public method.
879
880 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
881
882         * filewatcher.c : Windows build fix to be compliant with API changes.
883
884 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
885
886         * class.h, class.c: more accessors.
887         * metadata.h, metadata.c: prepare for hiding MonoType and
888         MonoMethodSignature: people should use the accessors from now on
889         outside of the tree.
890
891 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
892
893         * *.c, *.h: more API cleanups.
894
895 2004-06-18  Jackson Harper  <jackson@ximian.com>
896
897         * assembly.c: Trace loading assemblies.
898         * loader.c: Trace loading native libraries.
899         * mono-config.c: Trace loading config files.
900         
901 2004-06-18  Dick Porter  <dick@ximian.com>
902
903         * locales.c: Tell ICU the lengths of strings, it can cope with
904         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
905
906 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
907
908         * image.c: swapped name/filename;
909
910 2004-06-18  Martin Baulig  <martin@ximian.com>
911
912         * mono-debug-debugger.c (write_class): Write the parent class at
913         the end of the header.
914
915 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
916
917         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
918
919 2004-06-17  Raja R Harinath  <rharinath@novell.com>
920
921         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
922         (bundle_obj): New conditional define.
923         (BUILT_SOURCES): Remove.
924         ($(bundle_srcs)): Make parallel-make safe.
925         (libmonoruntime_la_LIBADD): Make unconditional.
926         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
927         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
928
929 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
930
931         * culture-info-tables.h: It was inconsistent with the latest
932           supp info files.
933
934 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
935
936         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
937         be loaded.
938
939         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
940         with gcc 2.95.
941
942 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
943
944         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
945         cleaned up public header threads.h.
946
947 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
948
949         * Makefile.am, *.c, *.h: more API cleanups.
950
951 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
952
953         * Makefile.am: removed monosn from compilation.
954         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
955         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
956         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
957         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
958         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
959         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
960
961 2004-06-15  Jackson Harper  <jackson@ximian.com>
962
963         * assembly.c: Make locales lower case when searching the GAC for
964         assemblies. gacutil will always make locales lowercase when
965         installing so this effectively makes them case insensitive.
966         
967 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
968
969         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
970         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
971           parameter which allows to choose whether the wait can be interrupted or 
972           not. Also added the method mono_monitor_enter(), which locks the monitor
973           using an infinite wait and without allowing interruption.
974           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
975           interrupted.
976         * object.h: Added new fields in MonoThread. suspend_event holds the event
977           used to susped/resume the thread. synch_lock is the lock object to use for
978           modifying the thread state.
979         * threads.c: Use the new synch_lock object for locking, instead of "this",
980           which can generate deadlocks.
981           Moved thread state change in Thread.Sleep and Thread.Join from managed
982           to unmanaged code. This avoids a deadlock when the thread was suspended
983           just after acquiring the thread lock.
984           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
985           Implemented Thread.Suspend using an event instead of ThreadSuspend,
986           which is not fully implemented in the io-layer.
987         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
988
989 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
990
991         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
992         threads-types.h: more API cleanups.
993
994 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
995
996         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
997         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
998         threadpool.c, threads.c: first pass at the exported API cleanup.
999
1000 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
1001
1002         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
1003
1004 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1005
1006         * icall.c: added internalGetHome.
1007
1008 2004-06-14  Dick Porter  <dick@ximian.com>
1009
1010         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
1011         possible to return successfully when '.' or '..' were the only
1012         entries in a directory, but were skipped.  The MonoIOStat was not
1013         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
1014         Fixes bug 59574.
1015
1016 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
1017
1018         * reflection.c: make binaries run on .Net 1.1 by default.
1019
1020 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1021
1022         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
1023
1024 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
1025
1026         * marshal.c: keep track of struct size with explicit layout
1027         (bug #59979).
1028
1029 2004-06-12  Martin Baulig  <martin@ximian.com>
1030
1031         * mono-debug-debugger.c: Comment out a debugging g_message().
1032
1033 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
1034
1035         * reflection.c, reflection.h: do not free custom attrs that are cached.
1036         * icall.c: use braces to make code clearer.
1037
1038 2004-06-11  Martin Baulig  <martin@ximian.com>
1039
1040         * class.h (MonoInflatedField): New type.
1041         (MonoClassField): Replaced `MonoType *generic_type' with
1042         `MonoInflatedField *generic_info'.
1043
1044         * icall.c
1045         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
1046
1047 2004-06-11  Martin Baulig  <martin@ximian.com>
1048
1049         * reflection.c (mono_image_create_method_token): Correctly encode
1050         varargs methods.
1051
1052 2004-06-11  Martin Baulig  <martin@ximian.com>
1053
1054         * metadata.c (mono_metadata_parse_method_signature): When parsing
1055         a MethodDef which has VarArgs, also set sentinelpos if we don't
1056         have any parameters.
1057
1058 2004-06-11  Martin Baulig  <martin@ximian.com>
1059
1060         * verify.c (mono_method_verify): In CEE_CALL, use
1061         mono_method_get_signature() to get the method's signature, unless
1062         we're a PInvoke method.
1063
1064 2004-06-10  Jackson Harper  <jackson@ximian.com>
1065
1066         * assembly.c: Use <path>/lib/mono/gac for the extra paths
1067         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
1068         logical name as the supplied path is just a prefix to the gac not
1069         the direct path to it.
1070         
1071 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
1072
1073         * reflection.c: make the token for a created method match
1074         the token of the MethodBuilder it was created from
1075         (IKVM requires this behaviour now).
1076
1077 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
1078
1079         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
1080         reflection.c, socket-io.c: leak fixes.
1081
1082 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
1083
1084         * icall.c: handle sentinel pos in vararg methods in position different
1085         from 0.
1086
1087 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1088
1089         * culture-info-tables.h: freshly generated.
1090
1091 2004-06-09  Martin Baulig  <martin@ximian.com>
1092
1093         * loader.c (mono_get_method_constrained): Call `mono_class_init
1094         (constrained_class)'.   
1095
1096 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
1097
1098         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
1099         any methods. Fixes #59629.
1100
1101 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1102
1103         * culture-info-tables.h: reflecting locale-builder updates.
1104
1105 2004-06-08  Dick Porter  <dick@ximian.com>
1106
1107         * object.h:
1108         * locales.c: Fixed compile warnings, including a real bug in
1109         CompareInfo_internal_compare.
1110         
1111 2004-06-08  Dick Porter  <dick@ximian.com>
1112
1113         * locales.c
1114         (ves_icall_System_Globalization_CompareInfo_internal_index):
1115         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1116         Double-check the resuls of usearches, because ICU currently
1117         ignores most of the collator settings here.  Fixes bug 59720.
1118         
1119 2004-06-08  Dick Porter  <dick@ximian.com>
1120
1121         * locales.c
1122         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1123         Fix memory leak and segfault-causing typo.  No idea how this one
1124         lasted so long without being noticed.
1125
1126 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
1127
1128         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
1129         any methods. Fixes #59629.
1130
1131 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1132
1133         * assembly.c:
1134         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
1135         own the critical section before). Removed dead code (that's done
1136         in the preload hook).
1137
1138         (mono_assembly_load_with_partial_name): call the preload hook.
1139
1140 2004-06-08  Martin Baulig  <martin@ximian.com>
1141
1142         * metadata.c (mono_metadata_signature_alloc): Default
1143         `sentinelpos' to -1.
1144
1145         * reflection.c (mono_image_get_array_token): Likewise.
1146
1147 2004-06-08  Martin Baulig  <martin@ximian.com>
1148
1149         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
1150
1151         * metadata.c (mono_metadata_parse_method_signature): When parsing
1152         a MethodDef which has VarArgs, set sentinelpos.
1153
1154         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
1155         `gint16' since we're using -1 for non-varargs methods.
1156
1157         * reflection.c
1158         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
1159         (method_encode_signature): Added varargs support.
1160         (method_builder_encode_signature): Likewise.
1161         (mono_image_get_varargs_method_token): New static method.
1162         (mono_image_create_method_token): New public method; this is
1163         called via an icall instead of mono_image_create_token() when
1164         calling a varargs method.       
1165
1166 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
1167
1168         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
1169
1170 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1171
1172         * culture-info-tables.h : Reflecting the latest locale-builder that
1173           fixed empty array representation ({} to {0}).
1174
1175 2004-06-07  Jackson Harper  <jackson@ximian.com>
1176
1177         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
1178         looking up extra gac paths. This allows MONO_GAC_PATH to act
1179         exactly like a prefix.
1180         
1181 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
1182
1183         * reflection.c (mono_reflection_type_from_name): Make a copy of the
1184         type name before modifying it. Fixes #59405.
1185
1186 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1187
1188         * culture-info.h: added fields for "all datetime patterns".
1189         * locales.c: (  ves_icall_System_Globalization_CultureInfo
1190           _construct_datetime_format ()): fill xxx_patterns fields.
1191         * object.h: added fields for "all datetime patterns" to
1192           MonoDateTimeFormatInfo.
1193         * culture-info-tables.h: reflecting locale-builder updates.
1194
1195 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
1196
1197         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
1198         the event has no add and remove methods. Fixes #59629.
1199
1200 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
1201
1202         * object.c: Fixed possible integer overflow when allocating large
1203         strings.
1204
1205 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
1206
1207         * culture-info-tables.h: reflecting locale-builder updates.
1208
1209 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
1210
1211         * culture-info-tables.h: reflecting locale-builder updates.
1212
1213 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
1214
1215         * culture-info-tables.h: reflecting locale-builder updates.
1216
1217 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
1218
1219         * threads.c: Made Thread.Sleep abortable.
1220
1221 2004-06-02  Martin Baulig  <martin@ximian.com>
1222
1223         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
1224
1225         * debug-mono-symfile.h: Bumped symbol file version number to 37.
1226
1227 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
1228
1229         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
1230
1231 2004-05-30  Jackson Harper  <jackson@ximian.com>
1232
1233         * reflection.c: Do not hardcode assembly versions or public key
1234         tokens anymore. All of this except the corlib section was dead
1235         code anyways.
1236         
1237 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
1238
1239         * object.c (mono_runtime_invoke_array): Automatically create boxed
1240         objects for byref valuetypes if needed. Fixes #59300.
1241         
1242         * object.c (mono_method_return_message_restore): Handle 
1243         MONO_TYPE_OBJECT as well.
1244
1245 2004-05-28  Jackson Harper  <jackson@ximian.com>
1246
1247         * reflection.c: The modified type encoding was causing build
1248         problems. Reverted for now.
1249         
1250 2004-05-28  Jackson Harper  <jackson@ximian.com>
1251
1252         * reflection.c/h: Take an assembly ref so that we dont create
1253         fully qualified names when encoding types in the same assembly as
1254         the custom attribute being emitted.
1255         * appdomain.c: Increment version number.
1256         
1257 2004-05-26  Duncan Mak  <duncan@ximian.com>
1258
1259         * icall.c
1260         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1261         Set the full version number (major, minor, build, revision).
1262
1263 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
1264
1265         * marshal.c (emit_struct_conv): increment src/dst after blit
1266         (mono_marshal_get_managed_wrapper,
1267         mono_marshal_get_native_wrapper): make sure we have marshalling
1268         info before marshalling params (info computation affects
1269         blittable)
1270
1271         * class.c (class_compute_field_layout): correctly deal with
1272         blittable
1273         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
1274         value types (as per what windows dows by default)
1275         (mono_class_setup_mono_type): System.ValueType is blittable
1276         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
1277         blittable
1278
1279         * marshal.c (mono_marshal_load_type_info): flag types  as
1280         non-blittable if the native layout doesn't match the managed
1281         layout
1282
1283 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1284
1285         * appdomain.c: don't add stuff in the private search path that is
1286         above the application base. If application base is not set, there's
1287         no private search path.
1288
1289 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
1290
1291         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
1292         byref struct arguments in native->managed marshalling.
1293
1294 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
1295
1296         * marshal.c (mono_marshal_get_runtime_invoke): correctly
1297         cache methods using signature (special case for methods
1298         that are value type or string class)
1299         
1300         * image.c (mono_image_close): clean up allocated GSList's
1301         in runtime_invoke_cache.
1302
1303 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1304
1305         * mono-config.c: set the correct path for mono_cfg_dir on windows when
1306         there's no MONO_CFG_DIR environment variable defined.
1307
1308 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1309
1310         * threads.c: windows version must be >= 0x0500 to include OpenThread.
1311
1312 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
1313
1314         * threadpool.c: Really wait for 500ms after the async call, even if the wait
1315           is interrumped.
1316         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
1317           before waiting for it, and call CloseHandle after the wait to unref it.
1318           This will make sure that handles are not disposed too early.
1319
1320 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1321
1322         * appdomain.c:
1323         * appdomain.h:
1324         * icall.c: removed
1325         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
1326         needed now.
1327
1328         * object.c: se the application_base only for the domain that runs
1329         Main. Fixes bug #59216,
1330
1331 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1332
1333         * appdomain.c:
1334         * object.c: only the domain in which Main is run have
1335         SetupInformation.ConfigurationFile set, so moved a few lines from
1336         appdomain.c to object.c.
1337
1338 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1339
1340         * appdomain.c: we tried to load [name].(dll|exe), but according
1341         to bug #57710, we must also try [culture]/[name].(dll|exe) and
1342         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
1343         There's a test case attached to bug #58922.
1344
1345 2004-05-27  Dick Porter  <dick@ximian.com>
1346
1347         * icall.c:
1348         * file-io.c: Implemented icalls for locking and unlocking regions
1349         in a file.
1350         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
1351         FALSE on error (fixes both compiler warning and real bug.)
1352
1353 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
1354
1355         * culture-info-tables.h: reflecting locale-builder updates.
1356
1357           (Added missing ChangeLog entry for 05/26)
1358
1359 2004-05-27  Jackson Harper  <jackson@ximian.com>
1360
1361         * locales.c: Fix some cut and paste errors.
1362         
1363 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1364
1365         * mono-config.c: set the correct path for config. directory on windows.
1366
1367 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1368
1369         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
1370           on win32.
1371
1372 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1373
1374         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
1375         from pinvoke functions.
1376         
1377         * marshal.c (mono_ftnptr_to_delegate): Implement this.
1378
1379 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1380
1381         * culture-info-tables.h: reflecting locale-builder updates.
1382
1383 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1384
1385         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
1386         #59086.
1387
1388 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
1389
1390         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
1391         * icall.c: Modified icalls for RNG.
1392         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
1393         Windows (CryptoAPI).
1394
1395 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1396
1397         * locales.c: Fix build.
1398
1399 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1400
1401         * culture-info-tables.h: reflecting locale-builder updates.
1402
1403 2004-05-25  Jackson Harper  <jackson@ximian.com>
1404
1405         * locales.c: When creating the current culture use the $LANGs
1406         specific culture. So DateTimeFormat and NumberFormat entries are created.
1407         
1408 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1409
1410         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
1411         a char array as parameter.
1412
1413 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
1414
1415         * image.c: In mono_image_open(), always use an absolute path name to
1416           look for already loaded images.
1417
1418 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
1419
1420         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
1421         missing in the windows build (like older cygwin include files).
1422
1423 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
1424
1425         * icall.c: Fixed check for possible integer overflow in Buffer_
1426         BlockCopy icall. Replaced comments style // by /* */.
1427
1428 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
1429
1430         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
1431         
1432         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
1433         check after MONO_VTADDR. Fixes pinvoke2.exe.
1434
1435         * marshal.h marshal.c metadata.h: Add beginnings of support for
1436         ftnptr -> delegate marshalling.
1437
1438 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
1439
1440         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
1441         * threads.c: Fix warnings.
1442
1443 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
1444
1445         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
1446         * icall.c: Registered icalls for Suspend and Resume.
1447         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
1448           Thread.Abort.
1449         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
1450         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
1451         * process.c: Use WaitForSingleObjectEx.
1452         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
1453           checkpoints.
1454         * threads.c, threads.h: Make use of new Ex wait methods. Improved
1455           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
1456           for Suspend and Resume. Added new mono_thread_stop, used for stoping
1457           background threads. Added basic support for Abort in Windows.
1458           Start new threads using a managed delegate invoke wrapper. This wrapper
1459           has an interruption checkpoint that is needed since an interruption
1460           can be requested before the thread leaves the unmanaged code that starts 
1461           the thread.
1462         * marshal.c: Added interruption checkpoint after every native call, and
1463           also before managed calls for wrappers called from unmanaged code to
1464           go into managed code.
1465         * object.h: Added new field in MonoThread to keep track of interruption
1466           requests.
1467
1468 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
1469
1470         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
1471         calls.
1472
1473 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1474
1475         * appdomain.c:
1476         * assembly.c:
1477         * gc.c:
1478         * locales.c:
1479         * mono-config.c:
1480         * rand.c: getenv -> g_getenv (windows!)
1481
1482         * process.c: complete_path is also used on non-windows platforms.
1483
1484 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1485
1486         * icall.c: new signature for Process_Start.
1487
1488         * process.[ch]: new signature for Process_Start. If we're on windows
1489         and UseShellExecute is false, we have to search for the program by
1490         ourselves if we don't get a full path.
1491
1492 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
1493
1494         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
1495         marshalling and call CleanUpNativeData if needed. Fixes #58646.
1496
1497 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1498
1499         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
1500         Fixes bug #58373.
1501
1502 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1503
1504         * process.c: use double quotes to quote program name and arguments on
1505         windows. Fixes bug #58575.
1506
1507 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1508
1509         * file-io.c: don't return "." and ".." when using windows Find*File.
1510
1511 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
1512
1513         * marshal.c: Don't pass wrappers to message init because method 
1514         addressed used to lookup metadata. part of remoting[2|3] fix.
1515
1516 2004-05-15  Jackson Harper  <jackson@ximian.com>
1517
1518         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
1519         path is essentially the same as MONO_PATH except that it points to
1520         GACs instead of lib directories.
1521         * loader.h: The user gac is gone so we dont need function to
1522         enable/disable it.
1523         * mono-config.c: user gac option is now gone.
1524         
1525 2004-05-15  Jackson Harper  <jackson@ximian.com>
1526
1527         * culture-info.h: Make defines more consistent, add calendar data
1528         to the culture info table.
1529         * culture-info-tables.h: Add basic calendar data. Basically
1530         everyone gets default gregorian until all the data is
1531         updated.
1532         * locales.c: Use the new consistent defines. Set calendar data for
1533         culture info objects.
1534         * object.h: add a field for calendar data to CultureInfo
1535         
1536 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
1537
1538         * image.c: image->runtime_invoke_cache is keyed on signatures now.
1539         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
1540         a signature.
1541         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
1542         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
1543         an extra param that is the pointer of the method to invoke. The IL for
1544         the invoke method is no longer specific to the method, but to the
1545         signature of the method. Thus, we can share the same code for multiple
1546         methods. This reduces the number of methods that have to be compiled.
1547
1548 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
1549
1550         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
1551
1552         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1553
1554         * icall.c: Optimize Buffer.BlockCopy.
1555
1556 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1557
1558         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
1559         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
1560         quote). Changed them to "MMMM yyyy".
1561
1562 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
1563
1564         * rand.c
1565         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
1566
1567 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
1568
1569         * reflection.h: Updated after changes to managed structures.
1570
1571         * appdomain.c: Bump corlib version.
1572
1573 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1574
1575         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
1576         windows.
1577
1578 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1579
1580         * Makefile.am: link to ../os/libmonoos.la on windows.
1581
1582         * assembly.c:
1583                 -If MONO_DEBUG, warn about non-existing directories in
1584                 MONO_PATH.
1585                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
1586                 compile time variable.
1587                 -Removed init_default_path and call mono_set_rootdir from
1588                 libmonoos.a instead (windows only).
1589
1590         * assembly.h: declare mono_assembly_getrootdir().
1591
1592         * domain.c:
1593         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
1594
1595         * loader.c: s/getenv/g_getenv/
1596
1597 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
1598
1599         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
1600
1601         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
1602
1603         * metadata.h: Add new marshalling conversions.
1604
1605         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
1606         function.
1607
1608         * reflection.c (mono_reflection_get_type): Lookup the type in all
1609         modules of a multi-module assembly. Fixes #58291.
1610
1611 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
1612
1613         * threads.c: Before aborting a background, set the StopRequested
1614         state.  This avoids throwing the Abort exception.
1615         In mono_thread_manage, don't continue with the shutdown until all
1616         aborted threads have actually stopped.
1617
1618 2004-05-10  Jackson Harper  <jackson@ximian.com>
1619
1620         * locales.c: Remove the modifier from culture names.
1621         
1622 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1623
1624         * Makefile.am: monosn is not installed any more. It has been deprecated
1625         in favor of sn.
1626
1627 2004-05-07  Jackson Harper  <jackson@ximian.com>
1628
1629         * locales.c
1630         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
1631         Fix array construction, add bailout if the length is 0.
1632
1633 2004-05-07  Dick Porter  <dick@ximian.com>
1634
1635         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
1636         machine doesn't have a DNS entry.  Patch by Urs Muff
1637         (umuff@quark.com), fixes bug 57928.
1638
1639 2004-05-06  Jackson Harper  <jackson@ximian.com>
1640
1641         * reflection.c: Handle null PublicTokens properly. alloc mem for
1642         assembly names culture so we dont crash when freeing it.
1643         
1644 2004-05-06  Jackson Harper  <jackson@ximian.com>
1645
1646         * assembly.c: Check the usergac when loading with partial names.
1647         
1648 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
1649
1650         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
1651         does nothing for now (not required for Linux/Windows) but the class
1652         library can call it (and a newer or modified runtime could need it).
1653         * icall.c: Registred icall.
1654
1655 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1656
1657         * loader.c: prints a message on module loading error we set MONO_DEBUG
1658         environment variable.
1659
1660 2004-05-05  Jackson Harper  <jackson@ximian.com>
1661
1662         * appdomain.c: Handle PublicKeyToken=null properly.
1663         
1664 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
1665
1666         * environment.c|h: Added icall ves_icall_System_Environment_
1667         GetOSVersionString to get the current OS version as a string.
1668         * icall.c: Registred icall.
1669
1670 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
1671
1672         * object.c: in mono_object_get_virtual_method(), take into account that
1673         non-virtual methods don't have a slot in the vtable. Check needed when
1674         the object is a proxy.
1675
1676 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
1677
1678         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
1679         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
1680
1681         * object.c (mono_class_compute_gc_descriptor): Fix warning.
1682
1683         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
1684         passed when a valuetype is expected.
1685
1686         * object.c (mono_unhandled_exception): Only set the exit code if the
1687         exception happens in the main thread. Fixes thread5.exe.
1688
1689         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
1690         invalid names. Fixes #58047.
1691
1692 2004-05-03  Jackson Harper  <jackson@ximian.com>
1693
1694         * assembly.c: This line was committed accidently and is unneeded.
1695         
1696 2004-05-03  Jackson Harper  <jackson@ximian.com>
1697
1698         * icall.c: Add new icall for Assembly::LoadWithPartialName
1699         * assembly.c/.h: new function that probes the GAC to load partial
1700         assembly names by Paolo Molaro.
1701         
1702 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1703
1704         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
1705         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
1706         (type_get_fully_qualified_name): Added PublicKeyToken when building a
1707         full type name.
1708
1709 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1710
1711         * appdomain.c: fixed check for 'neutral' culture and removed warning.
1712         * reflection.c: fix bug when parsing a full type name and Version is not
1713         the last thing in the string.
1714
1715 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
1716
1717         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
1718         crashes when it is freed.
1719
1720 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1721
1722         * assembly.c: print the compat warning to stderr.
1723
1724 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
1725
1726         * assembly.c (mono_assembly_load_references): Add a compatibility
1727         hack to run old applications that might be still referencing the
1728         3300-based assemblies, only do this for System.xxx.
1729
1730 2004-05-01  Jackson Harper  <jackson@ximian.com>
1731
1732         * appdomain.c: If the culture is neutral we set it to "".
1733         
1734 2004-04-29  Jackson Harper  <jackson@ximian.com>
1735
1736         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
1737
1738 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
1739  
1740         * string-icalls.c: added low overhead function for copying chars
1741         * icall.c: added needed icall for the above function
1742  
1743 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1744
1745         * icall.c: fix return value of get_global_assembly_cache.  Implemented
1746         Environment.GetLogicalDrives.
1747
1748 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
1749
1750         * rand.c: try and talk to egd or prngd
1751         for random bytes if opening devices fail.
1752
1753 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
1754
1755         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
1756         alignment for the type using the native alignment of its members 
1757         instead of using klass->min_align.
1758
1759         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
1760
1761 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1762
1763         * file-io.c:
1764         * socket-io.c: added check for sys/aio.h.
1765
1766 2004-04-28  Dick Porter  <dick@ximian.com>
1767
1768         * threads.c: Don't abort a thread thats already aborting, when
1769         terminating everything.
1770
1771 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1772
1773         * icall.c: added 2 new async calls for Socket.
1774
1775         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
1776         IO on *nix systems.
1777
1778         * threadpool.c: removed unused variable.
1779
1780 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
1781
1782         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
1783
1784 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
1785
1786         * locales.c: put back string_invariant_tolower () and
1787         string_invariant_toupper ().
1788
1789 2004-04-26 David Waite <mass@akuma.org>
1790
1791         * file-io.h:
1792         * socket-io.h:
1793         * threads.h:
1794         * unicode.h: remove comma from end of enumeration declarations
1795
1796 2004-04-26 David Waite <mass@akuma.org>
1797
1798         * debug-mono-symfile.h:
1799         * decimal.c:
1800         * mono_debug.h:
1801         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
1802
1803
1804 2004-04-26  Jackson Harper  <jackson@ximian.com>
1805
1806         * appdomain.c: Increment version number.
1807         
1808 2004-04-26  Jackson Harper  <jackson@ximian.com>
1809
1810         * appdomain.c: Set assembly references public token value when
1811         PublicKeyToken is specified, not the hash_value. Free public token
1812         values when free assembly name data. Previously the public key
1813         token was hex decoded, however we are using hex encoded public key
1814         tokens, so this is not neccasary.
1815         * assembly.c: Lookup assemblies in the gac if their public token
1816         value is set. Add function to allow enabling user gac
1817         lookups. Specify whether or not the assembly was loaded from the
1818         GAC. Compare full assembly names when checking the cache for
1819         assemblies (Temporarily disabled see comment in code). Remove
1820         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
1821         specifies trace-loader they get extra info to stdout on the
1822         loading of assemblies.
1823         * image.h: Add a field for an assembly references public token
1824         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
1825         whether an assembly has been loaded from the GAC.
1826         * image.c: Remove a corlib -> mscorlib name mapping.
1827         * loader.h: Add function to enable/disable the user gac.
1828         * mono-config.c: Check if the usergac is enabled in the config
1829         file.
1830         * icall.c: New icall to determine whether or not an assembly has
1831         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
1832         * tabldefs.h: Add constant for assemblyref flag that specifies a
1833         full public key is used instead of a public token.
1834         * reflection.c: Remove mscorlib -> corlib mappings. Set
1835         PublicTokenValue instead of hash value. This value is a hex
1836         string so it does not need to be expanded.
1837
1838 2004-04-26  Martin Baulig  <martin@ximian.com>
1839
1840         * mono-debug-debugger.c (mono_debugger_initialize): Set
1841         `mono_debugger_initialized' before calling mono_debug_lock().
1842
1843 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
1844
1845         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
1846           InternalToUpper/InternalToLower.
1847         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
1848           removed invariant culture shortcut.  This is now done in managed code.
1849         * locales.c: (string_invariant_toupper/tolower) removed.
1850
1851 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1852
1853         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
1854         Added Poll internal call.
1855
1856         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
1857         call for Poll. Select was too heavy for polling a single socket.
1858
1859         * threadpool.[ch]: added mono_threadpool_cleanup.
1860         * threads.c: use it. Don't use Thread_Abort on windows.
1861
1862 2004-04-23  Martin Baulig  <martin@ximian.com>
1863
1864         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
1865
1866 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
1867
1868         * icall.c: Registred new icalls for key pair protection and added an
1869         icall for Environment.GetFolderPath on Windows.
1870         * security.c|h: Added new icalls for key pair protection.
1871
1872 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1873
1874         * socket-io.c: don't display the non-supported family warning for known
1875         families. Now this is not displayed on windows when checking support
1876         for IPv4/IPv6.
1877
1878 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1879
1880         * class.c: don't display the layout warning for static fields.
1881
1882 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
1883
1884         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
1885         * locales.c, locales.h: Added new icalls for culture-specific
1886         Char.ToLower and Char.ToUpper.
1887
1888 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1889
1890         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
1891         by David Waite.
1892
1893 2004-04-20  Martin Baulig  <martin@ximian.com>
1894
1895         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
1896         of the type name before passing it to mono_reflection_type_from_name().
1897
1898 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
1899
1900         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
1901         encodings here. Fixes #56965.
1902
1903 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
1904
1905         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1906         fix test on strstr result not that I can see anything that
1907         relies on the result.
1908
1909 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
1910
1911         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
1912         Fixes #57081.
1913
1914         * marshal.c (mono_marshal_get_string_encoding): New helper function.
1915
1916         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
1917         function to determine which marshalling to use for strings. Fixes
1918         #56965.
1919
1920         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
1921
1922         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
1923
1924 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
1925
1926         * icall.c: #include mono-config.h
1927
1928 2004-04-15  Jackson Harper  <jackson@ximian.com>
1929
1930         * culture-info-tables.h: Fix date formats for en-US culture.
1931         
1932 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
1933
1934         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
1935         ThreadPool.SetMinThreads.
1936         * threadpool.c: Implemented ThreadPool.GetMinThreads and
1937         ThreadPool.SetMinThreads.
1938
1939 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1940
1941         * mono-config.c: also load the .config file in the directory
1942         where the assembly was found.
1943
1944 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
1945
1946         * assembly.c: load per-assembly config files.
1947         * icall.c: decrapified code to get the config dir and moved to
1948         mono-config.c.
1949         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
1950         per-assembly config files. When doing a dll map lookup give precedence
1951         to the per-assembly data.
1952
1953 2004-04-14  Martin Baulig  <martin@ximian.com>
1954
1955         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
1956         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
1957         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
1958
1959         * mono-debugger-debugger.c: While the debugger is locked, remember
1960         whether the symbol tables have changes and send one single
1961         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
1962
1963 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
1964
1965         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
1966
1967         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
1968         function.
1969
1970         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
1971         account when marshalling string arrays. Fixes #56965.
1972
1973 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
1974
1975         * icall.c: Add new icalls mapping for security.
1976         * security.c|h: Add internal calls for WindowsIdentity,
1977         WindowsImpersonationContext and WindowsPrincipal.
1978
1979 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
1980
1981         * class.c: Added comment to ensure the System.MonoDummy class
1982         is removed when no longer necessary
1983
1984 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
1985
1986         * appdomain.c: Pass arguments to the bootstraping exceptions to
1987         minimize JITed methods at boot
1988
1989         * metadata.c (mono_exception_from_name_two_strings): Allow for the
1990         second string to be null.
1991
1992         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1993         Change the protocol to minimize the JIT methods at startup.  Now
1994         it Returns the internal codepage, if the value of "int_code_page"
1995         is 1 at entry, and we can not compute a suitable code page
1996         number, returns the code page as a string.
1997
1998 2004-04-13  Jackson Harper  <jackson@ximian.com>
1999
2000         * culture-info-tables.h: Fix number of decimal digits for all
2001         english locales.
2002
2003 2004-04-13  Jackson Harper  <jackson@ximian.com>
2004
2005         * icall.c: Clairfy out of sync error message. It is not always
2006         your corlib that is out of sync.
2007
2008 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
2009
2010         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
2011         properties when only the set accessor is overriden. Fixes #55874.
2012
2013 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
2014
2015         * assembly.c (mono_assembly_load_references): Make this thread safe.
2016         Fixes #56327.
2017
2018 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
2019
2020         * monosn.c: Add missing initialization calls.
2021
2022 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
2023
2024         * locales.c:
2025         ves_icall_System_Globalization_CultureInfo_construct_number_format
2026         Fix g_assert so it compiles on fussier compilers re int/ptr
2027         mismatch
2028
2029 2004-04-08  Dick Porter  <dick@ximian.com>
2030
2031         * socket-io.h:
2032         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
2033         53992.  Also rearrange the code so that the internal calls return
2034         an error value and exceptions are thrown from managed code.
2035
2036         * icall.c: Add type info to the socket icalls.
2037
2038 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2039
2040         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
2041         owes me a beer.
2042
2043 2004-04-07  Martin Baulig  <martin@ximian.com>
2044
2045         * class.c (mono_class_from_generic_parameter): Don't default
2046         `klass->parent' to `mono_defaults.object_type'.
2047
2048 2004-04-07  Martin Baulig  <martin@ximian.com>
2049
2050         * reflection.c (mono_reflection_initialize_generic_parameter): Set
2051         `param->pklass->reflection_info'.       
2052
2053 2004-04-07  Jackson Harper  <jackson@ximian.com>
2054
2055         * culture-info-tables.h: Fix date separator symbol.
2056         
2057 2004-04-07  Martin Baulig  <martin@ximian.com>
2058
2059         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
2060         from System.Type to System.MonoType.
2061
2062 2004-04-07  Martin Baulig  <martin@ximian.com>
2063
2064         * reflection.h
2065         (MonoReflectionGenericParam): Added `has_reference_type' and
2066         `has_value_type' fields.
2067
2068         * reflection.c (mono_image_get_generic_param_info): Encode the
2069         correct flags if we have the `class' or `struct' constraint.
2070
2071 2004-04-07  Martin Baulig  <martin@ximian.com>
2072
2073         * reflection.h
2074         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
2075
2076 2004-04-07  Jackson Harper  <jackson@ximian.com>
2077
2078         * appdomain.c: Revert extra patches, just wanted to bump the
2079         version number.
2080         
2081 2004-04-07  Jackson Harper  <jackson@ximian.com>
2082
2083         * Makefile.am: Add culture-info private headers.
2084         * icall.c: Add new icalls for contructing locales.
2085         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
2086         * locales.h: Declare new culture info construction methods.
2087         * object.h: Add new fields used to avoid the CultureMap to
2088         MonoCultureInfo.
2089         * culture-info.h: Definition of structs used in the culture info
2090         tables.
2091         * culture-info-tables.h: Autogenerated tables that contain culture
2092         info data. This file was generated with the locale-builder tool.
2093         * appdomain.c: Incement corlib version number.
2094         
2095 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
2096
2097         * appdomain.c: (mono_runtime_init) move mono_thread_init
2098         to before mono_object_new calls so critical sections
2099         are initialized before use.
2100
2101 2004-04-07  Martin Baulig  <martin@ximian.com>
2102
2103         * icall.c
2104         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
2105         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
2106         (ves_icall_MonoGenericParam_initialize): Removed.
2107         (monogenericparam_icalls): Removed.
2108         (generictypeparambuilder_icalls): Added new table for
2109         System.Reflection.Emit.GenericTypeParameterBuilder.
2110
2111         * reflection.c
2112         (mono_reflection_define_generic_parameter): Removed.
2113         (mono_reflection_initialize_generic_parameter): This is now called
2114         from GenericTypeParameterBuilder's .ctor.
2115
2116 2004-04-06  Martin Baulig  <martin@ximian.com>
2117
2118         * class.c (mono_class_init): Don't inflate nested classes in a
2119         generic instance.
2120         (mono_type_get_name_recurse): Include the generic arguments for
2121         generic instances and generic type declarations.
2122         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
2123         (_mono_class_get_instantiation_name): Removed.
2124         (mono_class_create_generic): Always use `gklass->name' as our name.
2125
2126         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
2127
2128         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
2129         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
2130         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
2131         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
2132         closed generic methods here.
2133
2134         * reflection.c
2135         (mono_reflection_generic_inst_get_nested_types): Removed.
2136         (inflate_mono_method): Copy the generic parameters from the
2137         MonoMethodHeader into out MonoGenericMethod.
2138
2139 2004-04-06  Martin Baulig  <martin@ximian.com>
2140
2141         * row-indexes.h
2142         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
2143
2144         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
2145
2146         * reflection.c (build_compressed_metadata): If we have any entries
2147         in the GenericParam, MethodSpec or GenericParamConstraint tables,
2148         set the header version to 1.1.
2149
2150 2004-04-06  Martin Baulig  <martin@ximian.com>
2151
2152         * class.c (mono_class_init): If we're a generic instance,
2153         initialize our nested classes, too.
2154         (_mono_class_get_instantiation_name): Deal with the new `!%d'
2155         suffix. 
2156
2157 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2158
2159         * process.c: quote the argument passed to the shell on windows.
2160
2161 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
2162
2163         * threads.c (mono_alloc_special_static_data): Allow this to be
2164         called during startup.
2165
2166 2004-04-02  Martin Baulig  <martin@ximian.com>
2167
2168         * icall.c
2169         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
2170
2171 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
2172
2173         * icall.c: Fix build.
2174
2175 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
2176
2177         * Makefile.am: Added security.c|h.
2178         * icall.c: Added icall for get_UserName;
2179         * security.c: New file for security related icalls. Added function
2180         get_UserName for System.Environment (fix #56144).
2181         * security.h: New. Header file for security.c
2182
2183 2004-04-02  Dick Porter  <dick@ximian.com>
2184
2185         * icall.c: Deleted the icalls that were obsoleted some time ago
2186         by the ICU string code, and which were mixed into the icall
2187         rearranging.  Fixes bug 55969.
2188
2189         * string-icalls.h: 
2190         * string-icalls.c: Deleted the code that those icalls reference.
2191
2192 2004-04-01  Martin Baulig  <martin@ximian.com>
2193
2194         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
2195
2196         * class.c (mono_class_from_generic_parameter): Don't set 
2197         TYPE_ATTRIBUTE_INTERFACE.
2198         (my_mono_class_from_generic_parameter): Likewise.
2199
2200 2004-04-01  Martin Baulig  <martin@ximian.com>
2201
2202         * loader.c (find_method): Added an optional `MonoClass *ic'
2203         argument to search in a specific interface.
2204         (mono_get_method_constrained): New public function.
2205
2206 2004-04-01  Martin Baulig  <martin@ximian.com>
2207
2208         * reflection.c (mono_image_get_generic_field_token): Use the
2209         `handleref' cache here.
2210
2211 2004-04-01  Martin Baulig  <martin@ximian.com>
2212
2213         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
2214
2215         * reflection.c (create_generic_typespec): Use the `typespec' hash
2216         here, not the `typeref' one.    
2217
2218 2004-04-01  Martin Baulig  <martin@ximian.com>
2219
2220         * class.c (mono_class_inflate_generic_type): Moved the
2221         functionality into a new static inflate_generic_type() which
2222         returns NULL if it didn't do anything.  Only increment the
2223         `mono_stats.inflated_type_count' if we actually inflated
2224         something.
2225         (mono_class_get_full): Check the classes type to see whether we
2226         need to inflate it; also inflate MONO_TYPE_(M)VAR.
2227
2228 2004-04-01  Jackson Harper  <jackson@ximian.com>
2229
2230         * reflection.c: Set culture for assembly references.
2231         
2232 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
2233
2234         * reflection.[ch], icall.[ch], Fix support for pinning variables.
2235
2236 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2237
2238         * assembly.c:
2239         (do_mono_assembly_open): the critical section also covers
2240         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
2241
2242 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2243
2244         * threads.c:
2245         (mono_manage_threads): abort the background threads when finishing.
2246         Fixes bug #47232.
2247
2248 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2249
2250         * gc.c: only close the done_event handle if there was no timeout.
2251         C-ified comments.
2252
2253 2004-03-30  Martin Baulig  <martin@ximian.com>
2254
2255         * icall.c (icall_entries): It's called "System.Activator", not
2256         "System.Activation".    
2257
2258 2004-03-30  Martin Baulig  <martin@ximian.com>
2259
2260         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
2261         (mono_class_create_from_typespec): Likewise.
2262
2263 2004-03-30  Martin Baulig  <martin@ximian.com>
2264
2265         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
2266         `has_ctor_constraint' and `initialized'.
2267
2268 2004-03-30  Martin Baulig  <martin@ximian.com>
2269
2270         * reflection.c (encode_new_constraint): New static function to add
2271         the constructor constraint attribute to a type parameter.
2272         (encode_constraints): Call encode_new_constraint() if necessary.
2273
2274         * reflection.h
2275         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
2276
2277         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
2278         
2279 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
2280
2281         * reflection.c, icall.c: add support for pinning variables. 
2282
2283 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
2284
2285         * marshal.c (mono_marshal_get_managed_wrapper):
2286         init bool local with zero rather than null.
2287
2288 2004-03-29  Martin Baulig  <martin@ximian.com>
2289
2290         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
2291         the "official" behavior here.
2292         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
2293
2294 2004-03-29  Martin Baulig  <martin@ximian.com>
2295
2296         * icall.c: Reflect latest API changes.
2297
2298 2004-03-29  Martin Baulig  <martin@ximian.com>
2299
2300         * loader.c (mono_get_method_from_token): Also call
2301         mono_metadata_load_generic_params () for abstract and interface
2302         methods; replace the type arguments in the method signature with
2303         the ones which are loaded from the metadata.
2304
2305 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
2306
2307         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
2308         of the lock is not the current thread. MS.NET don't do it, in spite of
2309         what the documentation says. See bug #56157.
2310
2311 2004-03-28  Martin Baulig  <martin@ximian.com>
2312
2313         * class.c (mono_class_init): Don't call init_properties() and
2314         init_events() for generic instances; set `prop->parent' when
2315         inflating properties.
2316
2317         * reflection.c (mono_generic_inst_get_object): Call
2318         `mono_class_init (ginst->klass)'.
2319         (mono_type_get_object): Only create a MonoGenericInst if your
2320         generic type is a TypeBuilder.
2321         (do_mono_reflection_bind_generic_parameters): Only set
2322         `ginst->is_dynamic' if our generic type is a TypeBuilder.
2323
2324 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
2325
2326         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
2327         Fixes #56091.
2328
2329 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2330
2331         * icall.c: added Kill_internal icall.
2332         * process.[ch]: added Kill_internal icall.
2333
2334 2004-03-25  Martin Baulig  <martin@ximian.com>
2335
2336         * class.h (MonoStats): Added `generic_instance_count',
2337         `inflated_method_count', `inflated_type_count' and
2338         `generics_metadata_size'.       
2339
2340 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2341
2342         * reflection.c: no warnings now.
2343
2344 2004-03-25  Martin Baulig  <martin@ximian.com>
2345
2346         * class.c (mono_class_get_full): New public function; does a
2347         mono_class_get(), but also takes a `MonoGenericContext *'.
2348
2349         * loader.c (mono_field_from_memberref): Renamed to
2350         `field_from_memberref', made static and added `MonoGenericContext *'
2351         argument.
2352         (mono_field_from_token): Added `MonoGenericInst *' argument.
2353         (method_from_memberef): Likewise.
2354         (mono_get_method_from_token): Likewise.
2355         (mono_get_method_full): New public function; does a
2356         mono_get_method(), but also takes a `MonoGenericContext *'.
2357
2358         * verify.c (mono_method_verify): Get the method's generic context
2359         and pass it to mono_field_from_token(), mono_get_method_full() and
2360         mono_class_get_full().
2361
2362 2004-03-25  Martin Baulig  <martin@ximian.com>
2363
2364         * class.c (mono_class_inflate_generic_type): Take a
2365         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
2366         `MonoGenericMethod *'.
2367
2368 2004-03-25  Martin Baulig  <martin@ximian.com>
2369
2370         * loader.h (MonoMethodInflated): Store the MonoGenericContext
2371         instead of the MonoGenericMethod here.
2372
2373 2004-03-25  Martin Baulig  <martin@ximian.com>
2374
2375         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
2376         each time we create a new MonoGenericInst, we also create a new
2377         context which points back to us.
2378
2379         * class.c (inflate_method): Use `ginst->context' instead of
2380         creating a new context.
2381
2382         * loader.c (method_from_memberref): Use
2383         `klass->generic_inst->context' instead of creating a new context.
2384
2385 2004-03-25  Martin Baulig  <martin@ximian.com>
2386
2387         * class.h (MonoGenericContext): New struct.
2388         (MonoGenericMethod): Removed `generic_inst'.
2389
2390         * class.c (mono_class_inflate_generic_method): Take a
2391         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
2392
2393 2004-03-25  Martin Baulig  <martin@ximian.com>
2394
2395         * loader.h (MonoMethodInflated): New typedef.
2396
2397         * metadata.h (MonoMethodSignature): Removed `gen_method', make
2398         `generic_param_count' consume just 30 bits, added `is_inflated'
2399         and `has_type_parameters' flags (one bit each).
2400
2401         * class.c (mono_class_inflate_generic_method): Create a
2402         MonoMethodInflated instead of a MonoMethodNormal and set
2403         `is_inflated' in the method signature.
2404
2405         * class.h (MonoGenericMethod): Removed `generic_method'.
2406
2407 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
2408
2409         * image.c: Make sure the name of a MonoImage is always an absolute path.
2410           This fixes bug #54415.
2411
2412 2004-03-24  Martin Baulig  <martin@ximian.com>
2413
2414         * class.c (mono_class_setup_vtable): If we're a generic instance,
2415         use our generic type's vtable size.
2416
2417 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
2418
2419         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
2420         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
2421         problems.
2422
2423 2004-03-23  Martin Baulig  <martin@ximian.com>
2424
2425         * class.h (MonoDynamicGenericInst): Added `int count_events' and
2426         `MonoEvent *events'.
2427
2428         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
2429         (typebuilder_icalls): Added "get_event_info"; calls
2430         mono_reflection_event_builder_get_event_info(). 
2431
2432         * reflection.c (mono_reflection_generic_inst_initialize): Added
2433         `MonoArray *events'.
2434         (mono_reflection_event_builder_get_event_info): New function.
2435
2436 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
2437
2438         * object.h: add mono_type_initialization_init
2439
2440         * object.c (mono_runtime_class_init): 
2441         implement class constructor synchronization rules
2442         to cope with threading issues.  
2443         add mono_type_initialization_init
2444
2445         * appdomain.c (mono_runtime_init): call 
2446         mono_type_initialization_init
2447
2448         * class.h: removing initializing field from MonoVTable
2449
2450 2004-03-23  Martin Baulig  <martin@ximian.com>
2451
2452         * class.c (my_mono_class_from_generic_parameter): Use
2453         `param->name' if it's not NULL. 
2454
2455 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
2456
2457         * class.c: do not insert non-virtual methods in the vtable.
2458         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
2459         that means the method is non-virtual. This never would have
2460         happened before.
2461
2462 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
2463
2464         * profiler.c: Added lock for accessing coverage_hash.
2465
2466 2004-03-22  Martin Baulig  <martin@ximian.com>
2467
2468         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
2469         `method->method->signature->generic_param_count != 0' to make it
2470         work for interface methods.
2471
2472 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2473
2474         * process.c: quote the string passed to the shell using g_shell_quote.
2475
2476 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2477
2478         * threads.c:
2479         (mono_threads_manage): don't remove the finalizer thread and self
2480         from the threads hash table so that mono_thread_manage can be called
2481         more than once.
2482
2483 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2484
2485         * process.c: quote the arguments when UseShellExecute is true. Fixes
2486         bug #55790.
2487
2488 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2489
2490         * threads.c: set mono_thread_detach as a cleanup routine for every
2491         thread. This way it's always executed upon thread termination, either
2492         aborted or finished normally. No more xsp hangs!
2493
2494 2004-03-17  Martin Baulig  <martin@ximian.com>
2495
2496         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
2497         `int count_nested' and a `MonoType **nested'.
2498
2499         * reflection.c (mono_reflection_bind_generic_parameters): Moved
2500         most of the functionality into a new static
2501         do_mono_reflection_bind_generic_parameters() and don't take a
2502         `MonoType *nested_in' argument any more.  Don't compute nested
2503         types here.
2504         (mono_reflection_generic_inst_get_nested_types): New public method
2505         to get nested types.
2506
2507         * class.c (mono_class_create_generic): Set `klass->nested_in' if
2508         we're a nested class.
2509
2510         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
2511         mono_reflection_generic_inst_get_nested_types() to compute the
2512         nested types.
2513
2514 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2515
2516         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
2517         descriptive error message under windows.
2518         
2519 2004-03-17  Martin Baulig  <martin@ximian.com>
2520
2521         * class.c (dup_type): Added `const MonoType *original' argument;
2522         copy the attrs from the original type.
2523
2524 2004-03-17  Martin Baulig  <martin@ximian.com>
2525
2526         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
2527         `m->generic_inst_cache' here.
2528
2529 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2530
2531         * exception.h exception.c: Add stack_overflow_exception.
2532
2533 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2534
2535         * threadpool.c:
2536         (overlapped_callback): call SetEvent *after* invoking the callback.
2537         No need to call CloseHandle.
2538
2539 2004-03-16  Martin Baulig  <martin@ximian.com>
2540
2541         * reflection.c (mono_image_get_fieldref_token): Take a
2542         `MonoReflectionField *' instead of a `MonoClassField *' and a
2543         `MonoClass *'; store the `MonoReflectionField *' in the hash.
2544
2545 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2546
2547         * appdomain.c: don't add the culture to the filename we're looking for
2548         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
2549
2550 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2551
2552         * locales.c: don't ignore symbols when doing case insensitive compares.
2553         Thanks Dick! Fixes bug #54046.
2554
2555         * threads.c: surround 'threads' usage with enter/leave in
2556         mono_thread_manage.
2557
2558 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
2559
2560         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
2561         implicitly marshalled as [Out]. Fixes #55450.
2562
2563         (mono_marshal_get_runtime_invoke): Zero out the result if there is
2564         an exception.
2565
2566 2004-03-16  Martin Baulig  <martin@ximian.com>
2567
2568         * class.c (mono_class_from_generic_parameter): Use the actual
2569         parameter name. 
2570
2571 2004-03-16  Martin Baulig  <martin@ximian.com>
2572
2573         * reflection.c (type_get_signature_size): New static function.
2574         Compues the size of the type in a method signature.
2575         (method_get_signature_size): New static function; calls
2576         type_get_signature_size() to compute the actual size of the
2577         method's signature.
2578         (method_encode_signature): Use method_get_signature_size() to get
2579         the signature's size rather than using `nparams * 10'.
2580
2581 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2582
2583         * file-io.h: define here WapiOverlapped on windows. I don't want the
2584         regular OVERLAPPED one.
2585
2586         * file-io.c:
2587         * threadpool.c: somehow, BindIoCompletionCallback is not found.
2588         Disabling AIO on windows.
2589
2590 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2591
2592         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
2593         bug #55385.
2594
2595 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2596
2597         * appdomain.c: upgraded corlib version.
2598
2599         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
2600         and BeginWrite. Allow opening files for asynchrnous operations.
2601
2602         * file-io.h: new struct that maps FileStreamAsyncResult.
2603         * icall.c: added new icalls.
2604         * process.[ch]: support setting child process environment variables
2605         and use the SHELL or COMSPEC when UseShellExecute is true.
2606
2607         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
2608         callback for async. IO is here and also BindHandle.
2609
2610         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
2611         from here.
2612
2613 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
2614
2615         * reflection.c (create_custom_attr): Allow len == 0.
2616
2617         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
2618         computation on big-endian machines.
2619
2620 2004-03-13  Martin Baulig  <martin@ximian.com>
2621
2622         * class.h (MonoGenericInst): Added `int count_ifaces'.
2623
2624         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
2625         `ginst->count_ifaces' instead `klass->interface_count' since we
2626         may get called before the vtable is created.
2627
2628         * loader.c (mono_method_get_param_names): If we're a generic
2629         instance, return and don't initialize the class.
2630
2631         * reflection.c (mono_reflection_setup_generic_class): Don't call
2632         ensure_runtime_vtable().
2633         (mono_reflection_bind_generic_parameters): Set
2634         `ginst->count_ifaces'.
2635
2636 2004-03-11  Jackson Harper <jackson@ximian.com>
2637
2638         * icall.c:
2639         * unicode.c:
2640         * unicode.h: Remove unused System.Char icalls.
2641         
2642 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
2643
2644         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
2645         code when we P/Invoke the first library in Windows.Forms, instead
2646         of when we first open the assembly.
2647
2648         * assembly.c: Drop the lookup from here.
2649
2650 2004-03-10  Martin Baulig  <martin@ximian.com>
2651
2652         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
2653         class for properties, fields and events.  Finally fixes #54945.
2654
2655 2004-03-10  Martin Baulig  <martin@ximian.com>
2656
2657         * metadata.c (mono_metadata_class_equal): New static function;
2658         checks whether two generic instances or two generic parameters are
2659         equal.
2660         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
2661         compare classes.        
2662
2663 2004-03-10  Martin Baulig  <martin@ximian.com>
2664
2665         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
2666
2667         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
2668         argument and write it into the `reflection_info' field.
2669
2670         * icall.c
2671         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
2672         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
2673
2674 2004-03-09  Jackson Harper  <jackson@ximian.com>
2675
2676         * char-conversions.h: use 8 bits for numeric data its all we need
2677         * icall.c: numeric data is only 8 bits now.
2678
2679 2004-03-09  Martin Baulig  <martin@ximian.com>
2680
2681         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
2682
2683         * class.c (init_properties, init_events): Initialize the new
2684         `parent' field.
2685
2686         * reflection.c (typebuilder_setup_properties): Likewise.
2687         (typebuilder_setup_events): Likewise.
2688
2689         * reflection.h (MonoEventInfo): Replaced `parent with
2690         `declaring_type' and `reflected_type'.
2691
2692         * icall.c (ves_icall_get_property_info): Distinguish between
2693         declaring and reflected type.
2694         (ves_icall_get_event_info): Likewise.
2695
2696 2004-03-09  Martin Baulig  <martin@ximian.com>
2697
2698         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
2699         (ves_icall_Type_GetField): Correctly set field->klass.
2700
2701 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
2702
2703         * loader.h: Fix warning.
2704
2705 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
2706
2707         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
2708         library routine if present.  Notice that it will still continue
2709         executing even if its missing, for those working on the Gtk#
2710         edition of Windows.Forms.
2711
2712         * assembly.c (do_mono_assembly_open): If loading the
2713         System.Windows.Forms call mono_loader_wini_init.
2714
2715 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
2716
2717         * class.h: Added MonoRemoteClass struct.
2718         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
2719         function for MonoStrings.
2720         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
2721         Added internal call for getting the proxy type.
2722         * marshal.c: Get the type of transparent proxies from its remote_class.
2723         Added methods that generate the IL for type checks and casts:
2724         mono_marshal_get_isinst, mono_marshal_get_castclass, 
2725         mono_marshal_get_proxy_cancast.
2726         * marshal.h: Declaration of the previous new methods.
2727         * object.c: Added new moethods for creating and updating MonoRemoteClass
2728         instances: mono_remote_class, mono_upgrade_remote_class, 
2729         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
2730         * verify.c: FIx transparent_proxy_fields layout.
2731         * appdomain.c: Bump corlib version.
2732
2733 2004-03-04  Jackson Harper  <jackson@ximian.com>
2734
2735         * icall.c: Add icall to access char conversion tables.
2736         * char-conversions.h: Character conversion tables.
2737         * Makefile.am: Add char-conversions.h private header file.
2738         
2739 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
2740
2741         * appdomain.c (unload_thread_main): Increase unloading timeout to
2742         10 sec as a temporary workaround for Nant problems.
2743
2744 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
2745
2746         * gc.c: Add checks for GC_enable and GC_disable.
2747
2748         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
2749         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
2750         (bug #54988).
2751         
2752 2004-02-27  Martin Baulig  <martin@ximian.com>
2753
2754         * reflection.c (mono_reflection_bind_generic_parameters): Take a
2755         `MonoReflectionType *' instead of a `MonoType *'.
2756
2757 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
2758
2759         * gc.c (run_finalize): Avoid finalizing the object representing the
2760         finalizer thread.
2761         (finalizer_thread): Fix warning.
2762
2763 2004-02-25  Martin Baulig  <martin@ximian.com>
2764
2765         * class.c (_mono_class_get_instantiation_name): Added `int offset'
2766         argument for nested types.
2767         (mono_class_create_generic): Added support for nested generictypes.
2768
2769         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
2770         `GList *nested'.
2771
2772         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
2773
2774         * reflection.c (method_encode_signature): Increase the minimum
2775         value of `size' from 10 to 11.
2776         (mono_reflection_bind_generic_parameters): Take `int type_argc'
2777         and `MonoType **types' arguments instead of the `MonoArray
2778         *types'; added `MonoType *nested_in'.  Recursively instantiate
2779         nested classes. 
2780
2781 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
2782
2783         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
2784         stack_overflow_ex members which are used by exception handling.
2785
2786         * appdomain.c (mono_runtime_init): Initialize the new members.
2787
2788         * gc.c (mono_gc_enable): New helper function.
2789         * gc.c (mono_gc_disable): New helper function.
2790
2791 2004-02-23  Martin Baulig  <martin@ximian.com>
2792
2793         * icall.c: I must have been really stupid - make it actually work
2794         this time ;-)
2795
2796 2004-02-23  Martin Baulig  <martin@ximian.com>
2797
2798         * loader.c (method_from_memberref): Only inflate the method if
2799         it's in another klass.
2800
2801 2004-02-23  Martin Baulig  <martin@ximian.com>
2802
2803         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
2804         (mono_class_init): If we're a generic instance and an interface,
2805         compute `class->interface_id'; also create `class->interfaces'
2806         here and inflate them.
2807
2808         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
2809         `ginst->is_open'.
2810         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
2811
2812         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
2813
2814 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
2815
2816         * reflection.c (method_encode_code): Improved the error message
2817         generated by the exception.
2818
2819 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2820
2821         * icall.c: Martin did not do what he said in the ChangeLog for
2822         2004-02-18, but put back the changes for properties and events.
2823         Commenting those changes out again and adding comment to bug #54518.
2824         
2825         * process.c: removed warning.
2826
2827 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
2828
2829         * marshal.c (emit_struct_conv): Print an error message instead of
2830         asserting when a type does not have the StructLayout attribute.
2831
2832 2004-02-20  Martin Baulig  <martin@ximian.com>
2833
2834         * reflection.c (mono_type_get_object): Also use the cache for
2835         generic instances.
2836         (mono_reflection_bind_generic_parameters): Always compute
2837         `ginst->ifaces'.        
2838
2839 2004-02-20  Martin Baulig  <martin@ximian.com>
2840
2841         * class.h (MonoGenericMethod): Removed `klass'.
2842
2843         * class.c (mono_class_inflate_generic_method): Added `MonoClass
2844         *klass' argument.
2845
2846 2004-02-20  Martin Baulig  <martin@ximian.com>
2847
2848         * reflection.c (method_encode_methodspec): Actually use the
2849         uninflated signature for the memberref.
2850
2851 2004-02-20  Martin Baulig  <martin@ximian.com>
2852
2853         * class.h (MonoGenericMethod): Removed `declaring'.
2854
2855         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
2856         is NULL, compute it here.
2857
2858 2004-02-20  Martin Baulig  <martin@ximian.com>
2859
2860         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
2861
2862         * metadata.c (mono_metadata_generic_inst_hash): New method.
2863         (mono_metadata_generic_inst_equal): New method.
2864
2865         * reflection.c (mono_reflection_bind_generic_parameters): Use the
2866         `klass->image->generic_inst_cache' cache to avoid creating
2867         duplicate MonoGenericInst's.
2868
2869         * class.c (mono_class_inflate_generic_type): Use the cache.
2870
2871 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
2872
2873         * object.c: fixed gc descriptor calculation for embedded valuetypes.
2874
2875 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2876
2877         * icall.c: added Socket.WSAIoctl icall.
2878
2879         * socket-io.[ch]: implemented
2880         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
2881
2882 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
2883
2884         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
2885
2886 2004-02-18  Urs C Muff  <umuff@quark.com>
2887
2888         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
2889         this work on PPC and other big-endian architectures.
2890
2891         * debug-mono-symfile.h: Prepended the names of all the `guint32'
2892         fields with an underscore to make sure they're only accessed by
2893         the read32() macro.
2894
2895 2004-02-18  Martin Baulig  <martin@ximian.com>
2896
2897         * icall.c: Put the klass->refclass changes back for methods and
2898         fields, but not for properties and events.  We're currently not
2899         distinguishing between DeclaringType and ReflectedType for
2900         properties and events, that's what caused the regressions.
2901
2902 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2903
2904         * object.c:
2905         (mono_async_result_new): the handle can be NULL.
2906
2907         * threadpool.c: Use an event instead of a semaphore, don't initialize
2908         it until needed. This saves quite a few semaphores from being created
2909         when using the threadpool.
2910
2911 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
2912
2913         * object.c (mono_string_is_interned_lookup): Fix interning of long
2914         strings. Fixes #54473.
2915
2916         * domain.c (ldstr_equal): Optimize if the two strings are equal.
2917
2918         * icall.c: Revert the klass->refclass changes since they introduce
2919         regressions (bug #54518).
2920
2921 2004-02-18  Martin Baulig  <martin@ximian.com>
2922
2923         * class.c (mono_class_init): If we're a generic instance and don't
2924         come from a TypeBuilder, inflate our members here.
2925         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
2926         (mono_class_create_generic): New public method.
2927         (mono_class_initialize_generic): Removed.
2928         (get_instantiation_name): Renamed to
2929         _mono_class_get_instantiation_name() and made it public.
2930
2931 2004-02-18  Martin Baulig  <martin@ximian.com>
2932
2933         * class.c (mono_class_inflate_generic_type): Clear the new
2934         instance's `nginst->klass' when inflating a generic instance.
2935         (mono_class_is_subclass_of): Added (basic) support for generic
2936         instances.
2937
2938 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
2939
2940         * appdomain.h, domain.c: use a MonoCodeManager instead of a
2941         MonoMempool to hold compiled native code.
2942
2943 2004-02-17  Martin Baulig  <martin@ximian.com>
2944
2945         * class.h (MonoDynamicGenericInst): Added `count_properties' and
2946         `properties'.
2947
2948         * reflection.c (mono_reflection_generic_inst_initialize): Added
2949         `MonoArray *properties' argument.
2950
2951         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
2952
2953 2004-02-17  Martin Baulig  <martin@ximian.com>
2954
2955         * icall.c (ves_icall_Type_GetFields): Renamed to
2956         ves_icall_Type_GetFields_internal() and added a
2957         `MonoReflectionType *rtype' argument; pass it to
2958         mono_field_get_object() to set the field's "reflected" type.
2959         (ves_icall_Type_GetConstructors): Likewise.
2960         (ves_icall_Type_GetEvents): Likewise.
2961         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
2962         argument; pass it to mono_method_get_object() to set the method's
2963         "reflected" type.       
2964
2965 2004-02-17  Martin Baulig  <martin@ximian.com>
2966
2967         * class.h (MonoDynamicGenericInst): New type.
2968         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
2969
2970         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
2971         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
2972         (ves_icall_MonoGenericInst_GetFields): New interncall.
2973
2974         * class.c (mono_class_from_generic): Don't call
2975         mono_class_initialize_generic() if this is a dynamic instance;
2976         ie. it's being created from a TypeBuilder.
2977         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
2978         `class->byval_arg.type'.
2979
2980         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
2981         to `inflate_method' and made static.
2982         (mono_reflection_inflate_field): Removed.
2983         (mono_reflection_generic_inst_initialize): New public method.
2984
2985         * reflection.h (MonoReflectionGenericInst): Removed `methods',
2986         `ctors' and `fields'; added `initialized'.
2987
2988 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
2989
2990         * debug-helpers.c (mono_method_full_name): Fix output for empty
2991         namespaces.
2992
2993 2004-02-12  Martin Baulig  <martin@ximian.com>
2994
2995         * class.h (MonoClassField): Added `MonoType *generic_type'.
2996
2997         * reflection.c (mono_image_get_fieldref_token): Added support for
2998         instantiated generic types.
2999         (field_encode_inflated_field): Removed.
3000         (mono_image_get_inflated_field_token): Removed.
3001         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
3002
3003         * reflection.h (MonoReflectionInflatedField): Removed.
3004
3005 2004-02-12  Martin Baulig  <martin@ximian.com>
3006
3007         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
3008         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
3009
3010         * reflection.c (mono_image_get_methodspec_token): Take a
3011         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
3012         (mono_image_create_token): Check whether we have a
3013         `method->signature->gen_method' and call
3014         mono_image_get_methodspec_token() if appropriate.
3015         (inflated_method_get_object): Removed.
3016         (mono_reflection_bind_generic_method_parameters): Return a
3017         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
3018         (mono_reflection_inflate_method_or_ctor): Likewise.
3019
3020         * reflection.h (MonoReflectionInflatedMethod): Removed.
3021
3022 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
3023
3024         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
3025         for custom valuetype marshalling.
3026
3027         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
3028
3029 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3030
3031         * icall.c: fixed WSAGetLastError_internal name.
3032
3033 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
3034
3035         * threads.c (mono_thread_attach): Allow this to be called multiple
3036         times for a thread.
3037         
3038         * threads.c (build_wait_tids): Do not wait for ourselves.
3039
3040         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
3041         appdomain list is empty.
3042
3043         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
3044         memory returned by mono_string_builder_to_utf16, since it points into
3045         managed memory. Thanks to Bernie Solomon for noticing this.
3046
3047         * icall.c: Add AppDomainSetup icalls.
3048
3049         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
3050
3051         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
3052         types.
3053
3054         * reflection.c (reflection_methodbuilder_to_mono_method): Save
3055         custom attributes to the method_aux struct. Also fix array indexes etc.
3056
3057         * loader.c (mono_method_get_param_names): Make dynamic case work again.
3058         
3059 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
3060
3061         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
3062         (both static and runtime) and reduce startup time.
3063
3064 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
3065
3066         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
3067         AsAny marshalling conversion instead of crashing.
3068
3069         * marshal.c: Fix warnings.
3070
3071 2004-02-09  Martin Baulig  <martin@ximian.com>
3072
3073         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
3074
3075         * reflection.h (MonoReflectionInflatedMethod): Removed the
3076         `declaring' field, it's now in the unmanaged MonoGenericMethod.
3077
3078         * reflection.c (method_encode_methodspec): Removed the `method'
3079         argument; we get it from `gmethod->declaring'.
3080         (inflated_method_get_object): Removed the `declaring' argument.
3081
3082 2004-02-09  Martin Baulig  <martin@ximian.com>
3083
3084         * class.h (MonoGenericMethod): New type.
3085         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
3086         `generic_method'.
3087
3088         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
3089         a `MonoGenericMethod *gen_method' one.
3090
3091         * class.c (mono_class_inflate_generic_type): Take an additional
3092         `MonoGenericMethod * argument.  This is only non-NULL if we're
3093         inflating types for a generic method.   
3094         (mono_class_inflate_generic_signature): Renamed to
3095         inflate_generic_signature() and made static; take a
3096         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3097         (inflate_generic_header): Take a `MonoGenericMethod *' argument
3098         instead of a `MonoGenericInst *' one.
3099         (mono_class_inflate_generic_method): Likewise.
3100
3101         * reflection.c (encode_generic_method_sig): Take a
3102         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3103         (method_encode_methodspec): Likewise.
3104         (inflated_method_get_object): Likewise. 
3105
3106         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
3107         field with a `MonoGenericMethod *gmethod' one.  
3108
3109 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
3110
3111         * class.h (mono_class_has_parent): add parens to expansion
3112         so you can ! this.
3113
3114 2004-02-08  Martin Baulig  <martin@ximian.com>
3115
3116         * image.h (MonoImage): Removed `generics_cache'.
3117
3118         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
3119         instead of a `MonoType *' argument; removed the `inflate_methods'
3120         argument.  Don't inflate methods here.
3121
3122         * loader.c (find_method): If it's a generic instance, call
3123         mono_class_init() on the `sclass->generic_inst->generic_type'.
3124
3125         * metadata.c (mono_type_size): Make this work on uninitialized
3126         generic instances; call it on the `ginst->generic_type's class.
3127
3128         * reflection.c (mono_reflection_bind_generic_parameters): Call
3129         mono_class_from_generic() to create the `ginst->klass'.
3130
3131 2004-02-08  Martin Baulig  <martin@ximian.com>
3132
3133         * class.h (MonoClass): Changed type of `generic_inst' from
3134         `MonoType *' to `MonoGenericInst *'.
3135
3136 2004-02-08  Martin Baulig  <martin@ximian.com>
3137
3138         * icall.c (ves_icall_Type_BindGenericParameters): Just call
3139         mono_type_get_object(), this is now creating a `MonoGenericInst'
3140         for MONO_TYPE_GENERICINST.
3141         (ves_icall_MonoGenericInst_GetParentType): Likewise.
3142         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3143
3144         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
3145         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
3146         (inflated_method_get_object): Added `MonoClass *refclass' argument.
3147         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
3148         and reflected type.
3149
3150         * reflection.h (MonoReflectionInflatedMethod): Removed
3151         `declaring_type' and `reflected_type'.
3152
3153 2004-02-08  Martin Baulig  <martin@ximian.com>
3154
3155         * class.h (MonoGenericInst): Added `MonoType *parent' and
3156         `MonoType **ifaces'.
3157
3158         * reflection.h (MonoReflectionGenericInst): Removed `klass',
3159         `parent' and `interfaces'.
3160
3161         * reflection.c (mono_reflection_bind_generic_parameters): Take a
3162         `MonoType *' argument and return a `MonoType *'.
3163
3164         * icall.c
3165         (ves_icall_MonoGenericInst_GetParentType): New interncall.
3166         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
3167
3168 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
3169
3170         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
3171         valuetype marshalling.
3172
3173 2004-02-06  Martin Baulig  <martin@ximian.com>
3174
3175         * class.c
3176         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
3177         (my_mono_class_from_generic_parameter): Likewise.
3178
3179 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
3180
3181         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
3182         contents of the symbol files lazily.
3183
3184         * object.h (MonoThread): Add 'name' and 'name_len' fields.
3185
3186         * threads.h threads.c icall.c: New icalls for getting and setting the
3187         threads name.
3188
3189 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
3190
3191         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
3192         Raise an exception when the domain is not found.
3193
3194 2004-02-03  Martin Baulig  <martin@ximian.com>
3195
3196         * reflection.c (mono_image_get_methodspec_token): Use the
3197         uninflated signature; fixes gen-33.
3198
3199 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
3200
3201         * gc.c threads.c: Make the finalizer thread a normal managed thread so
3202         the finalizer code can use thread functionality.
3203
3204         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
3205         the finalizer thread.
3206
3207         * threads.c: Make some functions more robust.
3208
3209         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
3210
3211         * metadata.h: Add new marshalling conventions.
3212
3213         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
3214         stringbuilder marshalling. Fixes #53700.
3215
3216         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
3217
3218         * reflection.c (mono_image_get_type_info): Save declarative security
3219         info.
3220
3221         * reflection.c (mono_image_get_field_info): Handle uninitialized 
3222         unmanaged fields as well.
3223
3224         * appdomain.c: Bump corlib version.
3225
3226 2004-02-01  Martin Baulig  <martin@ximian.com>
3227
3228         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
3229         method type arguments.  
3230
3231 2004-01-30  Duncan Mak  <duncan@ximian.com>
3232
3233         * marshal.h: Add prototype for
3234         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
3235         and
3236         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
3237         fix the build.
3238
3239 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
3240
3241         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
3242         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
3243
3244 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
3245
3246         * marshal.c (mono_marshal_get_native_wrapper): Add support for
3247         custom marshalling of valuetypes.
3248
3249         * marshal.c: Fix some warnings.
3250
3251 2004-01-29  Martin Baulig  <martin@ximian.com>
3252
3253         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
3254         for generic method parameters.
3255
3256         * reflection.c (method_encode_methodspec): Write the uninflated
3257         signature into the methodspec table.
3258         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
3259         is always the uninflated method.
3260         (reflection_methodbuilder_to_mono_method): Copy the generic
3261         parameters from the MethodBuilder into `header->gen_params'.
3262
3263 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
3264
3265         * class.c (mono_class_from_generic_parameter): Fix warning.
3266
3267 2004-01-27  Martin Baulig  <martin@ximian.com>
3268
3269         * class.c (mono_class_from_generic_parameter): Don't create
3270         `klass->methods' here.  
3271
3272 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
3273
3274         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
3275         extension since it does not work with libraries named lib<FOO>.dll.so.
3276
3277 2004-01-25  Martin Baulig  <martin@ximian.com>
3278
3279         * class.c (mono_class_inflate_generic_type): Added support for
3280         MONO_TYPE_GENERICINST.
3281
3282         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
3283         inflate methods on open constructed types.      
3284
3285 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3286
3287         * object.c: fire ProcessExit event in the root AppDomain after running
3288         Main. Fixes bug #53299.
3289
3290 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
3291
3292         * socket-io.c: include the new socket-wrappers.h header.
3293         Use the wrappers instead of the unix socket functions to make the code
3294         more clear.
3295
3296 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
3297
3298         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
3299
3300         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3301         Fixes #22532.
3302
3303 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
3304
3305         * reflection.c (mono_image_create_pefile): Handle the case when the
3306         entry point is not a MethodBuilder.
3307
3308         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3309         field to ReflectionMethod since it is not allways a builder.
3310
3311         * reflection.c (type_get_fully_qualified_name): New helper function to
3312         return the fully qualified name of a type.
3313
3314         * reflection.c (encode_marshal_blob): Always emit the fully qualified
3315         type name for custom marshallers.
3316
3317         * reflection.c (mono_marshal_spec_from_builder): Ditto.
3318
3319         * class.c (mono_class_setup_vtable): If a parent class already 
3320         implements an interface, use the implementing methods from that class.
3321         Fixes #53148.
3322
3323 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3324
3325         * threadpool.c: just return instead of ExitThread to allow for thread
3326         clean up earlier.
3327
3328 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
3329
3330         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
3331         when closing resource modules.
3332
3333         * reflection.c (mono_image_create_pefile): Handle the case when the
3334         entry point is not a MethodBuilder.
3335
3336         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3337         field to ReflectionMethod since it is not allways a builder.
3338
3339 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
3340
3341         * marshal.c (mono_marshal_get_managed_wrapper): 
3342         mono_marshal_alloc takes native int so CONV_I
3343         the arg for 64bits.
3344
3345 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
3346
3347         * reflection.c (fixup_cattrs): New function to fixup the methoddef
3348         tokens in the cattr table. Fixes #53108.
3349
3350 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3351
3352         * loader.c: don't trim ".dll" before looking up in the config file.
3353         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
3354
3355 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
3356
3357         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
3358         Return the module which contains the resource as well.
3359         (ves_icall_System_Reflection_Module_Close): New icall.
3360
3361         * appdomain.c: Bump corlib version number.
3362
3363         * image.c (mono_image_addref): New public function.
3364
3365         * assembly.c: Call mono_image_addref.
3366
3367         * reflection.c (mono_module_get_object): Increase reference count of 
3368         the image.
3369
3370         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3371         Fixes #22532.
3372
3373         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
3374         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
3375         proper exceptions on DllImport problems.
3376
3377 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
3378
3379         * class.c, metadata.c: eliminate CSIZE macro.
3380
3381 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
3382
3383         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
3384         * object.h: Added async_callback field in MonoAsyncResult.
3385         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
3386         * verify.c: Added async_callback in MonoAsyncResult layout.
3387
3388 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
3389
3390         * reflection.c (mono_reflection_get_custom_attrs): Add support
3391         for Modules.
3392
3393 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
3394
3395         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
3396         marshalling.
3397         (mono_marshal_method_from_wrapper): Add null pointer check.
3398
3399 2004-01-16  Martin Baulig  <martin@ximian.com>
3400
3401         * debug-mono-symfile.h: Set version number to 36 and reflect
3402         latest symbol writer changes.
3403
3404 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
3405
3406         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
3407         multi-dimensional arrays.
3408         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
3409         (mono_class_from_mono_type): Use bounded_array_class_get.
3410         
3411         * class.c (mono_bounded_array_class_get): New function which takes
3412         a 'bounded' bool argument to distinguish vectors from one dimensional
3413         arrays.
3414
3415         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
3416         bounded_array_class_get if the array has bounds.
3417
3418         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
3419         Search modules loaded using AssemblyBuilder:AddModule as well.
3420
3421 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3422
3423         * appdomain.c: increased corlib version.
3424         * filewatcher.c: removed g_print.
3425         * icall.c:
3426         (get_property_info): only allocate what is actually requested.
3427         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
3428
3429 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3430
3431         * Makefile.am: added filewatcher.[ch]
3432         * filewatcher.[ch]: FileSystemWatcher runtime support.
3433         * icall.c: added new FSW icalls.
3434
3435 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3436
3437         * string-icalls.c: fix stringbuilder regression as suggested by
3438         Iain McCoy <iain@mccoy.id.au>.
3439
3440 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
3441
3442         * process.c (process_read_stringtable_block): Recognize '007f' as
3443         a language neutral stringtable block.
3444
3445 2004-01-12  Patrik Torstensson
3446
3447         * object.h (MonoStringBuilder) : Changed layout to support our
3448         new stringbuilder class.
3449         * marshal.c: Change marshalling to support the new layout of 
3450         string builder.
3451         * appdomain.c: increased version number because new layout of
3452         string builder.
3453
3454 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
3455
3456         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
3457         assembly name as an string instead of an AssemblyName, since it is
3458         easier to extract info from it.
3459
3460         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
3461         the culture subdirectories too. Fixes #52231.
3462
3463 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3464
3465         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
3466         It takes 2 new parameters with an optional name for the method to look
3467         for and case ignoring info.
3468
3469         * threadpool.c: removed unused variable.
3470
3471 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3472
3473         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
3474         It takes 2 new parameters with an optional name for the property to look
3475         for and case ignoring info.
3476         Fixes bug #52753.
3477
3478 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
3479
3480         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
3481         Fix #52451.
3482
3483 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3484
3485         * appdomain.c:
3486         * assembly.c: escape the uri before passing it to g_filename_from_uri.
3487         Fixes bug #52630.
3488
3489 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
3490
3491         * reflection.c: Add support for more than one unmanaged resource.
3492
3493         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
3494         in field->def_value, as done in all other cases.
3495
3496         * reflection.c (mono_reflection_get_custom_attrs): Add support for
3497         TypeBuilders.
3498
3499         * reflection.c (mono_reflection_create_runtime_class): Remove 
3500         errorneous assignment to klass->element_class, since it is already
3501         done in mono_reflection_setup_internal_class.
3502
3503 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3504
3505         * gc.c: added missing LeaveCriticalSection.
3506         * icall.c: indented a couple of lines.
3507         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
3508         if we call EndInvoke inside a callback. Fixes bug #52601.
3509
3510 2004-01-07  Martin Baulig  <martin@ximian.com>
3511
3512         * mono-debug-debugger.h
3513         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
3514
3515 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
3516
3517         * appdomain.c: Use messages in NotImplementedException.
3518
3519         * exception.c (mono_get_exception_not_implemented): Now this takes
3520         a message argument.
3521
3522         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
3523         exception instead of g_asserting an aborting when something is not
3524         implemented.
3525
3526         Add some inline docs.
3527
3528 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
3529
3530         * reflection.h: Update after changes to object layout.
3531
3532         * reflection.c: Implement saving of unmanaged aka win32 resources.
3533
3534         * appdomain.c: Bump version number.
3535
3536         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
3537         Handle missing domains gracefully.
3538
3539 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
3540
3541         * file-io.c : On Windows, there are much more invalid_path_chars.
3542
3543 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
3544
3545         * class.h, object.c: prepare for GetType () speedup.
3546
3547 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
3548
3549         * profiler.c: workaround for --profile null reference exception on
3550           cygwin. Patch by Patrik Torstensson.
3551
3552 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
3553
3554         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
3555         make work for unaligned access.
3556
3557 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
3558
3559         * class.c: small cleanup (class->fields [i] -> field).
3560         * image.c: check address of metadata is valid.
3561
3562 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
3563
3564         * assembly.h assembly.c (mono_assembly_loaded): New public function to
3565         search the list of loaded assemblies.
3566
3567         * reflection.c (mono_reflection_type_from_name): Use 
3568         mono_assembly_loaded instead of mono_image_loaded.
3569
3570         * reflection.c: Fix warnings.
3571
3572 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
3573
3574         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
3575         is dynamic. This is needed since an assembly can contain both dynamic and
3576         non-dynamic images.
3577
3578         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
3579         assembly->dynamic.
3580
3581         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
3582
3583         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
3584         to store modules loaded using AddModule.
3585
3586         * reflection.c (mono_image_fill_file_table): Generalize this so it works
3587         on Modules.
3588
3589         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
3590
3591         * reflection.c (mono_image_fill_export_table_from_module): New function to
3592         fill out the EXPORTEDTYPES table from a module.
3593
3594         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
3595         into a separate function. Also handle loaded non-dynamic modules.
3596
3597         * reflection.c (mono_image_basic_init): Fix memory allocation.
3598
3599         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3600
3601         * assembly.c (mono_assembly_load_references): Make this public.
3602
3603 2003-12-19  Martin Baulig  <martin@ximian.com>
3604
3605         * class.c (mono_class_initialize_generic): Made this static, take
3606         a `MonoGenericInst *' instead of a `MonoClass *'.
3607         (mono_class_from_generic): Call mono_class_initialize_generic()
3608         unless we're already initialized or being called from
3609         do_mono_metadata_parse_generic_inst().
3610
3611         * class.h (MonoGenericInst): Added `initialized' and
3612         `init_pending' flags.
3613
3614         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
3615         `mono_class_init (gklass)' or mono_class_initialize_generic()
3616         here; set `generic_inst->init_pending' while parsing the
3617         `type_argv'.
3618
3619 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
3620
3621         * locales.c: include string.h for memxxx prototypes
3622
3623 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
3624
3625         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
3626         constructor when accessing literal fields.
3627
3628 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
3629
3630         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3631
3632         * reflection.c (assembly_add_resource_manifest): New function to fill
3633         the MANIFESTRESOURCE table.
3634
3635         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
3636
3637         * reflection.h: Update to changes in class layout.
3638
3639         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
3640         Reenable call to mono_runtime_is_shutting_down ().
3641
3642         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
3643         determine if the runtime is shutting down.
3644
3645 2003-12-16  Jackson Harper <jackson@ximian.com>
3646
3647         * icall.c: comment out call to mono_runtime_is_shutting_down to
3648         fix build.
3649         
3650 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
3651
3652         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
3653         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
3654
3655 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
3656
3657         * reflection.c: move definition of swap_with_size
3658         to before its first call
3659
3660 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
3661
3662         * appdomain.c (mono_runtime_is_shutting_down): New public function.
3663
3664         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
3665         icall.
3666
3667         * object.c: Fix warnings.
3668
3669         * icall.c (ves_icall_Type_Get...): Only consider inherited static
3670         members if FlattenHierarchy is set.
3671
3672         * reflection.c (mono_image_add_decl_security): New function to emit
3673         declarative security.
3674
3675         * reflection.h reflection.c: Add support for declarative security.
3676
3677         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3678         
3679 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
3680
3681         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3682         
3683         * appdomain.c verify.c: Moved corlib version checking into its own
3684         function in appdomain.c since it needs to create vtables etc.
3685
3686 2003-12-13  Patrik Torstensson <p@rxc.se>
3687
3688         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
3689         instead of unwrapped server.
3690
3691 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
3692
3693         * verify.c (check_corlib): Fix field index.
3694
3695 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
3696
3697         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
3698         GetGacPath icall.
3699
3700 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
3701
3702         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
3703         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
3704         cope with sizeof(size_t) != sizeof(guint32).
3705
3706 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3707
3708         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
3709         in case of failure.
3710
3711 2003-12-10  Mark Crichton <crichton@gimp.org>
3712
3713         * icall.c: removed the GetNonZeroBytes.  We now handle this case
3714         in managed code.
3715
3716         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
3717
3718 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
3719
3720         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
3721         marked as deleted.
3722
3723 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
3724
3725         * verify.c (check_corlib): Handle the case when the version field is 
3726         initialized by a static constructor.
3727
3728 2003-12-08  Patrik Torstensson  <p@rxc.se>
3729
3730     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
3731
3732 2003-12-08  Martin Baulig  <martin@ximian.com>
3733
3734         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
3735         a MonoReflectionGenericParameter, also take the parameter index
3736         and name as arguments.
3737         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
3738         (ves_icall_MonoGenericParam_initialize): New interncall.
3739         (ves_icall_Type_make_byref_type): New interncall.
3740
3741         * reflection.h (MonoReflectionGenericParam): Derive from
3742         MonoReflectionType, not just from MonoObject.  Added `refobj' and
3743         `index' fields.
3744
3745         * reflection.c (mono_reflection_define_generic_parameter): Create
3746         and return a new MonoReflectionGenericParam; don't initialize the
3747         constraints here.
3748         (mono_reflection_initialize_generic_parameter): New public method;
3749         initializes the constraints and creates the `param->pklass'.
3750
3751 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
3752
3753         * reflection.h reflection.c: Use the new fields 'num_types', 
3754         'num_fields' and 'num_methods' to track the number of types etc.
3755
3756         * verify.c (check_corlib): Check corlib version number.
3757
3758 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
3759
3760         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
3761         function works on all methods.
3762
3763 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
3764
3765         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
3766         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
3767         the custom_type_info flag of the transparent proxy.
3768         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
3769         objects that supports IRemotingTypeInfo.
3770         * object.h: Added custom_type_info field in transparent proxy.
3771
3772 2003-12-06  Martin Baulig  <martin@ximian.com>
3773
3774         * class.c (mono_class_create_from_generic): Removed.
3775         (mono_class_from_generic): Check `ginst->klass' before doing
3776         anything else.  This is important to fully support "recursive"
3777         generic types.
3778
3779         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
3780         empty `generic_inst->klass' before doing anything else.
3781
3782 2003-12-06  Dick Porter  <dick@ximian.com>
3783
3784         * verify.c: 
3785         * object.h:
3786         * icall.c:
3787         * locales.c: Use C structs to access class fields.  Don't do a
3788         conversion between MonoString and UChar because both are
3789         platform-endian UTF-16.  Compare now takes startindex and count
3790         parameters.  Add a char overload for IndexOf.  Speed up the
3791         invariant string IndexOf.
3792
3793 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
3794
3795         * Makefile.am (monosn_LDADD): Fix parallel build.
3796
3797 2003-12-04  Martin Baulig  <martin@ximian.com>
3798
3799         * icall.c
3800         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3801         (ves_icall_Type_make_array_type): New interncall.       
3802
3803 2003-12-04  Martin Baulig  <martin@ximian.com>
3804
3805         * locales.c: also change it in the !HAVE_ICU case.
3806
3807 2003-12-04  Dick Porter  <dick@ximian.com>
3808
3809         * icall.c:
3810         * locales.c: construct_compareinfo is now in CompareInfo, not
3811         CultureInfo.
3812
3813 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
3814
3815         * image.c (mono_image_load_file_for_image): Cache loaded images in the
3816         image->files array.
3817
3818         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
3819         table as well.
3820
3821         * assembly.c (mono_assembly_load_references): Only load references
3822         once.
3823
3824         * class.c (mono_class_from_name): Avoid linear search of the 
3825         EXPORTEDTYPE table.
3826
3827         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
3828
3829 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
3830
3831         * image.h (MonoImage): Add 'field_cache' field.
3832
3833         * loader.c (mono_field_from_token): Cache field lookups.
3834         
3835         * reflection.c (mono_module_get_object): Fix name property.
3836
3837         * icall.c (ves_icall_get_enum_info): Update after changes to 
3838         mono_metadata_get_constant_index ().
3839
3840         * icall.c: Get rid of get_type_info icall, use a separate icall for
3841         each type property to avoid needless memory allocations. Fixes #51514.
3842
3843         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
3844         to avoid needless binary searches.
3845
3846         * class.c (class_compute_field_layout): Move the initialization of
3847         field->def_value to mono_class_vtable ().
3848
3849         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
3850         non-corlib types.
3851
3852         * object.c (mono_object_allocate): Make it inline.
3853
3854         * object.c (mono_object_allocate_spec): Make it inline.
3855         
3856 2003-12-02  Dick Porter  <dick@ximian.com>
3857
3858         * locales.c (create_NumberFormat): NumberFormatInfo construction.
3859         Patch by Mohammad DAMT (mdamt@cdl2000.com).
3860
3861 2003-12-01  Dick Porter  <dick@ximian.com>
3862
3863         * threads.c: Fix signature and call in CreateMutex and
3864         CreateEvent.
3865
3866 2003-12-01  Dick Porter  <dick@ximian.com>
3867
3868         * icall.c: 
3869         * locales.c: Implement string compares and searching
3870
3871         * object.h: Add extra Thread field
3872
3873 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
3874
3875         * reflection.c (fixup_method): Add support for MonoCMethod.
3876
3877 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
3878
3879         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
3880
3881         * reflection.c (assembly_name_to_aname): Allow extra characters in
3882         assembly names. Fixes #51468.
3883
3884 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
3885
3886         * exception.c (mono_exception_from_name_domain): New helper function.
3887
3888         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
3889         exception object in the correct domain.
3890
3891         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
3892         formatting + make a copy a the input data.
3893
3894         * loader.c (mono_get_method_from_token): Methods which contain
3895         native code do not have entries in the ImplMap.
3896
3897         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
3898         Thanks to Gonzalo for spotting this.
3899         
3900         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
3901         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
3902
3903         * assembly.h (mono_assembly_load_from): Split the second part of 
3904         assembly loading into a new public function.
3905
3906         * exception.h (mono_get_exception_bad_image_format): New function.
3907
3908 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
3909
3910         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
3911         Enumerate all modules inside a dynamic assembly. Fixes #51293.
3912         
3913         * icall.c: Add new icall for creating dynamic methods.
3914
3915         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
3916
3917         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
3918
3919         * reflection.c (mono_reflection_create_dynamic_method): New icall to
3920         create a dynamic method.
3921
3922         * reflection.c (resolve_object): New helper function.
3923
3924         * reflection.c: Generalize ReflectionMethodBuilder and the functions
3925         which manipulate it so they can also work on dynamic methods.
3926
3927         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
3928         creating the MonoReflectionMethodAux structure if it is not needed.
3929         
3930         * reflection.h verify.c: Update after changes to object layout.
3931
3932         * reflection.c (method_builder_encode_signature): Fix compilation on
3933         gcc 2.95.x.
3934
3935 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
3936
3937         * appdomain.h: Added support for context static fields. Added static_data
3938           field to MonoAppContext and renamed thread_static_fields to a more
3939           generic special_static_fields in MonoAppDomain, since it can now contain
3940           context static fields.
3941         * domain.c: Updated hashtable name.
3942         * object.c: Replaced field_is_thread_static() for a more generic
3943           field_is_special_static() which also checks for context static attribute.
3944           In mono_class_vtable(), added support for static context fields.
3945         * threads.c: Changed methods that manage thread static fields to more
3946           generic methods so they can be reused both for thread and context static
3947           data.
3948         * threads.h: Declared some new methods.
3949
3950 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
3951
3952         * reflection.h: Update after changes to the managed types.
3953
3954         * reflection.c (encode_custom_modifiers): New helper function.
3955
3956         * reflection.c (method_encode_signature): Emit custom modifiers.
3957
3958         * reflection.c (field_encode_signature): Emit custom modifiers.
3959
3960 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
3961
3962         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
3963
3964         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
3965         implementation.
3966
3967         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
3968         icall.
3969
3970         * object.c (mono_field_get_value_object): New function.
3971
3972         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
3973         specific.
3974
3975 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
3976
3977         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
3978         return a preallocated out-of-memory exception instance.
3979
3980         * object.c (out_of_memory): Use the new function.
3981
3982         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
3983         flag is before the custom modifiers. Fixes #49802.
3984
3985 2003-11-16  Martin Baulig  <martin@ximian.com>
3986
3987         * class.c (mono_class_is_open_constructed_type): Implemented the
3988         MONO_TYPE_GENERICINST case.
3989
3990 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
3991
3992         * assembly.c (mono_assembly_fill_assembly_name): New function to
3993         fill out the MonoAssemblyName structure.
3994         (mono_assembly_open): Use the new function.
3995
3996         * icall.c (fill_reflection_assembly_name): New helper function.
3997
3998         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
3999         new function.
4000
4001         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
4002
4003 2003-11-15  Martin Baulig  <martin@ximian.com>
4004
4005         * class.c (mono_class_is_open_constructed_type): New public
4006         function; checks whether a type is an open constructed type,
4007         ie. whether it still contains type parameters.
4008         (mono_class_inflate_generic_type): If we're a type parameter and
4009         the inflated type is also a MONO_TYPE_(M)VAR, return the original
4010         type.
4011
4012         * class.h (MonoGenericInst): Added `guint32 is_open'.
4013
4014         * loader.c (method_from_methodspec): Check whether we're an open
4015         or closed constructed type and set `ginst->is_open'.
4016
4017         * reflection.c (mono_reflection_bind_generic_parameters): Check
4018         whether we're an open or closed constructed type and set
4019         `ginst->is_open'.
4020         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
4021         from open constructed types.
4022
4023 2003-11-15  Martin Baulig  <martin@ximian.com>
4024
4025         * reflection.c (mono_reflection_bind_generic_parameters): If we're
4026         a generic instance (instead of a generic type declaration) with
4027         unbound generic parameters, bind them to our actual types.
4028
4029 2003-11-14  Martin Baulig  <martin@ximian.com>
4030
4031         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
4032
4033         * reflection.c (mono_reflection_bind_generic_parameters): If we're
4034         an interface type, populate `res->interfaces' with instantiated
4035         versions of all the interfaces we inherit.
4036
4037 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
4038
4039         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
4040         when MONO_PATH is set but doesn't contain the install dir.
4041
4042 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4043
4044         * icall.c:
4045         (ves_icall_Type_GetInterfaces): don't return an interface twice when
4046         it's also implemented in base classes. Fixes bug #50927.
4047
4048 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
4049
4050         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
4051         if this method is called from a finalizer. Fixes #50913.
4052
4053 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
4054
4055         * threads.c: Implement VolatileRead/VolatileWrite
4056
4057         * icall.c: Add new icalls for VolatileRead/VolatileWrite
4058
4059 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4060
4061         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
4062         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
4063         2.95.3.
4064
4065         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
4066         from Peter Ross (pro@missioncriticalit.com).
4067         
4068 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
4069
4070         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
4071
4072 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4073
4074         * assembly.c (mono_assembly_load_references): Disable check because it
4075         triggers on older corlibs which lots of people have.
4076
4077 2003-11-12  Jackson Harper  <jackson@ximian.com>
4078
4079         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
4080         load corlib.dll if mscorlib.dll is not found.
4081         * assembly.h: Remove corlib name define.
4082         * class.c:
4083         * domain.c:
4084         * image.c: Change corlib name to mscorlib.
4085         
4086 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4087
4088         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
4089
4090 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
4091
4092         * appdomain.h: Added loader_optimization here to sync with the C#
4093         code, and add disallow_binding_redirects field.
4094
4095 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
4096
4097         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
4098
4099         * reflection.c (mono_image_build_metadata): Fix crash on modules
4100         with no types.
4101
4102         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
4103
4104         * icall.c (ves_icall_get_method_info): Return callingConvention as
4105         well.
4106
4107         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
4108         namespaces from the EXPORTEDTYPE table as well.
4109
4110         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
4111         from all modules inside the assembly.
4112         
4113 2003-11-11  Martin Baulig  <martin@ximian.com>
4114
4115         * reflection.c (mono_reflection_bind_generic_parameters): Make
4116         this work for interfaces.
4117
4118 2003-11-11  Martin Baulig  <martin@ximian.com>
4119
4120         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
4121
4122 2003-11-11  Martin Baulig  <martin@ximian.com>
4123
4124         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
4125         "MonoInflatedMethod" and "MonoInflatedCtor".
4126
4127 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
4128
4129         * reflection.c (resolution_scope_from_image): Use the assembly table
4130         from the manifest module, since other modules don't have it.
4131
4132         * debug-helpers.c (mono_type_full_name): New helper function.
4133
4134         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
4135
4136         * image.c (mono_image_load_file_for_image): New public function which
4137         is a replacement for the load_file_for_image in class.c.
4138
4139         * assembly.c (mono_assembly_load_module): A wrapper for the function
4140         above which does assembly association and reference loading too.
4141
4142         * class.c (mono_class_from_name): Call mono_assembly_load_module.
4143
4144 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4145
4146         * appdomain.c: not all of the attributes for the full assembly name
4147         are required and the order doesn't matter. Fixes bug #50787.
4148
4149 2003-11-10  Dick Porter  <dick@ximian.com>
4150
4151         * locales.c: Use platform-endian UTF16
4152
4153 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
4154
4155         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4156         
4157 2003-11-10  Martin Baulig  <martin@ximian.com>
4158
4159         * metadata.c
4160         (mono_metadata_load_generic_params): Make this actually work.
4161
4162         * reflection.c (mono_reflection_bind_generic_parameters): If our
4163         parent is a generic instance, pass all the `types' to it, no
4164         matter whether it has the same number of type parameters or not.
4165
4166 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
4167
4168         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4169
4170         * assembly.c (mono_assembly_load_references): Move the image<->assembly
4171         assignment code to this function so it gets called recursively for all
4172         modules.
4173
4174         * image.c (load_modules): Remove the assembly assignment since it is
4175         now done by mono_assembly_load_references.
4176         
4177         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
4178         Add 'module' argument.
4179         (mono_module_get_types): New helper function.
4180         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
4181
4182 2003-11-08  Martin Baulig  <martin@ximian.com>
4183
4184         * class.c (mono_class_inflate_generic_method): Interface method
4185         don't have a header.
4186
4187         * reflection.c (mono_image_get_methodspec_token): Take an
4188         additional `MonoGenericInst *' argument instead of reading it from
4189         the header; this is necessary to support interfaces.
4190         (mono_image_create_token): Pass the `MonoGenericInst *' from the
4191         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
4192         (inflated_method_get_object): Take an additional `MonoGenericInst *'
4193         argument.
4194
4195         * reflection.h (MonoReflectionInflatedMethod): Added
4196         `MonoGenericInst *ginst'.
4197
4198 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
4199
4200         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
4201
4202 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
4203
4204         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
4205
4206 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
4207
4208         * reflection.c 
4209         (reflection_methodbuilder_from_method_builder):
4210         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
4211         initialize a ReflectionMethodBuilder structure.
4212         (mono_image_get_methodbuilder_token):
4213         (mono_image_get_ctorbuilder_token): New functions to emit memberref
4214         tokens which point to types in another module inside the same assembly.
4215
4216         * reflection.c: Use the new helper functions.
4217         
4218         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
4219
4220         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
4221         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
4222
4223         * reflection.c (resolution_scope_from_image): Emit a moduleref if
4224         neccesary.
4225
4226         * reflection.c (mono_image_build_metadata): Emit metadata only for the
4227         current module. Emit the manifest only for the main module.
4228
4229         * reflection.c (mono_image_create_token): Add assertion when a 
4230         memberref needs to be created.
4231
4232         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
4233
4234         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
4235         larger buffer for the custom attribute blob. Fixes #50637.
4236         
4237 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4238
4239         * threadpool.c: notify listener on async processing handles after
4240         invoking the async callback. Thanks to Zoltan.
4241
4242 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4243
4244         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
4245         avoid code duplication.
4246
4247         * reflection.h (MonoDynamicImage): New type which is currently unused,
4248         but will be used through the ref.emit code in place of 
4249         MonoDynamicAssembly.
4250
4251         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4252         object layout.
4253
4254         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
4255         a MonoDynamicImage instead of just a MonoImage.
4256         
4257         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
4258         icalls to ModuleBuilder but keep their semantics, so they will work
4259         with moduleb->assemblyb. This will change later.
4260         
4261 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4262
4263         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4264         object layout.
4265
4266         * reflection.c (mono_image_build_metadata): Avoid creation of a default
4267         main module, since it is now done by the managed code.
4268
4269 2003-11-03  Martin Baulig  <martin@ximian.com>
4270
4271         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
4272         `ginst->klass' here.
4273         (method_encode_methodspec): Don't use the `ginst->generic_method's
4274         klass if it's a generic instance, use `ginst->klass' in this case.
4275
4276 2003-11-03  Martin Baulig  <martin@ximian.com>
4277
4278         * reflection.c (mono_image_get_generic_method_param_info):
4279         Removed, use mono_image_get_generic_param_info() instead.
4280         (mono_image_get_type_info): Write the GenericParam table before
4281         the Method table.  This is neccessary because in the GenericParam
4282         table, type parameters of the class (ie. '!0' etc.) must come
4283         before the ones from its generic methods (ie. '!!0' etc).
4284
4285 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4286
4287         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
4288
4289 2003-11-02  Martin Baulig  <martin@ximian.com>
4290
4291         * reflection.c (create_generic_typespec): Take a
4292         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
4293         the generic parameters from it.
4294
4295 2003-11-02  Martin Baulig  <martin@ximian.com>
4296
4297         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
4298         instead of a `MonoClassField *' since we just need the type.
4299         (create_generic_typespec): New static function.  Creates a
4300         TypeSpec token for a generic type declaration.
4301         (mono_image_get_generic_field_token): New static function.
4302         (mono_image_create_token): If we're a FieldBuilder in a generic
4303         type declaration, call mono_image_get_generic_field_token() to get
4304         the token.
4305
4306 2003-11-02  Martin Baulig  <martin@ximian.com>
4307
4308         * reflection.h
4309         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
4310         `MonoReflectionGenericInst *declaring_type' and
4311         `MonoReflectionGenericInst *reflected_type' fields.
4312
4313         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
4314         `MonoReflectionGenericInst *declaring_type' and a
4315         `MonoReflectionGenericInst *reflected_type' argument instead of a
4316         single `MonoReflectionGenericInst *type' one.  Set
4317         `res->declaring_type' and `res->reflected_type' from them.
4318         (mono_reflection_inflate_field): Likewise.      
4319
4320 2003-11-02  Martin Baulig  <martin@ximian.com>
4321
4322         * class.c (mono_class_setup_vtable): Don't store generic methods
4323         in the vtable.  
4324
4325 2003-11-02  Martin Baulig  <martin@ximian.com>
4326
4327         * reflection.h (MonoReflectionGenericInst): Added
4328         `MonoReflectionType *declaring_type'.
4329
4330         * reflection.c (mono_reflection_bind_generic_parameters): Use
4331         `if (tb->parent)' instead of `klass->parent'.
4332
4333 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
4334
4335         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
4336         with an empty ASSEMBLY table.
4337
4338         * reflection.c (mono_image_build_metadata): Avoid using the same loop
4339         variable in the inner and outer loops.
4340
4341 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
4342
4343         * metadata.h (mono_metadata_make_token): Put parentheses around macro
4344         argument.
4345
4346         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
4347         
4348         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
4349         icalls. Instead, do everything in managed code. This is needed since
4350         it is hard to restore the original domain etc. in unmanaged code in the
4351         presence of undeniable exceptions.
4352
4353         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
4354         New icalls to push and pop appdomain refs.
4355
4356 2003-10-31  Martin Baulig  <martin@ximian.com>
4357
4358         * class.c (inflate_generic_type): Renamed to
4359         mono_class_inflate_generic_type() and made it public.
4360
4361         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
4362         New interncall.
4363
4364         * loader.c (mono_field_from_memberref): Also set the retklass for
4365         typespecs.
4366
4367         * fielder.c (mono_image_get_inflated_field_token): New static
4368         method; creates a metadata token for an inflated field.
4369         (mono_image_create_token, fixup_method): Added support for
4370         "MonoInflatedField".
4371         (fieldbuilder_to_mono_class_field): New static function.
4372         (mono_reflection_inflate_field): New public function.
4373
4374         * reflection.h
4375         (MonoReflectionGenericInst): Added `MonoArray *fields'.
4376         (MonoReflectionInflatedField): New typedef.     
4377
4378 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
4379
4380         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
4381         for Solaris and other platforms without s6_addr16
4382
4383 2003-10-30  Martin Baulig  <martin@ximian.com>
4384
4385         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
4386         argument instead of two.
4387         (mono_class_inflate_generic_signature): Likewise.
4388         (inflate_generic_header): Likewise.
4389         (mono_class_inflate_generic_method): Likewise.  In addition, if
4390         `ginst->klass' is set, it becomes the new `method->klass'.
4391
4392         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
4393         field.
4394
4395         * reflection.c (encode_generic_method_sig): Write a 0xa as the
4396         first byte. [FIXME]
4397         (method_encode_methodspec): If we have generic parameters, create
4398         a MethodSpec instead of a MethodRef.
4399         (fixup_method): Added support for "MonoInflatedMethod" and
4400         "MonoInflatedCtor".
4401         (mono_image_create_token): Added support for "MonoInflatedMethod"
4402         and "MonoInflatedCtor".
4403         (inflated_method_get_object): New static function; returns a
4404         managed "System.Reflection.MonoInflatedMethod" object.
4405         (mono_reflection_bind_generic_method_parameters): Return a
4406         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
4407         (mono_reflection_inflate_method_or_ctor): Likewise.
4408         (mono_image_get_generic_method_param_info): Initialize unused
4409         fields to zero.
4410         (mono_image_get_generic_param_info): Likewise.
4411
4412         * reflection.h (MonoReflectionInflatedMethod): New public
4413         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
4414         "S.R.MonoInflatedCtor" classes.
4415
4416         * loader.c (method_from_memberref): If we're a TypeSpec and it
4417         resolves to a generic instance, inflate the method.
4418
4419 2003-10-28  Dick Porter  <dick@ximian.com>
4420
4421         * object.c (mono_runtime_run_main): Convert command-line arguments
4422         into utf8, falling back to the user's locale encoding to do so.
4423
4424 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
4425
4426         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
4427         at this time.
4428
4429         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
4430
4431         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
4432         up icalls at method definition time. Partially fixes #33569.
4433
4434 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
4435
4436         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
4437         marshalling of arrays. Fixes #50116.
4438
4439         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
4440
4441         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
4442         points to a vtable in the dying appdomain.
4443
4444         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
4445         listeners into unmanaged code inside the lock.
4446
4447         * object.c (mono_class_vtable): Turn off typed allocation in non-root
4448         domains and add some comments.
4449
4450 2003-10-25  Martin Baulig  <martin@ximian.com>
4451
4452         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
4453
4454         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
4455
4456         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
4457         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
4458         currently parsing.  Create the generic class and store it in
4459         `generic_inst->klass' before parsing the type arguments.  This is
4460         required to support "recursive" definitions; see mcs/tests/gen-23.cs
4461         for an example.
4462         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
4463         to support recursive typespec entries.
4464
4465         * class.c (mono_class_setup_parent): If our parent is a generic
4466         instance, we may get called before it has its name set.
4467         (mono_class_from_generic): Splitted into
4468         mono_class_create_from_generic() and mono_class_initialize_generic().
4469
4470 2003-10-25  Martin Baulig  <martin@ximian.com>
4471
4472         * icall.c (ves_icall_Type_BindGenericParameters): Return a
4473         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
4474         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
4475         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
4476
4477         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
4478         (create_typespec): Likewise.
4479         (mono_reflection_bind_generic_parameters): Return a
4480         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
4481         (mono_reflection_inflate_method_or_ctor): New public function.
4482
4483         * reflection.h (MonoReflectionGenericInst): New typedef.        
4484
4485 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
4486
4487         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
4488         inside the domain lock. Fixes #49993.
4489         
4490         * object.c (mono_class_vtable): When typed allocation is used, 
4491         allocate vtables in the GC heap instead of in the mempool, since the
4492         vtables contain GC descriptors which are used by the collector even
4493         after the domain owning the mempool is unloaded.
4494
4495         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
4496
4497         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
4498         reflect what it does. Also invalidate mempools instead of freeing
4499         them if a define is set.
4500
4501         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
4502         of the appdomain.
4503         
4504         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
4505         hold the finalizable objects in this domain.
4506
4507         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
4508         appdomain.
4509
4510         * appdomain.c (mono_domain_set): New function to set the current
4511         appdomain, but only if it is not being unloaded.
4512
4513         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
4514         appdomain which is being unloaded.
4515         
4516         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
4517         unloading of the root appdomain.
4518
4519         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
4520         icall to execute a method in another appdomain. Intended as a 
4521         replacement for InternalSetDomain, which can confuse the code 
4522         generation in the JIT.
4523
4524         * appdomain.c (mono_domain_is_unloading): New function to determine
4525         whenever an appdomain is unloading.
4526
4527         * appdomain.c (mono_domain_unload): New function to correctly unload
4528         an appdomain.
4529
4530         * assembly.c (mono_assembly_load_references): Check that an assembly
4531         does not references itself.
4532
4533         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
4534         domain manually, it asks the finalizer thread to do it, then waits for
4535         the result. Also added a timeout.
4536
4537         * icall.c: Register the new icalls.
4538
4539         * threads.h threads.c: Export the mono_gc_stop_world and 
4540         mono_gc_start_world functions.
4541         
4542         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
4543         function to fill out the mempool with 0x2a.
4544
4545 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
4546
4547         * reflection.h (MonoReflectionMethodAux): New structure to store
4548         information which is rarely used, thus is not in the MonoMethod
4549         structure.
4550
4551         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
4552         store the aux info.
4553
4554         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
4555         and marshalling info into the aux structure.
4556
4557         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
4558         from the aux structure.
4559
4560         * loader.c (mono_method_get_param_names): Retrieve the param names from
4561         the aux structure.
4562         
4563 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
4564
4565         * exception.h exception.c: Add AppDomainUnloadedException && fix 
4566         warning.
4567
4568 2003-10-21  Dick Porter  <dick@ximian.com>
4569
4570         * socket-io.c
4571         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
4572         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
4573
4574 2003-10-21  Martin Baulig  <martin@ximian.com>
4575
4576         * reflection.c (mono_reflection_bind_generic_parameters):
4577         `klass->parent' is NULL for interfaces.
4578
4579 2003-10-21  Martin Baulig  <martin@ximian.com>
4580
4581         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4582
4583 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
4584
4585         * exception.c (mono_exception_from_name_msg): New helper function for
4586         creating exceptions and initializing their message field.
4587
4588         * exception.c: Simplify functions using the new helper.
4589
4590         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
4591         New function.
4592
4593         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
4594         mono_raise_exception, since otherwise gcc doesn't generate the function
4595         epilog for raise_exception, confusing the stack unwinding in the JIT.
4596         Fixes #45043.
4597
4598         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
4599         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
4600         Fixes #49499.
4601
4602 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4603
4604         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
4605         utf8.
4606
4607 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
4608
4609         * icall.c: Removed GetUninitializedObject method because
4610           AllocateUninitializedClassInstance does the same.
4611
4612 2003-10-18  Martin Baulig  <martin@ximian.com>
4613
4614         * class.c (inflate_generic_signature): Renamed to
4615         mono_class_inflate_generic_signature() and made it public.
4616         (my_mono_class_from_generic_parameter): New static function; if we
4617         don't already have the generic parameter's MonoClass, create a
4618         very simple one which is just used internally in the runtime and
4619         not passed back to managed code.
4620
4621         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
4622
4623         * metadata.h (MonoMethodSignature): Moved the
4624         `MonoGenericParam *gen_params' to the MonoMethodHeader.
4625         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
4626
4627         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
4628         ves_icall_MonoMethod_GetGenericArguments(); this is now an
4629         interncall on the MonoMethod class, not on MethodInfo.
4630         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
4631         calling mono_reflection_bind_generic_method_parameters() directly.
4632
4633         * loader.c (mono_method_get_signature): If this is a MethodSpec;
4634         return the already computed `method->signature'.
4635         (method_from_methodspec): New static function to load a method
4636         from a MethodSpec entry.
4637         (mono_get_method_from_token): Call the new method_from_methodspec()
4638         for MethodSpec tokens.  
4639         (mono_get_method_from_token): If we're a generic method, load the
4640         type parameters.
4641
4642         * reflection.c (mono_image_get_memberref_token): Allow
4643         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
4644         table.
4645         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
4646         (mono_image_create_token): First check whether it's a generic
4647         method (so we'd need to create a MethodSpec), then do the other
4648         two alternatives.
4649         (mono_reflection_bind_generic_method_parameters): Return a
4650         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
4651         called directly from the interncall.
4652
4653 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
4654
4655         * reflection.c (load_public_key): Move loading of the public key
4656         into managed code.
4657
4658         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
4659
4660         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
4661         fields.
4662
4663         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
4664         culture, hash_alg and public_key. Fixes #49555.
4665
4666 2003-10-17  Martin Baulig  <martin@ximian.com>
4667
4668         * class.h (MonoGenericInst): Moved this declaration here and added
4669         `MonoMethod *generic_method'.
4670
4671         * icall.c
4672         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
4673         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
4674
4675         * metadata.c (mono_metadata_type_equal): Two types of
4676         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
4677         index; ie. don't compare the address of the `MonoGenericParam'
4678         structure.
4679         (mono_metadata_load_generic_params): Removed the `MonoMethod
4680         *method' argument.
4681
4682         * metadata.h (MonoGenericInst): Moved declaration to class.h.
4683         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
4684
4685         * reflection.c (method_encode_signature): Encode the number of
4686         generic parameters.
4687         (encode_generic_method_sig): New static function.
4688         (method_encode_methodspec): New static function; creates an entry
4689         in the MethodSpec table for a generic method.
4690         (mono_image_get_methodspec_token): New static function.
4691         (mono_image_create_token): Call mono_image_get_methodspec_token()
4692         for generic methods.
4693         (mono_reflection_bind_generic_method_parameters): New public
4694         function.  Instantiates a generic method.
4695
4696 2003-10-16  Martin Baulig  <martin@ximian.com>
4697
4698         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
4699         *gen_params' here from MonoMethodHeader.
4700
4701         * metadata.c (mono_metadata_parse_method_signature): If we have
4702         generic parameters, initialize `method->gen_params' and then set
4703         the correct `type->data.generic_param' in all the parameters.
4704
4705 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
4706
4707         * threads.c (mono_threads_get_default_stacksize): New function to 
4708         return the default stacksize.
4709
4710         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
4711         termination of the finalizer thread, since the previous method had
4712         race conditions. Fixes #49628.
4713
4714         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
4715         as for the other managed threads.
4716
4717 2003-10-16  Martin Baulig  <martin@ximian.com>
4718
4719         * class.c (inflate_generic_signature): Copy `generic_param_count'
4720         and `gen_params'.
4721
4722         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
4723         New interncall.
4724
4725         * metadata.c (mono_metadata_parse_method_signature): Actually set
4726         the `method->generic_param_count' here.
4727         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
4728
4729 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
4730
4731         * object.h: Add a new field to TypedRef to simplify the implementation
4732         of the REFANY opcodes in the JIT.
4733
4734         * icall.c: Make use of the new field.
4735
4736         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
4737         dynamically.
4738
4739 2003-10-15  Martin Baulig  <martin@ximian.com>
4740
4741         * class.c (mono_class_from_gen_param): Renamed to
4742         mono_class_from_generic_parameter() and moved most of the
4743         functionality from mono_reflection_define_generic_parameter()
4744         here; ie. we create a "real" class here.
4745         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
4746         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
4747         previously been called.
4748
4749         * class.h (MonoGenericParam): Moved the declaration of this struct
4750         here from metadata.h and added `MonoMethod *method'.
4751
4752         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
4753         interncall.
4754
4755         * loader.c (mono_get_method_from_token): If we have any generic
4756         parameters, call mono_metadata_load_generic_params() to read them
4757         from the MONO_TABLE_GENERICPAR.
4758
4759         * metadata.c (mono_metadata_load_generic_params): Added
4760         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
4761
4762         * metadata.h (MonoMethodSignature): Replaced
4763         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
4764         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
4765
4766         * reflection.c (mono_reflection_define_generic_parameter): Moved
4767         most of the functionality into the new
4768         mono_class_from_generic_parameter(); set the `method' field if
4769         we're a method parameter.       
4770
4771 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
4772
4773         * marshal.c (emit_struct_conv): if native size is 0
4774         emit no code.
4775
4776 2003-10-14  Martin Baulig  <martin@ximian.com>
4777
4778         * icall.c: The generics API has changed in the spec since it was
4779         added to System.Type; these modifications make it match the spec
4780         again.
4781         (ves_icall_Type_GetGenericParameters): Renamed to
4782         `ves_icall_Type_GetGenericArguments'.
4783         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
4784         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
4785         `ves_icall_MonoType_get_HasGenericArguments'.
4786         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
4787         `ves_icall_MonoType_get_IsGenericParameter'.
4788         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
4789         this is no interncall anymore.
4790         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
4791         `ves_icall_TypeBuilder_get_IsGenericParameter'.
4792
4793 2003-10-14  Martin Baulig  <martin@ximian.com>
4794
4795         * reflection.c (mono_reflection_bind_generic_parameters): Also
4796         inflate generic methods if we're reading the class from IL.
4797
4798 2003-10-13  Martin Baulig  <martin@ximian.com>
4799
4800         * reflection.c (mono_reflection_define_generic_parameter): This
4801         method isn't called directly from the icall anymore; take a
4802         `MonoReflectionAssemblyBuilder *' so we can use this for type and
4803         method generic parameters.
4804         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
4805         (method_builder_encode_signature): Encode generic parameters.
4806         (mono_image_get_method_info): Write generic params to the
4807         MONO_TABLE_GENERICPARAM table.
4808
4809         * reflection.h (MonoReflectionMethodBuilder): Added
4810         `MonoArray *generic_params'.
4811
4812         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
4813
4814         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
4815         wrapper for mono_reflection_define_generic_parameter().
4816         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
4817
4818 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
4819
4820         * marshal.h: Add missing function to fix build.
4821
4822         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
4823         the SetLastError pinvoke attribute.
4824
4825         * marshal.c (mono_marshal_set_last_error): New helper function called
4826         by the generated code.
4827         
4828         * marshal.c (mono_mb_emit_branch): New helper function.
4829
4830         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
4831
4832         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4833         classes as parameters and return values of delegates. Fixes #29256. 
4834
4835 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
4836
4837         * locales.c: use gint32 in non HAVE_ICU case
4838
4839 2003-10-11  Martin Baulig  <martin@ximian.com>
4840
4841         * mono-debug.c (mono_debug_add_method): Added a workaround for
4842         bug #48591.
4843
4844 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
4845
4846         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
4847         delegates passed to native code must use the STDCALL calling 
4848         convention. Fixes #35987.
4849
4850 2003-10-10  Martin Baulig  <martin@ximian.com>
4851
4852         * class.c (inflate_generic_type): If we're inflating for a generic
4853         type instance (and not for a generic method), return
4854         MONO_TYPE_MVAR unchanged.
4855
4856 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4857
4858         * string-icalls.c: Join ignores null strings in the source array.
4859         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
4860         * threads.c: GetAvailableTheads is slightly more accurate.
4861
4862 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
4863
4864         * threads.h threads.c : add mono_threads_set_default_stacksize
4865         and pass default to CreateThread calls.
4866
4867 2003-10-09  Dick Porter  <dick@ximian.com>
4868
4869         * icall.c:
4870         * locales.h:
4871         * locales.c: Internal calls for constructing CultureInfo and
4872         related objects from libicu (if its available.)
4873
4874 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
4875
4876         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
4877
4878 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4879
4880         * threadpool.c: added an argument to async_invoke_thread that is the
4881         item to process, pass the MonoAsyncResult to the thread start function
4882         when creating a new thread. This way we don't need to acquire any lock
4883         when we're creating a new thread. Readded a semaphore for faster
4884         response times (instead of that Sleep i added).
4885
4886 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
4887
4888         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
4889         get daylight change dates better on Windows, fix handling
4890         of platforms without tm_gmtoff.
4891
4892 2003-10-06  Martin Baulig  <martin@ximian.com>
4893
4894         * class.c (inflate_generic_method): Renamed to
4895         mono_class_inflate_generic_method() and made public.
4896         (mono_class_init): Don't inflate the generic methods here.
4897         (mono_class_from_generic): Added `gboolean inflate_methods'
4898         argument.  Inflate the methods here.
4899
4900         * loader.c (mono_method_get_param_names): Ignore instances of
4901         generic types for the moment.
4902
4903         * reflection.c (fixup_method): Added support for inflated methods.
4904         (mono_image_create_token): Use mono_image_get_methodref_token()
4905         for inflated methods.
4906         (mono_custom_attrs_from_param): Ignore instances of generic types
4907         for the moment.
4908         (mono_reflection_bind_generic_parameters): New public function.
4909         Moved all the functionality from
4910         ves_icall_Type_BindGenericParameters() here and added support for
4911         dynamic types.
4912         (mono_reflection_define_generic_parameter): Initialize
4913         `klass->methods' here.
4914
4915         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
4916         functionality into mono_reflection_define_generic_parameter().
4917         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
4918         TypeBuilder, return that TypeBuilder.
4919
4920 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4921
4922         * appdomain.c: removed mono_delegate_semaphore.
4923
4924         * threadpool.c:
4925         (mono_thread_pool_add): moved hash table creation inside and the thread 
4926         creation outside of the critical region.
4927         (mono_thread_pool_finish): removed obsolete code.
4928         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
4929         continue or exit the thread depending on the queue.
4930
4931 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
4932
4933         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
4934         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
4935         handle more bool marshalling options
4936
4937 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
4938
4939         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
4940         arrays of structs. Also add a more descriptive error message when
4941         a structure member is marshalled as LPArray.
4942
4943 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
4944
4945         * marshal.c (mono_marshal_get_native_wrapper): Add support for
4946         marshalling arrays of complex types. Fixes #29098. Also remove an
4947         usused and incomplete function.
4948
4949 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4950
4951         * gc.c: report heap_size - free_bytes as total memory allocated
4952         (bug#49362).
4953
4954 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
4955
4956         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
4957         fix timezone handling problems on Windows.
4958         
4959         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
4960         asserts when the year is outside the range handled by ms the functions.
4961
4962         * class.c (setup_interface_offsets): If the class is an interface,
4963         fill out its interface_offsets slot.
4964
4965 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4966
4967         * threadpool.c: mark threadpool threads as background.
4968
4969 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
4970
4971         * decimal.c - define DECINLINE to nothing if not using GCC
4972
4973 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
4974
4975         * assembly.c: More refcount fixes.
4976
4977 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4978
4979         * string-icalls.c: if we're not trimming, return the same string.
4980         When not splitting, don't create a new string.
4981
4982 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4983
4984         * image.c:
4985         (mono_image_open): increment the ref_count inside the critical section.
4986
4987 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
4988
4989         * image.c (mono_image_open): Fix reference counting bug.
4990
4991 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
4992
4993         * marshal.c (mono_marshal_type_size) struct alignment changed for 
4994         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
4995         64bits. Avoid leak in mono_marshal_get_native_wrapper when
4996         mono_lookup_pinvoke_call throws.        
4997
4998 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
4999
5000         * reflection.c (mono_reflection_parse_type): Fix #49114.
5001
5002         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
5003         temporary workaround for cygwin header problem.
5004
5005         * object.c (mono_object_isinst): Synchronize this with the code
5006         generated by the JIT for casts.
5007
5008 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
5009
5010         * reflection.c (encode_type): Fix #38332.
5011
5012 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
5013
5014         * marshal.c (mono_marshal_method_from_wrapper): New function to return
5015         the original method from the wrapper method.
5016
5017 2003-09-25  Martin Baulig  <martin@ximian.com>
5018
5019         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
5020         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
5021         (ves_icall_Type_get_IsGenericInstance): New interncall.
5022
5023 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
5024
5025         * object.c: fix cast warning in big endian code.
5026
5027 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
5028
5029         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
5030         
5031 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5032
5033         * assembly.c: don't call check_env from mono_assembly_load. It's
5034         already done once in mono_assemblies_init and may cause headaches when
5035         multiple threads are loading assemblies.
5036
5037 2003-09-19  Martin Baulig  <martin@ximian.com>
5038
5039         * reflection.c (mono_reflection_define_generic_parameter): Don't
5040         allocate `klass->methods', set `klass->flags' to
5041         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
5042
5043 2003-09-18  Martin Baulig  <martin@ximian.com>
5044
5045         * class.c (mono_class_init): Don't create `class->methods' if it's
5046         already initialized.
5047
5048         * metadata.c (mono_metadata_load_generic_params): Make this
5049         actually work.
5050
5051         * reflection.c (mono_reflection_define_generic_parameter): Set
5052         parent class and interfaces from the constraints.
5053
5054         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
5055         to keep this struct in sync with the declaration in TypeBuilder.cs.
5056
5057 2003-09-17  Martin Baulig  <martin@ximian.com>
5058
5059         * metadata.h (MonoType): Replaced the data's `int type_param'
5060         field with `MonoGenericParam *generic_param'.
5061         (MonoGenericParam): Added `MonoClass *klass'.
5062
5063         * class.c (mono_class_from_gen_param): Removed the
5064         `MonoImage *image' and `int type_num' arguments.
5065
5066         * metadata.c (mono_metadata_parse_generic_param): New static
5067         method; creates a MonoGenericParam which just contains the index.
5068         (do_mono_metadata_parse_type): Call
5069         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
5070         MONO_TYPE_MVAR.
5071
5072         * reflection.c (mono_image_typedef_or_ref): Generic type
5073         parameters may be in the same assembly, but never use a typedef
5074         for them.
5075         (mono_reflection_define_generic_parameter): We're now creating a
5076         "real" class for the type parameter; it's now safe to call
5077         mono_class_from_mono_type() on the class'es type, it'll do the
5078         right thing.
5079
5080 2003-09-16  Martin Baulig  <martin@ximian.com>
5081
5082         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
5083         `symfile->range_entry_size' and `symfile->class_entry_size' here;
5084         the `symfile' data structure must be fully initialized before it
5085         gets added to the table.
5086
5087 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
5088
5089         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
5090
5091         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
5092         class init trampolines.
5093
5094 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
5095
5096         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
5097         to the built-in profiler to turn off time and allocation profiling
5098         respectively.
5099
5100 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
5101
5102         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
5103         g_direct_equal.
5104
5105         * debug-helpers.c (mono_method_full_name): Print the wrapper type
5106         in human readable form.
5107
5108 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
5109
5110         * reflection.c icall.c: Fixed warnings.
5111
5112         * image.c (load_class_names): Use a temporary hash table to hold the
5113         namespaces in order to avoid doing many string comparisons.
5114
5115         * image.h: Fix typo.
5116
5117         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
5118         Pass NULL instead of g_direct_equal to the GHashTable constructor 
5119         since the NULL case is short-circuited inside g_hash_table_lookup, 
5120         leading to better performance.  
5121
5122         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
5123         obtain the first custom attribute for a given index. Depends on the
5124         CustomAttribute table being sorted by the parent field.
5125
5126         * reflection.c (mono_custom_attrs_from_index): Use the new function 
5127         for better performance.
5128
5129 2003-09-07  Martin Baulig  <martin@ximian.com>
5130
5131         * class.c (mono_class_init): If we're a generic instance, inflate
5132         all our methods instead of loading them from the image.
5133         (mono_class_from_generic): Set `class->methods = gklass->methods'.
5134
5135 2003-09-07  Martin Baulig  <martin@ximian.com>
5136
5137         * mono-debug-debugger.c: Added support for constructors.
5138
5139 2003-09-06  Martin Baulig  <martin@ximian.com>
5140
5141         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
5142         New interncall.
5143
5144         * reflection.c (mono_reflection_setup_generic_class): Call
5145         ensure_runtime_vtable() to create the vtable.
5146
5147 2003-09-05  Martin Baulig  <martin@ximian.com>
5148
5149         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
5150         MONO_TYPE_MVAR.
5151
5152 2003-09-04  Martin Baulig  <martin@ximian.com>
5153
5154         * reflection.c (mono_reflection_define_generic_parameter): Generic
5155         parameters start with zero.
5156
5157 2003-09-04  Martin Baulig  <martin@ximian.com>
5158
5159         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
5160
5161         * reflection.h (MonoReflectionGenericParam): New typedef.
5162         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
5163         the generic parameters from the managed TypeBuilder.
5164
5165         * reflection.c (mono_reflection_define_generic_parameter): New function.
5166         (mono_reflection_create_runtime_class): Encode generic parameters.
5167         (mono_reflection_setup_generic_class): New function; this is
5168         called after adding adding all generic params to the TypeBuilder.
5169         (encode_type): Added MONO_TYPE_VAR.
5170
5171 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
5172
5173         * class.h class.c (mono_class_needs_cctor_run): Moved this method
5174         here from the JIT.
5175
5176         * assembly.h assembly.c: Moved the AOT loading code into an assembly
5177         load hook.
5178
5179 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
5180
5181         * reflection.h reflection.c class.h class.c: Delete duplicate 
5182         definition of mono_type_get_name () from reflection.c and export the
5183         one in class.c.
5184
5185         * class.c: Class loading fixes from Bernie Solomon 
5186         (bernard@ugsolutions.com).
5187
5188         * reflection.c: Endianness fixes from Bernie Solomon 
5189         (bernard@ugsolutions.com).
5190         
5191 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
5192
5193         * assembly.h assembly.c: Define a file format version for AOT
5194         libraries.
5195         
5196         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
5197
5198         * appdomain.h (MonoJitInfo): New field to determine whenever the
5199         code is domain neutral.
5200         
5201 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
5202
5203         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
5204
5205 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
5206
5207         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
5208         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
5209         Avoid caching the result since strings must be domain specific. Fixes
5210         #48050.
5211
5212 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
5213
5214         * marshal.c (mono_marshal_init): Make this callable multiple times
5215         since it is hard to find a correct place to call it.
5216
5217         * object.c (mono_runtime_class_init): Execute static constructors in
5218         the correct appdomain.
5219
5220         * image.c (build_guid_table): Handle the case when multiple images have
5221         the same GUID.
5222
5223 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5224
5225         * icall.c: added a couple of icalls for System.Web.
5226
5227 2003-08-28  Martin Baulig  <martin@ximian.com>
5228
5229         * icall.c (ves_icall_Type_BindGenericParameters): Use
5230         `klass->generic_inst' instead of `&klass->byval_arg' in the
5231         mono_type_get_object() call.  The returned type must be
5232         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
5233
5234 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
5235
5236         * NOTES: New file.
5237
5238         * object.c (mono_class_proxy_vtable): Make it thread safe.
5239
5240         * pedump.c: Fix warning.
5241
5242         * object.c appdomain.h: Get rid of metadata_section. 
5243         It is no longer needed and it was causing deadlocks with domain->lock.
5244
5245         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
5246
5247 2003-08-26  Martin Baulig  <martin@ximian.com>
5248
5249         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
5250
5251 2003-08-26  Martin Baulig  <martin@ximian.com>
5252
5253         * pedump.c (main): Call mono_metadata_init(),
5254         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
5255         and mono_loader_init().
5256
5257 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
5258
5259         * loader.h: Add missing include to fix build.
5260
5261         * image.h: mono_image_load_references is no more.
5262
5263         * assembly.c: Reworked assembly loading to make it really thread safe.
5264         After these changes, the assembly returned by mono_assembly_open is
5265         fully initialized, i.e. all its references assemblies are loaded.
5266
5267         * assembly.c (mono_image_load_references): Renamed to 
5268         mono_assembly_load_references, and made private, since clients no
5269         longer need to call it.
5270
5271         * class.c: Removed calls to mono_assembly_load_references, since it was
5272         a source of deadlocks.
5273
5274         * loader.h loader.c class.h class.c: Protect data structures using a 
5275         new lock, the loader lock.
5276
5277         * class.c (mono_class_setup_vtable): Create temporary hash tables and
5278         GPtrArrays only when needed.
5279
5280         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
5281         into empty structures by mcs. Fixes pinvoke7.cs.
5282         
5283         * domain.c (mono_init): Call a new initialization function.
5284
5285         * appdomain.c (mono_runtime_init): Call the new initializer function
5286         of the marshal module.
5287
5288         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
5289         inserted into empty structures by mcs. Fixes pinvoke7.cs.
5290
5291         * marshal.h marshal.c: Added locks around the wrapper caches to make
5292         this module thread safe.
5293
5294         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
5295         this argument. Fixes pinvoke1.exe.
5296
5297 2003-08-25  Lluis Sanchez <lluis@ximian.com>
5298
5299         * object.h: Added call_type field to MonoMethodMessage and the corresponding
5300         enumeration of values. Removed fields to store remote call output values in
5301         MonoAsyncResult. Not needed any more.
5302         * object.c: Initialize call_type and async_result fields in mono_message_init.
5303         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
5304         dispatching the message.
5305         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
5306         async call to finish. To do it use a message with EndInvoke call type.
5307
5308 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
5309
5310         * loader.h loader.c (mono_method_hash_marhal_info): New function which
5311         determines whenever a method has marshalling info.
5312
5313 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5314
5315         * assembly.c: fix the build on windows.
5316
5317 2003-08-22 Lluis Sanchez <lluis@ximian.com>
5318
5319         * object.cs: Fixed bug #47785.
5320
5321 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
5322
5323         * string-icalls.c (StringReplace): If their are no occurances of
5324         the old string found return a reference to the supplied
5325         string. This saves some memory and matches MS behavoir.
5326         
5327 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5328
5329         * socket-io.c: fixed compilation for systems that define AF_INET6
5330         and don't define SOL_IP/SOL_IPV6.
5331
5332 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
5333
5334         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
5335         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
5336
5337         * rawbuffer.c rawbuffer.h: Make this module thread safe.
5338
5339         * domain.c: Make this module thread safe.
5340
5341         * domain.c (mono_init): Call new initialization function.
5342
5343         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
5344         reference types too. Fixes #38812.
5345
5346         * image.c (mono_image_init): Fixed warnings.
5347
5348         * class.c (mono_class_from_typeref): Handle assembly load failure
5349         correctly.
5350
5351         * appdomain.c (add_assemblies_to_domain): Handle the case when
5352         the references of an assembly are not yet loaded.
5353
5354         * metadata.c image.c assembly.c: Moved initialization of global
5355         variables to a separate function called at startup since lazy 
5356         initialization of these variables is not thread safe.
5357         
5358         * image.c assembly.c: Made this module thread safe by adding locks in 
5359         the appropriate places.
5360
5361         * domain.c (mono_init): Call the new initialization functions of the
5362         three modules.
5363
5364 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
5365
5366         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
5367           make a direct call. It is proxy's work to make the call asynchronous.
5368           mono_delegate_end_invoke(): If the targe is a proxy, just collect
5369           the return values.
5370         * object.cs: mono_method_call_message_new(): read AsyncResult and
5371           state object from parameters list, if this info is requested.
5372         * object.h: Added fields to store remote call output values in
5373           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
5374
5375 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5376
5377         * object.h: add needed fields to MonoThread.
5378         * threads.c, threads.h: allow registering a function to cleanup data
5379         allocated per thread by the JIT.
5380
5381 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5382
5383         * loader.h: portability fix by Bernie Solomon
5384         * <bernard@ugsolutions.com>.
5385
5386 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
5387
5388         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
5389         return a MonoArray. This simplifies the code and also ensures that
5390         the cache allways contains an object reference as a value.
5391
5392         * icall.c (ves_icall_get_parameter_info): Simplified using the new
5393         function.
5394
5395 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5396
5397         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
5398         fixes a problem with byte ordering when getting the address family for
5399         a socket.
5400
5401 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
5402
5403         * .cvsignore: Added monosn.
5404
5405         * reflection.h reflection.c loader.c: Added support for parameter
5406         marshalling to dynamically created types. Fixes #47295.
5407
5408 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
5409
5410         * rand.c: remove useless warnings.
5411
5412 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5413
5414         * class.c: implemented ldtoken for methods and fieldrefs.
5415
5416 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5417
5418         * threadpool.c: when mono_async_invoke was called, no one took care of
5419         monitoring the queue. So if the method invoked took some time and we
5420         got new async invoke requests after 500 ms (the thread created waited
5421         that long in WaitForSingleObject), the new async invoke was not called
5422         until the previous one finished.
5423
5424         This is fixed now. Thanks to Totte for helping with it.
5425
5426 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5427
5428         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
5429
5430 2003-08-11  Martin Baulig  <martin@ximian.com>
5431
5432         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
5433
5434 2003-08-06  Martin Baulig  <martin@ximian.com>
5435
5436         * mono-debug-debugger.c: Added support for static fields,
5437         properties and methods.
5438
5439 2003-08-06  Martin Baulig  <martin@ximian.com>
5440
5441         * mono-debug-debugger.c: Don't store the MonoString's vtable to
5442         make this work for applications with multiple application domains.
5443
5444 2003-08-04  Martin Baulig  <martin@ximian.com>
5445
5446         * mono-debug-debugger.c: Completely reworked the type support; the
5447         most important thing is that we're now just using one single
5448         `MonoType' instance per type.
5449
5450 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
5451
5452         * mono-endian.h, mono-endian.c, icall.c: Added icall
5453         ves_icall_System_Double_AssertEndianity to assert double word endianity
5454         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
5455
5456 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5457
5458         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
5459         support, icalls and fixes.
5460
5461 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
5462
5463         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
5464         classes that are a punctuation character in .NET is not the same a
5465         g_unichar_ispunct.
5466
5467 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5468
5469         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
5470
5471 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
5472
5473         * icall.c: Add new MemCopy internalcall.
5474         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
5475         Simplified code; It is not necessary to handle all the cases here,
5476         as the C# code takes care of it.  Only handle the case of the name
5477         resource embedded into the assembly.
5478
5479         Changed signature to return the data pointer and the size of the
5480         data. 
5481
5482 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
5483
5484         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
5485         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
5486
5487 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
5488
5489         * socket-io.c: ignore EINTR error in select.
5490
5491 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5492
5493         * class.h, class.c: removed unused subclasses field in MonoClass.
5494
5495 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
5496
5497         * icall.c: improve fix of get_base_definition(). If the parent class
5498           doesn't have the mehod, look at the parent of the parent.
5499         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
5500           to check if a parameter is an in or out parameter
5501           (PARAM_ATTRIBUTE_IN is not set by default).
5502           mono_method_return_message_restore(): Use mono_class_value_size to
5503           get the size of a value type. mono_type_stack_size (parameterType)
5504           does not return the correct value if parameterType is byRef.
5505           mono_load_remote_field(), mono_load_remote_field_new(),
5506           mono_store_remote_field(), mono_store_remote_field_new():
5507           raise exception if the remote call returns an exception.
5508
5509 2003-07-28  Martin Baulig  <martin@ximian.com>
5510
5511         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
5512         method.  This is a wrapper around mono_runtime_invoke() which
5513         boxes the instance object if neccessary.
5514
5515 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5516
5517         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
5518         metadata.h, row-indexes.h, verify.c: first cut of generics support.
5519
5520 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5521
5522         * icall.c: disable mcs bug workaround.
5523
5524 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
5525
5526         * object.c (mono_runtime_class_init): Take the metadata_section
5527         mutex before obtaining the domain mutex.
5528
5529         * appdomain.h: Added definition of metadata_section mutex here. 
5530
5531         * object.c: define metadata_mutex here.
5532
5533 2003-07-24  Ravi Pratap  <ravi@ximian.com>
5534
5535         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
5536         fixed.
5537
5538 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
5539
5540         * reflection.c: Fix bug #46669
5541
5542 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5543
5544         * exception.c:
5545         * exception.h:
5546         * icall.c:
5547         * object.h: fill in the type name for TypeLoadException.
5548
5549 2003-07-23  Ravi Pratap  <ravi@ximian.com>
5550
5551         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
5552         relationship between TypeBuilders while compiling corlib) and bug
5553         45993 (Array types returned from the runtime while compiling
5554         corlib were from the loaded corlib).
5555
5556 2003-07-22  Martin Baulig  <martin@ximian.com>
5557
5558         * mono-debug-debugger.c: Reworked the type support a bit more;
5559         distinguish between types and classes.
5560
5561 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
5562
5563         * icall.c: add IsArrayImpl icall.
5564
5565 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
5566
5567         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
5568         initializing real_size only once. Also fix bug #46602.
5569
5570 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
5571
5572         * object.c: Renamed mono_metadata_section to metadata_section.
5573
5574 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
5575
5576         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
5577           empty array if the type is an array. Fixed.
5578           ves_icall_MonoMethod_get_base_definition: if the base method
5579           is abstract, get the MethodInfo from the list of methods of
5580           the class.
5581         * reflection.c: ParameterInfo.PositionImpl should be zero-based
5582           and it was 1-based. Fixed in mono_param_get_objects.
5583
5584 2003-07-20  Martin Baulig  <martin@ximian.com>
5585
5586         * mono-debug.h: Set version number to 31.
5587         (mono_debug_init): Added `MonoDomain *' argument.
5588
5589         * mono-debug-debugger.c: Reworked the type support; explicitly
5590         tell the debugger about builtin types; pass the `klass' address to
5591         the debugger.
5592
5593 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
5594
5595         * image.c: Allow new metadata tables to be loaded without a
5596         warning. Also update the warning message to give the new constant value.
5597                 
5598 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5599
5600         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
5601         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
5602         array type representation changes.
5603
5604 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5605
5606         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
5607         on Environment.Exit () call.
5608
5609 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5610
5611         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
5612         requires a matching corlib.
5613
5614 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
5615
5616         * Changelog: My editor decided to add a CR to each line. Sorry about that.
5617           Committed again without the CRs.
5618         
5619 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
5620
5621         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
5622           getting it from the "this" socket instance. Did not work
5623           if the socket is a subclass of Socket.
5624           Also fixed bug #35371.
5625
5626 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5627
5628         * metadata.c: fixed size for TypedByRef.
5629         * loader.c: when searching for a method, consider the vararg amrker.
5630         * unicode.c, decimal.c: constify some arrays.
5631
5632 2003-07-15  Dick Porter  <dick@ximian.com>
5633
5634         * socket-io.c: Fixed compilation for gcc < 3.2.
5635
5636         Fixed compilation for machines that don't have AF_INET6 (thanks to
5637         Bernie Solomon <bernard@ugsolutions.com> for that part.)
5638
5639         Fixed compile warnings.
5640         
5641         Fixed formatting and line endings.
5642
5643 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
5644
5645         * socket-io.h:
5646         * socket-io.c: Added IPv6 support.
5647
5648 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
5649
5650         * class.c (mono_class_is_assignable_from): New function to implement
5651         the is_assignable_from logic. Used by mono_object_isinst, 
5652         Type::IsAssignableFrom () and the interpreter.
5653
5654         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
5655         Object, even interfaces.
5656         
5657         * object.c (mono_object_isinst): Implement in terms of 
5658         is_assignable_from.
5659
5660         * icall.c (ves_icall_type_is_assignable_from): New icall.
5661
5662 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
5663
5664         * domain.c (foreach_domain): fix compiler warning.
5665
5666 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
5667
5668         * image.c (load_metadata_ptrs): use g_strndup because strndup is
5669         not available on all plattforms
5670
5671 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
5672
5673         * image.h image.c: Store the metadata version string in MonoImage.
5674         * icall.c: New icall to retrieve the image version.
5675         * reflection.c (create_dynamic_image): Fill in the image version field
5676         * reflection.c (build_compressed_metadata): Use the image version
5677         from the image structure.
5678
5679 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5680
5681         * appdomain.c: modified comment.
5682         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
5683         That will be its last iteration when mono_gc_cleanup is called from
5684         mono_runtime_cleanup and before the domain is unloaded.
5685
5686         Fixes bug #45962.
5687
5688 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
5689
5690         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
5691         attributes.
5692
5693 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5694
5695         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
5696         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
5697         Bernie Solomon <bernard@ugsolutions.com>.
5698
5699 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5700
5701         * object.c, object.h: provide mono_object_new_fast() for faster
5702         allocation in some special cases.
5703
5704 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
5705
5706         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
5707         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
5708
5709 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
5710
5711         * threadpool.c: fix leaks.
5712
5713 2003-07-01  Dick Porter  <dick@ximian.com>
5714
5715         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
5716         using MonoGHashTables.  Fixes threadpool bug posted to list.
5717
5718 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
5719
5720         * image.h, image.c: added support to load an assembly from a byte array.
5721         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
5722         assembly bundle support.
5723
5724 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
5725
5726         * threadpool.c (mono_thread_pool_add): keep a reference to the
5727         AsyncResult to prevent GC
5728
5729 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5730
5731         * class.c: leak fix.
5732
5733 2003-06-25  Dick Porter  <dick@ximian.com>
5734
5735         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
5736         for the async object, the WaitHandle object will close the handle.
5737         Fixes bug 45321.
5738
5739 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5740
5741         * class.c: in mono_array_class_get (), lookup from the hash with the
5742         same type we insert: this works around a bug in
5743         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
5744         lluis. The real fix will have to wait for after the release.
5745
5746 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5747
5748         * icall.c: fix memory leak when getting type members.
5749
5750 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5751
5752         * reflection.c: added more pubtoken special cases.
5753
5754 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
5755
5756         * class.c: handle field offset correctly when class size
5757         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
5758
5759 2003-06-20  Martin Baulig  <martin@ximian.com>
5760
5761         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
5762         *image' field.
5763
5764 2003-06-20  Martin Baulig  <martin@ximian.com>
5765
5766         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
5767
5768 2003-06-20  Martin Baulig  <martin@ximian.com>
5769
5770         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
5771         just distinguish between variables in registers and variables at
5772         an offset relative to a register.
5773
5774 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5775
5776         * icall.c: #ifdef out latest changes until mcs is fixed.
5777
5778 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5779
5780         * icall.c: return members in metadata order.
5781
5782 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5783
5784         * icall.c: avoid infinite loop in GetTimeZoneData.
5785
5786 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
5787
5788         * icall.c: added Marshal.Prelink/All icalls.
5789
5790 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5791
5792         * object.c, object.h: fix warnings and do some overflow checking
5793         when creating arrays.
5794
5795 2003-06-17  Dick Porter  <dick@ximian.com>
5796
5797         * file-io.h:
5798         * file-io.c: File attributes need to be tweaked slightly when
5799         passed from the managed to the w32 world.
5800
5801 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
5802         * profiler.h profiler-private.h profiler.c: Rework last patch
5803         based on suggestion by Paolo.
5804         
5805 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
5806
5807         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
5808         instruction level coverage data collection.
5809         * profiler.h profiler.c (: Added new callback function which can be
5810         used by the profiler to limit which functions should have coverage
5811         instrumentation.
5812         * profiler.c (mono_profiler_load): Call g_module_build_path to
5813         generate the file name of the profiler library.
5814
5815 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5816
5817         * profiler.c, profiler.h, profiler-private.h: added basic block 
5818         coverage profiling API.
5819
5820 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
5821
5822         * reflection.c (mono_reflection_create_runtime_class): Add support
5823         for events in dynamically generated code.
5824
5825         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
5826         not allocated.
5827
5828 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5829
5830         * icall.c: when getting timezone info, return reasonable values if we
5831         can't get the actual data.
5832
5833 2003-06-14  Dick Porter  <dick@ximian.com>
5834
5835         * threads.c (start_wrapper): Remove the reference to the thread
5836         object in the TLS data, so the thread object can be finalized.
5837         This won't be reached if the thread threw an uncaught exception,
5838         so those thread handles will stay referenced :-( (This is due to
5839         missing support for scanning thread-specific data in the Boehm GC
5840         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
5841
5842 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
5843
5844         * reflection.c: ensure streams and tables are first allocated with
5845         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
5846
5847 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5848
5849         * icall.c: fixed GetElementType for byrefs (bug# 44792).
5850
5851 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
5852
5853         * reflection.c (mono_reflection_create_runtime_class): Add support for
5854         properties to dynamically created classes.
5855         * reflection.c: Fix a few places where non-MonoObjects were inserted
5856         into the tokens hashtable.
5857
5858 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5859
5860         * object.c: some support to handle out of memory exceptions.
5861
5862 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
5863
5864         * marshal.c (mono_marshal_get_native_wrapper): support reference
5865         return types
5866
5867 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5868
5869         * object.h, object.c: more portability stuff from Bernie Solomon.
5870         Unexport mono_object_allocate(). Added mono_object_unbox ().
5871         Set exitcode when an unhandled exception is thrown.
5872
5873 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
5874
5875         * marshal.c (mono_marshal_get_native_wrapper): use custom
5876         marshaler for return types.
5877
5878 2003-06-10  Dick Porter  <dick@ximian.com>
5879
5880         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
5881         ip_mreq is available
5882
5883 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
5884
5885         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
5886         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
5887         by Bernie Solomon <bernard@ugsolutions.com>.
5888
5889 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
5890
5891         * gc.c (mono_gc_init): Avoid error message on shutdown when
5892         GC_DONT_GC=1 is used.
5893
5894         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
5895         New icall to return the GUID of a module.
5896
5897 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5898
5899         * class.c: ensure instance size always includes the parent's size
5900         even whem class size is set explicitly (fixes bug#44294).
5901
5902 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5903
5904         * profiler.h, profiler.c: made the simple profiler thread-safe,
5905         get more accurate timing info. Allow the loading of an
5906         externally-developed profiler module.
5907
5908 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
5909
5910         * marshal.c (mono_marshal_get_native_wrapper): improved
5911         class/byref arguments.
5912         (mono_marshal_get_native_wrapper): better string marshaling support.
5913
5914 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5915
5916         * class.c: ensure .pack and .size are handled correctly and
5917         simplified layout of static fields.
5918
5919 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
5920
5921         * appdomain.c
5922         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
5923
5924         * loader.c (mono_lookup_pinvoke_call): look for modules in the
5925         current directory (fix bug 44008)
5926
5927 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
5928
5929         * marshal.c (mono_marshal_get_native_wrapper): started support for
5930         custom marshalers.
5931         (mono_delegate_to_ftnptr): consider marshalling specifications
5932
5933 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5934
5935         * reflection.c, reflection.h: emit custom marshal info.
5936
5937 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5938
5939         * object.c: free the GError.
5940         * icall.c: added CloseEvent_internal.
5941         * threads.[ch]:
5942         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
5943         call.
5944
5945 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
5946
5947         * loader.c (mono_method_get_signature): Add support for dynamic
5948         assemblies.
5949
5950 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5951
5952         * reflection.c: fixed bug #43905.
5953
5954 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5955
5956         * class.c, domain.c, icall.c, metadata.h, object.h: support for
5957         handling TypedReference and ArgIterator.
5958         * loader.c, loader.h: added function to get signature at call site.
5959
5960 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5961
5962         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
5963         data readonly. Buglets and warning fixes. Some MethodSpec support.
5964
5965 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5966
5967         * class.h, class.c, object.c: remove relative numbering support.
5968
5969 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
5970
5971         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
5972         free the string, until we get a chance to fix Gtk#
5973
5974 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5975
5976         * marshal.c: revert last patch.
5977
5978 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5979
5980         * icall.c: updates for new mono_class_vtable() not calling
5981         the type constructor anymore.
5982
5983 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5984
5985         * object.h, object.c: separate vtable creation from type
5986         initialization. Make running the .cctor thread safe.
5987
5988 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
5989
5990         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
5991
5992 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
5993
5994         * loader.c (mono_get_method): consider calling convention
5995
5996 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
5997
5998         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
5999         to return the invisible global type for a module.
6000
6001         * reflection.c (mono_image_build_metadata): Emit global fields too.
6002
6003 2003-05-20  Peter Williams  <peterw@ximian.com>
6004
6005         * loader.c (mono_lookup_internal_call): Add a few newlines.
6006
6007 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
6008
6009         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
6010         literal strings.
6011
6012         * appdomain.c (set_domain_search_path): Recalculate search path when
6013         AppDomainSetup.PrivateBinPath changes.
6014
6015         * object.c (mono_class_compute_gc_descriptor): It turns out some
6016         parts of the class libs (like System.Thread) holds pointers to
6017         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
6018         to treat native int a pointer type here.
6019         
6020 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
6021
6022         * appdomain.h, domain.c: add hashtable for jump target resolution.
6023
6024 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
6025
6026         * reflection.h reflection.c icall.c: Added new icalls 
6027         GetManifestResourceInfoInternal, GetModulesInternal and support
6028         infrastructure.
6029
6030 2003-05-16  Dick Porter  <dick@ximian.com>
6031
6032         * icall.c:
6033         * file-io.h:
6034         * file-io.c: Implement System.IO.MonoIO::GetTempPath
6035
6036 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
6037
6038         * object.c: mono_store_remote_field: little fix to previous patch.
6039
6040 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
6041
6042         * class.c: add constructors to array classes.
6043         * icall.c: special case array construction for InternalInvoke (),
6044
6045 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
6046
6047         * class.h class.c reflection.c object.c: Added support for field
6048         defaults in dynamically generated classes.
6049
6050 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
6051
6052         * reflection.c: properly encode charset for ddlimport.
6053
6054 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
6055
6056         * threads.c: allow compiling without GC.
6057
6058 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6059
6060         * appdomain.h, object.c, object.h, threads.c, threads.h: added
6061         handling of thread static data.
6062
6063 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6064
6065         * reflection.h, reflection.c: added mono_custom_attrs_free ().
6066
6067 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
6068
6069         * class.c (mono_array_class_get): always set the serializable flags
6070         (mono_array_class_get): always set the SEALED attribute for array types
6071
6072 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
6073
6074         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
6075         attributes (fix for bug 42021).
6076
6077 2003-05-12  Dick Porter  <dick@ximian.com>
6078
6079         * gc.c: Don't run finalizers when the finalizer thread is
6080         finishing up, because the default domain has already been
6081         destroyed.
6082
6083 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
6084
6085         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
6086         value is null, we should throw an exception.   This is slightly
6087         different than the other conventions used for the constructor.
6088
6089 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6090
6091         * socket-io.c: fixed windows build.
6092
6093 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6094
6095         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
6096
6097 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
6098
6099         * object.c (mono_string_new_wrapper): Compatibility fix for MS
6100         compilers.
6101
6102 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
6103
6104         * class.c (mono_class_layout_fields): Add experimental GC aware
6105         auto layout facility. Requires class library changes to work correctly.
6106
6107         (mono_class_setup_vtable): Avoid overriding explicit interface
6108         method implementations. Fixes iface3.exe test.
6109
6110         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
6111         object reference.
6112         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
6113         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
6114
6115         * metadata.h: Add new type classification macro which determines
6116         whenever the type holds an object reference.
6117
6118 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
6119
6120         * marshal.c (mono_marshal_get_native_wrapper): cleanups
6121
6122 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
6123
6124         * gc.c (finalizer_thread): Work around a GC bug.
6125
6126 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
6127
6128         * marshal.c (emit_struct_conv): allow unions
6129
6130         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
6131
6132 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
6133
6134         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
6135
6136 2003-05-06  Martin Baulig  <martin@ximian.com>
6137
6138         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
6139
6140 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6141
6142         * socket-io.c:
6143         (Select_internal): allow NULLs, don't create arrays if not needed.
6144         Coupled with Socket.cs changes.
6145
6146         * threadpool.c:
6147         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
6148         register a finalizer for it that will close the semaphore handle. This
6149         fixes the leak and make Lupus' test run with > 4080 loops.
6150
6151 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
6152
6153         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
6154         Jerome Laban (bug #42287)
6155
6156 2003-05-02  Martin Baulig  <martin@ximian.com>
6157
6158         * debug-mono-symfile.h
6159         (MonoSymbolFile): Moved declaration into mono-debug.h.
6160         (MonoDebugMethodJitInfo): Likewise.
6161         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
6162         argument.
6163         (_mono_debug_address_from_il_offset): Take a
6164         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
6165
6166         * mono-debug.h
6167         (MonoDebugDomainData): New struct.
6168         (mono_debug_get_domain_data): New function.
6169         (mono_debug_add_method): Take an additional `MonoDomain *'
6170         argument.
6171         (mono_debug_source_location_from_address): Likewise.
6172         (mono_debug_il_offset_from_address): Likewise.
6173         (mono_debug_address_from_il_offset): Likewise.
6174
6175 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
6176
6177         * reflection.c: one more check for null type in custom attrs.
6178
6179 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6180
6181         * reflection.c: avoid warning (comparison is always false due to limited
6182         range of data type).
6183
6184 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6185
6186         * icall.c: throw an exception in Type.GetField if the argument 'name'
6187         is NULL.
6188
6189 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
6190
6191         * reflection.c: fixed handling of enums in named arguments to custom
6192         attributes (bug #42123).
6193
6194 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6195
6196         * reflection.c: use the right array element type and handle
6197         a null for a Type argument, too.
6198
6199 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
6200
6201         * reflection.c: handle arrays as arguments to custom attributes.
6202
6203 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
6204
6205         * reflection.c: handle a string value in a custom attr
6206         ctor that takes an object.
6207
6208 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
6209
6210         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
6211         (fix bug #42063)
6212
6213 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
6214
6215         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
6216
6217 2003-04-27  Martin Baulig  <martin@ximian.com>
6218
6219         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
6220         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
6221         MONO_DEBUGGER_EVENT_BREAKPOINT.
6222         (mono_breakpoint_trampoline_code): Removed.
6223         (mono_debugger_event_handler): The last argument is now a
6224         `guint32'.
6225         (mono_debugger_insert_breakpoint_full): Removed the
6226         `use_trampoline' argument.
6227         (mono_debugger_method_has_breakpoint): Likewise.
6228         (mono_debugger_trampoline_breakpoint_callback): Renamed to
6229         mono_debugger_breakpoint_callback(); take the method and
6230         breakpoint number as arguments.
6231
6232 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6233
6234         * metadata.c: fix off by one when loading parameters attributes.
6235
6236 2003-04-24  Martin Baulig  <martin@ximian.com>
6237
6238         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
6239
6240 2003-04-24  Martin Baulig  <martin@ximian.com>
6241
6242         * mono-debug-debugger.c: Moved all code which interacts with the
6243         Mono Debugger here.
6244
6245         * debug-mono-symfile.c: This code now just deals with the symbol
6246         file itself, the debugger code is now in mono-debug-debugger.c.
6247
6248 2003-04-23  Martin Baulig  <martin@ximian.com>
6249
6250         * mono-debug.c (mono_debug_source_location_from_il_offset):
6251         New method; like mono_debug_source_location_from_address(), but
6252         takes an IL offset instead of a machine address.
6253
6254 2003-04-23  Martin Baulig  <martin@ximian.com>
6255
6256         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
6257         `line' field; this is now computed by the debugger.
6258
6259 2003-04-23  Martin Baulig  <martin@ximian.com>
6260
6261         * mono-debug.[ch]: New files.  This is the new debugging interface.
6262
6263         * mono-debug-debugger.[ch]: New files.  Moved all code which
6264         interacts with the Mono Debugger here.
6265
6266 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
6267
6268         * domain.c (mono_init): initialize mono_defaults.monitor_class
6269
6270 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
6271
6272         * reflection.c (method_encode_code): Add a spicy exception to help
6273         future compiler authors.
6274
6275 2003-04-21  Martin Baulig  <martin@ximian.com>
6276
6277         * icall.c
6278         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6279         Make this work with relative pathnames; g_filename_to_uri() needs
6280         an absolute filename.
6281
6282 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
6283
6284         * icall.c: Track name changes in Object and ValueType.
6285
6286 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
6287
6288         * metadata.c (mono_type_stack_size): size should be a multiple of
6289         sizeof (gpointer)
6290
6291 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6292
6293         * gc.c:
6294         (internal_domain_finalize): moved into mono_domain_finalize. No need
6295         to create another thread because the finalizers will be run in the
6296         finalizer thread.
6297         
6298         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
6299         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
6300         to be run (MS does this too).
6301
6302 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
6303
6304         * object.c (mono_class_compute_gc_descriptor): Update comment.
6305
6306         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
6307
6308         * image.h: Add synchronized wrapper cache.
6309
6310         * image.c (do_mono_image_open): Initialize cache.
6311
6312         * reflection.c (create_dynamic_mono_image): Initialize cache.
6313
6314 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6315
6316         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
6317         ves_icall_System_Buffer_ByteLengthInternal.
6318
6319 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6320
6321         * reflection.c: setup klass->nested_in earlier. Allow
6322         a dash in the assembly name.
6323
6324 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
6325
6326         * metadata.c (mono_type_to_unmanaged): dont access
6327         type->data.klass for MONO_TYPE_OBJECT
6328         (mono_type_to_unmanaged): consider System.Delegate class
6329
6330 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
6331
6332         * class.c: just setup supertypes in the proper place instead of
6333         initializing the full element class for arrays.
6334
6335 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6336
6337         * class.c: ensure the element class of arrays is initialized.
6338         Setup the supertype info for array classes, too.
6339
6340 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
6341
6342         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
6343
6344 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6345
6346         * Makefile.am: re-added -m option when running cygpath. This way,
6347         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
6348         separator.
6349         * mono-config.c: same codepath for locating mono config file for WIN32
6350         and the rest.
6351         * assembly.c: if mono_assembly_setrootdir is called, don't override
6352         the value set.
6353
6354 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6355
6356         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
6357         MONO_ASSEMBLIES variable.
6358
6359 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
6360
6361         * icall.c: added Assembly::GetNamespaces() icall.
6362
6363 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6364
6365         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
6366
6367 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
6368
6369         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
6370         * object.c: fixed bug in the construction of vtable for proxies
6371
6372 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
6373
6374         * object.c (mono_array_new): Mark mono_array_new as an icall.
6375
6376 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6377
6378         * class.c: fixed test for public method when overriding interfaces.
6379         Closes bug #40970.
6380
6381 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6382
6383         * appdomain.h, domain.c: added mono_domain_foreach() to
6384         be able to access the currently loaded appdomains.
6385         * object.c: make string interning work across sppdomains.
6386         Mark some functions for use as icalls.
6387
6388 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
6389
6390         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
6391
6392         * reflection.h reflection.c: Allocate long living data using 
6393         GC_MALLOC_ATOMIC so the collector does not need to scan it.
6394
6395         * reflection.c: Double the allocation size in streams instead of
6396         increasing it, to prevent unneccesary copying on large assemblies.
6397         
6398         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
6399         creation if the assembly does not have the Run flag set.
6400
6401 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6402
6403         * class.h: avoid the C++ keywords in header files (Jerome Laban
6404         spotted and fixed this).
6405
6406 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6407
6408         * object.c:
6409         (mono_unhandled_exception): fill in the arguments for the
6410         UnhandledException event. Only trigger that event for the default
6411         domain (as MS does).
6412
6413 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
6414
6415         * object.c: Improve typed allocation stuff based on suggestions from
6416         Paolo. Also turn it on if the GC library supports it.
6417
6418 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
6419
6420         * object.c object.h class.h: Added experimental typed allocation
6421         facility using the interfaces in gc_gcj.h.
6422
6423         * os/gc_wrapper.h: Added new include files.
6424         
6425 2003-04-03  Martin Baulig  <martin@ximian.com>
6426
6427         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
6428         which is not yet enabled by default.
6429
6430         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
6431         functions.
6432         (mono_gc_lock, mono_gc_unlock): New static functions.
6433
6434         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
6435         functions; stop/start the world for the garbage collector.  This
6436         is using the windows API; we need to complete the SuspendThread()/
6437         ResumeThread() implementation in the io-layer to make this work on Unix.
6438         (mono_gc_push_all_stacks): New public function; tells the garbage
6439         collector about the stack pointers from all managed threads.
6440
6441 2003-04-03  Martin Baulig  <martin@ximian.com>
6442
6443         * object.h (MonoThread): Added `gpointer stack_ptr'.
6444
6445         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
6446
6447 2003-04-03  Martin Baulig  <martin@ximian.com>
6448
6449         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
6450
6451 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
6452
6453         * reflection.c (typebuilder_setup_fields): Initialize field.first and
6454         field.last.
6455
6456 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
6457
6458         * loader.c (mono_lookup_internal_call): Report the corlib that is
6459         out of sync.
6460
6461 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
6462
6463         * icall.c (ves_icall_type_GetTypeCode): fixed check for
6464         System.DBNull (it's class not valuetype).
6465
6466 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6467
6468         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
6469         if the array method was already assigned a token (fixes bug#40646).
6470
6471 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
6472
6473         * reflection.c (mono_reflection_get_type): Attempt type resolve even
6474         if no assembly is given.
6475
6476 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
6477
6478         * metadata.h: Added the new tables.
6479
6480         * row-indexes.h: Added definitions for new tables.
6481
6482         * metadata.c: Add schemas for new tables, and add support for
6483         computing the sizes of them.
6484
6485         * class.c: Update for handling the new type cases.
6486
6487 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
6488
6489         * metadata.h (MONO_TYPE_IS_VOID): new macro
6490
6491 2003-03-31  Martin Baulig  <martin@ximian.com>
6492
6493         * threads.h (MonoThreadCallbacks): Added `thread_created'.
6494
6495         * threads.c (mono_thread_new_init): Call `thread_created' in the
6496         mono_thread_callbacks.
6497
6498 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
6499
6500         * loader.h: added marshalbyrefobject_class to mono_defaults
6501         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
6502         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
6503           generation of output parameters.
6504           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
6505         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
6506           contextbound and the target object belongs to the context of the caller.
6507         * object.h: added context and unwrapped_server variables in MonoRealProxy.
6508         * object.c: Implemented support for interfaces and abstract classes
6509           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
6510           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
6511
6512 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
6513
6514         * class.h class.c (mono_class_is_subclass_of): New function.
6515         
6516         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
6517         routines for most common case (calls from ArrayList::ToArray).
6518
6519         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
6520         routine so programs which call Environment::Exit() can be profiled.
6521
6522         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
6523         Added MONO_ARCH_SAVE_REGS.
6524
6525         * icall.c (ves_icall_type_is_subtype_of): Use new function.
6526
6527 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
6528
6529         * blob.h: Add a couple of new MonoType types definitions.
6530
6531         * tabledefs.h: Add a couple of new call convs.
6532
6533 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
6534
6535         * reflection.h (MonoReflectionDynamicAssembly): track changes in
6536         the layout of the class.
6537
6538         * reflection.c (alloc_table): double the size on overflow to avoid
6539         unnecessary copying.
6540
6541         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
6542         avoid filling out metadata tables and blobs. Also set mb->ilgen to
6543         null so it can be garbage collected.
6544         
6545 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
6546
6547         * reflection.c (mono_reflection_get_type): Return the resolved type
6548         only if it is in the assembly we searched.
6549
6550         * reflection.c (ensure_runtime_vtable): Initialize method slots.
6551
6552         * class.c (mono_class_setup_vtable): Set the slot of the overriding
6553         method.
6554
6555 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6556
6557         * appdomain.c:
6558         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
6559         the right one is 'file:///blah', but MS allows it.
6560         * assembly.c:
6561         (mono_assembly_open): allow 'file://blah'
6562
6563         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
6564
6565 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
6566
6567         * socket-io.c: fixes bug #40310.
6568
6569 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
6570
6571         * reflection.c (mono_reflection_parse_type): handle deeply nested
6572         types correctly.
6573
6574         * reflection.c (mono_image_create_token): Use unique token values
6575         since they will be put into a hash table.
6576
6577         * class.c (mono_class_setup_vtable): If a method occurs in more than
6578         one place in the vtable, and it gets overriden, then change the
6579         other occurances too.
6580
6581         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
6582         object as return type.
6583
6584 2003-03-22  Pedro Martínez Juliá  <yoros@wanadoo.es>
6585
6586         * icall.c: Deleted "ToString" implementation for double and float
6587         because they are full implemented in managed code.
6588
6589 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6590
6591         * reflection.c, reflection.h: implemented and exported functions
6592         to retrieve info about custom attributes.
6593
6594 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6595
6596         * appdomain.c: moved Uri handling to assembly.c
6597         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
6598         work when using a file Uri in *nix and windows.
6599
6600         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
6601         GetReferencedAssemblies.
6602
6603 2003-03-18  Dick Porter  <dick@ximian.com>
6604
6605         * icall.c: Rename a couple of internal calls
6606
6607         * threads.c: Set the thread state to Stopped when a thread exits.
6608         Fixes bug 39377.
6609
6610 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
6611
6612         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6613         New icall.
6614
6615         * object.c (mono_class_vtable): fix warning.
6616
6617 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
6618
6619         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
6620
6621         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
6622         memory.
6623         (method_encode_clauses): Create exception info structures in the right
6624         order.
6625         (mono_reflection_setup_internal_class): Initialize supertypes field.
6626
6627         * class.c object.c: Handle interfaces which implement other interfaces 
6628         correctly.
6629
6630         * class.h class.c: Move the supertypes array initialization code into 
6631         a separate function so it can be used for dynamic types too. Also call
6632         it earlier, in mono_class_init(), since it can be used before the
6633         type is initialized.
6634
6635 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6636
6637         * Makefile.am:
6638         * assembly.c:
6639         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
6640
6641         * appdomain.c:
6642         * appdomain.h:
6643         * marshal.c:
6644         * object.c: remove warnings.
6645
6646 2003-03-13  Martin Baulig  <martin@ximian.com>
6647
6648         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
6649         (MonoDebugLexicalBlockEntry): New types.
6650
6651         * debug-mono-symfile.c
6652         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
6653
6654 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6655
6656         * process.c: ret can be any non-zero value accroding to MS doc.
6657
6658 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
6659
6660         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
6661         fixing a warning for a miss-used prototype, would have cause
6662         random memory corruption.
6663
6664 2003-03-07  Martin Baulig  <martin@ximian.com>
6665
6666         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
6667         getting really annoying ....
6668
6669 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
6670
6671         * reflection.c (fixup_method): added support for array methods.
6672
6673 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
6674
6675         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
6676         (pointed out by Michael Adams).
6677
6678 2003-03-04  Dick Porter  <dick@ximian.com>
6679
6680         * icall.c: Temporarily reverted the Double and Single ToString()
6681         change, because it broke nunit.
6682
6683 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
6684
6685         * object.h, threads.h: make include files compatible with C++
6686         (patch by Jerome Laban <jlaban@wanadoo.fr>).
6687
6688 2003-03-04  Pedro Martínez Juliá  <yoros@wanadoo.es>
6689
6690         * icall.c: Erased ToString helper functions for Double and Single.
6691         Now, that implementations ar all in managed code (Double and Single
6692         Formatters).
6693
6694 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
6695
6696         * appdomain.c: Added method for initializing the default context of
6697         a domain. Added internal call for getting the default context.
6698         * appdomain.h: Added context variable in MonoDomain struct.
6699         * domain.c: mono_domain_set also sets the default context of the domain
6700         * icall.c: Mapped internal method InternalGetDefaultContext.
6701         * object.c: mono_object_get_virtual_method returns always a remoting
6702         wrapper if the object is a transparent proxy.
6703         mono_runtime_invoke_array: when creating an object by calling the
6704         constructor, if the created object is a proxy, then the constructor should
6705         be called using the a remoting wrapper.
6706
6707 2003-03-03  Dick Porter  <dick@ximian.com>
6708
6709         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
6710         variable so it compiles on solaris.  Problem spotted by
6711         Christopher Taylor <ct@cs.clemson.edu>
6712
6713 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6714
6715         * appdomain.c:
6716         (get_info_from_assembly_name): don't leak value.
6717
6718         * icall.c:
6719         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
6720         result.
6721
6722 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
6723
6724         * assembly.c: export mono_image_load_references ().
6725         * class.c: handle function pointers. mono_class_from_name() now
6726         supports nested type names directly.
6727
6728 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
6729
6730         * reflection.h reflection.c: Encode already created dynamic methods 
6731         and fields correctly as a DEF instead of a REF.
6732
6733         * reflection.c: Get rid of the force_ref argument to 
6734         mono_image_typedef_or_ref since it was wrong in the first place.
6735
6736         * string-icalls.c: add error checking to string constructors according
6737         to the MSDN docs.
6738
6739         * reflection.c: Emit types in the order their TypeBuilders were 
6740         created. Previously, a new table index was assigned to each type before
6741         the tables were emitted. This was wrong because the signature blob
6742         might already refer to a type by its original table index.
6743
6744 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
6745
6746         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
6747         change.
6748         
6749 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6750
6751         * Makefile.am: make assemblies dir have \ instead of / on windows.
6752
6753 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
6754
6755         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
6756         iterate over the NESTEDCLASS table using a linear search since the
6757         table is not guaranteed to be sorted by the secondary key.
6758
6759         * class.c (mono_class_create_from_typedef): fixed up call to
6760         mono_metadata_nesting_typedef.
6761         
6762 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
6763
6764         * marshal.c (mono_string_to_byvalstr): clear the memory as
6765         suggested by Jerome Laban <jlaban@wanadoo.fr>
6766
6767 2003-02-26  Dick Porter  <dick@ximian.com>
6768
6769         * process.c: Cope with padding in .rsrc blocks
6770
6771 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
6772
6773         * metadata.h: reverted the filter_len change, it breaks reflection
6774         
6775 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
6776
6777         * metadata.h: added a new field to store the filter_len
6778         
6779
6780 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
6781
6782         * reflection.c: handle custom attributes for types and members
6783         created with Reflection.Emit (bug#38422).
6784
6785 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
6786
6787         * reflection.c: define RTSpecialName automatically for constructors for
6788         compatibility with MS.NET.
6789
6790         * reflection.c (mono_reflection_create_runtime_class): initialize
6791         nested_in field of dynamically created classes.
6792
6793 2003-02-22  Martin Baulig  <martin@ximian.com>
6794
6795         * debug-mono-symfile.h: Incremented version number.
6796
6797 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
6798
6799         * object.h icall.c process.c: fix warnings.
6800
6801 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
6802
6803         * appdomain.h appdomain.c:
6804         (mono_domain_try_type_resolve): split the 
6805         name_or_tb argument into a name and a tb argument.
6806         (mono_domain_has_type_resolve): new function to check whenever the
6807         application has registered a TypeResolve event handler.
6808         
6809         * icall.c reflection.h reflection.c: move the type resolve logic into
6810         mono_reflection_get_type () so it will be invoked when 
6811         Assembly::GetType () is called.
6812
6813         * reflection.c:
6814         (mono_reflection_get_type): renamed to get_type_internal.
6815         (mono_reflection_get_type): fixed type name generation so it works 
6816         for nested types too.
6817         (mono_reflection_get_type): call has_type_resolve () to avoid the 
6818         costly type name generation if there is no resolve event handler.
6819
6820 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6821
6822         * class.c, image.c: load exported types from file references.
6823
6824 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
6825
6826         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
6827           used to cache the managed methods used to create proxies and make 
6828           remote invocation of methods.
6829         * class.h: Added in MonoVTable a flag to indicate that a class needs 
6830           to be remotely created.
6831         * object.c: Modified the method mono_class_vtable(). It now initializes 
6832           the remote flag of the vtable. Modified mono_object_new_specific(), 
6833           so now it checks the remote flag.
6834         * icall.c: Added a couple of internal methods, one for enabling instance 
6835           creation interception for a type, and one for creating objects bypassing
6836           the remote check.
6837
6838 2003-02-18  Martin Baulig  <martin@ximian.com>
6839
6840         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
6841         New interncall to get a method's metadata token.
6842
6843         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
6844         New interncall for the debugger.
6845
6846 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
6847
6848         * class.c (mono_class_setup_vtable): allocate supertype array
6849
6850 2003-02-18  Martin Baulig  <martin@ximian.com>
6851
6852         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
6853
6854 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6855
6856         * reflection.c:
6857         (assembly_name_to_aname): jump over unknown properties (i've found
6858         something like: 'type, assembly, version=xxx, custom=null, public...',
6859         so now will ignore custom=null and still get the rest of the values).
6860
6861 2003-02-17  Dick Porter  <dick@ximian.com>
6862
6863         * threads.c: Have Thread.Start() wait for a semaphore to signal
6864         that the thread has set up all its local data.  This fixes bug
6865         34323, where Abort() raced the new thread's TLS data.
6866
6867         Also removes the handle_store() call from start_wrapper, because
6868         threads are now always created suspended and there is no longer a
6869         race between the parent and child threads to store the info.
6870
6871 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
6872
6873         * image.c: explain the #- heap issue in a message, hopefully
6874         avoiding FAQs on mono-list.
6875
6876 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6877
6878         * icall.c:
6879         (GetEntryAssembly): if the domain has not invoked
6880         AppDomain.ExecuteAssembly yet, return the assembly of the default
6881         AppDomain.
6882
6883 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
6884
6885         * class.c (mono_ldtoken): make it work in dynamic assemblies.
6886
6887 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
6888
6889         * metadata.c, reflection.c: simple speedup to type hash
6890         and equals code.
6891
6892 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
6893
6894         * image.c, image.h, class.c, assembly.c: move module loading
6895         to MonoImage. When loading metadata, consider alignemnet from
6896         the start of metadata, not from the metadata address in memory.
6897
6898 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
6899
6900         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
6901         AssemblyBuilder objects. Factored out custom attribute creation into
6902         a separate function.
6903         (create_custom_attr): new function to create custom attributes.
6904
6905 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
6906
6907         * Makefile.am: Got tired of typing the full pathname to pedump.
6908         Until there is another option, am installing this.
6909
6910 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
6911
6912         * class.c (class_compute_field_layout): always set field->parent 
6913         (mono_ldtoken): use mono_defaults.fieldhandle_class;
6914
6915 2003-02-11  Dick Porter  <dick@ximian.com>
6916
6917         * threads-types.h:
6918         * monitor.c: Rewrote Monitor, making lock much faster and
6919         Pulse/Wait work as specified.  Also uses much fewer handles, and only
6920         creates them as needed.
6921
6922         * exception.c: Added SynchronizationLockException
6923
6924         * threads.c: Deleted old Monitor implementation.  The new one is
6925         in a new file.
6926
6927 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
6928
6929         * class.c: handled TypedReference type code. Set the correct size for
6930         class data. Setup interface_offsets for interface classes, too.
6931
6932 2003-02-09  Martin Baulig  <martin@ximian.com>
6933
6934         * debug-mono-symfile.h: Reflect latest symbol writer changes.
6935
6936 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
6937
6938         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
6939         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
6940         * object.c: fixed mono_object_get_virtual_method () for interfaces.
6941         * verify.c: check for code that runs after the end of the method.
6942
6943 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
6944
6945         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
6946         "System.Math::Round2".
6947         * sysmath.h: Added Floor, Round and Round2 definitions.
6948         * sysmath.c: Modified certain functions that were not 100% compliant
6949         with MS.NET (math precision) and added the implementation of Floor,
6950         Round and Round2.
6951
6952 2003-02-07  Martin Baulig  <martin@ximian.com>
6953
6954         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
6955
6956 2003-02-07  Martin Baulig  <martin@ximian.com>
6957
6958         * debug-mono-symfile.c: Reflected latest symwriter changes.
6959         (mono_debug_create_mono_symbol_file): Removed.
6960         (mono_debug_open_mono_symbol_file): Take an argument which
6961         specifies whether to create a dynamic symbol file.
6962
6963 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
6964
6965         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
6966
6967 2003-02-05  Martin Baulig  <martin@ximian.com>
6968
6969         * reflection.c (mono_image_build_metadata): Make this public,
6970         protect it against being called multiple times, don't create
6971         resources and don't build the compressed metadata here.
6972         (mono_image_create_pefile): Do this here.
6973
6974         * icall.c
6975         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
6976
6977 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6978
6979         * socket-io.c: fixed bug #36322.
6980
6981 2003-02-06  Piers Haken <piersh@friskit.com>
6982
6983         * appdomain.[ch]:
6984         * class.h:
6985         * debug-mono-symfile.c:
6986         * icall.c:
6987         * loader.c:
6988         * mono-config.c:
6989         * monosn.c:
6990         * reflection.c:
6991         * socket-io.c: warning cleanups
6992
6993 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
6994
6995         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
6996         function. works like remoting invoke, but does a check for the Proxy first.
6997
6998 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
6999
7000         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
7001
7002 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
7003
7004         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
7005         array of pointers.
7006         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
7007         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
7008
7009         * object.c (mono_store_remote_field_new): used by the new jit
7010         instead of mono_store_remote_field
7011         (mono_load_remote_field_new): used by the new jit
7012         instead of mono_load_remote_field
7013
7014 2003-02-05  Patrik Torstensson
7015
7016         * appdomain.c: changed unload to take the domain id instead
7017         of domain
7018         
7019         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
7020
7021
7022 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7023
7024         * appdomain.c: don't look for assemblies in ApplicationBase if
7025         PrivateBinPathProbe is set.
7026
7027 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7028
7029         * object.c: make the first argument in main_args contain the absolute
7030         path to the assembly. Fixes bug #37511.
7031
7032 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7033
7034         * icall.c: get correct UTC offset for countries not using daylight
7035         time saving. Fixes bug #30030.
7036
7037 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7038
7039         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
7040         and 1 are the family).
7041
7042 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
7043
7044         * icall.c (ves_icall_InternalExecute): removed wrong assertion
7045
7046         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
7047
7048 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
7049
7050         * reflection.c: added support for SignatureHelper tokens, which is
7051         needed by the Calli opcode.
7052
7053         * reflection.h: track changes to SignatureHelper class.
7054
7055         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
7056
7057 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7058
7059         * appdomain.c: fixed loading assemblies from PrivateBinPath.
7060
7061 2003-02-03  Patrik Torstensson
7062         * appdomain.[c|h], domain.c : 
7063          - Added support for getting a domain via domain id
7064          - Support for setting and getting domain from System.AppDomain 
7065            (used in cross appdomain channel)
7066          - Added support for get/set for a MonoAppContext on a thread 
7067            (Context class in System.Runtime.Remoting.Contexts),
7068          - Removed hack in Get/SetData and ExecuteAssembly.
7069         
7070         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
7071         the managed world to get control when a proxy is created.
7072
7073         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
7074         
7075 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
7076
7077         * icall.c
7078         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
7079         Populate the codebase field as well.
7080
7081 2003-02-02  Martin Baulig  <martin@ximian.com>
7082
7083         * debug-mono-symfile.c
7084         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
7085         (mono_debug_symfile_add_method): Allow interncalls.
7086
7087 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7088
7089         * icall.c: throw parse exception if strtod fails or the string is empty.
7090
7091 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
7092
7093         * marshal.c: handle object type separately from defined
7094         class types.
7095
7096 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
7097
7098         * marshal.c: handle NATIVE_LPSTR for strings when it's
7099         explicitly specified.
7100
7101 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
7102
7103         * reflection.c, reflection.h, icall.c: setup the reflection
7104         handle cache for ModuleBuilders and AssemblyBuilders.
7105
7106 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
7107
7108         * reflection.c (reflection_methodbuilder_to_mono_method): set
7109         pinvoke flag
7110
7111 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7112
7113         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
7114
7115 2003-01-29  Dick Porter  <dick@ximian.com>
7116
7117         * threads.c: No need for the fake_thread kludge now that Thread
7118         doesn't run a class constructor
7119         
7120 2003-01-29  Dick Porter  <dick@ximian.com>
7121
7122         * threads.c: Use g_direct_hash instead of the rather bogus
7123         g_int_hash
7124
7125 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
7126
7127         * marshal.c (mono_marshal_get_native_wrapper): add check for null
7128         (fix pinvoke12.exe)
7129         (mono_marshal_get_struct_to_ptr): generate valid IL code
7130         (mono_marshal_get_ptr_to_struct): generate valid IL code
7131         (*): correctly set sig->pinvoke, we need to memdup the signature
7132         to do that
7133
7134 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7135
7136         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
7137         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
7138
7139 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7140
7141         * profiler.c: provide more callers information.
7142
7143 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
7144
7145         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
7146
7147         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
7148
7149         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
7150
7151 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7152
7153         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
7154         exception instead of going into an infinite loop on dates which it 
7155         can't yet handle.
7156
7157         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
7158         out-of-range exception if needed.
7159
7160         * class.c (mono_class_setup_vtable): allow a virtual method to provide
7161         an implementation for an interface method and to override an inherited
7162         method at the same time. 
7163         Imagine a scenario when a virtual method is used to override a
7164         virtual abstract method in a parent class, and this same method 
7165         provides an implementation for an method inherited from an interface. 
7166         In this case, the interface resolution code will set im->slot, which 
7167         means that the virtual method override pass will skip this method 
7168         which means a pointer to the abstract method inherited from the parent
7169         will remain in the vtable of this non-abstract class.
7170
7171         * class.c: (mono_class_setup_vtable): continue search for a real 
7172         method if only an abstract method is found.     
7173
7174 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7175
7176         * reflection.c: add size to encoding for ByValStr and ByValArray
7177         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
7178
7179 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7180
7181         * class.c (mono_class_setup_vtable): pass the override info as an
7182         argument.
7183
7184         * class.c (mono_class_setup_vtable): set the slot of overriding methods
7185         correctly.
7186         
7187         * reflection.c (ensure_runtime_vtable); add support for method 
7188         overrides.
7189         
7190 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7191
7192         * reflection.c (resolution_scope_from_image): Hack to work to work with
7193         dynamic assemblies.
7194
7195         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
7196         added a 'force_ref' argument to force this function to allways return 
7197         a TypeRef. This is needed by mono_image_get_memberref_token ().
7198         
7199 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7200
7201         * reflection.c (mono_image_get_type_info): interfaces really don't have
7202         a parent.
7203
7204         * reflection.c (mono_image_basic_init): fill out missing fields of
7205         image structure.
7206
7207         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
7208         dynamic assemblies. This is required so dynamic assemblies show up in
7209         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
7210         Type::GetType() etc. This is consistent with MS behaviour.
7211
7212         * image.c image.h reflection.c: add newly created classes to the name 
7213         cache so mono_class_get () will find them.      
7214
7215 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7216
7217         First part of changes to get IKVM.NET running under mono.
7218         
7219         * appdomain.h, appdomain.c: added new function 
7220         mono_domain_try_type_resolve() which will emit TypeResolve events. 
7221         This function will call AppDomain::DoTypeResolve to do the actual work.
7222
7223         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
7224         moved existing code dealing with dynamic tokens to a new function 
7225         called mono_reflection_lookup_dynamic_token (). This function will 
7226         raise TypeResolve events when appropriate. Since reflection.c is not 
7227         part of libmetadata, a new hook function called 
7228         mono_lookup_dynamic_token() is added to class.c which will call this.
7229
7230         * assembly.h assembly.c: make the invoke_load_hook function public,
7231         so it can be called for dynamic assemblies.
7232
7233         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
7234
7235         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
7236         type isn't found.
7237
7238         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
7239         MonoGHashTable, since it contains pointers to objects which the GC 
7240         needs to track.
7241
7242         * assembly.c (search_loaded): remove unused variable.
7243         
7244 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
7245
7246         * object.c: fixed issue exposed by gcc-generated IL programs
7247         that use RVA data for pointers.
7248
7249 2003-01-25  Martin Baulig  <martin@ximian.com>
7250
7251         * threads.c (start_wrapper): Moved the initialization of
7252         `start_func' above the mono_new_thread_init() call to which we
7253         pass it as argument.
7254
7255 2003-01-24  Martin Baulig  <martin@ximian.com>
7256
7257         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
7258         the MonoThread pointer.
7259
7260 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
7261
7262         * icall.c: Rename `PowImpl' to Pow.
7263
7264 2003-01-23  Dick Porter  <dick@ximian.com>
7265
7266         * threads.c (start_wrapper): Create a Thread object if needed, so
7267         the Main() thread can do the class initialisation in a subthread
7268         that has been set up to allow managed code execution.
7269
7270         Pass the thread ID instead of the MonoThread pointer to the thread
7271         start and attach callbacks.  This change is required, because the
7272         jit thread start callback must be called _before_ the Thread
7273         object can be created.
7274         
7275         (mono_thread_init): Removed much object creation code that is no
7276         longer needed.  No managed code is called from here now.
7277
7278         * object.c (mono_runtime_exec_managed_code): Create a subthread
7279         for Main, and call back to the runtime to use it.
7280         Set the exit code when Main exits.
7281
7282         * gc.c: Make sure domain finalisation happens in a subthread.
7283         Re-enable threaded GC, fixing bug 31333 (again).
7284
7285         * environment.c: System.Environment internall calls (so far just
7286         ExitCode is here, the others are still in icall.c)
7287
7288         * appdomain.c (mono_runtime_cleanup): All threads running managed
7289         code should have finished before mono_runtime_cleanup() is
7290         reached, so no need to clean up threads.
7291
7292 2003-01-22  Martin Baulig  <martin@ximian.com>
7293
7294         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
7295         `gpointer func' arguments.      
7296         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
7297         but added `MonoThread *thread' argument.
7298         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
7299
7300         * threads.c (mono_new_thread_init): Added `gpointer func' argument
7301         and pass it to the mono_thread_start_cb callback.
7302         (mono_install_thread_callbacks): New public function to install a
7303         set of callbacks which are set by the debugger.
7304         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
7305
7306 2003-01-22  Martin Baulig  <martin@ximian.com>
7307
7308         * Makefile.am: Install debug-mono-symfile.h.
7309
7310 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
7311
7312         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
7313
7314 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
7315
7316         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
7317         * class.c (mono_ptr_class_get): correctly set access levels of pointers
7318         (mono_array_class_get): correctly set access levels of arrays
7319
7320 2003-01-20      Patrik Torstensson
7321         * image.h (MonoAssemblyName): changed major, minor, build, revision
7322         from signed to unsigned.
7323
7324 2003-01-20  sean kasun <skasun@azstarnet.com>
7325
7326         * reflection.c (load_cattr_value): Now this handles
7327         MONO_TYPE_SZARRAY.  Fixes bug #35629
7328
7329 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
7330
7331         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
7332         integer value
7333
7334 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7335
7336         * decimal.c: fixed bug #26056.
7337
7338 2003-01-17  Martin Baulig  <martin@ximian.com>
7339
7340         * gc.c: Raise an ExecutionEngineException instead of using g_error().
7341
7342 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7343
7344         * exception.[ch]:
7345         (mono_get_exception_type_initialization): new function.
7346
7347         * object.c: throw a TypeInitializationException when an exception is
7348         thrown invoking the class constructor.
7349
7350 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7351
7352         * reflection.c: fixed attribute reading.
7353
7354 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7355
7356         * icall.c:
7357         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
7358         provided, look for the type in the calling assembly and then in
7359         mscorlib; if the assembly name is provided, only try that one.
7360
7361 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
7362
7363         * object.c: register the vtable before there is a chance it's
7364         queried again recursively.
7365
7366 2003-01-13  Duncan Mak  <duncan@ximian.com>
7367
7368         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
7369         gc-internal.h. 
7370         
7371 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
7372
7373         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
7374
7375 2003-01-11  Martin Baulig  <martin@ximian.com>
7376
7377         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
7378         this to 20 for the release.
7379
7380 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
7381
7382         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
7383
7384         * loader.c (mono_method_get_marshal_info): bug fix
7385
7386         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
7387         structures with explicit layout
7388
7389 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7390
7391         * profiler.c: made the output more readable (and sorted). 
7392         Added caller information for the allocation profiler.
7393
7394 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
7395
7396         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
7397
7398 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7399
7400         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
7401         to get value types.
7402         
7403 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
7404
7405         * object.c, profiler.h, profiler.c, profiler-private.h:
7406         Added object allocation profiler.
7407
7408 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
7409
7410         * reflection.h, reflection.c: handle global methods.
7411         Compress blob entries.
7412
7413 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
7414
7415         * marshal.c: fix compilation.
7416
7417 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
7418
7419         * loader.c (mono_method_get_marshal_info): impl.
7420
7421         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
7422
7423 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7424
7425         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
7426         for reference types.
7427
7428 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
7429
7430         * loader.c: fixed off by one error in loaded parameter names.
7431
7432 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
7433
7434         * marshal.c (mono_marshal_get_icall_wrapper): like
7435         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
7436         instead of a MonoMethod.
7437
7438 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7439
7440         * decimal.c: fixed bug #36537.
7441
7442 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
7443
7444         * marshal.c: throw a missing method exception if a
7445         P/Invoke method is not found.
7446
7447 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7448
7449         * icall.c: allow a null this for constructors.
7450
7451 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
7452
7453         * icall.c: raise the proper exceptions if the arguments to the
7454         internal Invoke are incorrect.
7455
7456 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
7457
7458         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
7459
7460 2003-01-03  Martin Baulig  <martin@ximian.com>
7461
7462         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7463
7464 2002-12-31  Martin Baulig  <martin@ximian.com>
7465
7466         * debug-mono-symfile.c: Completely rewrote the type section.
7467         Instead of using individual malloc()ed fields, we use one big
7468         continuous memory area and offsets into this area.
7469         See the comments in the source code for details.
7470
7471 2002-12-30  Martin Baulig  <martin@ximian.com>
7472
7473         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
7474
7475 2002-12-30  Martin Baulig  <martin@ximian.com>
7476
7477         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
7478         line number table in this data blob instead of using an external
7479         pointer.
7480
7481 2002-12-28  Martin Baulig  <martin@ximian.com>
7482
7483         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7484
7485 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
7486
7487         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
7488         as a boxed return type.
7489
7490 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
7491
7492         * appdomain.c
7493         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
7494         g_build_filename to properly get separators on the filename created.
7495
7496         * object.h: Small change, introduce MonoMarshalByRefObject to
7497         track the layout of that structure in the C# universe as we make
7498         changes there.
7499
7500 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
7501
7502         * object.c: removed assert to allow static fields on interfaces.
7503         * loader.c: a TypeSpec may be used for any type, not just arrays.
7504
7505 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7506
7507         * class.c, class.h: added mono_class_array_element_size ().
7508         Ignore static methods in interfaces.
7509
7510 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7511
7512         * threads.c: fixed the build under cygwin.
7513
7514 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
7515
7516         * reflection.c: handle nullref constants. Allocate keys for
7517         reflection handles with the GC.
7518
7519 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7520
7521         * threads.c, threads.h: added mono_thread_get_abort_signal()
7522         to get a suitable signal for thread abort.
7523
7524 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7525
7526         * metadata.c: fix handling of ExportedType table.
7527
7528 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7529
7530         * icall.c: added WriteWindowsDebugString internal call.
7531
7532 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7533
7534         * reflection.h: added fields to match C# implementation.
7535
7536 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7537
7538         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
7539
7540 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
7541
7542         * gc.h, gc-internal.h: Rename header for GC internal calls to
7543         gc-internal.h from gc.h as to not clash with Boehm GC having its
7544         header installed as <gc.h> in outside include paths.
7545         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
7546         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
7547
7548 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7549
7550         * icall.c: assign minor, build and revision in FillName.
7551
7552 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
7553
7554         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
7555         Added support for running code generated by Reflection.Emit.
7556
7557 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7558
7559         * appdomain.c: check for NULL argument in LoadFrom.
7560
7561 2002-12-10  Dick Porter  <dick@ximian.com>
7562
7563         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
7564
7565 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7566
7567         * appdomain.c: fix buglet when building exe file name.  Handle full
7568         assembly name (needed after latest changes to AssemblyName).
7569         * image.c:
7570         (mono_image_close): free some hashtables.
7571
7572 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
7573
7574         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
7575         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
7576         on some systems (redhat 7.3) 
7577
7578 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
7579
7580         * threads.c: delete the critical section of a sync block,
7581         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
7582
7583 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
7584
7585         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
7586
7587 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7588
7589         * appdomain.[ch]: handle the assembly preload event to try loading the
7590         assemblies using the paths we have in the current domain.
7591
7592         * assembly.[ch]: created an assembly preload hook that is called to try
7593         loading the assembly by other means that the ones provided here.
7594
7595         * domain.c: initialize the domain search path.
7596
7597         From now on, assemblies (TODO: except corlib and System) are loaded
7598         according to these rules when using mono_assembly_load ():
7599
7600                 1. It tries to load the assembly from the ApplicationBase
7601                 of the current domain appending .dll and .exe (TODO: have to
7602                 try loading from name/name.dll and name/name.exe).
7603
7604                 2. It tries the search path specified in PrivateBinPath for the
7605                 current domain (if any).
7606
7607                 3. Previous behavior.
7608
7609 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
7610
7611         * icall.c: implemented GetInterfaceMap() related icall.
7612         * domain.c, loader.h: load MethodInfo in mono_defaults.
7613
7614 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7615
7616         * gc.c: disable the finalizer thread for now, untill all the issues
7617         with it are resolved.
7618
7619 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7620
7621         * string-icalls.c: handle embedded nulls in string ctor when the
7622         length is specified.
7623
7624 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7625
7626         * class.c: look for explicit interface implementation in parent
7627         classes, too.
7628
7629 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
7630
7631         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
7632
7633 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7634
7635         * gc.c: protect handles with a critical section.
7636
7637 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7638
7639         * icall.c:
7640         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
7641         parameters. If no assembly specified, try getting the type from all
7642         the assemblies in the current domain, else, load the assembly and get
7643         the type from it.
7644
7645 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7646
7647         * marshal.c: applied patch from Aleksey Demakov that fixes
7648         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
7649
7650 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7651
7652         * icall.c: fixed get_location.
7653
7654 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
7655
7656         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
7657         declarations to make it work with older gcc. 
7658
7659         * loader.c (mono_get_method): set signature->pinvoke for native calls
7660
7661 2002-11-20  Dick Porter  <dick@ximian.com>
7662
7663         * threads.c (mono_thread_init): Set the main thread's handle
7664
7665 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7666
7667         * gc.c: allow compilation without GC support. Changed to match the
7668         mono coding style.
7669
7670 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7671
7672         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
7673
7674 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
7675
7676         * reflection.c: set a public key token on the core assemblies.
7677
7678 2002-11-18  Dick Porter  <dick@ximian.com>
7679
7680         * threads.c: Split out some thread initialisation so that other
7681         files can set the start callback function.
7682
7683         * gc.c: Run finalisers in a separate thread, to avoid stack
7684         overflow.  Fixes bug 31333.
7685
7686         * appdomain.c: Set up GC finalisation thread.
7687
7688         * reflection.c: 
7689         * object.c: 
7690         * domain.c: Use gc.h macros for GC_malloc
7691         
7692 2002-11-15  Dick Porter  <dick@ximian.com>
7693
7694         * threadpool.c: 
7695         * threads.c:
7696         * appdomain.c: Removed mono_runtime_init_with_attach(),
7697         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
7698         merging the extra parameter with the existing function.  Removed
7699         unneeded code in mono_thread_attach().
7700
7701 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
7702
7703         * image.c (mono_image_loaded_by_guid): a method to get loaded
7704         images by guid. 
7705         (load_metadata_ptrs): we store the guid as string.
7706
7707 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
7708
7709         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
7710
7711         * metadata.c (mono_guid_to_string): imported method form Zoltan
7712         Varga (slightly modified)
7713
7714         * assembly.c (mono_assembly_open): load precompiled code
7715
7716         * loader.h (MonoMethod): we store the method token for use in the
7717         aot compiler. 
7718
7719 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7720
7721         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
7722         the hook function called when an assembly is loaded.
7723         
7724         * domain.c: Modified file.
7725         (mono_domain_assembly_load): removed hash table insertion of assemblies.
7726
7727         Fixes bug #33196.
7728
7729 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
7730
7731         * reflection.c: Map PEFileKind to the value expected by the WinNT
7732         image loader. 
7733
7734 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7735
7736         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
7737         Read until the buffer is filled completely.
7738
7739 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7740
7741         * icall.c: implemented MonoType.InternalGetEvent ().
7742
7743 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7744
7745         * appdomain.c: implemented InitAppDomainSetup. Delayed
7746         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
7747         the entry_assembly.
7748
7749         * assembly.c: base_dir is now an absolute path ending with
7750         G_DIR_SEPARATOR.
7751
7752         * icall.c: modified get_location according to the above changes.
7753
7754         * object.c: init AppDomain.SetupInformation for the default domain after
7755         we have the entry assembly.
7756
7757         * domain.c: when unloading a domain, setup = NULL.
7758
7759 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
7760
7761         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
7762
7763 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
7764
7765         * object.h, object.c: introduced mono_object_get_virtual_method ()
7766         to lookup the method invoked on an object when a callvirt is done on
7767         a method.
7768         * icall.c: make MethodInfo::Invoke() always do a virtual call.
7769
7770 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7771
7772         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
7773         current domain when loaded an assembly and failed to load it.
7774
7775         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
7776
7777 2002-10-31  Dick Porter  <dick@ximian.com>
7778
7779         * icall.c: 
7780         * file-io.h: 
7781         * file-io.c: Return the error status in a parameter, as the
7782         GetLastError() value has long since been blown away if we try and
7783         look it up in a subsequent internal call invocation.  Delete the
7784         GetLastError() internal call, because it's useless.
7785
7786 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
7787
7788         * class.[ch]: added cast_class to fix bug 29517
7789
7790 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
7791
7792         * marshal.c: create valid IL code in the filter clause:
7793         the new JIT is less forgiving:-)
7794
7795 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7796
7797         * icall.c: removed get_property internal call.
7798
7799 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
7800
7801         * appdomain.h domain.c: Added an ID to appdomains.
7802         
7803         * threads.c threads.h icall.c: Implement icall
7804         Thread:GetDomainID(), and remove unused icall 
7805         CurrentThreadDomain_internal.
7806
7807 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7808
7809         * icall.c: Don't recurse through the base types in GetConstructor.
7810         Fixes bug #32063. 
7811
7812 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7813
7814         * mempool.h, mempool.c: added mono_mempool_empty() and
7815         mono_mempool_stats().
7816
7817 2002-10-23  Dick Porter  <dick@ximian.com>
7818
7819         * file-io.c: 
7820         * file-io.h: 
7821         * icall.c: Added MonoIO.GetFileType internal call
7822
7823 2002-10-17  Dick Porter  <dick@ximian.com>
7824
7825         * appdomain.c (mono_runtime_cleanup): Don't signal the async
7826         delegate semaphore before waiting for all threads to finish,
7827         because new threads can also call async delegates.  Fixes bug
7828         32004.
7829
7830         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
7831         of 3 seconds, in case another async job is queued.  (This part is
7832         needed because the bug fix reintroduced the 3s exit lag.)  This
7833         makes the mono_runtime_shutdown flag superfluous.
7834
7835 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7836
7837         * reflection.c: include ehader size in method section headers.
7838         Really check for suplicated modules entries.
7839
7840 2002-10-17  Martin Baulig  <martin@gnome.org>
7841
7842         * debug-mono-symfile.c: Added back support for locals.
7843
7844 2002-10-14  Martin Baulig  <martin@gnome.org>
7845
7846         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
7847         MONO_TYPE_VOID.
7848
7849 2002-10-14  Martin Baulig  <martin@gnome.org>
7850
7851         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
7852         mono_class_get() instead of looking in the class cache. 
7853
7854 2002-10-13  Martin Baulig  <martin@gnome.org>
7855
7856         * debug-mono-symfile.c: Set version number to 28, include the
7857         signature in method names.
7858
7859 2002-10-13  Martin Baulig  <martin@gnome.org>
7860
7861         * debug-mono-symfile.h: Set version number to 27.
7862
7863 2002-10-11  Martin Baulig  <martin@gnome.org>
7864
7865         * gc.c: Don't register/unregister NULL pointers as disappearing links.
7866
7867 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7868
7869         * metadata.c, metadata.h: added helper function to allocate signatures.
7870
7871 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7872
7873         * icall.c: added internal call to get the location of machine.config.
7874
7875 2002-10-08  Martin Baulig  <martin@gnome.org>
7876
7877         * debug-mono-symfile.c: Ignore classes with a pending init for the
7878         moment.
7879
7880 2002-10-03  Dick Porter  <dick@ximian.com>
7881
7882         * threads.c: Freebsd pthread_t is a pointer
7883
7884 2002-10-03  Dick Porter  <dick@ximian.com>
7885
7886         * socket-io.c: Implemented GetHostName_internal
7887
7888 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7889
7890         * mono-config.c:
7891         (mono_config_parse_file): don't leak the text.
7892
7893 2002-10-02  Martin Baulig  <martin@gnome.org>
7894
7895         * debug-mono-symfile.c: Added support for methods.
7896
7897 2002-10-01  Martin Baulig  <martin@gnome.org>
7898
7899         * debug-mono-symfile.c: Don't emit methods and line numbers for
7900         the dynamic symbol file, just write the type table.  We can easily
7901         have an external helper program which creates a symbol file for an
7902         IL file.        
7903
7904 2002-10-01  Dick Porter  <dick@ximian.com>
7905
7906         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
7907         Only add the handle to the cleanup array when we're about to
7908         launch the thread.  Bug 31425 deadlocked when the test was run on
7909         mono under w32.
7910
7911 2002-10-01  Martin Baulig  <martin@gnome.org>
7912
7913         * debug-mono-symfile.c: Added support for properties.
7914
7915 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7916
7917         * reflection.c: unaligned store fix from Mark Crichton
7918         <crichton@gimp.org>.
7919
7920 2002-09-27  Martin Baulig  <martin@gnome.org>
7921
7922         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
7923         New interncall.
7924
7925 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7926
7927         * assembly.h, assembly.c: use a sane API to hook into the assembly
7928         loading process instead of a useless special-purpouse hack
7929         (ngen needs a hook, too, for example).
7930
7931 2002-09-27  Dick Porter  <dick@ximian.com>
7932
7933         * threads.c (mono_thread_init): Call GetCurrentProcess() so
7934         io-layer can set up some process handle info.  Not needed on w32,
7935         but doesn't hurt either.
7936
7937         * process.c: Pass the program name in the second parameter to
7938         CreateProcess, so the path is searched.  Include the working
7939         directory. Implemented process name, process enumeration, and some
7940         process detail internal calls.
7941         
7942         * icall.c: Added internal calls for process lookup, and some
7943         process details
7944
7945 2002-09-26  Martin Baulig  <martin@gnome.org>
7946
7947         * assembly.c (mono_install_open_assembly_hook): New global
7948         function to install a function to be invoked each time a new
7949         assembly is loaded.
7950         (mono_assembly_open): Run this callback function if set.
7951
7952         * debug-mono-symfile.c: Put back line numbers for the dynamic
7953         symbol file and also record the .il file as source file.  This
7954         allows us to install the temporary symbol file as `file.dbg' just
7955         like a compiler-generated one.
7956
7957 2002-09-26  Nick Zigarovich <nick@chemlab.org>
7958
7959         * Corrected typo in gc.c (BOHEM vs BOEHM).
7960
7961 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7962
7963         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
7964         GetProperties. Also avoid calling g_slist_length in GetProperties and
7965         GetMethods.
7966
7967 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7968
7969         * reflection.c: avoid unaligned stores (bug spotted by
7970         Mark Crichton  <crichton@gimp.org>).
7971
7972 2002-09-25  Martin Baulig  <martin@gnome.org>
7973
7974         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
7975         instead of guint64 for addresses and added prologue/epilogue info.
7976
7977 2002-09-25  Martin Baulig  <martin@gnome.org>
7978
7979         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
7980         store line number info.  For the dynamic symbol file, we only need
7981         to provide the JIT generated dynamic line number info for the dynamic
7982         symbol file.
7983
7984 2002-09-25  Martin Baulig  <martin@gnome.org>
7985
7986         * debug-mono-symfile.h: Incremented version number.
7987
7988 2002-09-24  Martin Baulig  <martin@gnome.org>
7989
7990         * class.c (mono_debugger_class_init_func): New global function
7991         pointer variable.
7992         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
7993         call it.
7994
7995         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
7996         function.  This is called via the mono_debugger_class_init_func
7997         hook to add all types to the dynamic type table.
7998         (ves_icall_MonoDebugger_GetType): New interncall to get a class
7999         from its metadata token.
8000
8001         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
8002         New interncall for the debugger.
8003
8004 2002-09-24  Nick Drochak <ndrochak@gol.com>
8005
8006         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
8007         before using it in case it is null.
8008         
8009 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8010
8011         * metadata.c: allow custom modifiers in local var signatures
8012         (bug spotted by Zoltan Varga).
8013
8014 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8015
8016         * class.c: deal with the <Module> class that may have a NULL vtable.
8017         Eliminate warnings.
8018
8019 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8020
8021         * image.c, image.h: more strong name helpers.
8022         * monosn.c: more work: convert pem keys to cryptoapi format.
8023
8024 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8025
8026         * string-icalls.c: speedup IndexOf.
8027
8028 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8029
8030         * icall.c: updates from Zoltan.2.Varga@nokia.com.
8031
8032 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8033
8034         * icall.c: cleanup: use mono_object_domain ().
8035
8036 2002-09-23  Martin Baulig  <martin@gnome.org>
8037
8038         * debug-mono-symfile.c: Improved type support.
8039
8040 2002-09-22  Martin Baulig  <martin@gnome.org>
8041
8042         * debug-mono-symfile.c: Added support for reference types and strings.
8043
8044 2002-09-22  Martin Baulig  <martin@gnome.org>
8045
8046         * debug-mono-symfile.c: Started to work on the type table.
8047
8048 2002-09-21  Martin Baulig  <martin@gnome.org>
8049
8050         * debug-mono-symfile.c: Largely reworked the symbol table format.
8051         The symbol table is now incrementally updated each time a new
8052         method is added.  We're now also using our own magic and version
8053         so that you don't need to recompile all your classes if the
8054         dynamic table changes.
8055         (mono_debug_update_mono_symbol_file): Removed.
8056         (mono_debug_symfile_add_method): New function to add a method.
8057
8058 2002-09-21  Martin Baulig  <martin@gnome.org>
8059
8060         * icall.c
8061         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
8062         New interncall.
8063
8064         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
8065         New interncall to get a method from its metadata token.
8066
8067 2002-09-21  Martin Baulig  <martin@gnome.org>
8068
8069         * debug-mono-symfile.c: Create type table.
8070
8071 2002-09-20  Martin Baulig  <martin@gnome.org>
8072
8073         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
8074
8075 2002-09-20  Martin Baulig  <martin@gnome.org>
8076
8077         * debug-mono-symfile.c: Provide information about params and locals.
8078
8079 2002-09-20  Martin Baulig  <martin@gnome.org>
8080
8081         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
8082         New interncall.
8083
8084         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
8085         interncall to get a method from its metadata token.
8086
8087 2002-09-20  Martin Baulig  <martin@gnome.org>
8088
8089         * debug-mono-symfile.c: Added a few checks for method->header
8090         being non-NULL.  This should never happen, but for the moment
8091         let's use a g_warning() rather than a g_assert().
8092
8093 2002-09-19  Mark Crichton  <crichton@gimp.org>
8094
8095         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
8096         even if support for it isn't present.  Added an #ifdef to fix this.
8097
8098         * socket-io.c: Added checks back for Solaris support.
8099
8100 2002-09-19  Martin Baulig  <martin@gnome.org>
8101
8102         * debug-mono-symfile.c (read_string, write_string): Reflect latest
8103         changes in the symbol file format.
8104
8105 2002-09-18  Martin Baulig  <martin@gnome.org>
8106
8107         * debug-mono-symfile.c: Set version number to 21.
8108
8109 2002-09-18  Dick Porter  <dick@ximian.com>
8110
8111         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
8112         on netbsd.  Fixes bug 30051.
8113
8114 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8115
8116         * reflection.c:
8117         (set_version_from_string): little fix.
8118
8119 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8120
8121         * monosn.c, Makefile.am: added strong name utility.
8122         * reflection.h, reflection.c: implemented delayed signing,
8123         locale, version and hash id assembly attributes.
8124
8125 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8126
8127         * loader.c, metadata.c: load param attributes in signatures.
8128
8129 2002-09-16  Martin Baulig  <martin@gnome.org>
8130
8131         * debug-mono-symfile.c: Added string table with all method names.
8132
8133 2002-09-14  Martin Baulig  <martin@gnome.org>
8134
8135         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
8136         fast method lookup.
8137
8138 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8139
8140         * reflection.c: record the public key token of referenced assemblies.
8141
8142 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8143
8144         * image.c, image.h: added functions to get the strong name and the
8145         public key of an assembly.
8146         * pedump.c: use them.
8147
8148 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
8149
8150         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
8151
8152 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
8153
8154         * marshal.c (mono_marshal_get_managed_wrapper): Added
8155         MONO_TYPE_BOOLEAN 
8156
8157 2002-09-11  Martin Baulig  <martin@gnome.org>
8158
8159         * gc.c: Call GC_unregister_disappearing_link() on all links when
8160         finalizing them, this is necessary to aviod a crash in boehm's
8161         finalize handler.
8162
8163 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8164
8165         * gc.c: handle GetTarget for finalized objects spotted and fixed by
8166         nick@chemlab.org.
8167
8168 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8169
8170         * icall.c: implemented MonoType::Module.
8171         * reflection.c, reflection.h: mono_module_get_object () from
8172         Tomi Pakarinen <tomi.pakarinen@welho.com>.
8173
8174 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8175
8176         * icall.c: ignore overridden methods in GetMethods ().
8177         Fix for FieldInfo::SetValue().
8178         * object.c: handle float/double in runtime invoke.
8179
8180 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8181
8182         * object.c: allow a constructor to be called again on an object.
8183
8184 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8185
8186         * class.h, class.c: move field layout code to it's own function and
8187         export it. Get an interface id earlier. Move fields in MonoClass
8188         so they are more cache friendly and align the bitfields.
8189         * loader.c: temporary handle get_param_names() for a runtime method.
8190         * reflection.c, reflection.h: more code to handle runtime creation of
8191         types.
8192
8193 2002-09-09  Martin Baulig  <martin@gnome.org>
8194
8195         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
8196         signature with the pinvoke field being set for the actual call.
8197
8198 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8199
8200         * icall.c: removed some unused icalls. Start of map of glib charsets
8201         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
8202
8203 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8204
8205         * debug-helpers.c: break infinite loop (found and fixed by
8206         Holger Arnold <harnold@gmx.de>).
8207
8208 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8209
8210         * icall.c: target may be null in create_delegate.
8211
8212 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8213
8214         * marshal.c: handle a boolean return type.
8215
8216 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8217
8218         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
8219
8220 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8221
8222         * gc.c: fix weakreferences.
8223
8224 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8225
8226         * icall.c: added icall to get default codepage.
8227
8228 2002-09-03  Dick Porter  <dick@ximian.com>
8229
8230         * threads.h: 
8231         * threads.c: Use MonoThread instead of MonoObject where
8232         apropriate.
8233
8234         Store running thread objects in a hash table, so that we have all
8235         the info to hand when waiting for them to finish
8236         (means we don't need OpenThread() any more, so mingw builds should
8237         be fully functional again.)
8238
8239         * verify.c:
8240         * object.h: Added thread ID to MonoThread
8241
8242 2002-09-03  Martin Baulig  <martin@gnome.org>
8243
8244         * icall.c (System.Reflection.Assembly::get_location): New interncall.
8245
8246 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8247
8248         * icall.c: fixed leak in get_temp_path. Thanks lupus.
8249
8250 2002-09-03  Martin Baulig  <martin@gnome.org>
8251
8252         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
8253         argument to store the end address of the disassembled instruction.
8254
8255         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
8256         here from debug-symfile.h.
8257         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
8258         JIT into this struct.
8259         (MonoSymbolFile): Added `char *image_file' field.
8260         (MonoDebugGetMethodFunc): Removed.
8261         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
8262         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
8263         (mono_debug_find_method): New method.
8264
8265         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
8266         create a full symbol file.
8267         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
8268         and static symbol files.
8269         (mono_debug_find_method): The symbol file keeps an internal method hash,
8270         call this to get a MonoDebugMethodInfo from a MonoMethod.
8271
8272         * debug-symfile.[ch]: Removed.
8273
8274 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
8275
8276         * image.c (do_mono_image_open): Remove linker version check.
8277
8278 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
8279
8280         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
8281         wrappers for instance methods.
8282         
8283 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8284
8285         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
8286
8287 2002-08-28  Dick Porter  <dick@ximian.com>
8288
8289         * Makefile.am: Export HOST_CC for w32 builds
8290
8291 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8292
8293         * file-io.c process.c: MonoString are null terminated, no
8294         need for mono_string_to_utf16() anymore.
8295
8296 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8297
8298         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
8299
8300 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
8301
8302         * icall.c, reflection.h: speedup System.MonoType.
8303
8304 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8305
8306         * reflection.c: allow null as the value of a string argument in
8307         custom attributes constructors.
8308
8309 2002-08-27  Martin Baulig  <martin@gnome.org>
8310
8311         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
8312         `trampoline_address' field.
8313
8314 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
8315
8316         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
8317         check (fixes bug #29486) 
8318
8319 2002-08-27  Martin Baulig  <martin@gnome.org>
8320
8321         * debug-mono-symfile.c: Changed the file format in a way that allows us
8322         open it read-only and to use a specially malloced area for all the
8323         dynamic data.  We can now also generate a symbol file on-the-fly if we're
8324         debugging IL code and there is no MCS generated symbol file for it.
8325
8326 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8327
8328         * object.c: added a define for a good string and array
8329         creation speedup (not enabled by default because we need to deal with
8330         the synch stuff).
8331
8332 2002-08-26  Martin Baulig  <martin@gnome.org>
8333
8334         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
8335         function to create a dynamic symbol file.  This is used by the
8336         debugger to create a symbol file for IL code on-the-fly.
8337
8338 2002-08-26  Martin Baulig  <martin@gnome.org>
8339
8340         * loader.c (mono_lookup_pinvoke_call): Include the error message
8341         from g_module_error() in the error message.
8342
8343 2002-08-24  Martin Baulig  <martin@gnome.org>
8344
8345         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
8346         function to update the symbol file.  The symbol file is mmap()ed
8347         writable, but private.  This allows us to install the symbol file
8348         together with the assembly.
8349
8350 2002-08-24  Martin Baulig  <martin@gnome.org>
8351
8352         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
8353         but they can read the new symbol file format which mcs is now creating.
8354
8355         * debug-symfile.c (mono_debug_find_source_location): Moved to
8356         debug-mono-symfile.c; this is now operating on the new symbol file.
8357
8358 2002-08-23  Martin Baulig  <martin@gnome.org>
8359
8360         * debug-helpers.c (mono_method_desc_from_method): New function to get
8361         a MonoMethodDesc from a MonoMethod.
8362
8363 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8364
8365         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
8366         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
8367
8368 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8369
8370         * string-icalls.[ch]: make helper methods static.
8371
8372 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8373
8374         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
8375         types to it and to SetValueInternal.
8376
8377         * object.c: Moved handle_enum label to its proper place. This was the
8378         f... bug! ;-)
8379
8380         This time i compiled mcs and gtk-sharp and they both work.
8381
8382 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8383
8384         * icall.c: reverted partially my previous patch until 
8385         object.c:set_value handles enums correcly.
8386
8387 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8388
8389         * icall.c:
8390         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
8391         (ves_icall_System_Environment_get_MachineName): removed warning when
8392         compiling under cygwin.
8393
8394 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8395
8396         * object.c: fixed field_get_value() for reference types.
8397
8398 2002-08-22  Dick Porter  <dick@ximian.com>
8399
8400         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
8401         Don't free a buffer while it's still needed.  Patch from Jonathan
8402         Liger <Jonathan.liger@wanadoo.fr>
8403
8404 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
8405
8406         * icall.c (ves_icall_System_Environment_get_Platform): Add new
8407         internal call.
8408
8409 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
8410
8411         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
8412         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
8413
8414         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
8415         we call unmanaged code which throws exceptions.
8416
8417 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8418
8419         * appdomain.h: added per-domain entry_assembly.
8420         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
8421         arguments.
8422         * icall.c: Assembly::GetEntryAssembly icall.
8423         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
8424         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
8425
8426 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8427
8428         * appdomain.h, gc.c: added mono_domain_finalize ().
8429
8430 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8431
8432         * object.c:
8433         (mono_print_unhandled_exception): changed g_warning by g_printerr
8434         because g_log has a 1024 characters limit (yeah, i got a big stack
8435         trace). Don't print exception name, that should be in ToString 
8436         returned string.
8437
8438 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8439
8440         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
8441         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
8442
8443 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8444
8445         * object.c:
8446         (mono_print_unhandled_exception): after previous commit, i realized
8447         that MS calls ToString on the exception. I changed this function to
8448         do that. This way we get stack_trace for free.
8449
8450 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8451
8452         * object.c:
8453         (mono_print_unhandled_exception): invoke Message property instead of
8454         getting 'message' field from Exception. Don't allocate memory for
8455         'trace' and 'message' if not needed.
8456
8457 2002-08-18  Dick Porter  <dick@ximian.com>
8458
8459         * unicode.c: Fix asserts to match Encoder.cs checks
8460
8461 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8462
8463         * marshal.c: fix unaligned store issue and a few wrong
8464         opcode argument types.
8465
8466 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8467
8468         * icall.c: added GetUninitializedObjectInternal internal call.
8469
8470 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
8471
8472         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
8473         to the right domain.
8474
8475 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
8476
8477         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
8478
8479         * class.c (class_compute_field_layout): set blittable to false for Strings
8480
8481         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
8482
8483 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8484
8485         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
8486         first chunk of code to create types at runtime. Code to
8487         handle ReflectedType/DeclaringType. Make reflection handles
8488         domain specific.
8489
8490 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8491
8492         * class.c: set correct name in arrays.
8493
8494 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
8495
8496         * appdomain.c (mono_domain_transfer_object): make it work with
8497         valuetypes. bug fixes.
8498
8499 2002-08-12  Dick Porter  <dick@ximian.com>
8500
8501         * object.h: Rename some parameters to avoid c++ keywords (Patch
8502         from Joseph Wenninger <kde@jowenn.at>)
8503
8504 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
8505
8506         * icall.c: added icall to implement Assembly.GetFile*.
8507
8508 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8509
8510         * reflection.h, reflection.c: code to embed managed resources.
8511
8512 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8513
8514         * class.c: move all the type size stuff into
8515         class_compute_field_layout().
8516
8517 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8518
8519         * class.c: ensure enums have always the correct instance size.
8520         * unicode.c: remove wrong assert.
8521
8522 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8523
8524         * assembly.c: fix mem corruption issue.
8525         * image.h, image.c: added mono_image_get_resource () to access
8526         managed resources.
8527         * icall.c: implemented Assembly.EntryPoint property and some
8528         Managed Resources related internalcalls.
8529
8530
8531 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8532
8533         * image.c, image.h: impemented mono_image_get_entry_point ().
8534         * appdomain.c: use mono_image_get_entry_point.
8535
8536 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8537
8538         * reflection.c: support the object type argument when loading
8539         custom attributes.
8540
8541 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
8542
8543         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
8544         String as return type.
8545
8546 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
8547
8548         * reflection.c: fix encoding of named args for custom attrs to match
8549         the ms implementation. Read them back when instantiating custom
8550         attributes.
8551
8552 2002-08-02  Radek Doulik  <rodo@ximian.com>
8553
8554         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
8555         by Dietmar as quick fix
8556         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
8557         16 as stack size, used on more places as quick fix before Dietmar
8558         will fix it properly
8559
8560 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8561
8562         * object.h, object.c: added accessors for fields and properties.
8563
8564 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8565
8566         * class.c, class.h: made mono_class_get_field_from_name ()
8567         loop on parent types.
8568         Added mono_class_get_property_from_name ().
8569
8570 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8571
8572         * class.c, class.h: move the code to setup the type vtable in its own
8573         function so that it can be reused also for types created at runtime.
8574         Eliminate the "class" identifier from the header file.
8575         * reflection.c: setup the vtable for enums so that we can create
8576         objects for use in SetConstant ().
8577
8578 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
8579
8580         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
8581         instead of the delegate itself as this pointer (bug #28383)
8582
8583 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
8584
8585         * marshal.c (mono_marshal_get_managed_wrapper): added return type
8586         conversions.
8587
8588 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8589
8590         * loader.c: don't set the pinvoke bit on icalls.
8591
8592 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
8593
8594         * debug-helpers.c (mono_method_full_name): only print a number to
8595         indicate wrapper type (so that the output is more readable in traces).
8596
8597 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
8598
8599         * class.c (mono_class_init): include method override patch from Paolo
8600
8601 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
8602
8603         * icall.c: fixed GetTypeCode().
8604
8605 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
8606
8607         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
8608         use real delegate invoke function to make it work with multicast
8609         delegates (fix bug# 28291).
8610
8611 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8612
8613         * object.c: load constant strings.
8614
8615 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8616
8617         * reflection.c: no magic numbers.
8618         * tabledefs.h: security action enum.
8619
8620 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8621
8622         * assembly.c: fix possible memory corruption.
8623
8624 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8625
8626         * reflection.h, reflection.c: added support for linking resources.
8627         * verify.c: check we have an updated corlib.
8628
8629 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
8630
8631         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
8632         string arrays.
8633         (mono_marshal_string_array): null terminate unmanaged string arrays.
8634         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
8635
8636 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8637
8638         * icall.c: Type.GetType () can now return also types from the
8639         calling assembly.
8640
8641 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8642
8643         * loader.h, loader.c: stack walking support.
8644         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
8645         GetCallingAssembly.
8646
8647 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
8648
8649         * marshal.c: added optimisations for blittable types 
8650
8651         * class.c (mono_array_class_get): do not set blittable attribute on arrays
8652         (mono_class_setup_mono_type): set blittable attribute for single
8653         and double.
8654
8655         * marshal.c (mono_string_utf8_to_builder): impl.
8656         (mono_string_builder_to_utf8): impl.
8657         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
8658
8659 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
8660
8661         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
8662         (mono_marshal_get_managed_wrapper): impl. byref types
8663
8664 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8665
8666         * icall.c:
8667         (search_method): don't display debug message. 
8668
8669 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
8670
8671         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
8672
8673 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8674
8675         * appdomain.c: set the missing filename when throwing exception.
8676
8677 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
8678
8679         * metadata.c (mono_type_size): code cleanup
8680         (mono_type_stack_size): removed some test code
8681
8682 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
8683
8684         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
8685         mono_get_exception_file_not_found now.
8686
8687         * exception.c (mono_exception_from_name_two_strings): New version
8688         that will call a constructor with two string arguments. 
8689         (mono_get_exception_file_not_found): New helper routine, used to
8690         report file-not-found errors.
8691
8692 2002-07-20  Dick Porter  <dick@ximian.com>
8693
8694         * process.h:
8695         * process.c: Pass file handles to CreateProcess
8696         
8697         * icall.c:
8698         * file-io.h:
8699         * file-io.c: Implemented CreatePipe
8700
8701 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
8702
8703         * metadata.c (mono_get_param_info): set alignment for value types
8704
8705 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8706
8707         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
8708         Constify mono_domain_assembly_open().
8709         * loader.c: handle null namespace in icalls.
8710
8711 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
8712
8713         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
8714         (emit_str_to_ptr_conv): marshal object as structs
8715
8716         * metadata.c (mono_type_to_unmanaged): marshal object as structs
8717
8718         * marshal.c (mono_marshal_get_runtime_invoke): support value types
8719
8720 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
8721
8722         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
8723         (mono_marshal_get_native_wrapper): we an now return value types
8724
8725 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8726
8727         * verify.c: more checks implemented.
8728
8729 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
8730
8731         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
8732         (fix bug #27695)
8733         (mono_marshal_get_native_wrapper): allow byref arguments
8734         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
8735         impl. PtrToStringXXX methods
8736         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
8737         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
8738         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
8739         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
8740         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
8741
8742 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8743
8744         * reflection.c: fix buglet in parsing an assembly name.
8745
8746 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
8747
8748         * marshal.c (emit_ptr_to_str_conv): first impl.
8749
8750 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8751
8752         * object.c, class.h: cache the vtable in the class as suggested by
8753         vargaz@freemail.hu (Zoltan Varga).
8754
8755 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8756
8757         * class.h, loader.c: added mono_field_from_token().
8758         * verify.c: first cut of type checking code.
8759
8760 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
8761
8762         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
8763
8764 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
8765
8766         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
8767         (fix bug #27782)
8768         (mono_marshal_get_remoting_invoke): impl.
8769         (mono_delegate_begin_invoke): impl.
8770         (mono_mb_emit_save_args): impl.
8771         (mono_delegate_end_invoke): impl.
8772         (mono_marshal_get_delegate_begin_invoke):
8773         (mono_marshal_get_delegate_end_invoke):
8774         (mono_marshal_get_delegate_invoke): generate a special name for
8775         those methods (including the signature) and associate them whith
8776         the delegate class. 
8777
8778 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
8779
8780         * reflection.[ch]: 
8781         (mono_reflection_type_from_name): now it has a MonoImage parameter
8782         which is used as the default image to search the type in. If the image
8783         is NULL or getting the type from it fails, it defaults to corlib.
8784
8785         * icall.c: changed 1 call to mono_reflection_type_from_name to match
8786         new parameter.
8787
8788 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8789
8790         * reflection.c: update the parameter table index.
8791
8792 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8793
8794         * domain.c: don't include the mark byte in the string hash.
8795
8796 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8797
8798         * icall.cs: icall for Type.GetTypeCode ().
8799         * verify: a couple of fixes and disabled local initialization checks.
8800
8801 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
8802
8803         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
8804
8805         * debug-helpers.c (mono_method_full_name): print the type of the
8806         runtime wrapper
8807
8808         * metadata.c (mono_signature_hash): a hash function for signatures
8809         (mono_signature_hash): better hash algorithm
8810
8811         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
8812
8813         * debug-helpers.c (mono_method_full_name): this can now generate
8814         method names with signatures
8815
8816         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
8817         method dont have this pointers.
8818
8819 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8820
8821         * reflection.c: fixup typebuilder tokens.
8822         * image.c: fix buglet.
8823         * marshal.h: remove whitespace.
8824         * metadata.h, metadata.c: reinstate code that was removed.
8825         * verify.c: handle catch directives and fix another couple of bugs.
8826
8827 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
8828
8829         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
8830         (mono_marshal_get_native_wrapper): make it comp. with the old code
8831         (mono_marshal_get_native_wrapper): support boolean
8832         (mono_marshal_get_managed_wrapper): support more types
8833
8834 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
8835
8836         * class.c (class_compute_field_layout): compute class->blittable attribute.
8837
8838 2002-07-09  Dick Porter  <dick@ximian.com>
8839
8840         * threads.c: Make the thread cleaning up cope with threads that
8841         call ExitThread()
8842
8843 2002-07-08  Radek Doulik  <rodo@ximian.com>
8844
8845         * reflection.c (method_encode_code): use non-translated values to
8846         compute finally_start, this fixes exception handling on ppc, yay!
8847
8848         * decimal.h (struct signscale): fix endianess
8849
8850 2002-07-07  Radek Doulik  <rodo@ximian.com>
8851
8852         * reflection.c: swap box_val and not val
8853
8854 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8855
8856         * reflection.c, reflection.h: handle full assembly info in type name.
8857         Handle Type arguments when loading custom attributes.
8858         * icall.c: updated to use new mono_reflection_type_from_name () method.
8859
8860 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8861
8862         * loader.c:
8863         (method_from_memberref): also print assembly name when method not found.
8864
8865 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8866
8867         * icall.c:
8868         (ves_icall_TypeGetProperties): fixed bug #27473. 
8869
8870 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8871
8872         * reflection.c: display image name and token when cannot find the
8873         .ctor for an attribute.
8874
8875 2002-07-05  Martin Baulig  <martin@gnome.org>
8876
8877         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8878
8879 2002-07-04  Dick Porter  <dick@ximian.com>
8880
8881         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
8882         compile on mingw.  This will cause mingw builds to not wait for
8883         subthreads to terminate after the main thread does.  I've lodged a
8884         bug with the mingw developers for them to wrap OpenThread().
8885
8886 2002-07-03  Dick Porter  <dick@ximian.com>
8887
8888         * threads.c: Store thread IDs instead of handles, because
8889         GetCurrentThread() returns a pseudohandle and therefore stores
8890         useless values.  mono_thread_cleanup() continues checking the
8891         array of threads until it is empty, to cope with subthreads
8892         spawning new threads after the main thread has finished.
8893
8894         * profiler.h:
8895         * profiler.c:
8896         * profiler-private.h: Pass the thread ID to thread profiler
8897         functions, instead of a handle
8898
8899 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8900
8901         * verify.c: fixes to make it more usable.
8902         * pedump.c: added --verify code to verify IL code in an assembly.
8903
8904 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8905
8906         * reflection.c: turn errors into warnings to allow compiling corlib.
8907
8908 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8909
8910         * reflection.c: add special cases to compile corlib.
8911
8912 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8913
8914         * reflection.c: handle properties with only a set method.
8915
8916 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8917
8918         * opcodes.h: add enum with opcodes in opval order.
8919
8920 2002-07-01  Dick Porter  <dick@ximian.com>
8921         
8922         * object.h:
8923         * object.c (mono_runtime_run_main): Removed unneeded argument
8924
8925 2002-06-28  Martin Baulig  <martin@gnome.org>
8926
8927         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8928
8929 2002-06-27  Dick Porter  <dick@ximian.com>
8930
8931         * threads.c: Store the handle in both the parent thread and in the
8932         subthread, to minimise the time between starting a new thread and
8933         storing its ID.
8934
8935 2002-06-26  Dick Porter  <dick@ximian.com>
8936
8937         * appdomain.c (mono_runtime_cleanup): Close the socket library
8938         after all the threads have finished, not before
8939
8940 2002-06-26  Martin Baulig  <martin@gnome.org>
8941
8942         * debug-symfile.c (mono_debug_find_source_location): Added
8943         `guint32 *line_number' argument.  If it's not NULL, store the line number
8944         there and return the file name without the line number.
8945
8946 2002-06-25  Dick Porter  <dick@ximian.com>
8947
8948         * icall.c:
8949         * process.h:
8950         * process.c: Process forking and other support functions
8951
8952 2002-06-25  Dick Porter  <dick@ximian.com>
8953
8954         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
8955         things dont happen when the image is closed.
8956         (mono_image_lookup_resource): Walk the resource section looking
8957         for a particular entry
8958
8959         * cil-coff.h: PE resource section decoding
8960
8961 2002-06-25  Dick Porter  <dick@ximian.com>
8962         
8963         * assembly.h:
8964         * assembly.c: 
8965         (mono_assembly_foreach): Accessor functions to walk the list of
8966         loaded assemblies
8967         (mono_assembly_set_main):
8968         (mono_assembly_get_main): Process methods need to know which
8969         assembly is the "main" one
8970
8971         * object.c (mono_runtime_run_main): Record the main assembly
8972
8973         * debug-helpers.c: Fix typo
8974
8975 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
8976
8977         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
8978         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
8979
8980 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8981
8982         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
8983
8984 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
8985
8986         * image.c (do_mono_image_open): Initialize reference count,
8987         otherwise we leak the MonoImage.
8988
8989 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8990
8991         * reflection.c: small tweak to handle self-hosting.
8992
8993 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8994
8995         * reflection.c: fix type name parse code.
8996
8997 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8998
8999         * reflection.c: break out of the loop.
9000         * image.c: special case corlib.
9001
9002 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9003
9004         * reflection.c: add all the custom attrs at the end to ensure the
9005         ctors have been properly initialized when the attributes are defined
9006         in the current assembly.
9007
9008 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9009
9010         * reflection.c: handle correctly multiple-nested types.
9011
9012 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
9013
9014         * row-indexes.h: fix typos.
9015         * reflection.c: adjust for typos and fix method_def_or_ref
9016         encoding in MethodImpl table.
9017
9018 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9019
9020         * reflection.c: fix entry point patching (thanks Serge!).
9021
9022 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
9023
9024         * verify.c: add check for System.Exception
9025
9026 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9027
9028         * image.c, class.c: minifix for code just c&p'ed.
9029         * reflection.c: warning fix.
9030         * object.h, loader.h, domain.c: load also StringBuilder.
9031
9032 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9033
9034         * marshal.h, marshal.c: some support code to handle complex marshaling.
9035
9036 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9037
9038         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
9039         Better signatures with vtable error dump.
9040
9041 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
9042
9043         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
9044
9045 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
9046
9047         * icall.c (ves_icall_Type_GetField): impl.
9048
9049 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9050
9051         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
9052         to retrieve a marshal description blob for a field or param.
9053
9054 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
9055
9056         * reflection.h, reflection.c: change order of nested type emission
9057         to avoid table corruption. The NestedTypes table is sorted.
9058         * icall.c: change order of GetConstructor results to workaround mcs bug.
9059
9060 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9061
9062         * reflection.h, reflection.c: handle field and param marshal
9063         information.
9064
9065 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9066
9067         * icall.c, marshal.c marshal.h: more Marshal class implementation.
9068
9069 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9070
9071         * reflection.c: fix call convention.
9072
9073 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9074
9075         * reflection.h, reflection.c: mono_image_get_memberref_token()
9076         takes a type instead of a class, now. Added
9077         mono_image_get_array_token() to create tokens for the special
9078         multi-dim array methods.
9079
9080 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9081
9082         * assembly.c: handle modules (no assembly table). Split
9083         loading references in its own function.
9084         * class.c: handle moduleref resolution scope.
9085         * image.c, image.h: cache module name in image.
9086
9087 2002-06-07  Martin Baulig  <martin@gnome.org>
9088
9089         * reflection.c (mono_image_get_type_info): Only add a class layout entry
9090         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
9091
9092 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9093
9094         * icall.c: more signature fixes that used uint instead of int.
9095
9096 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9097
9098         * reflection.c: fixed signature of field refs.
9099
9100 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9101
9102         * class.c, reflection.c: handle typerefs of nested types
9103         (both on read and when writing files).
9104
9105 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
9106
9107         * icall.c: fix method signatures that tried to workaround the previous
9108         typo, d'oh!
9109
9110 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9111
9112         * debug-helpers.c: fix typo.
9113
9114 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9115
9116         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
9117         rewrote the PE/COFF writing code (our programs are understood by the
9118         ms runtime, now).
9119
9120 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9121
9122         * gc.c, gc.h, icall.c: weakreference support.
9123
9124 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9125
9126         * Makefile.am, mono-config.c: use $(sysconfdir).
9127
9128 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9129
9130         * icall.c: changed default precision of Double.ToString() to 15.
9131         Fixed memory leak. Unified with Single.ToString.
9132
9133 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
9134
9135         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
9136
9137 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
9138
9139         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
9140         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
9141         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
9142         and myself.
9143
9144 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9145
9146         * debug-symfile.c, sysmath.c: yet more compilation fixes.
9147
9148 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9149
9150         * reflection.c, socket-io.c: more compilation fixes.
9151
9152 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9153
9154         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
9155         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
9156         unicode.c: warning and compiler compatibility fixes.
9157
9158 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9159
9160         * class.h, metadata.c: fixed warnings/compilation errors.
9161
9162 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9163
9164         * Makefile.am, mono-config.c, mono-config.h: configuration file
9165         support routines.
9166         * loader.c, loader.h: make Dll mapping configurable at runtime in the
9167         config file. Export methods to insert and lookup mappings.
9168
9169 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
9170
9171         * reflection.c: handle types and boxed objects in custom attr
9172         constructors.
9173
9174 2002-05-30  Martin Baulig  <martin@gnome.org>
9175
9176         * debug-symfile.c
9177         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
9178
9179 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
9180
9181         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
9182         to lookup the implmap row for a P/Invoke method.
9183         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
9184         P/Invoke method from the runtime on an as needed basis.
9185
9186 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
9187
9188         * metadata.c (mono_metadata_parse_signature): impl.
9189
9190 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9191
9192         * class.c: handle .pack directive.
9193
9194 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
9195
9196         * object.c: initialize static fields with RVA data.
9197
9198 2002-05-25  Martin Baulig  <martin@gnome.org>
9199
9200         * debug-symfile.c
9201         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
9202
9203 2002-05-24  Martin Baulig  <martin@gnome.org>
9204
9205         * debug-symfile.c
9206         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
9207         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
9208         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
9209
9210 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9211
9212         * object.c: special case string ctros in invoke.
9213         * gc.c: silly whitespace changes.
9214
9215 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
9216
9217         * threadpool.[ch]: impl. a threadpool that can
9218         be used by mint and mono.
9219
9220 2002-05-22  Martin Baulig  <martin@gnome.org>
9221
9222         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
9223         The first argument is now a `MonoReflectionModuleBuilder *', the return
9224         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
9225         `methods' field to get the method builder.  The `token' argument is the
9226         unfixed token.
9227
9228         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
9229         invalid characters instead of g_assert_not_reached()ing.  This seems
9230         to be the behaviour of mscorlib.
9231
9232 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
9233
9234         * object.c (mono_runtime_invoke_array): applied patch from Rachel
9235         Hestilow to fix bug #25104
9236
9237 2002-05-21  Martin Baulig  <martin@gnome.org>
9238
9239         * debug-symfile.c (mono_debug_find_source_location): New function.
9240         Looks up an IL offset in the line number table and returns the source
9241         location as a string.
9242
9243 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9244
9245         * icall.c:
9246         (mono_double_ToStringImpl): changed %f by %g until we have something
9247         better.
9248
9249 2002-05-21  Nick Drochak  <ndrochak@gol.com>
9250
9251         * icall.c : Use different name for Math.Pow's icall.  Needed to check
9252         parameters first in C#.
9253
9254 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9255
9256         * icall.c, reflection.h: added icall to get info about an event.
9257
9258 2002-05-20  Radek Doulik  <rodo@ximian.com>
9259
9260         * object.c (mono_value_box): don't use memcpy for boxing on BIG
9261         endian
9262         (mono_value_box): don't use memcpy for small sizes on
9263         architectures with unaligned access
9264
9265 2002-05-20  Martin Baulig  <martin@gnome.org>
9266
9267         * reflection.c (mono_reflection_setup_internal_class): Don't crash
9268         if `tb->parent == NULL'.
9269         (mono_reflection_create_internal_class): New function.  This is
9270         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
9271         for enum types.
9272
9273         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
9274         New interncall.
9275
9276 2002-05-19  Martin Baulig  <martin@gnome.org>
9277
9278         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
9279         argument to get the length, don't default to the array length.
9280
9281 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
9282
9283         * assembly.c (mono_assembly_setrootdir): New function used to
9284         override the MONO_ASSEMBLIES directory.
9285
9286 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9287
9288         * icall.c: ValueType_GetHashCode() initialize local var.
9289
9290 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9291
9292         * reflection.c: sort custom attributes table.
9293
9294 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9295
9296         * reflection.c: support named args in custom attributes (write support).
9297
9298 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9299
9300         * reflection.c: fix finally position calculation.
9301
9302 2002-05-15  Radek Doulik  <rodo@ximian.com>
9303
9304         * reflection.c: fixed endianess at many places
9305
9306         * icall.c (ves_icall_InitializeArray): comment out debug msg
9307
9308 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
9309
9310         * object.c (mono_unhandled_exception): new function to handle
9311         unhandled exceptions.
9312         (mono_unhandled_exception): call the UnhandledException event.
9313         (mono_runtime_delegate_invoke): impl.
9314
9315 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
9316
9317         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
9318         returns the RVA, not the direct pointer to the data. Handle the case
9319         when the class size is fixed.
9320
9321 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
9322
9323         * reflection.c: fix some endianess issues.
9324
9325 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
9326
9327         * object.c (mono_runtime_invoke): is now able to catch exceptions.
9328
9329         * threads.c (mono_thread_init): added a callback which is invoked
9330         at thread start.
9331
9332 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
9333         
9334         * icall.c: make GetHashCode return non-negative values.
9335
9336 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
9337
9338         * object.c, icall.c, gc.c: revert to address-based hashcode.
9339
9340 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
9341
9342         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
9343
9344 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9345
9346         * icall.c, class.c: special case <Module>.
9347
9348 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
9349
9350         * icall.c: fix bug in GetNow().
9351
9352 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
9353
9354         * object.c (mono_runtime_class_init): make sure that we call all
9355         static class constructors.
9356
9357 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9358
9359         * reflection.c: sort methodsemantics table.
9360
9361 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
9362
9363         * reflection.h, reflection.c: honour init locals setting.
9364
9365 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
9366
9367         * icall.c: copied Double ToStringImpl for Single ToStringImpl
9368
9369 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9370
9371         * reflection.c: support ContructorBuilders in attribute blob creation.
9372
9373 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9374
9375         * reflection.c: some changes to build a binary that can be run
9376         directly in windows.
9377
9378 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9379
9380         * loader.c: print a big message when an icall can't be found.
9381
9382 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9383
9384         * string-icalls.c: fix bug 24248.
9385
9386 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
9387
9388         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
9389         icall.c, reflection.h: separate assembly loading by pathname and by
9390         assembly name. Use the MONO_PATH env var to search for assemblies.
9391
9392 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9393
9394         * assembly.c, image.h: add some support for assemblies
9395         with multiple modules.
9396         * class.c, class.h: export mono_class_from_typeref().
9397         * loader.c: remove duplicated code and use mono_class_from_typeref(),
9398         instead.
9399
9400 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9401
9402         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
9403         documentation says (the ECMA one is correct).
9404
9405 2002-05-02  Dick Porter  <dick@ximian.com>
9406
9407         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
9408         Don't name the synchronisation mutex.
9409
9410 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
9411
9412         * rand.c
9413         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
9414         Make the prototypes match.
9415         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
9416         Same.
9417
9418         * icall.c
9419         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
9420         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
9421         all systems have tm.tm_zone, so use strftime() with %Z to print
9422         the timezone abreviation into a temp string.
9423
9424         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
9425         rather than mono_array_addr() on a MonoString on Big Endian
9426         machines.
9427
9428 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
9429
9430         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
9431         fix bug 24041
9432
9433 2002-04-30  Dick Porter  <dick@ximian.com>
9434
9435         * socket-io.c: Cope with SOCKET being an integer rather than a
9436         pointer now.
9437
9438         * threads.c: Added Thread_free_internal, to deal with thread
9439         handle cleanup.  Moved calls to handle_store() and handle_remove()
9440         to start_wrapper(), so each can only be called once.  Allocate
9441         synchronisation blocks with GC_malloc(), and use GC finalisation
9442         to close the handles.
9443
9444         * icall.c: added System.Threading.Thread::Thread_free_internal
9445
9446 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9447
9448         * icall.c: support Environment.Exit, CommandLineArgs().
9449
9450 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9451
9452         * object.c, object.h: added mono_runtime_run_main () and
9453         mono_runtime_get_main_args () for use in System.Environment.
9454
9455 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9456
9457         * gc.c: fix thinko, enable actual finalization since the jit is now
9458         fixed.
9459
9460 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9461
9462         * gc.c, object.c: take into account that an object may be offset wrt the address
9463         returned by GC_malloc().
9464
9465 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
9466
9467         * image.c: handle files without entries in the assembly table (modules).
9468
9469 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
9470
9471         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
9472         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
9473         allowed to be null when it's System.Object class setup.
9474
9475 2002-04-27  Martin Baulig  <martin@gnome.org>
9476
9477         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
9478         if `tb->parent == NULL' rather than crashing.
9479
9480 2002-04-28  Nick Drochak  <ndrochak@gol.com>
9481
9482         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
9483         calling acos() where asin() should have been called.
9484
9485 2002-04-26  Martin Baulig  <martin@gnome.org>
9486
9487         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
9488         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
9489         there's a subdirectory called `System', but we don't want to read that
9490         subdirectory as an assembly.
9491
9492 2002-04-25  Martin Baulig  <martin@gnome.org>
9493
9494         * debug-symfile.c: Reflect latest MonoString changes.
9495
9496 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9497
9498         * rand.c, rand.h: instance method icalls need to have an explicit
9499         this pointer as first argument in the C implementation.
9500
9501 2002-04-25  Nick Drochak <ndrochak@gol.com>
9502
9503         * icall.c: Fix typo in map for GetNonZeroBytes
9504
9505 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9506
9507         * string-icalls.c : String does now passes unit tests without any 
9508         errors, the following changes has been made:
9509         
9510         Implemented replace methods.
9511         Renaming of methods to (try) follow the standard.
9512         Fixed compare ordinal
9513         Made all memory allocated directly to function instead of via icall function.
9514         Small performance fix in is_in_array function
9515                         
9516  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
9517
9518         c (mono_string_Internal_ctor_charp_int_int):
9519         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
9520         sindex < 0, throw ArgumentOutOfRangeException instead of
9521         ArgumentNullException.
9522
9523         Added new check for length == 0, however
9524         I need to make it return String.Empty from the C code.
9525         
9526         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
9527         that calculate the length for us here.
9528         
9529         (mono_string_Internal_ctor_sbytep_int_int): Replaced
9530         mono_string_new_utf16 with mono_string_new, since value is utf8.
9531
9532 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9533
9534         * object.c: register the object for finalization if needed.
9535         Allocate one more char in the string for the terminating 0 char.
9536
9537 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9538
9539         * class.c, class.h, image.c: check if a type implemenst a destructor.
9540         Use the proper key for array class lookups.
9541         * icall.c: register the icalls in the System.GC class.
9542         * gc.c, gc.h: GC-related functions and icalls.
9543
9544 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9545
9546         * icall.c:
9547         * socket-io.c:
9548         * unicode.c: free some strings gotten from mono_string_to_utf8 and
9549         changed a couple of free () by g_free ().
9550
9551         * decimal.c: one-liner in the comments for decimal2string ().
9552
9553 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9554
9555         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
9556
9557 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9558
9559         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
9560         * object.c (mono_runtime_invoke_array) : handle null in params
9561
9562 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9563
9564         * string-icalls.c: fixed bug in split (one off bug)
9565
9566 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9567
9568         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
9569         * icalls.c: added String::Equals as internal method
9570
9571 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9572
9573         * threads.c: fixed bug in the double interlocked functions
9574
9575 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
9576
9577         * threads.c: implemented all of the new interlocked icalls.
9578         * string-icalls.c: fix a bug in insert.
9579         * icalls.c: added the icalls for interlocked, removed old string functions.
9580         
9581 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9582
9583         * loader.c: fix off-by-one error when reading argument names.
9584
9585 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9586
9587         * profiler.c: win32 counter implementation (untested).
9588         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
9589         (the latter needs testing and more complete impl. from win32 folks).
9590
9591 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
9592
9593         * object.c: mono_array_new_full workaround mono_array_class_get
9594         problem.
9595
9596 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9597
9598         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
9599         * object.h (mono_string_chars): Changed casting type.
9600
9601 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9602
9603         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
9604                            method signatures to use gunichar2 instead of gint16.
9605
9606 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
9607
9608         * object.h, object.c: domain-specific versions of mono_object_new and
9609         mono_array_new.
9610
9611 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
9612
9613         * object.c: changed String layout
9614
9615         * string-icalls.c (mono_string_Internal_ctor_chara): added
9616         internal string constructors.
9617
9618 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
9619
9620         * threads.c: pass 'this' to the thread start routine.
9621
9622 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9623
9624         * string-icalls.c: fix IndexOf and LastIndexOf. Now
9625         InternalCompareStr don't call twice mono_string_cmp_char for the last
9626         character. Improved performance in mono_string_cmp_char.
9627
9628 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9629
9630         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
9631         code into its own library: libmonoruntime.
9632
9633 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
9634
9635         * object.h, object.c: changed array format so that szarrays do not
9636         require a bounds structure.
9637         * icall.c, appdomain.c: support for new szarray format.
9638
9639 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9640
9641         * metadata.c: compare also the retuns type when comparing signatures:
9642         we didn't do this as an optimization since really overloaded methods
9643         must differ also in the arguments, but this doesn't work with
9644         low-level IL code (or when using explicit conversion operators: see
9645         bug#23498 for an example).
9646
9647 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9648
9649         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
9650
9651 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
9652
9653         * icall.c: make MonoType::GetElementType its own icall.
9654
9655 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9656
9657         * icall.c: remove MonoMethod_get_Name().
9658         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
9659         object.
9660
9661 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9662
9663         * string-icalls.c: optimized a few methods.
9664
9665 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9666
9667         * icall.c: added all new string internal calls
9668         * string-icalls.c: added, new string internal call implementation.
9669         * object.c: added mono_string_new_size for allocating a string a size
9670
9671 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
9672
9673         * object.c (mono_object_isinst): use the same code as in the
9674         optimized x86 version.
9675
9676 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9677
9678         * profiler.c: TSC-based timer code (faster and more accurate).
9679         Not hooked up in configure, yet (set USE_X86TSC to 1).
9680
9681 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
9682
9683         * profiler.c, profiler.h: track time spent compiling methods.
9684         * threads.c: track thread creation/destruction.
9685
9686 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
9687
9688         * profiler.c, profiler.h, profiler-private.h: profiling interface
9689         and sample implementation. Moved here so that it can be used also by
9690         the jit.
9691
9692 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
9693
9694         * reflection.c, reflection.h: keep types and other handles separate in
9695         the hash tables for referred tokens. Add guid for modules.
9696
9697 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9698
9699         * assembly.c: fix bugs found with valgrind.
9700         * metadata.h, metadata.c: added mono_metadata_guid_heap().
9701
9702 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
9703
9704         * threads: added icall support for getting current domain for
9705                    the thread.
9706  
9707 2002-04-13  Martin Baulig  <martin@gnome.org>
9708
9709         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
9710         (MonoDebugVarInfo): Added `index' field for register based addresses.
9711         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
9712         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
9713         `MonoDebugVarInfo *params' and `guint32 this_offset' with
9714         `MonoDebugVarInfo *this_var'.
9715
9716         * debug-symfile.c (relocate_variable): New static function to write
9717         a location description for a local variable or method parameter.
9718
9719 2002-04-12  Martin Baulig  <martin@gnome.org>
9720
9721         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
9722         stack offset and begin/end scope address of a local variable.
9723         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
9724         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
9725         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
9726
9727         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
9728         Added new relocation types for start/end scope of a local variable.
9729
9730 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9731
9732         * object.h: add mono_object_domain() macro.
9733         * reflection.c: handle typespecs.
9734         * icall.c: MonoMethod::get_Name() implementation.
9735
9736 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9737
9738         * icall.c: String::GetHashCode() icall implementation.
9739
9740 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9741
9742         * icall.c: String::IndexOfAny icall.
9743         * object.c, object.h: make array->max_length more useful.
9744         Intrduced mono_object_class() and mono_string_length() macros.
9745
9746 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9747
9748         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
9749         instead of g_unichar_isdigit.
9750
9751 2002-04-11  Nick Drochak  <ndrochak@gol.com>
9752
9753         * icall.c: Implement a simple Double.ToString().
9754
9755 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9756
9757         * appdomain.h: only io-layer.h is supposed to be included.
9758         * icall.c: explicitly import environ. Fix warning.
9759
9760 2002-04-10  Nick Drochak  <ndrochak@gol.com>
9761
9762         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
9763                 return true even if it's not Daylight Savings time.
9764                 Only return false for the case where the function isn't
9765                 implemented for a plaform (read Windows).
9766
9767 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9768
9769         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
9770         data with a mutex.
9771
9772 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
9773
9774         * mempool.c (mono_mempool_alloc): only use g_malloc when
9775         absolutely necessary.
9776
9777 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
9778
9779         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
9780
9781         * class.c (mono_class_vtable): use domain mempool to allocate vtable
9782         (mono_class_proxy_vtable): use domain mempool
9783
9784 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9785
9786         * appdomain.h, appdomain.c: split initialization that requires the
9787         execution engine support into mono_runtime_init().
9788
9789 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
9790
9791         * class.c (mono_class_init): don't include vtable inside MonoClass
9792         to save some memory, gather some statistics.
9793         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
9794
9795 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9796
9797         * icall.c: internalcall implementation for ValueType.Equals().
9798
9799 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
9800
9801         * object.c (mono_message_init): moved 
9802         (mono_runtime_exec_main): new arch. independent impl.
9803         (mono_runtime_invoke_array): new method - like
9804         mono_runtime_invoke, but you can pass an array of objects.
9805         (mono_remoting_invoke): new arch. independent impl.
9806         (mono_message_invoke): new arch. independent impl.
9807         (mono_runtime_class_init): new arch. independent impl.
9808         (mono_runtime_object_init): new arch. independent impl.
9809
9810 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9811
9812         * metadata.c, object.c, reflection.c: documented the exported
9813         functions.
9814
9815 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
9816
9817         * icall.c: simpler code to pass the assembly builder data to corlib.
9818         Implement GetNestedTypes() internalcall.
9819
9820 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9821
9822         * class.c: warn if a type can't be loaded.
9823
9824 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
9825
9826         * image.h: typedef MonoImageOpenStatus
9827         * types.h: removed unused file
9828         
9829 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
9830
9831         * icall.c: Enum_ToObject accepts enum value arguments.
9832
9833 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9834
9835         * class.c: move initialization of properties, events and nested
9836         classes, so that they happen for interfaces, too.
9837
9838 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9839
9840         * icall.c: cleanup some ugly casts in Array_SetValue*.
9841
9842 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9843
9844         * icall.c: the values array fro enums is of the correct type, now.
9845         Implement (correctly) getFullName instead of assQualifiedName for
9846         MonoType.
9847         * reflection.h, reflection.c: added mono_type_get_name ().
9848
9849 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9850
9851         * assembly.c, image.h: for each MonoImage, record from wich assembly
9852         it was loaded.
9853         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
9854         Make Type.Assembly work.
9855
9856 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
9857
9858         * debug-symfile.h: use char* instead of gpointer to avoid
9859         unnecessary casts.
9860
9861         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
9862
9863         * icall.c (ves_icall_InternalExecute): impl. FielSetter
9864         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
9865
9866 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
9867
9868         * icall.c (mono_message_init): impl. (code cleanup)
9869         (ves_icall_InternalExecute): impl. FieldGetter
9870
9871         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
9872         defined we call all (non-static)methods through the vtable. 
9873
9874 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
9875
9876         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
9877         finalizer even though the memory is still referenced (and the chunk of
9878         memory is not freed).
9879
9880 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9881
9882         * assembly.c: fix brokeness.
9883
9884 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
9885
9886         * class.c: kill some warnings. Check explicit interface method
9887         implementation also without considering the namespace.
9888         Load also literal strings in static class data.
9889
9890 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
9891
9892         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
9893         (default_assembly_name_resolver): Make the resolver take the
9894         "base" directory where the assembly was originally defined, so we
9895         can load DLLs that are in the same directory as the assembly that
9896         is being referenced.
9897
9898 2002-03-28  Dick Porter  <dick@ximian.com>
9899
9900         * file-io.h: 
9901         * file-io.c:
9902         * socket-io.c: 
9903         * unicode.h: 
9904         * unicode.c: Warning cleanups
9905
9906 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
9907
9908         * object.h, reflection.h: use the correct type instead of MonoObject.
9909
9910 2002-03-28  Martin Baulig  <martin@gnome.org>
9911
9912         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
9913         (mono_debug_update_symbol_file): Initialize classes if necessary.
9914
9915 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9916
9917         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
9918         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
9919
9920 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
9921
9922         * assembly.h: fix function prototype.
9923         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
9924         * mono-endian.h: use const cast.
9925
9926 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
9927
9928         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
9929
9930 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9931
9932         * loader.c: don't assert when a typeref can't be loaded, give
9933         a chance to the runtime to trow an exception instead.
9934         * loader.h: fix warning.
9935
9936 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
9937
9938         * class.c (mono_class_proxy_vtable): added proxy support
9939
9940 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
9941
9942         * icall.c: removed last of PAL calls, added System.Environment
9943         * file-io.h, file-io.c: MonoIO implementation
9944         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
9945
9946 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9947
9948         * appdomain.c: do not use the byte marker in ldstr table lookup.
9949         * debug-helpers.c: allow two ':' to separate class and method name.
9950         * object.c: allocate arrays bounds with the GC, too.
9951         * verify: add a few more checks.
9952
9953 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
9954
9955         * reflection.c: output also literal strings. Allocate parameter data
9956         with GC_malloc() (thanks, Martin, for catching this!).
9957
9958 2002-03-26  Martin Baulig  <martin@gnome.org>
9959
9960         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
9961         include the `this' offset in the `param_offsets'.
9962
9963 2002-03-25  Martin Baulig  <martin@gnome.org>
9964
9965         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
9966         mono_debug_get_class() function to get the classes. Added new
9967         relocation types for arrays and strings.
9968         (mono_debug_get_class): New static function to search in all
9969         referenced assemblies for a metadata token.
9970
9971         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
9972
9973 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
9974
9975         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
9976         hold gc-allocated objects. Make the string heap a stream like the
9977         others. Removed duplicated code when writing stream info.
9978         Added asserts to catch possible buffer overflows. Set the sorted map
9979         for tables that need sorting. Added some documentation.
9980
9981 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
9982
9983         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
9984         for interned strings and vtables.
9985
9986 2002-03-24  Martin Baulig  <martin@gnome.org>
9987
9988         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
9989         it in the array since it was created with g_slist_prepend().
9990
9991 2002-03-24  Martin Baulig  <martin@gnome.org>
9992
9993         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
9994         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
9995         (mono_debug_method_from_token): Renamed to
9996         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
9997         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
9998
9999         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
10000         relocation types.
10001
10002         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
10003
10004 2002-03-24  Martin Baulig  <martin@gnome.org>
10005
10006         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
10007         (mono_debug_method_from_token): New func.
10008
10009         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
10010         New interncall, calls mono_debug_local_type_from_signature().
10011         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
10012         calls mono_debug_method_from_token().
10013
10014 2002-03-23  Martin Baulig  <martin@gnome.org>
10015
10016         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
10017         specifies the number of bytes to be converted, not the array size.
10018         Return the number of chars, not the number of bytes.
10019         (ves_icall_iconv_get_chars): The `byteCount' argument
10020         specifies the number of bytes to be converted, not the array size.
10021
10022 2002-03-23  Martin Baulig  <martin@gnome.org>
10023
10024         * reflection.h (MonoReflectionSigHelper): New type.
10025
10026         * reflection.c (mono_reflection_sighelper_get_signature_local),
10027         (mono_reflection_sighelper_get_signature_local): New functions.
10028
10029         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
10030         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
10031         interncalls.
10032
10033 2002-03-23  Martin Baulig  <martin@gnome.org>
10034
10035         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
10036         is_writeable is set.
10037         (mono_raw_buffer_update): New function to write the modified map
10038         back to disk.
10039
10040         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
10041
10042         * debug-symfile.c (mono_debug_update_symbol_file): Call
10043         mono_raw_buffer_update() when done writing.
10044
10045 2002-03-23  Martin Baulig  <martin@gnome.org>
10046
10047         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
10048
10049         * debug-symfile.c: Added support for arguments and local variables.
10050
10051 2002-03-23  Dick Porter  <dick@ximian.com>
10052
10053         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
10054         protected by ifdefs, hence breaking the w32 build.
10055
10056 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10057
10058         * object.c: implement is_interned() the right way.
10059
10060 2002-03-21  Martin Baulig  <martin@gnome.org>
10061
10062         * debug-symfile.[ch]: New files to handle debugging information
10063         files. There's also support to dynamically update these symbol
10064         files to include machine dependent information.
10065
10066 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
10067
10068         * threads.c (mono_thread_create): new function to create thread
10069         from C
10070
10071 2002-03-20  Martin Baulig  <martin@gnome.org>
10072
10073         * icall.c (ves_icall_InternalInvoke): Create a new object if the
10074         method is a constructor.
10075         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
10076         points to ves_icall_InternalInvoke().
10077
10078 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
10079
10080         * file-io.c: Flush shouldn't throw exceptions.
10081
10082 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
10083
10084         * file-io.c: FileStream flush support; FileSetLength now
10085         restores file pointer.
10086
10087 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10088
10089         * class.c: set image for pointer classes.
10090
10091 2002/03/19  Nick Drochak <ndrochak@gol.com>
10092
10093         * sysmath.c: Forgot one.
10094
10095 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
10096
10097         * sysmath.c: Avoid redefining existing names.
10098
10099 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
10100
10101         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
10102         handled by runtime as icall rather than dllimport from libm.so
10103         * file-io.c, file-io.h: fixed handle argument type.
10104
10105 2002-03-18  Dick Porter  <dick@ximian.com>
10106
10107         * reflection.c (mono_image_get_type_info): rename interface to
10108         iface, because of "#define interface struct" on windows.
10109
10110 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
10111
10112         * class.c, class.h: rename and export mono_ptr_class_get().
10113         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
10114         * reflection.c, reflection.h, icall.c: better/saner type name
10115         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
10116         method signatures.
10117
10118 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
10119
10120         * class.c (mono_class_init): removed hardcoded GHC_SLOT
10121
10122         * icall.c (ves_icall_InternalInvoke): impl.
10123
10124 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10125
10126         * reflection.c: output the interface map table, too.
10127
10128 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
10129
10130         * class.c (class_compute_field_layout): separate computation of 
10131         static field layout
10132
10133 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
10134
10135         * icall.c: added System.Buffer support.
10136         * file-io.c: moved file icalls from PAL to FileStream.
10137
10138 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
10139
10140         * icall.c (ves_icall_System_Object_GetHashCode): impl.
10141
10142 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
10143
10144         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
10145
10146 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10147
10148         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
10149
10150 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10151
10152         * debug-helpers.{c,h}: moved here from monograph some useful functions
10153         to locate a method by name/signature in a class or image. Included
10154         also a small and flexible IL disassembler.
10155
10156 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10157
10158         * reflection.c: fixup tokens in methods with small header size, too.
10159
10160 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
10161
10162         * object.c (mono_string_to_utf8): remove assert(!error), instead
10163         print a warning. 
10164
10165 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
10166
10167         * icall.c: update to the new mono_Array_class_get interface.
10168
10169 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10170
10171         * appdomain.c, object.c: Boehm-GC enable.
10172         * icall.c: make get_data_chunk() support split data requests.
10173         Ensure a class is initialized in more cases. Return only the first
10174         property found in GetProperties() or the compiler gets confused. 
10175         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
10176         * reflection.h, reflection.c: add fixup mechanism for field and method
10177         tokens. Initialize assembly->typeref in a single place. Output
10178         properties after events. Support custom attributes for events, too.
10179         Typo fix for paramter custom attrs.
10180
10181 2002-03-07  Martin Baulig  <martin@gnome.org>
10182
10183         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
10184
10185 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
10186
10187         * class.c (mono_array_class_get): fix. for multi. dim. arrays
10188
10189 2002-03-06  Martin Baulig  <martin@gnome.org>
10190
10191         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
10192         non-zero lower bounds. See testcases #F10-#F13.
10193
10194 2002-03-05  Martin Baulig  <martin@gnome.org>
10195
10196         * exception.c (mono_get_exception_argument_out_of_range): New exception.
10197
10198         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
10199         ves_icall_System_Array_GetValue(), only calculate the absolute array position
10200         here.
10201         (ves_icall_System_Array_SetValue): Likewise.
10202         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
10203         as argument and does the actual work. This function is used when copying a
10204         multi-dimensional array.
10205         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
10206         now do all the widening conversions of value types.
10207         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
10208
10209 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10210
10211         * class.c: remove some magic numbers and use the smbolic names,
10212         instead. Added init_events() to load event info at class init time.
10213         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
10214         and mono_metadata_methods_from_event().
10215         * reflection.h, reflection.c: added support for writing out the evnets
10216         related information.
10217
10218 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10219
10220         * reflection.h, icall.c: use a different method (GetInterfaces)
10221         to gather interface info and add isbyref, isprimitive and
10222         ispointer to the ves_icall_get_type_info() return value.
10223
10224 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10225
10226         * class.h: stared adding support for events.
10227         * icall.c: split find_members implementation. Added debug icall to get
10228         the address of an object.
10229         * reflection.c: handle TypeBuilders in mono_type_get_object().
10230
10231 2002-03-01  Martin Baulig  <martin@gnome.org>
10232
10233         * icall.c (ves_icall_System_Array_GetLength): This must throw an
10234         ArgumentOutOfRangeException(), not an ArgumentException().
10235         (ves_icall_System_Array_GetLowerBound): Likewise.
10236         (ves_icall_System_Array_GetValue): Improved argument checking.
10237         (ves_icall_System_Array_SetValue): Improved argument checking.
10238
10239 2002-03-01  Martin Baulig  <martin@gnome.org>
10240
10241         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
10242         called with invalid arguments rather than just dying with g_assert().
10243         (ves_icall_System_Array_SetValue): Likewise.
10244         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
10245         raise a NotImplementedException instead.
10246         (ves_icall_System_Array_GetLength): Added argument checking.
10247         (ves_icall_System_Array_GetLowerBound): Added argument checking.
10248
10249 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
10250
10251         * object.h (mono_assert): new macros mono_assert and
10252         mono_assert_not_reached
10253
10254 2002-02-28  Martin Baulig  <martin@gnome.org>
10255
10256         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
10257         and "System::String::IsInterned" to "System::String::_IsInterned".
10258
10259 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
10260
10261         * icall.c: remove hacks for typebuilder. Added icall to create a
10262         modified type from a tybebuilder.
10263         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
10264         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
10265         to create a backing MonoClass for a TypeBuilder.
10266
10267 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10268
10269         * class.c, class.h: more refactoring of class init.
10270         Export mono_class_setup_mono_type() and mono_class_setup_parent().
10271
10272 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
10273
10274         * marshal.c, marshal.h: start of marshaling interface.
10275
10276 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10277
10278         * icall.c: fix order in assembly qualified name icall.
10279
10280 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10281
10282         * class.c: do not free str, since we store it in the hash table.
10283         * reflection.h: add label field to MonoILExceptionInfo.
10284         * reflection.c: handle references to more than one assembly. Handle
10285         case when there isn't a module created in the assembly.
10286
10287 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10288
10289         * class.c: Fix typo. Start refactoring of class init code.
10290
10291 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10292
10293         * appdomain.c: exit with 1 on error.
10294         * class.c: we already have the name in MonoClassField.
10295         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
10296         MonoStreamHeader instead of an offset of image->raw_metadata.
10297
10298 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
10299
10300         * appdomain.c (mono_init): Be even more descriptive about the error.
10301
10302 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
10303
10304         * appdomain.c: give the user an informative message when corlib can't
10305         be loaded.
10306
10307 2002-02-26  Martin Baulig  <martin@gnome.org>
10308
10309         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10310         New icall to get the time zone data.
10311
10312 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10313
10314         * reflection.c: set virtual and raw size of section correctly.
10315         * threads.c: transfer domain information to newly created threads.
10316
10317 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10318
10319         * class.c: when instancing a class in a domain, load the default
10320         vaules for static fields from the constant table. Fix System.Enum to
10321         not be an enum.
10322         * icall.c: implement Object::GetType() internalcall. Implemented
10323         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
10324         Fixed checking of binding flags in find_members().
10325         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
10326         * reflection.c: handle enumerations when writing to the constant
10327         table. Use a different object cache for types.
10328
10329
10330 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
10331
10332         * object.c (mono_object_isinst): fix for arrays
10333
10334         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
10335
10336 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10337
10338         * object.c: don't use mprotect ()  and fix intern pool hash table
10339         lookup for big endian systems.
10340
10341 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10342
10343         * icall.c: change type_is_subtype_of () signature.
10344
10345 2002-02-21  Mark Crichton  <crichton@gimp.org>
10346
10347         * rand.c, rand.h: Added random number generator for
10348         System.Security.Cryptography classes.
10349
10350         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
10351
10352         * icall.c: Added System.Security.Cryptography calls.
10353
10354 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10355
10356         * class.c, icall.c, metadata.c: better support for pointer types.
10357         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
10358         * reflection.c: Add support for getting custom attrs for properties
10359         and simplify some code.
10360
10361 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10362
10363         * icall.c: change getToken () and add custom attribute GetBlob()helper
10364         method.
10365         * reflection.h: add custom attrs array to the reflection builder structures.
10366         * reflection.c: encode and emit custom attributes for all the relevant
10367         reflection objects. Cache fieldref and methodref tokens. Change
10368         mono_image_create_token() interface to take a MonoDynamicAssembly.
10369         More complete custom attributes decoder. Load custom attributes for
10370         Assembly, Field, Method and Constructor objects, too. Make the
10371         returned array an Attribute[] one, not object[]. Added
10372         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
10373         custom attribute constructor.
10374
10375 2002-02-20  Dick Porter  <dick@ximian.com>
10376
10377         * icall.c:
10378         * rawbuffer.c:
10379         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
10380         problem code out for now).
10381
10382 2002-02-19  Radek Doulik  <rodo@ximian.com>
10383
10384         * object.c (mono_ldstr): use hash table to avoid multiple swapping
10385
10386 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
10387
10388         * icall.c: register the GetCustomAttributes method.
10389         * object.c, object.h: add mono_string_new_len ().
10390         * reflection.h, reflection.c: added mono_runtime_invoke(),
10391         mono_install_runtime_invoke(). Added
10392         mono_reflection_get_custom_attrs () to load custom attributes and
10393         create the attribute objects.
10394
10395 2002-02-19  Dick Porter  <dick@ximian.com>
10396         * threads-dummy-types.c:
10397         * threads-dummy-types.h:
10398         * threads-dummy.c:
10399         * threads-dummy.h:
10400         * threads-pthread-types.c:
10401         * threads-pthread-types.h:
10402         * threads-pthread.c:
10403         * threads-pthread.h:  Deleted obsolete files
10404
10405 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
10406
10407         * class.c (mono_class_vtable): runtime init the class when we
10408         allocate static class data.
10409
10410         * icall.c (ves_icall_System_Array_SetValue): check for null values.
10411
10412         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
10413         and String - but we will need generic marshalling support in the
10414         future. 
10415         (mono_init): set the domain name in a ms compatible way
10416
10417         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
10418         String[].
10419
10420 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
10421
10422         * object.c (mono_array_clone): use alloca() instead of g_malloc  
10423         for sizes
10424
10425         * appdomain.c (mono_domain_unload): impl.
10426
10427 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10428
10429         * appdomain.c, object.c: fix intern pool implementation.
10430         * class.c: fix alignment code.
10431
10432 2002-02-16  Radek Doulik  <rodo@ximian.com>
10433
10434         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
10435         and s2 > s1, just copy lower bytes to be compatible with little
10436         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
10437         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
10438
10439         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
10440         force big_endian to be 1 for big endian machines 
10441         (ves_icall_iconv_new_decoder): ditto
10442
10443 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
10444
10445         * socket-io.c (convert_sockopt_level_and_name): If the system
10446         doesn't define SOL_IP or SOL_TCP, get them by hand using
10447         getprotobyname() and caching the values (because this could be a
10448         slow operation).
10449         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
10450         Use the appropriate struct when the system does support it. Ie,
10451         not all systems have struct ip_mreqn so use struct ip_mreq when
10452         appropriate.
10453
10454 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
10455
10456         * reflection.c: handle finally clauses.
10457
10458 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
10459
10460         * socket-io.c: use g_snprintf() instead of snprintf.
10461
10462 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
10463
10464         * reflection.c (mono_param_get_objects): Cast second argument to
10465         mono_method_get_param_names to a const char** to silence the
10466         compiler warning.
10467
10468         * appdomain.c (mono_domain_assembly_open): Put parens around the
10469         truth statement in the for-loop.
10470
10471         * unicode.c (iconv_convert): Got rid of a compiler warning about
10472         int i being unused when the system has a new iconv.
10473         (iconv_get_length): Same.
10474
10475         * image.c (load_class_names): Cast the second argument to
10476         g_hash_table_insert() to char* to hush compiler warnings about the
10477         arg being a const.
10478         (mono_image_open): Same here.
10479
10480         * socket-io.c: Don't conditionally include sys/filio.h or
10481         sys/sockio.h here anymore since we now get them from
10482         io-layer/io-layer.h
10483         (inet_pton): If the system doesn't support inet_aton, implement
10484         using inet_addr and also #define INADDR_NONE if it isn't defined
10485         by the system.
10486
10487 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10488
10489         * metadata.c, metadata.h: added function to get packing and size info
10490         of a typedef.
10491         * reflection.h, reflection.c: handle field RVA data. Save info about
10492         the table layout if needed. Assign typedef indexes to all the types
10493         before dumping the info about them to avoid forward reference problems.
10494
10495 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
10496
10497         * socket-io.c (convert_sockopt_level_and_name): ifdef
10498         SO_ACCEPTCONN because it is not defined on my system (old debian)
10499
10500 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10501
10502         * opcode.c: use stddef.h to get NULL.
10503
10504 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
10505
10506         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
10507         for FIONBIO, FIONREAD and SIOCATMARK.
10508         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
10509         define INADDR_NONE and besides, inet_addr() is deprecated and
10510         should not be used. Use inet_pton() instead - it also has the
10511         added bonus that it can easily handle IPv6 addresses as well.
10512         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
10513
10514 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10515
10516         * decimal.c: remove _MSC_VER conditional.
10517
10518 2002-02-13  Dick Porter  <dick@ximian.com>
10519
10520         * socket-io.c: 
10521         * icall.c: Internal calls for Blocking, Select, Shutdown,
10522         GetSocketOption and SetSocketOption
10523
10524 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10525
10526         * assembly.cs: better resolver: use it instead of some kludgy
10527         code.
10528
10529 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
10530
10531         * reflection.c: the best way to speed-up the compiler is to avoid
10532         infinite loops.
10533
10534 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
10535
10536         * class.c (mono_class_vtable): changed the object layout
10537         (obj->vtable->class). 
10538         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
10539
10540 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10541
10542         * assembly.c: look for assemblies in the assembly dir, too.
10543
10544 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10545
10546         * class.c: fix thinko in mono_class_from_type().
10547
10548 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10549
10550         * exception.h, exception.c: added TypeLoadException.
10551         * object.h, object.c: added mono_array_clone ().
10552         * icall.c: handle throwOnError in AssemblyGetType().
10553         Added Array.Clone().
10554         * opcode.h, opcode.c: use a single value for the opcode val.
10555         Compile fix for non-gcc compilers.
10556
10557 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
10558
10559         * opcodes.c, opcodes.h: export interesting info about opcodes.
10560
10561 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
10562
10563         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
10564         icalls. 
10565
10566         * class.c (class_compute_field_layout): set element_class for enums
10567         (mono_class_create_from_typedef): set element_class for normal classes
10568
10569         * icall.c (ves_icall_System_Enum_get_value): impl.
10570
10571         * class.c (mono_class_create_from_typedef): do not set valuetype
10572         flag for System.ValueType and System.Enum
10573
10574 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
10575
10576         * unicode.c (iconv_convert): fix big endian problem.
10577
10578 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10579
10580         * class.c: add asserts if we are ever going to scribble over memory.
10581         * socket-io.c: not all systems have AF_IRDA defined.
10582
10583 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
10584
10585         * class.c (class_compute_field_layout): do not consider static
10586         fields to compute alignment
10587
10588 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
10589
10590         * appdomain.c (mono_appdomain_get): impl.
10591         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
10592
10593 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10594
10595         * icall.c: ignore "file://" prefix when loading an assembly.
10596
10597 2002-01-23  Dick Porter  <dick@ximian.com>
10598
10599         * socket-io.c:
10600         * icall.c:
10601         * Makefile.am: Added socket support
10602
10603 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
10604
10605         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
10606         code back.  This should return the assemblies that are loaded by
10607         the runtime on behalf of an application domain. 
10608
10609         The current implementation is still broken, it just returns every
10610         assembly loaded, but until we get real applications domain this
10611         will do.
10612
10613 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
10614
10615         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
10616         AppDomain object.
10617
10618 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
10619
10620         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
10621         the mono_class_from_name lookup.
10622         (ves_icall_get_parameter_info): ditto.
10623         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
10624         method.
10625         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
10626
10627 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10628
10629         * class.c: load also nested classes on class init.
10630         System.ValueType instance methods gets passed boxed
10631         values, unless methods in derived classed that get a pointer to the
10632         data.
10633         * icall.c: use better name parsing code in GetType().
10634         * image.c, image.h: add mono_image_loaded ().
10635         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
10636         * reflection.c, reflection.h: added mono_reflection_parse_type().
10637
10638 2002-01-22  Veronica De Santis <veron78@interfree.it>
10639
10640         * icall.c : Added mapping of internal calls for Manual and Auto reset events
10641         * threads.c : Added the implementation of internal calls for events
10642         * threads.h : Added prototypes of internal calls for events
10643         
10644 2002-01-21  Radek Doulik  <rodo@ximian.com>
10645
10646         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
10647
10648 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
10649
10650         * class.c (mono_class_init): set min_align to 1 (instead of 0)
10651         (mono_class_value_size): use min_align
10652
10653 2002-01-20  Dick Porter  <dick@ximian.com>
10654
10655         * threads.h:
10656         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
10657         so it compiles on w32.
10658
10659 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
10660
10661         * metadata.c (mono_type_stack_size): impl.
10662
10663         * class.c (mono_class_get_field): impl. memberref token
10664
10665 2002-01-16 Veronica De Santis <veron78@@interfree.it>
10666
10667         * icall.h : Added the internal calls mapping for CreateMutex_internal
10668                     and ReleaseMutex_internal.
10669         * threads.h : Added the prototype of mutexes internal calls.
10670         * threads.c : Added the implementations of mutexes internal calls.
10671
10672 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10673
10674         * metaparse.h: removed unused file.
10675         * reflection.c, reflection.h: added stream_data_align () function 
10676         to align data in streams and keep stream aligned. Add support for
10677         exception support in method headers.
10678
10679 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
10680
10681         * unicode.c: make iconv_convert () return the number of bytess written
10682         in the output buffer.
10683
10684 2002-01-15  Dick Porter  <dick@ximian.com>
10685         * threads.c: Make the runtime's idea of infinite timeouts coincide
10686         with the class library's
10687
10688         Fix a particularly egregious bug in mono_thread_cleanup(). That
10689         code was so utterly bogus it must have been written on a Monday.
10690
10691 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10692
10693         * reflection.h: add subtypes field to TypeBuilder.
10694         * reflection.c: encode constants for literal fields.
10695         Handle subtypes. Fix user string token (and add a zero byte)
10696         at the end.
10697         
10698 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
10699
10700         * class.c (mono_class_init): bug fix: assign slot numbers for
10701         abstract methods.
10702
10703 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10704
10705         * reflection.c: don't try to output a code RVA for abstract methods.
10706         Small fixes for method header format. Output parameter info to the
10707         ParamDef table. Save method overriding info to MethodImpl table.
10708         Fix property support. Allow typedef.extends to be a type in the
10709         building assembly.
10710         * verify.c: fix off-by-one error.
10711
10712 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
10713
10714         * class.c: fix mono_class_from_mono_type () for szarray types.
10715         Remove unused cache check in mono_class_from_type_spec().
10716         * icall.c: *type_from_name () functions handle simple arrays and byref.
10717         * reflection.c: handle byref and szarray types. Handle methods without
10718         body (gets P/Invoke compilation working). Handle types and fields in
10719         get_token ().
10720         * reflection.h: add rank to MonoTypeInfo.
10721
10722 2002-01-10  Dick Porter  <dick@ximian.com>
10723
10724         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
10725         internal calls
10726
10727 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10728
10729         * icall.c: initialize class in type_from_handle ().
10730         Loop also in parent classes for get_method ().
10731         * reflection.c: properly encode class and valuetype types.
10732         Start on encoding TypeBuilder types. Handle fieldrefs.
10733         Use correct length when registering a user string.
10734         Handle ConstructorBuilder and MonoMethod in get_token ().
10735         Make mono_type_get_object () aware of cached types.
10736         * object.c: back out change to mono_string_new ().
10737
10738 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
10739         * object.c: mono_string_new should return a NULL when the string 
10740         passed in is NULL -- not try to deference it.
10741         
10742 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
10743
10744         * icall.c: hack to make IsSubType work for TypeBuilders.
10745         * reflection.c: emit constructors before methods.
10746         Retrieve param names in mono_param_get_objects().
10747
10748 2002/01/05  Nick Drochak  <ndrochak@gol.com>
10749
10750         * Makefile.am: fix list of headers and sources so automake 1.5
10751         doesn't complain. Removed \# at end of list.
10752
10753 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10754
10755         * reflection.c: get token for a method ref. Set return type of
10756         constructor to void.
10757         * loader.c: debug message.
10758         * class.c: typo fix.
10759
10760 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
10761
10762         * icall.c: fix array init with rank > 1. FindMembers
10763         loops in parent class as well.
10764         * image.c: do not insert nested types in name cache.
10765         * reflection.c: warning fix.
10766         * reflection.h: add override method (for interface impl).
10767
10768 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
10769
10770         * metadata.c: fix customattr decoding.
10771
10772 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
10773
10774         * rawbuffer.cs: Added native Win32 implementation, avoids using
10775         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
10776
10777 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
10778
10779         * class.c: make the low-level routines handle the cache.
10780
10781 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
10782
10783         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
10784
10785 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
10786
10787         * class.c: fix mono_array_element_size() for objects.
10788         * class.h, class.c: add properties to MonoClass and load them
10789         at init time.
10790         * icall.c: check with isinst() when assigning a value to an array
10791         instead of requiring the classes to match exactly.
10792         Implemented icall for System.Type::GetType().
10793         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
10794         enums. Handle bindingflags when looking for methods and fields.
10795         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
10796         and mono_metadata_methods_from_property().
10797         * reflection.h, reflection.c: added structures for propreties,
10798         parameters and enums. Implemented mono_property_get_object() and
10799         mono_param_get_objects().
10800
10801 2001-12-18  Dick Porter  <dick@ximian.com>
10802
10803         * file-io.c: Use mono_string_to_utf16() instead of
10804         mono_string_chars()
10805
10806         * object.c: Added mono_string_to_utf16(), which copies the non
10807         NULL-terminated MonoString into a new double-null-terminated
10808         buffer.
10809
10810 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
10811
10812         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
10813
10814 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
10815
10816         * file-io.c: raise exceptions if handle is invalid.
10817
10818 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
10819
10820         * assembly.c: yet another check for mscorlib.
10821         * class.c, class.h: load nesting info for classes.
10822         * icall.c: many new functions to support the Reflection classes.
10823         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
10824         * reflection.h, reflection.c: mono_image_create_token(),
10825         mono_assembly_get_object(), mono_type_get_object(),
10826         mono_method_get_object(), mono_field_get_object(): methods to return
10827         objects that parallel the C representation of assemblies, types,
10828         methods, fields.
10829
10830 2001-12-11  Dick Porter  <dick@ximian.com>
10831
10832         * icall.c:
10833         * file-io.c: Internal calls for file IO.
10834
10835 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
10836
10837         * tabledefs.h: missing FileAttributes.
10838         * verify.h, verify.c: use is_valid_string () to simplify and check for
10839         valid strings more correctly. Fix warnings and speeling.
10840         Check more tables: Filed, File, ModuleRef, StandAloneSig.
10841         Check code: branches, maxstack, method calls.
10842
10843 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
10844
10845         * object.c (mono_object_allocate): removed static, so that the jit
10846         can allocate value types.
10847
10848         * icall.c (ves_icall_System_DateTime_GetNow): impl.
10849
10850 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10851
10852         * class.c: init enum types right away and register the
10853         token->MonoClass map in mono_class_create_from_typedef ().
10854         * verify.h, verify.c: first cut of the verifier.
10855         * pedump.c: add --verify switch to verify metadata tables.
10856         * tabledefs.h: add some missing enums.
10857
10858 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
10859
10860         * class.c (mono_install_runtime_class_init): impl.
10861         (mono_class_init): renamed mono_class_metadata_init to
10862         mono_class_init, also removed the metadata_inited flag
10863
10864         * object.c (mono_object_isinst): use faster algorithm
10865
10866 2001-11-30  Radek Doulik  <rodo@ximian.com>
10867
10868         * mono-endian.h: reverted last change
10869         added function prototypes
10870
10871         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
10872         add mono-endian.c back
10873
10874         * mono-endian.c: returned back, as Paolo pointed out, it's needed
10875         for unaligned access, I've mistaked it with endianess. I am
10876         sorry.
10877         (mono_read16): fix reverted endianess
10878         (mono_read64): ditto
10879         (mono_read32): ditto
10880
10881 2001-11-30  Dick Porter  <dick@ximian.com>
10882
10883         * exception.c: Implement mono_exception_from_name()
10884
10885 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10886
10887         * metadata.h, metadata.c: remove params_size and locals_size and their
10888         calculation from the metadata code: they are only usefult to the
10889         interp.
10890
10891 2001-11-29  Radek Doulik  <rodo@ximian.com>
10892
10893         * object.c (mono_ldstr): swap bytes here, it's probably not the
10894         best place, but works for me now, I'll redo it once I know mono
10895         better, also note that I add PROT_WRITE and don't reset back, also
10896         note that it's only affects big endians, so x86 should be OK
10897
10898         * mono-endian.h (read16): use just glib macros for both endians
10899
10900         * mono-endian.c: removed as glib macros are used in in
10901         mono-endian.h so we don't need to care about endianess for read
10902         macros as glib does that for us already
10903
10904 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
10905
10906         * class.h, class.h: take minimum alignment into consideration so
10907         that the fields of a class remain aligned also when in an array.
10908
10909 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10910
10911         * loader.h, loader.c: add mono_method_get_param_names().
10912         * class.c: 0-init class fields.
10913
10914 2001-11-26  Dick Porter  <dick@ximian.com>
10915
10916         * icall.c:
10917         * threads-types.h:
10918         * threads.c: New file that handles System.Threading on all platforms
10919
10920         * object.c: 
10921         * object.h: Remove the synchronisation struct from MonoObject,
10922         replace it with a pointer that gets initialised on demand
10923
10924         * Makefile.am: Replace all the system-specific threading code with
10925         a single file that uses the new wrapper library
10926
10927 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
10928
10929         * class.c, class.h: add mono_install_trampoline() so that the runtime
10930         can register a function to create a trampoline: removes the ugly
10931         requirement that a runtime needed to export arch_create_jit_trampoline.
10932         * object.h, object.c: added mono_install_handler() so that the runtime
10933         can install an handler for exceptions generated in C code (with
10934         mono_raise_exception()). Added C struct for System.Delegate.
10935         * pedump.c: removed arch_create_jit_trampoline.
10936         * reflection.c: some cleanups to allow registering user strings and
10937         later getting a token for methodrefs and fieldrefs before the assembly
10938         is built.
10939         * row-indexes.h: updates and fixes from the new ECMA specs.
10940
10941 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
10942
10943         * class.h, class.c: add enum_basetype field to MonoClass.
10944         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
10945         to get index in the constant table reated to a field, param or
10946         property.
10947         * reflection.h, reflection.c: handle constructors. Set public-key and
10948         version number of the built assembly to 0.
10949         * row-indexes.h: update from new ECMA spec.
10950
10951 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10952
10953         * class.h, class.c: add a max_interface_id to MonoClass.
10954         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
10955         since it's used to do that. Added mono_type_type_from_obj().
10956         Make GetType() return NULL instead of segfaulting if the type was not
10957         found. Handle simple arrays in assQualifiedName.
10958         * object.h: add a struct to represent an Exception.
10959         * reflection.c: output call convention in method signature.
10960         Add code to support P/Invoke methods and fixed offsets for fields.
10961
10962 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
10963
10964         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
10965         the value.
10966         * icall.c: use mono_array_addr instead of array->vector: fixes the
10967         reflection image writing.
10968         * reflection.c: init call convention byte to 0 in method signature.
10969         Encode the property signature. Don't output property-related methods
10970         twice. Really process the properties for a type (don't cast a field to
10971         a property, my mom always told me that).
10972         Fix 64 bit issues in pointer alignment in a different and more
10973         readable way.
10974
10975 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
10976
10977         * loader.h: Removed type class from MonoDefaults, added monotype
10978
10979         * loader.c: Loaded MonoType, removed loading of Type
10980
10981         * icall.c (my_mono_new_object): Now returns a System.MonoType,
10982         and fills in System.Type._impl with a RuntimeTypeHandle rather
10983         than the actual MonoClass *
10984
10985         (ves_icall_type_from_handle): change from type_class to
10986         monotype_class
10987
10988         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
10989         implemented
10990
10991         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
10992         implemented
10993
10994         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
10995
10996         (ves_icall_System_Reflection_Assembly_GetType): implemented
10997
10998         (ves_icall_System_MonoType_assQualifiedName): implemented
10999
11000         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
11001
11002 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
11003
11004         * assembly.c (mono_assembly_open): Implement a cache for the
11005         assemblies. 
11006
11007         (mono_assembly_close): only destroy the assembly when the last
11008         reference is gone.
11009         
11010 2001-11-09  Dick Porter  <dick@ximian.com>
11011
11012         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
11013
11014 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
11015
11016         * class.c (mono_class_metadata_init): bug fix: compute the right slot
11017
11018 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
11019
11020         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
11021         from Martin Weindel.
11022         * object.h: add mono_string_chars ().
11023
11024 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
11025
11026         * reflection.c (build_compressed_metadata): Eliminates warnings
11027         and uses 64-bit clean code.
11028
11029         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
11030         (mono_type_equal): Change signature to eliminate warnings.
11031
11032 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11033
11034         * icall.c, loader.c: remove the internalcall array constructors.
11035         Changes to match the new MonoArray structure.
11036         * object.h, object.c: an array object doesn't allocate an extra
11037         vector. Add mono_array_new_full () to create jagged arrays easily.
11038
11039 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
11040
11041         * metadata.h, metadata.c: add mono_metadata_field_info () to
11042         retreive all the info about a field from vairous tables.
11043         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
11044         * class.h, class.c: augment MonoClassField with more info.
11045         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
11046         policy and load a field's RVA if needed.
11047
11048 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
11049
11050         * class.c (mono_class_metadata_init): create a trampoline for all
11051         virtual functions instead of actually compiling them.
11052
11053 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
11054
11055         * class.h, class.c: include name in MonoClassField.
11056         * class.c: fix fundamental type of System.Object and System.String.
11057         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
11058         tokens in ldtoken.
11059         * icall.c: remove internalcalls for the Reflection stuff that is now
11060         done in C# code.
11061         * loader.c: mono_field_from_memberref () implementation.
11062         * mono-endian.c: thinko (s/struct/union/g).
11063         * object.c, object.h: make the mono_string_* prototypes actually use
11064         MonoString instead of MonoObject.
11065         * reflection.c, reflection.h: updates for changes in the reflection
11066         code in corlib: we use C structures that map to the actual C# classes.
11067         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
11068         fat method header if needed and use the info from the ILGenerator for
11069         methods. Handle fields in types. Misc fixes.
11070
11071 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
11072
11073         * class.c (mono_class_metadata_init): bug fix: always allocate
11074         space for static class data
11075
11076 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
11077
11078         * class.c (mono_compute_relative_numbering): use relative
11079         numbering to support fast runtime type checks.
11080
11081 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
11082
11083         * class.c (mono_class_create_from_typeref): added debugging output
11084         to print class name when MonoDummy is returned instead of real class
11085
11086 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
11087
11088         * class.c (mono_class_metadata_init): interface offset table now
11089         contains pointers into the vtable - this is more efficient for the jit
11090
11091 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
11092
11093         * class.c (mono_class_metadata_init): use a temporary vtable (the
11094         old algorithm only worked for the interpreter, but not for the jit)
11095
11096 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
11097
11098         * loader.c (method_from_memberref): use mono_class_get to get the
11099         class of an array instead of using System.Array directly.
11100         (mono_get_method): also add MEMBERREF methods to the method cache
11101         which usefull for arrays.
11102
11103 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
11104
11105         * pedump.c (arch_compile_method): added to compute vtable entry
11106
11107         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
11108         number of interfaces.
11109         
11110         * class.h: merged MonoArrayClass into MonoClass
11111
11112         * class.c (mono_class_create_from_typedef): compute the vtable size and
11113         allocate space to include the vtable inside MonoClass
11114         (mono_class_metadata_init): initialize the vtable
11115
11116 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
11117
11118         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
11119         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
11120         * image.c: endian fixes by Laurent Rioux.
11121         * object.h, object.c: rename MonoStringObject to MonoString and
11122         MonoArrayObject to MonoArray. Change some function names to conform to
11123         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
11124         guint16* as first argument, so don't use char*.
11125         Provide macros to do the interesting things on arrays in a portable way.
11126         * threads-pthread.c: updates for the API changes and #include <sched.h>
11127         (required for sched_yield()).
11128         * icall.c: updates for the API changes above.
11129         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
11130         platforms that need them.
11131
11132 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11133
11134         * class.c: set the correct type for all the fundamental
11135         type when loading the class.
11136
11137 2001-10-05  Dick Porter  <dick@ximian.com>
11138
11139         * threads-pthread.c (pthread_mutex_timedlock): Simple
11140         compatibility version for C libraries that lack this call.
11141
11142 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11143
11144         * class.c: MonoTypes stored in MonoClass are stored as
11145         fundamental MonoTypes when the class represents a
11146         fundamental type (System.Int32, ...).
11147         The TypeHandle return by ldtoken is a MonoType*.
11148         * icall.c: ves_icall_get_data_chunk () write out all the
11149         PE/COFF stuff. Implement ves_icall_define_method (),
11150         ves_icall_set_method_body (), ves_icall_type_from_handle ().
11151         * image.c: properly skip unknown streams.
11152         * loader.h, loader.c: add type_class to mono_defaults.
11153         * metadata.c, metadata.h: export compute_size () as
11154         mono_metadata_compute_size () with a better interface.
11155         Typo and C&P fixes.
11156         * pedump.c: don't try to print the entry point RVA if there is no entry point.
11157         * reflection.c, reflection.h: many cleanups, fixes, output method
11158         signatures and headers, typedef and typeref info, compress the metadata
11159         tables, output all the heap streams, cli header etc.
11160         * row-indexes.h: typo fixes.
11161
11162 2001-10-04  Dick Porter  <dick@ximian.com>
11163
11164         * object.h: Add a synchronisation mutex struct to MonoObject
11165
11166         * object.c (mono_new_object): Initialise the object
11167         synchronisation mutexes
11168
11169         * icall.c: System.Threading.Monitor internal calls
11170         
11171         * threads-pthread.h:
11172         * threads-pthread.c: System.Threading.Monitor internal calls
11173
11174         * threads-types.h: New file, includes the system-specific thread
11175         structures
11176         
11177         * threads-pthread-types.h:
11178         * threads-pthread-types.c: New files, handle pthread-specific
11179         synchronisation types
11180
11181         * threads-dummy-types.h: 
11182         * threads-dummy-types.c: New files of dummy support for
11183         thread-specific types
11184
11185         * metadata.c:
11186         * image.c:
11187         * pedump.c: include mono-endian.h not endian.h
11188         
11189         * Makefile.am: More threads files.
11190         Name mono-endian.h not endian.h
11191
11192 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
11193
11194         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
11195         stuff and implement a few more bits.
11196         * icall.c: a field needs to be dereferenced twice. Do not use the same
11197         name for two variables in the same scope.
11198         * image.c, image.h: cleanups.
11199
11200 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
11201
11202         * class.c (mono_class_metadata_init): bug fix: compute the right size
11203
11204 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
11205
11206         * icall.c: implemented some of the Reflection internalcalls.
11207         * image.c, image.h: start writing out the PE/COFF image.
11208         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
11209         that does the reverse than decode_blob_size ().
11210         * object.c: use mono_metadata_encode_value (). Move here
11211         temporary implementation of mono_string_to_utf8 ().
11212         * rawbuffer.c: make malloc_map static.
11213
11214 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11215
11216         * metadata.c: fix type comparison for arrays.
11217         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
11218         Added a couple of new classes to monodefaults.
11219         * icall.c: added a couple of Reflection-related internalcalls.
11220         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
11221         Added a byval_arg MonoType to MonoClass.
11222
11223 2001-09-28  Dick Porter  <dick@ximian.com>
11224
11225         * icall.c:
11226         * threads-pthread.h: 
11227         * threads-pthread.c: Implemented internal calls for
11228         LocalDataStoreSlot operations.  Applied mutexes around all shared
11229         data.  Reworked the thread creation and Start() operations to
11230         avoid a race condition.
11231         
11232         * threads-dummy.h:
11233         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
11234
11235 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
11236
11237         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
11238
11239 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
11240
11241         * class.c, loader.c: warn and return NULL instead of erroring out.
11242         * icall.c: added System.AppDomain::getCurDomain().
11243         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
11244
11245 2001-09-25  Dick Porter  <dick@ximian.com>
11246
11247         * threads-pthread.h:
11248         * threads-pthread.c: Implemented timed thread joining and added
11249         System.Threading.Thread::Join_internal internal call
11250
11251         * icall.c: Added System.Threading.Thread::Join_internal internal call
11252
11253         * threads-dummy.h:
11254         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
11255
11256 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
11257
11258         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
11259         mono_string_intern () to implement the semantics of the ldstr opcode
11260         and the interning of System.Strings.
11261         * icall.c: provide hooks to make String::IsIntern and String::Intern
11262         internalcalls.
11263
11264 2001-09-23  Dick Porter  <dick@ximian.com>
11265
11266         * threads-dummy.c: 
11267         * threads-dummy.h: New files of dummy threading routines
11268
11269         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
11270         support code based on system specifics
11271
11272         Rename PTHREAD_LIBS to THREAD_LIBS
11273         
11274 2001-09-23  Dick Porter  <dick@ximian.com>
11275
11276         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
11277         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
11278         internal calls.
11279         (mono_thread_init): Set up a Thread object instance to return when
11280         the main thread calls Thread.CurrentThread
11281         (mono_thread_cleanup): Wait for all subthreads to exit
11282
11283         * icall.c: New internal calls for System.Threading.Thread::Sleep
11284         (including Schedule) and CurrentThread
11285
11286         * threads.h: New file, to insulate thread-specific stuff from the
11287         rest of the code
11288
11289 2001-09-21  Dick Porter  <dick@ximian.com>
11290
11291         * threads-pthread.h: 
11292         * threads-pthread.c: New file, for handling pthreads-style
11293         threading support.  Start() now starts a new thread and executes
11294         the ThreadStart delegate instance.
11295
11296         * icall.c: Added the internalcall for
11297         System.Threading.Thread::Start_internal
11298
11299         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
11300
11301 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
11302
11303         * loader.c: work around the different signatures for delegates
11304         constructors csc generates in compiled code vs the ones compiled in mscorlib.
11305
11306 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11307
11308         * class.h, class.c: add mono_class_get_field_from_name ().
11309         * *: Fix C comments and other ANSI C issues.
11310
11311 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
11312
11313         * endian.h, assembly.c: fix some endianness issues.
11314
11315 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
11316
11317         * loader.h, load.c: add delegate_class to mono_defaults.
11318         Handle runtime provided methods in mono_get_method ().
11319
11320 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
11321
11322         * loader.c (mono_get_method): use pinvoke for internal call
11323
11324         * icall.c: use pinvoke for internal call
11325
11326         * loader.c (method_from_memberref): set the method name
11327
11328 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
11329
11330         * metadata.c: help the compiler generate better code for
11331         mono_class_from_mono_type ().
11332
11333 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
11334
11335         * class.c (mono_class_metadata_init): delayed computing of the
11336         class size to mono_class_metadata_init ()
11337
11338 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
11339
11340         * class.c, class.h: add an interfaces member to MonoClass.
11341         * image.c, image.h: add assembly_name field to MonoImage
11342         from the assembly table.
11343         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
11344
11345 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11346
11347         * class.c: Handle Array in mono_class_from_mono_type ().
11348         * metadata.c, pedump.c: some endian fixes.
11349
11350 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11351
11352         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
11353         * metadata.c: fix small problem introduced with the latest commit.
11354
11355 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
11356
11357         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
11358         We don't need a MonoMetadata pointer anymore to compare signatures in
11359         mono_metadata_signature_equal (), update callers.
11360         Reduced memory usage an number of allocations for MonoMethodHeader and
11361         MonoMethodSignature.
11362
11363 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
11364
11365         * metadata.c: added compare for szarray.
11366
11367 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
11368
11369         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
11370         and add a couple more types to it and mono_defaults. Give an hint on
11371         classes that need implementing in our corlib and are referenced
11372         in mscorlib.
11373
11374 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
11375
11376         * class.h, class.c: keep track if a class is also an Enum.
11377         * loader.c: Implement a couple more types for use in libffi
11378         marshalling. Gives better diagnostics when failing to dlopen
11379         a library. Set method->klass for P/Invoke methods, too.
11380
11381 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
11382
11383         * class.c, class.h: add a MonoType this_arg to MonoClass that
11384         represents a pointer to an object of the class' type that
11385         can be used by the interpreter and later the type cache.
11386         Add best guess alignment info for valuetype objects.
11387
11388 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
11389
11390         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
11391         into MonoType: one less level of indirection and allocation and
11392         simplifies quite a bit of code. Added cache for MonoTypes that are
11393         used frequently, so that we don't need to allocate them all the time.
11394
11395 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
11396
11397         * class.c (mono_class_create_from_typedef): System.Enum is also a
11398         value type, although it does not derive from System.ValueType
11399         (maybe a bug in the ms compiler?)
11400
11401         * metadata.c (mono_type_size): return the right size for value types
11402
11403         * loader.c (mono_get_method): only initialize method header if not abstract
11404
11405         * class.c (mono_class_from_mono_type): use mono_default values. 
11406
11407 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
11408
11409         * *: use MonoClass pointers instead of <type_tokens>
11410         
11411         * class.h: new flag: metadata_inited.
11412
11413         * class.c (mono_class_metadata_init): impl.
11414         (mono_class_instance_size): impl.
11415         (mono_class_data_size): impl.
11416
11417 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11418
11419         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
11420         MonoClass now has the name and name_space fields. 
11421         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
11422         mono_get_method () takes and optional MonoClass as argument.
11423         Removed mono_typedef_from_name() and added mono_class_token_from_name()
11424         instead that takes advantage of a map from class names to typedef
11425         tokens in MonoImage.
11426
11427 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
11428
11429         * metadata.c: zero is not a valid alignment boundary.
11430         Merge MONO_TYPE_VOID in default decoding code.
11431
11432 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
11433
11434         * image.h: merged MonoMetadata into MonoImage
11435
11436         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
11437         identify the type of elements.
11438
11439 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
11440
11441         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
11442         * cil-coff.h: split MonoMSDOSHeader and add size info.
11443         * image.c: add some consistency checks.
11444         * metadata.c: fix row size computation: one programmer
11445         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
11446         add explanation for the locator routine.
11447         Fix decoding of size in method header.
11448         
11449 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
11450
11451         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
11452         (g_concat_dir_and_file): Bring g_concat_dir_and_file
11453         function from gnome-libs.  This uses the right path separator
11454         based on the OS, and also works around a bug in some systems where
11455         a double slash is not allowed. 
11456         (default_assembly_name_resolver): Use g_concat_dir_and_file
11457         (mono_assembly_open): ditto.
11458
11459 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
11460
11461         * metadata.c (mono_metadata_signature_equal): impl.
11462
11463         * *: void is now a realy MonoType (instead of using NULL)
11464         
11465         * metadata.c (do_mono_metadata_parse_type): use
11466         mono_metadata_parse_type to parse void value.
11467
11468 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
11469
11470         * metadata.c, metadata.h: in the signature and method header store
11471         only the space required for holding the loca vars and incoming arguments.
11472
11473 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
11474
11475         * metadata.c (do_mono_metadata_parse_type): treat void like any
11476         other type (instead of assigning NULL);
11477
11478 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
11479
11480         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
11481
11482 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
11483
11484         * image.c (do_mono_image_open): added a cache for arrays.
11485
11486 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11487
11488         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
11489         decode a single column from a row in a metadata table and changes
11490         to take advantage of it in the typedef locator (gives a nice speed up).
11491         Store offset info for function params.
11492
11493 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
11494
11495         * image.h (MONO_IMAGE_IS_CORLIB): removed 
11496
11497 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
11498
11499         * assembly.c: how could mono_assembly_close () had ever worked?
11500         * metadata.c, metadata.h: provide offset info for local vars.
11501         Implement mono_type_size () to take care of alignment as well
11502         as size (it was mono_field_type_size in cli/class.c before).
11503
11504 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
11505
11506         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
11507
11508         * assembly.h (CORLIB_NAME): set to corlib.dll
11509
11510         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
11511
11512 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11513
11514         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
11515         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
11516         tokentype.h: massive namespace cleanup.
11517
11518 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11519
11520         * metadata.h, metadata.c: decode exception clauses when parsing method header.
11521
11522 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
11523
11524         * metadata.c (mono_metadata_free_type): added check for type !=
11525         NULL (void) before calling mono_metadata_free_type()
11526
11527 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
11528
11529         * metadata.h, row_indexes.h: added header with enumerations to use
11530         to index in the columns from tables in metadata and to decode coded
11531         tokens: we should start using this instead of embedding magic numbers
11532         all over the code.
11533
11534 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
11535
11536         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
11537         Move metadata_t info from cli_image_info_t to MonoImage, where
11538         it's easily accessible. Changed all the uses accordingly.
11539         Added the method and class caches to MonoImage.
11540         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
11541         and mono_metadata_decode_value () signature to be more consistent
11542         with the other parse functions (and simplify code). Taken advantage
11543         of zero-length array allocation with GCC. Removed reduntant (and
11544         wrong) MonoFieldType struct and use MonoParam instead. Changed
11545         mono_metadata_parse_field_type () to use common code for parsing.
11546         Added mono_metadata_typedef_from_field () and
11547         mono_metadata_typedef_from_method () to lookup a typedef index from a
11548         field or method token.
11549         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
11550
11551 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
11552
11553         * metadata.c (mono_metadata_parse_field_type): Implement. 
11554         (do_mono_metadata_parse_type): Split engine from
11555         mono_metadata_parse_type, so that we can create smaller structures
11556         for things that just have one pointer to the MonoType (look at
11557         the MonoFieldType)
11558
11559 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
11560
11561         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
11562         as Jan Gray found out, it is incorrect. 
11563
11564 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
11565
11566         * assembly.c: Implement asssembly loading.  This loads an image
11567         and loads all the referenced assemblies.  Come to think of it, we
11568         could always do lazy loading of the assemblies. 
11569
11570         * image.c (mono_image_open): Keep loaded images in a hashtable.
11571
11572         * image.h (MonoImage): Add reference count.
11573
11574 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
11575
11576         * assembly.c (mono_assembly_open): Keep track of the file name in
11577         case the assembly has no ASSEMBLY table.
11578
11579         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
11580         from get.c here.
11581
11582 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
11583
11584         * metadata.c, metadata.h: decode local vars in method header
11585         parse function. Change callers accordingly.
11586
11587 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
11588
11589         * metadata.h, cil-coff.h: protect against multiple inclusion.
11590         Added some new structures to hold information decoded from metadata:
11591         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
11592         and relevant decoding/free functions.
11593         * metadata.c: implement decoding functions. Add warning for out of bounds
11594         index in mono_metadata_locate(). Implement mono_get_method () to retreive
11595         all the info about a method signature and invocation. Remove check on
11596         uninitialized local var in parse_mh() and fix memory leak.
11597
11598 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
11599
11600         * metadata.h: More macros.
11601
11602         * tokentype.h: New file.
11603
11604 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
11605
11606         * assembly.c: added a consistency check and initialize
11607         some structures with g_new0().
11608         * metadata.c: fixed a couple more bugs in table size computation
11609         and add other checks for out-of bound access to metadata.
11610
11611 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
11612
11613         * metatada.c: fix bugs computing table sizes. Spew a
11614         warning when index in string heap is out of bounds.
11615
11616 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
11617
11618         * metadata.h: Add a couple of macros to manipulate tokens. 
11619
11620 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11621
11622         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
11623         cli_section_tables).
11624
11625 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
11626
11627         * metadata.c (mono_metadata_user_string): New function, provides
11628         access to the UserString heap. 
11629
11630 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
11631
11632         * metadata.c: Add inline documentation.
11633
11634 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
11635
11636         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
11637         files. 
11638
11639 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
11640
11641         * typeattr.h: New file, TypeAttribute flags. 
11642
11643 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
11644
11645         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
11646         mono_assembly_ensure_section): Section loading code.
11647         (load_section_tables): Load the sections.
11648
11649         * mono/metadata/metadata.c (mono_metadata_locate_token,
11650         mono_metadata_locate): Functions to locate the information
11651         definition given a token or a table and an index.
11652         (mono_metadata_compute_table_bases): New.
11653         (compute_size): New function to compute the sizes of the various
11654         tables.
11655
11656         * mono/metadata/metadata.h: Finish listing the different index
11657         types. 
11658
11659         * mono/metadata/pedump.c: Improve to dump new information.
11660
11661 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
11662
11663         * mono/metadata/metadata.c: Entered all the tables matching
11664         Beta2. 
11665
11666         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
11667