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