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