(PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
[mono.git] / mono / metadata / ChangeLog
1 2004-06-17  Raja R Harinath  <rharinath@novell.com>
2
3         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
4         (bundle_obj): New conditional define.
5         (BUILT_SOURCES): Remove.
6         ($(bundle_srcs)): Make parallel-make safe.
7         (libmonoruntime_la_LIBADD): Make unconditional.
8         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
9         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
10
11 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
12
13         * culture-info-tables.h: It was inconsistent with the latest
14           supp info files.
15
16 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
17
18         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
19         be loaded.
20
21         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
22         with gcc 2.95.
23
24 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
25
26         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
27         cleaned up public header threads.h.
28
29 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
30
31         * Makefile.am, *.c, *.h: more API cleanups.
32
33 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
34
35         * Makefile.am: removed monosn from compilation.
36         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
37         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
38         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
39         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
40         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
41         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
42
43 2004-06-15  Jackson Harper  <jackson@ximian.com>
44
45         * assembly.c: Make locales lower case when searching the GAC for
46         assemblies. gacutil will always make locales lowercase when
47         installing so this effectively makes them case insensitive.
48         
49 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
50
51         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
52         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
53           parameter which allows to choose whether the wait can be interrupted or 
54           not. Also added the method mono_monitor_enter(), which locks the monitor
55           using an infinite wait and without allowing interruption.
56           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
57           interrupted.
58         * object.h: Added new fields in MonoThread. suspend_event holds the event
59           used to susped/resume the thread. synch_lock is the lock object to use for
60           modifying the thread state.
61         * threads.c: Use the new synch_lock object for locking, instead of "this",
62           which can generate deadlocks.
63           Moved thread state change in Thread.Sleep and Thread.Join from managed
64           to unmanaged code. This avoids a deadlock when the thread was suspended
65           just after acquiring the thread lock.
66           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
67           Implemented Thread.Suspend using an event instead of ThreadSuspend,
68           which is not fully implemented in the io-layer.
69         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
70
71 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
72
73         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
74         threads-types.h: more API cleanups.
75
76 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
77
78         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
79         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
80         threadpool.c, threads.c: first pass at the exported API cleanup.
81
82 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
83
84         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
85
86 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
87
88         * icall.c: added internalGetHome.
89
90 2004-06-14  Dick Porter  <dick@ximian.com>
91
92         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
93         possible to return successfully when '.' or '..' were the only
94         entries in a directory, but were skipped.  The MonoIOStat was not
95         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
96         Fixes bug 59574.
97
98 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
99
100         * reflection.c: make binaries run on .Net 1.1 by default.
101
102 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
103
104         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
105
106 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
107
108         * marshal.c: keep track of struct size with explicit layout
109         (bug #59979).
110
111 2004-06-12  Martin Baulig  <martin@ximian.com>
112
113         * mono-debug-debugger.c: Comment out a debugging g_message().
114
115 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
116
117         * reflection.c, reflection.h: do not free custom attrs that are cached.
118         * icall.c: use braces to make code clearer.
119
120 2004-06-11  Martin Baulig  <martin@ximian.com>
121
122         * class.h (MonoInflatedField): New type.
123         (MonoClassField): Replaced `MonoType *generic_type' with
124         `MonoInflatedField *generic_info'.
125
126         * icall.c
127         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
128
129 2004-06-11  Martin Baulig  <martin@ximian.com>
130
131         * reflection.c (mono_image_create_method_token): Correctly encode
132         varargs methods.
133
134 2004-06-11  Martin Baulig  <martin@ximian.com>
135
136         * metadata.c (mono_metadata_parse_method_signature): When parsing
137         a MethodDef which has VarArgs, also set sentinelpos if we don't
138         have any parameters.
139
140 2004-06-11  Martin Baulig  <martin@ximian.com>
141
142         * verify.c (mono_method_verify): In CEE_CALL, use
143         mono_method_get_signature() to get the method's signature, unless
144         we're a PInvoke method.
145
146 2004-06-10  Jackson Harper  <jackson@ximian.com>
147
148         * assembly.c: Use <path>/lib/mono/gac for the extra paths
149         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
150         logical name as the supplied path is just a prefix to the gac not
151         the direct path to it.
152         
153 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
154
155         * reflection.c: make the token for a created method match
156         the token of the MethodBuilder it was created from
157         (IKVM requires this behaviour now).
158
159 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
160
161         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
162         reflection.c, socket-io.c: leak fixes.
163
164 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
165
166         * icall.c: handle sentinel pos in vararg methods in position different
167         from 0.
168
169 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
170
171         * culture-info-tables.h: freshly generated.
172
173 2004-06-09  Martin Baulig  <martin@ximian.com>
174
175         * loader.c (mono_get_method_constrained): Call `mono_class_init
176         (constrained_class)'.   
177
178 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
179
180         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
181         any methods. Fixes #59629.
182
183 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
184
185         * culture-info-tables.h: reflecting locale-builder updates.
186
187 2004-06-08  Dick Porter  <dick@ximian.com>
188
189         * object.h:
190         * locales.c: Fixed compile warnings, including a real bug in
191         CompareInfo_internal_compare.
192         
193 2004-06-08  Dick Porter  <dick@ximian.com>
194
195         * locales.c
196         (ves_icall_System_Globalization_CompareInfo_internal_index):
197         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
198         Double-check the resuls of usearches, because ICU currently
199         ignores most of the collator settings here.  Fixes bug 59720.
200         
201 2004-06-08  Dick Porter  <dick@ximian.com>
202
203         * locales.c
204         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
205         Fix memory leak and segfault-causing typo.  No idea how this one
206         lasted so long without being noticed.
207
208 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
209
210         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
211         any methods. Fixes #59629.
212
213 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
214
215         * assembly.c:
216         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
217         own the critical section before). Removed dead code (that's done
218         in the preload hook).
219
220         (mono_assembly_load_with_partial_name): call the preload hook.
221
222 2004-06-08  Martin Baulig  <martin@ximian.com>
223
224         * metadata.c (mono_metadata_signature_alloc): Default
225         `sentinelpos' to -1.
226
227         * reflection.c (mono_image_get_array_token): Likewise.
228
229 2004-06-08  Martin Baulig  <martin@ximian.com>
230
231         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
232
233         * metadata.c (mono_metadata_parse_method_signature): When parsing
234         a MethodDef which has VarArgs, set sentinelpos.
235
236         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
237         `gint16' since we're using -1 for non-varargs methods.
238
239         * reflection.c
240         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
241         (method_encode_signature): Added varargs support.
242         (method_builder_encode_signature): Likewise.
243         (mono_image_get_varargs_method_token): New static method.
244         (mono_image_create_method_token): New public method; this is
245         called via an icall instead of mono_image_create_token() when
246         calling a varargs method.       
247
248 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
249
250         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
251
252 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
253
254         * culture-info-tables.h : Reflecting the latest locale-builder that
255           fixed empty array representation ({} to {0}).
256
257 2004-06-07  Jackson Harper  <jackson@ximian.com>
258
259         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
260         looking up extra gac paths. This allows MONO_GAC_PATH to act
261         exactly like a prefix.
262         
263 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
264
265         * reflection.c (mono_reflection_type_from_name): Make a copy of the
266         type name before modifying it. Fixes #59405.
267
268 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
269
270         * culture-info.h: added fields for "all datetime patterns".
271         * locales.c: (  ves_icall_System_Globalization_CultureInfo
272           _construct_datetime_format ()): fill xxx_patterns fields.
273         * object.h: added fields for "all datetime patterns" to
274           MonoDateTimeFormatInfo.
275         * culture-info-tables.h: reflecting locale-builder updates.
276
277 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
278
279         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
280         the event has no add and remove methods. Fixes #59629.
281
282 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
283
284         * object.c: Fixed possible integer overflow when allocating large
285         strings.
286
287 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
288
289         * culture-info-tables.h: reflecting locale-builder updates.
290
291 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
292
293         * culture-info-tables.h: reflecting locale-builder updates.
294
295 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
296
297         * culture-info-tables.h: reflecting locale-builder updates.
298
299 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
300
301         * threads.c: Made Thread.Sleep abortable.
302
303 2004-06-02  Martin Baulig  <martin@ximian.com>
304
305         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
306
307         * debug-mono-symfile.h: Bumped symbol file version number to 37.
308
309 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
310
311         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
312
313 2004-05-30  Jackson Harper  <jackson@ximian.com>
314
315         * reflection.c: Do not hardcode assembly versions or public key
316         tokens anymore. All of this except the corlib section was dead
317         code anyways.
318         
319 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
320
321         * object.c (mono_runtime_invoke_array): Automatically create boxed
322         objects for byref valuetypes if needed. Fixes #59300.
323         
324         * object.c (mono_method_return_message_restore): Handle 
325         MONO_TYPE_OBJECT as well.
326
327 2004-05-28  Jackson Harper  <jackson@ximian.com>
328
329         * reflection.c: The modified type encoding was causing build
330         problems. Reverted for now.
331         
332 2004-05-28  Jackson Harper  <jackson@ximian.com>
333
334         * reflection.c/h: Take an assembly ref so that we dont create
335         fully qualified names when encoding types in the same assembly as
336         the custom attribute being emitted.
337         * appdomain.c: Increment version number.
338         
339 2004-05-26  Duncan Mak  <duncan@ximian.com>
340
341         * icall.c
342         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
343         Set the full version number (major, minor, build, revision).
344
345 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
346
347         * marshal.c (emit_struct_conv): increment src/dst after blit
348         (mono_marshal_get_managed_wrapper,
349         mono_marshal_get_native_wrapper): make sure we have marshalling
350         info before marshalling params (info computation affects
351         blittable)
352
353         * class.c (class_compute_field_layout): correctly deal with
354         blittable
355         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
356         value types (as per what windows dows by default)
357         (mono_class_setup_mono_type): System.ValueType is blittable
358         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
359         blittable
360
361         * marshal.c (mono_marshal_load_type_info): flag types  as
362         non-blittable if the native layout doesn't match the managed
363         layout
364
365 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
366
367         * appdomain.c: don't add stuff in the private search path that is
368         above the application base. If application base is not set, there's
369         no private search path.
370
371 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
372
373         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
374         byref struct arguments in native->managed marshalling.
375
376 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
377
378         * marshal.c (mono_marshal_get_runtime_invoke): correctly
379         cache methods using signature (special case for methods
380         that are value type or string class)
381         
382         * image.c (mono_image_close): clean up allocated GSList's
383         in runtime_invoke_cache.
384
385 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
386
387         * mono-config.c: set the correct path for mono_cfg_dir on windows when
388         there's no MONO_CFG_DIR environment variable defined.
389
390 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
391
392         * threads.c: windows version must be >= 0x0500 to include OpenThread.
393
394 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
395
396         * threadpool.c: Really wait for 500ms after the async call, even if the wait
397           is interrumped.
398         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
399           before waiting for it, and call CloseHandle after the wait to unref it.
400           This will make sure that handles are not disposed too early.
401
402 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
403
404         * appdomain.c:
405         * appdomai
406         * process.c: Use WaitForSingleObjectEx.
407         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
408           checkpoints.
409         * threads.c, threads.h: Make use of new Ex wait methods. Improved
410           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
411           for Suspend and Resume. Added new mono_thread_stop, used for stoping
412           background threads. Added basic support for Abort in Windows.
413           Start new threads using a managed delegate invoke wrapper. This wrapper
414           has an interruption checkpoint that is needed since an interruption
415           can be requested before the thread leaves the unmanaged code that starts 
416           the thread.
417         * marshal.c: Added interruption checkpoint after every native call, and
418           also before managed calls for wrappers called from unmanaged code to
419           go into managed code.
420         * object.h: Added new field in MonoThread to keep track of interruption
421           requests.
422
423 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
424
425         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
426         calls.
427
428 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
429
430         * appdomain.c:
431         * assembly.c:
432         * gc.c:
433         * locales.c:
434         * mono-config.c:
435         * rand.c: getenv -> g_getenv (windows!)
436
437         * process.c: complete_path is also used on non-windows platforms.
438
439 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
440
441         * icall.c: new signature for Process_Start.
442
443         * process.[ch]: new signature for Process_Start. If we're on windows
444         and UseShellExecute is false, we have to search for the program by
445         ourselves if we don't get a full path.
446
447 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
448
449         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
450         marshalling and call CleanUpNativeData if needed. Fixes #58646.
451
452 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
453
454         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
455         Fixes bug #58373.
456
457 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
458
459         * process.c: use double quotes to quote program name and arguments on
460         windows. Fixes bug #58575.
461
462 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
463
464         * file-io.c: don't return "." and ".." when using windows Find*File.
465
466 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
467
468         * marshal.c: Don't pass wrappers to message init because method 
469         addressed used to lookup metadata. part of remoting[2|3] fix.
470
471 2004-05-15  Jackson Harper  <jackson@ximian.com>
472
473         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
474         path is essentially the same as MONO_PATH except that it points to
475         GACs instead of lib directories.
476         * loader.h: The user gac is gone so we dont need function to
477         enable/disable it.
478         * mono-config.c: user gac option is now gone.
479         
480 2004-05-15  Jackson Harper  <jackson@ximian.com>
481
482         * culture-info.h: Make defines more consistent, add calendar data
483         to the culture info table.
484         * culture-info-tables.h: Add basic calendar data. Basically
485         everyone gets default gregorian until all the data is
486         updated.
487         * locales.c: Use the new consistent defines. Set calendar data for
488         culture info objects.
489         * object.h: add a field for calendar data to CultureInfo
490         
491 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
492
493         * image.c: image->runtime_invoke_cache is keyed on signatures now.
494         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
495         a signature.
496         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
497         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
498         an extra param that is the pointer of the method to invoke. The IL for
499         the invoke method is no longer specific to the method, but to the
500         signature of the method. Thus, we can share the same code for multiple
501         methods. This reduces the number of methods that have to be compiled.
502
503 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
504
505         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
506
507         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
508
509         * icall.c: Optimize Buffer.BlockCopy.
510
511 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
512
513         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
514         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
515         quote). Changed them to "MMMM yyyy".
516
517 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
518
519         * rand.c
520         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
521
522 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
523
524         * reflection.h: Updated after changes to managed structures.
525
526         * appdomain.c: Bump corlib version.
527
528 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
529
530         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
531         windows.
532
533 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
534
535         * Makefile.am: link to ../os/libmonoos.la on windows.
536
537         * assembly.c:
538                 -If MONO_DEBUG, warn about non-existing directories in
539                 MONO_PATH.
540                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
541                 compile time variable.
542                 -Removed init_default_path and call mono_set_rootdir from
543                 libmonoos.a instead (windows only).
544
545         * assembly.h: declare mono_assembly_getrootdir().
546
547         * domain.c:
548         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
549
550         * loader.c: s/getenv/g_getenv/
551
552 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
553
554         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
555
556         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
557
558         * metadata.h: Add new marshalling conversions.
559
560         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
561         function.
562
563         * reflection.c (mono_reflection_get_type): Lookup the type in all
564         modules of a multi-module assembly. Fixes #58291.
565
566 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
567
568         * threads.c: Before aborting a background, set the StopRequested
569         state.  This avoids throwing the Abort exception.
570         In mono_thread_manage, don't continue with the shutdown until all
571         aborted threads have actually stopped.
572
573 2004-05-10  Jackson Harper  <jackson@ximian.com>
574
575         * locales.c: Remove the modifier from culture names.
576         
577 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
578
579         * Makefile.am: monosn is not installed any more. It has been deprecated
580         in favor of sn.
581
582 2004-05-07  Jackson Harper  <jackson@ximian.com>
583
584         * locales.c
585         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
586         Fix array construction, add bailout if the length is 0.
587
588 2004-05-07  Dick Porter  <dick@ximian.com>
589
590         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
591         machine doesn't have a DNS entry.  Patch by Urs Muff
592         (umuff@quark.com), fixes bug 57928.
593
594 2004-05-06  Jackson Harper  <jackson@ximian.com>
595
596         * reflection.c: Handle null PublicTokens properly. alloc mem for
597         assembly names culture so we dont crash when freeing it.
598         
599 2004-05-06  Jackson Harper  <jackson@ximian.com>
600
601         * assembly.c: Check the usergac when loading with partial names.
602         
603 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
604
605         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
606         does nothing for now (not required for Linux/Windows) but the class
607         library can call it (and a newer or modified runtime could need it).
608         * icall.c: Registred icall.
609
610 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
611
612         * loader.c: prints a message on module loading error we set MONO_DEBUG
613         environment variable.
614
615 2004-05-05  Jackson Harper  <jackson@ximian.com>
616
617         * appdomain.c: Handle PublicKeyToken=null properly.
618         
619 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
620
621         * environment.c|h: Added icall ves_icall_System_Environment_
622         GetOSVersionString to get the current OS version as a string.
623         * icall.c: Registred icall.
624
625 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
626
627         * object.c: in mono_object_get_virtual_method(), take into account that
628         non-virtual methods don't have a slot in the vtable. Check needed when
629         the object is a proxy.
630
631 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
632
633         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
634         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
635
636         * object.c (mono_class_compute_gc_descriptor): Fix warning.
637
638         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
639         passed when a valuetype is expected.
640
641         * object.c (mono_unhandled_exception): Only set the exit code if the
642         exception happens in the main thread. Fixes thread5.exe.
643
644         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
645         invalid names. Fixes #58047.
646
647 2004-05-03  Jackson Harper  <jackson@ximian.com>
648
649         * assembly.c: This line was committed accidently and is unneeded.
650         
651 2004-05-03  Jackson Harper  <jackson@ximian.com>
652
653         * icall.c: Add new icall for Assembly::LoadWithPartialName
654         * assembly.c/.h: new function that probes the GAC to load partial
655         assembly names by Paolo Molaro.
656         
657 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
658
659         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
660         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
661         (type_get_fully_qualified_name): Added PublicKeyToken when building a
662         full type name.
663
664 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
665
666         * appdomain.c: fixed check for 'neutral' culture and removed warning.
667         * reflection.c: fix bug when parsing a full type name and Version is not
668         the last thing in the string.
669
670 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
671
672         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
673         crashes when it is freed.
674
675 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
676
677         * assembly.c: print the compat warning to stderr.
678
679 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
680
681         * assembly.c (mono_assembly_load_references): Add a compatibility
682         hack to run old applications that might be still referencing the
683         3300-based assemblies, only do this for System.xxx.
684
685 2004-05-01  Jackson Harper  <jackson@ximian.com>
686
687         * appdomain.c: If the culture is neutral we set it to "".
688         
689 2004-04-29  Jackson Harper  <jackson@ximian.com>
690
691         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
692
693 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
694  
695         * string-icalls.c: added low overhead function for copying chars
696         * icall.c: added needed icall for the above function
697  
698 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
699
700         * icall.c: fix return value of get_global_assembly_cache.  Implemented
701         Environment.GetLogicalDrives.
702
703 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
704
705         * rand.c: try and talk to egd or prngd
706         for random bytes if opening devices fail.
707
708 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
709
710         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
711         alignment for the type using the native alignment of its members 
712         instead of using klass->min_align.
713
714         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
715
716 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
717
718         * file-io.c:
719         * socket-io.c: added check for sys/aio.h.
720
721 2004-04-28  Dick Porter  <dick@ximian.com>
722
723         * threads.c: Don't abort a thread thats already aborting, when
724         terminating everything.
725
726 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
727
728         * icall.c: added 2 new async calls for Socket.
729
730         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
731         IO on *nix systems.
732
733         * threadpool.c: removed unused variable.
734
735 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
736
737         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
738
739 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
740
741         * locales.c: put back string_invariant_tolower () and
742         string_invariant_toupper ().
743
744 2004-04-26 David Waite <mass@akuma.org>
745
746         * file-io.h:
747         * socket-io.h:
748         * threads.h:
749         * unicode.h: remove comma from end of enumeration declarations
750
751 2004-04-26 David Waite <mass@akuma.org>
752
753         * debug-mono-symfile.h:
754         * decimal.c:
755         * mono_debug.h:
756         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
757
758
759 2004-04-26  Jackson Harper  <jackson@ximian.com>
760
761         * appdomain.c: Increment version number.
762         
763 2004-04-26  Jackson Harper  <jackson@ximian.com>
764
765         * appdomain.c: Set assembly references public token value when
766         PublicKeyToken is specified, not the hash_value. Free public token
767         values when free assembly name data. Previously the public key
768         token was hex decoded, however we are using hex encoded public key
769         tokens, so this is not neccasary.
770         * assembly.c: Lookup assemblies in the gac if their public token
771         value is set. Add function to allow enabling user gac
772         lookups. Specify whether or not the assembly was loaded from the
773         GAC. Compare full assembly names when checking the cache for
774         assemblies (Temporarily disabled see comment in code). Remove
775         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
776         specifies trace-loader they get extra info to stdout on the
777         loading of assemblies.
778         * image.h: Add a field for an assembly references public token
779         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
780         whether an assembly has been loaded from the GAC.
781         * image.c: Remove a corlib -> mscorlib name mapping.
782         * loader.h: Add function to enable/disable the user gac.
783         * mono-config.c: Check if the usergac is enabled in the config
784         file.
785         * icall.c: New icall to determine whether or not an assembly has
786         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
787         * tabldefs.h: Add constant for assemblyref flag that specifies a
788         full public key is used instead of a public token.
789         * reflection.c: Remove mscorlib -> corlib mappings. Set
790         PublicTokenValue instead of hash value. This value is a hex
791         string so it does not need to be expanded.
792
793 2004-04-26  Martin Baulig  <martin@ximian.com>
794
795         * mono-debug-debugger.c (mono_debugger_initialize): Set
796         `mono_debugger_initialized' before calling mono_debug_lock().
797
798 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
799
800         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
801           InternalToUpper/InternalToLower.
802         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
803           removed invariant culture shortcut.  This is now done in managed code.
804         * locales.c: (string_invariant_toupper/tolower) removed.
805
806 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
807
808         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
809         Added Poll internal call.
810
811         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
812         call for Poll. Select was too heavy for polling a single socket.
813
814         * threadpool.[ch]: added mono_threadpool_cleanup.
815         * threads.c: use it. Don't use Thread_Abort on windows.
816
817 2004-04-23  Martin Baulig  <martin@ximian.com>
818
819         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
820
821 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
822
823         * icall.c: Registred new icalls for key pair protection and added an
824         icall for Environment.GetFolderPath on Windows.
825         * security.c|h: Added new icalls for key pair protection.
826
827 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
828
829         * socket-io.c: don't display the non-supported family warning for known
830         families. Now this is not displayed on windows when checking support
831         for IPv4/IPv6.
832
833 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
834
835         * class.c: don't display the layout warning for static fields.
836
837 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
838
839         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
840         * locales.c, locales.h: Added new icalls for culture-specific
841         Char.ToLower and Char.ToUpper.
842
843 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
844
845         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
846         by David Waite.
847
848 2004-04-20  Martin Baulig  <martin@ximian.com>
849
850         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
851         of the type name before passing it to mono_reflection_type_from_name().
852
853 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
854
855         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
856         encodings here. Fixes #56965.
857
858 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
859
860         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
861         fix test on strstr result not that I can see anything that
862         relies on the result.
863
864 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
865
866         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
867         Fixes #57081.
868
869         * marshal.c (mono_marshal_get_string_encoding): New helper function.
870
871         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
872         function to determine which marshalling to use for strings. Fixes
873         #56965.
874
875         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
876
877         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
878
879 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
880
881         * icall.c: #include mono-config.h
882
883 2004-04-15  Jackson Harper  <jackson@ximian.com>
884
885         * culture-info-tables.h: Fix date formats for en-US culture.
886         
887 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
888
889         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
890         ThreadPool.SetMinThreads.
891         * threadpool.c: Implemented ThreadPool.GetMinThreads and
892         ThreadPool.SetMinThreads.
893
894 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
895
896         * mono-config.c: also load the .config file in the directory
897         where the assembly was found.
898
899 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
900
901         * assembly.c: load per-assembly config files.
902         * icall.c: decrapified code to get the config dir and moved to
903         mono-config.c.
904         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
905         per-assembly config files. When doing a dll map lookup give precedence
906         to the per-assembly data.
907
908 2004-04-14  Martin Baulig  <martin@ximian.com>
909
910         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
911         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
912         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
913
914         * mono-debugger-debugger.c: While the debugger is locked, remember
915         whether the symbol tables have changes and send one single
916         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
917
918 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
919
920         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
921
922         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
923         function.
924
925         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
926         account when marshalling string arrays. Fixes #56965.
927
928 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
929
930         * icall.c: Add new icalls mapping for security.
931         * security.c|h: Add internal calls for WindowsIdentity,
932         WindowsImpersonationContext and WindowsPrincipal.
933
934 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
935
936         * class.c: Added comment to ensure the System.MonoDummy class
937         is removed when no longer necessary
938
939 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
940
941         * appdomain.c: Pass arguments to the bootstraping exceptions to
942         minimize JITed methods at boot
943
944         * metadata.c (mono_exception_from_name_two_strings): Allow for the
945         second string to be null.
946
947         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
948         Change the protocol to minimize the JIT methods at startup.  Now
949         it Returns the internal codepage, if the value of "int_code_page"
950         is 1 at entry, and we can not compute a suitable code page
951         number, returns the code page as a string.
952
953 2004-04-13  Jackson Harper  <jackson@ximian.com>
954
955         * culture-info-tables.h: Fix number of decimal digits for all
956         english locales.
957
958 2004-04-13  Jackson Harper  <jackson@ximian.com>
959
960         * icall.c: Clairfy out of sync error message. It is not always
961         your corlib that is out of sync.
962
963 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
964
965         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
966         properties when only the set accessor is overriden. Fixes #55874.
967
968 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
969
970         * assembly.c (mono_assembly_load_references): Make this thread safe.
971         Fixes #56327.
972
973 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
974
975         * monosn.c: Add missing initialization calls.
976
977 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
978
979         * locales.c:
980         ves_icall_System_Globalization_CultureInfo_construct_number_format
981         Fix g_assert so it compiles on fussier compilers re int/ptr
982         mismatch
983
984 2004-04-08  Dick Porter  <dick@ximian.com>
985
986         * socket-io.h:
987         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
988         53992.  Also rearrange the code so that the internal calls return
989         an error value and exceptions are thrown from managed code.
990
991         * icall.c: Add type info to the socket icalls.
992
993 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
994
995         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
996         owes me a beer.
997
998 2004-04-07  Martin Baulig  <martin@ximian.com>
999
1000         * class.c (mono_class_from_generic_parameter): Don't default
1001         `klass->parent' to `mono_defaults.object_type'.
1002
1003 2004-04-07  Martin Baulig  <martin@ximian.com>
1004
1005         * reflection.c (mono_reflection_initialize_generic_parameter): Set
1006         `param->pklass->reflection_info'.       
1007
1008 2004-04-07  Jackson Harper  <jackson@ximian.com>
1009
1010         * culture-info-tables.h: Fix date separator symbol.
1011         
1012 2004-04-07  Martin Baulig  <martin@ximian.com>
1013
1014         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
1015         from System.Type to System.MonoType.
1016
1017 2004-04-07  Martin Baulig  <martin@ximian.com>
1018
1019         * reflection.h
1020         (MonoReflectionGenericParam): Added `has_reference_type' and
1021         `has_value_type' fields.
1022
1023         * reflection.c (mono_image_get_generic_param_info): Encode the
1024         correct flags if we have the `class' or `struct' constraint.
1025
1026 2004-04-07  Martin Baulig  <martin@ximian.com>
1027
1028         * reflection.h
1029         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
1030
1031 2004-04-07  Jackson Harper  <jackson@ximian.com>
1032
1033         * appdomain.c: Revert extra patches, just wanted to bump the
1034         version number.
1035         
1036 2004-04-07  Jackson Harper  <jackson@ximian.com>
1037
1038         * Makefile.am: Add culture-info private headers.
1039         * icall.c: Add new icalls for contructing locales.
1040         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
1041         * locales.h: Declare new culture info construction methods.
1042         * object.h: Add new fields used to avoid the CultureMap to
1043         MonoCultureInfo.
1044         * culture-info.h: Definition of structs used in the culture info
1045         tables.
1046         * culture-info-tables.h: Autogenerated tables that contain culture
1047         info data. This file was generated with the locale-builder tool.
1048         * appdomain.c: Incement corlib version number.
1049         
1050 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
1051
1052         * appdomain.c: (mono_runtime_init) move mono_thread_init
1053         to before mono_object_new calls so critical sections
1054         are initialized before use.
1055
1056 2004-04-07  Martin Baulig  <martin@ximian.com>
1057
1058         * icall.c
1059         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
1060         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
1061         (ves_icall_MonoGenericParam_initialize): Removed.
1062         (monogenericparam_icalls): Removed.
1063         (generictypeparambuilder_icalls): Added new table for
1064         System.Reflection.Emit.GenericTypeParameterBuilder.
1065
1066         * reflection.c
1067         (mono_reflection_define_generic_parameter): Removed.
1068         (mono_reflection_initialize_generic_parameter): This is now called
1069         from GenericTypeParameterBuilder's .ctor.
1070
1071 2004-04-06  Martin Baulig  <martin@ximian.com>
1072
1073         * class.c (mono_class_init): Don't inflate nested classes in a
1074         generic instance.
1075         (mono_type_get_name_recurse): Include the generic arguments for
1076         generic instances and generic type declarations.
1077         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
1078         (_mono_class_get_instantiation_name): Removed.
1079         (mono_class_create_generic): Always use `gklass->name' as our name.
1080
1081         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
1082
1083         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
1084         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
1085         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
1086         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
1087         closed generic methods here.
1088
1089         * reflection.c
1090         (mono_reflection_generic_inst_get_nested_types): Removed.
1091         (inflate_mono_method): Copy the generic parameters from the
1092         MonoMethodHeader into out MonoGenericMethod.
1093
1094 2004-04-06  Martin Baulig  <martin@ximian.com>
1095
1096         * row-indexes.h
1097         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
1098
1099         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
1100
1101         * reflection.c (build_compressed_metadata): If we have any entries
1102         in the GenericParam, MethodSpec or GenericParamConstraint tables,
1103         set the header version to 1.1.
1104
1105 2004-04-06  Martin Baulig  <martin@ximian.com>
1106
1107         * class.c (mono_class_init): If we're a generic instance,
1108         initialize our nested classes, too.
1109         (_mono_class_get_instantiation_name): Deal with the new `!%d'
1110         suffix. 
1111
1112 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1113
1114         * process.c: quote the argument passed to the shell on windows.
1115
1116 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
1117
1118         * threads.c (mono_alloc_special_static_data): Allow this to be
1119         called during startup.
1120
1121 2004-04-02  Martin Baulig  <martin@ximian.com>
1122
1123         * icall.c
1124         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
1125
1126 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
1127
1128         * icall.c: Fix build.
1129
1130 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
1131
1132         * Makefile.am: Added security.c|h.
1133         * icall.c: Added icall for get_UserName;
1134         * security.c: New file for security related icalls. Added function
1135         get_UserName for System.Environment (fix #56144).
1136         * security.h: New. Header file for security.c
1137
1138 2004-04-02  Dick Porter  <dick@ximian.com>
1139
1140         * icall.c: Deleted the icalls that were obsoleted some time ago
1141         by the ICU string code, and which were mixed into the icall
1142         rearranging.  Fixes bug 55969.
1143
1144         * string-icalls.h: 
1145         * string-icalls.c: Deleted the code that those icalls reference.
1146
1147 2004-04-01  Martin Baulig  <martin@ximian.com>
1148
1149         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
1150
1151         * class.c (mono_class_from_generic_parameter): Don't set 
1152         TYPE_ATTRIBUTE_INTERFACE.
1153         (my_mono_class_from_generic_parameter): Likewise.
1154
1155 2004-04-01  Martin Baulig  <martin@ximian.com>
1156
1157         * loader.c (find_method): Added an optional `MonoClass *ic'
1158         argument to search in a specific interface.
1159         (mono_get_method_constrained): New public function.
1160
1161 2004-04-01  Martin Baulig  <martin@ximian.com>
1162
1163         * reflection.c (mono_image_get_generic_field_token): Use the
1164         `handleref' cache here.
1165
1166 2004-04-01  Martin Baulig  <martin@ximian.com>
1167
1168         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
1169
1170         * reflection.c (create_generic_typespec): Use the `typespec' hash
1171         here, not the `typeref' one.    
1172
1173 2004-04-01  Martin Baulig  <martin@ximian.com>
1174
1175         * class.c (mono_class_inflate_generic_type): Moved the
1176         functionality into a new static inflate_generic_type() which
1177         returns NULL if it didn't do anything.  Only increment the
1178         `mono_stats.inflated_type_count' if we actually inflated
1179         something.
1180         (mono_class_get_full): Check the classes type to see whether we
1181         need to inflate it; also inflate MONO_TYPE_(M)VAR.
1182
1183 2004-04-01  Jackson Harper  <jackson@ximian.com>
1184
1185         * reflection.c: Set culture for assembly references.
1186         
1187 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
1188
1189         * reflection.[ch], icall.[ch], Fix support for pinning variables.
1190
1191 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1192
1193         * assembly.c:
1194         (do_mono_assembly_open): the critical section also covers
1195         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
1196
1197 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1198
1199         * threads.c:
1200         (mono_manage_threads): abort the background threads when finishing.
1201         Fixes bug #47232.
1202
1203 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1204
1205         * gc.c: only close the done_event handle if there was no timeout.
1206         C-ified comments.
1207
1208 2004-03-30  Martin Baulig  <martin@ximian.com>
1209
1210         * icall.c (icall_entries): It's called "System.Activator", not
1211         "System.Activation".    
1212
1213 2004-03-30  Martin Baulig  <martin@ximian.com>
1214
1215         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
1216         (mono_class_create_from_typespec): Likewise.
1217
1218 2004-03-30  Martin Baulig  <martin@ximian.com>
1219
1220         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
1221         `has_ctor_constraint' and `initialized'.
1222
1223 2004-03-30  Martin Baulig  <martin@ximian.com>
1224
1225         * reflection.c (encode_new_constraint): New static function to add
1226         the constructor constraint attribute to a type parameter.
1227         (encode_constraints): Call encode_new_constraint() if necessary.
1228
1229         * reflection.h
1230         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
1231
1232         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
1233         
1234 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
1235
1236         * reflection.c, icall.c: add support for pinning variables. 
1237
1238 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
1239
1240         * marshal.c (mono_marshal_get_managed_wrapper):
1241         init bool local with zero rather than null.
1242
1243 2004-03-29  Martin Baulig  <martin@ximian.com>
1244
1245         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
1246         the "official" behavior here.
1247         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
1248
1249 2004-03-29  Martin Baulig  <martin@ximian.com>
1250
1251         * icall.c: Reflect latest API changes.
1252
1253 2004-03-29  Martin Baulig  <martin@ximian.com>
1254
1255         * loader.c (mono_get_method_from_token): Also call
1256         mono_metadata_load_generic_params () for abstract and interface
1257         methods; replace the type arguments in the method signature with
1258         the ones which are loaded from the metadata.
1259
1260 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
1261
1262         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
1263         of the lock is not the current thread. MS.NET don't do it, in spite of
1264         what the documentation says. See bug #56157.
1265
1266 2004-03-28  Martin Baulig  <martin@ximian.com>
1267
1268         * class.c (mono_class_init): Don't call init_properties() and
1269         init_events() for generic instances; set `prop->parent' when
1270         inflating properties.
1271
1272         * reflection.c (mono_generic_inst_get_object): Call
1273         `mono_class_init (ginst->klass)'.
1274         (mono_type_get_object): Only create a MonoGenericInst if your
1275         generic type is a TypeBuilder.
1276         (do_mono_reflection_bind_generic_parameters): Only set
1277         `ginst->is_dynamic' if our generic type is a TypeBuilder.
1278
1279 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
1280
1281         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
1282         Fixes #56091.
1283
1284 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1285
1286         * icall.c: added Kill_internal icall.
1287         * process.[ch]: added Kill_internal icall.
1288
1289 2004-03-25  Martin Baulig  <martin@ximian.com>
1290
1291         * class.h (MonoStats): Added `generic_instance_count',
1292         `inflated_method_count', `inflated_type_count' and
1293         `generics_metadata_size'.       
1294
1295 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1296
1297         * reflection.c: no warnings now.
1298
1299 2004-03-25  Martin Baulig  <martin@ximian.com>
1300
1301         * class.c (mono_class_get_full): New public function; does a
1302         mono_class_get(), but also takes a `MonoGenericContext *'.
1303
1304         * loader.c (mono_field_from_memberref): Renamed to
1305         `field_from_memberref', made static and added `MonoGenericContext *'
1306         argument.
1307         (mono_field_from_token): Added `MonoGenericInst *' argument.
1308         (method_from_memberef): Likewise.
1309         (mono_get_method_from_token): Likewise.
1310         (mono_get_method_full): New public function; does a
1311         mono_get_method(), but also takes a `MonoGenericContext *'.
1312
1313         * verify.c (mono_method_verify): Get the method's generic context
1314         and pass it to mono_field_from_token(), mono_get_method_full() and
1315         mono_class_get_full().
1316
1317 2004-03-25  Martin Baulig  <martin@ximian.com>
1318
1319         * class.c (mono_class_inflate_generic_type): Take a
1320         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
1321         `MonoGenericMethod *'.
1322
1323 2004-03-25  Martin Baulig  <martin@ximian.com>
1324
1325         * loader.h (MonoMethodInflated): Store the MonoGenericContext
1326         instead of the MonoGenericMethod here.
1327
1328 2004-03-25  Martin Baulig  <martin@ximian.com>
1329
1330         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
1331         each time we create a new MonoGenericInst, we also create a new
1332         context which points back to us.
1333
1334         * class.c (inflate_method): Use `ginst->context' instead of
1335         creating a new context.
1336
1337         * loader.c (method_from_memberref): Use
1338         `klass->generic_inst->context' instead of creating a new context.
1339
1340 2004-03-25  Martin Baulig  <martin@ximian.com>
1341
1342         * class.h (MonoGenericContext): New struct.
1343         (MonoGenericMethod): Removed `generic_inst'.
1344
1345         * class.c (mono_class_inflate_generic_method): Take a
1346         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
1347
1348 2004-03-25  Martin Baulig  <martin@ximian.com>
1349
1350         * loader.h (MonoMethodInflated): New typedef.
1351
1352         * metadata.h (MonoMethodSignature): Removed `gen_method', make
1353         `generic_param_count' consume just 30 bits, added `is_inflated'
1354         and `has_type_parameters' flags (one bit each).
1355
1356         * class.c (mono_class_inflate_generic_method): Create a
1357         MonoMethodInflated instead of a MonoMethodNormal and set
1358         `is_inflated' in the method signature.
1359
1360         * class.h (MonoGenericMethod): Removed `generic_method'.
1361
1362 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
1363
1364         *
1365         properties and events, that's what caused the regressions.
1366
1367 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1368
1369         * object.c:
1370         (mono_async_result_new): the handle can be NULL.
1371
1372         * threadpool.c: Use an event instead of a semaphore, don't initialize
1373         it until needed. This saves quite a few semaphores from being created
1374         when using the threadpool.
1375
1376 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
1377
1378         * object.c (mono_string_is_interned_lookup): Fix interning of long
1379         strings. Fixes #54473.
1380
1381         * domain.c (ldstr_equal): Optimize if the two strings are equal.
1382
1383         * icall.c: Revert the klass->refclass changes since they introduce
1384         regressions (bug #54518).
1385
1386 2004-02-18  Martin Baulig  <martin@ximian.com>
1387
1388         * class.c (mono_class_init): If we're a generic instance and don't
1389         come from a TypeBuilder, inflate our members here.
1390         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
1391         (mono_class_create_generic): New public method.
1392         (mono_class_initialize_generic): Removed.
1393         (get_instantiation_name): Renamed to
1394         _mono_class_get_instantiation_name() and made it public.
1395
1396 2004-02-18  Martin Baulig  <martin@ximian.com>
1397
1398         * class.c (mono_class_inflate_generic_type): Clear the new
1399         instance's `nginst->klass' when inflating a generic instance.
1400         (mono_class_is_subclass_of): Added (basic) support for generic
1401         instances.
1402
1403 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
1404
1405         * appdomain.h, domain.c: use a MonoCodeManager instead of a
1406         MonoMempool to hold compiled native code.
1407
1408 2004-02-17  Martin Baulig  <martin@ximian.com>
1409
1410         * class.h (MonoDynamicGenericInst): Added `count_properties' and
1411         `properties'.
1412
1413         * reflection.c (mono_reflection_generic_inst_initialize): Added
1414         `MonoArray *properties' argument.
1415
1416         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
1417
1418 2004-02-17  Martin Baulig  <martin@ximian.com>
1419
1420         * icall.c (ves_icall_Type_GetFields): Renamed to
1421         ves_icall_Type_GetFields_internal() and added a
1422         `MonoReflectionType *rtype' argument; pass it to
1423         mono_field_get_object() to set the field's "reflected" type.
1424         (ves_icall_Type_GetConstructors): Likewise.
1425         (ves_icall_Type_GetEvents): Likewise.
1426         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
1427         argument; pass it to mono_method_get_object() to set the method's
1428         "reflected" type.       
1429
1430 2004-02-17  Martin Baulig  <martin@ximian.com>
1431
1432         * class.h (MonoDynamicGenericInst): New type.
1433         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
1434
1435         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
1436         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
1437         (ves_icall_MonoGenericInst_GetFields): New interncall.
1438
1439         * class.c (mono_class_from_generic): Don't call
1440         mono_class_initialize_generic() if this is a dynamic instance;
1441         ie. it's being created from a TypeBuilder.
1442         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
1443         `class->byval_arg.type'.
1444
1445         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
1446         to `inflate_method' and made static.
1447         (mono_reflection_inflate_field): Removed.
1448         (mono_reflection_generic_inst_initialize): New public method.
1449
1450         * reflection.h (MonoReflectionGenericInst): Removed `methods',
1451         `ctors' and `fields'; added `initialized'.
1452
1453 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
1454
1455         * debug-helpers.c (mono_method_full_name): Fix output for empty
1456         namespaces.
1457
1458 2004-02-12  Martin Baulig  <martin@ximian.com>
1459
1460         * class.h (MonoClassField): Added `MonoType *generic_type'.
1461
1462         * reflection.c (mono_image_get_fieldref_token): Added support for
1463         instantiated generic types.
1464         (field_encode_inflated_field): Removed.
1465         (mono_image_get_inflated_field_token): Removed.
1466         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
1467
1468         * reflection.h (MonoReflectionInflatedField): Removed.
1469
1470 2004-02-12  Martin Baulig  <martin@ximian.com>
1471
1472         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
1473         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
1474
1475         * reflection.c (mono_image_get_methodspec_token): Take a
1476         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
1477         (mono_image_create_token): Check whether we have a
1478         `method->signature->gen_method' and call
1479         mono_image_get_methodspec_token() if appropriate.
1480         (inflated_method_get_object): Removed.
1481         (mono_reflection_bind_generic_method_parameters): Return a
1482         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
1483         (mono_reflection_inflate_method_or_ctor): Likewise.
1484
1485         * reflection.h (MonoReflectionInflatedMethod): Removed.
1486
1487 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
1488
1489         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
1490         for custom valuetype marshalling.
1491
1492         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
1493
1494 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1495
1496         * icall.c: fixed WSAGetLastError_internal name.
1497
1498 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
1499
1500         * threads.c (mono_thread_attach): Allow this to be called multiple
1501         times for a thread.
1502         
1503         * threads.c (build_wait_tids): Do not wait for ourselves.
1504
1505         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
1506         appdomain list is empty.
1507
1508         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
1509         memory returned by mono_string_builder_to_utf16, since it points into
1510         managed memory. Thanks to Bernie Solomon for noticing this.
1511
1512         * icall.c: Add AppDomainSetup icalls.
1513
1514         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
1515
1516         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
1517         types.
1518
1519         * reflection.c (reflection_methodbuilder_to_mono_method): Save
1520         custom attributes to the method_aux struct. Also fix array indexes etc.
1521
1522         * loader.c (mono_method_get_param_names): Make dynamic case work again.
1523         
1524 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
1525
1526         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
1527         (both static and runtime) and reduce startup time.
1528
1529 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
1530
1531         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
1532         AsAny marshalling conversion instead of crashing.
1533
1534         * marshal.c: Fix warnings.
1535
1536 2004-02-09  Martin Baulig  <martin@ximian.com>
1537
1538         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
1539
1540         * reflection.h (MonoReflectionInflatedMethod): Removed the
1541         `declaring' field, it's now in the unmanaged MonoGenericMethod.
1542
1543         * reflection.c (method_encode_methodspec): Removed the `method'
1544         argument; we get it from `gmethod->declaring'.
1545         (inflated_method_get_object): Removed the `declaring' argument.
1546
1547 2004-02-09  Martin Baulig  <martin@ximian.com>
1548
1549         * class.h (MonoGenericMethod): New type.
1550         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
1551         `generic_method'.
1552
1553         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
1554         a `MonoGenericMethod *gen_method' one.
1555
1556         * class.c (mono_class_inflate_generic_type): Take an additional
1557         `MonoGenericMethod * argument.  This is only non-NULL if we're
1558         inflating types for a generic method.   
1559         (mono_class_inflate_generic_signature): Renamed to
1560         inflate_generic_signature() and made static; take a
1561         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1562         (inflate_generic_header): Take a `MonoGenericMethod *' argument
1563         instead of a `MonoGenericInst *' one.
1564         (mono_class_inflate_generic_method): Likewise.
1565
1566         * reflection.c (encode_generic_method_sig): Take a
1567         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1568         (method_encode_methodspec): Likewise.
1569         (inflated_method_get_object): Likewise. 
1570
1571         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
1572         field with a `MonoGenericMethod *gmethod' one.  
1573
1574 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
1575
1576         * class.h (mono_class_has_parent): add parens to expansion
1577         so you can ! this.
1578
1579 2004-02-08  Martin Baulig  <martin@ximian.com>
1580
1581         * image.h (MonoImage): Removed `generics_cache'.
1582
1583         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
1584         instead of a `MonoType *' argument; removed the `inflate_methods'
1585         argument.  Don't inflate methods here.
1586
1587         * loader.c (find_method): If it's a generic instance, call
1588         mono_class_init() on the `sclass->generic_inst->generic_type'.
1589
1590         * metadata.c (mono_type_size): Make this work on uninitial
1591         TypeBuilders.
1592
1593         * reflection.c (mono_reflection_create_runtime_class): Remove 
1594         errorneous assignment to klass->element_class, since it is already
1595         done in mono_reflection_setup_internal_class.
1596
1597 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1598
1599         * gc.c: added missing LeaveCriticalSection.
1600         * icall.c: indented a couple of lines.
1601         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
1602         if we call EndInvoke inside a callback. Fixes bug #52601.
1603
1604 2004-01-07  Martin Baulig  <martin@ximian.com>
1605
1606         * mono-debug-debugger.h
1607         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
1608
1609 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
1610
1611         * appdomain.c: Use messages in NotImplementedException.
1612
1613         * exception.c (mono_get_exception_not_implemented): Now this takes
1614         a message argument.
1615
1616         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
1617         exception instead of g_asserting an aborting when something is not
1618         implemented.
1619
1620         Add some inline docs.
1621
1622 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
1623
1624         * reflection.h: Update after changes to object layout.
1625
1626         * reflection.c: Implement saving of unmanaged aka win32 resources.
1627
1628         * appdomain.c: Bump version number.
1629
1630         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
1631         Handle missing domains gracefully.
1632
1633 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
1634
1635         * file-io.c : On Windows, there are much more invalid_path_chars.
1636
1637 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
1638
1639         * class.h, object.c: prepare for GetType () speedup.
1640
1641 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
1642
1643         * profiler.c: workaround for --profile null reference exception on
1644           cygwin. Patch by Patrik Torstensson.
1645
1646 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
1647
1648         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
1649         make work for unaligned access.
1650
1651 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
1652
1653         * class.c: small cleanup (class->fields [i] -> field).
1654         * image.c: check address of metadata is valid.
1655
1656 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
1657
1658         * assembly.h assembly.c (mono_assembly_loaded): New public function to
1659         search the list of loaded assemblies.
1660
1661         * reflection.c (mono_reflection_type_from_name): Use 
1662         mono_assembly_loaded instead of mono_image_loaded.
1663
1664         * reflection.c: Fix warnings.
1665
1666 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
1667
1668         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
1669         is dynamic. This is needed since an assembly can contain both dynamic and
1670         non-dynamic images.
1671
1672         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
1673         assembly->dynamic.
1674
1675         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
1676
1677         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
1678         to store modules loaded using AddModule.
1679
1680         * reflection.c (mono_image_fill_file_table): Generalize this so it works
1681         on Modules.
1682
1683         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
1684
1685         * reflection.c (mono_image_fill_export_table_from_module): New function to
1686         fill out the EXPORTEDTYPES table from a module.
1687
1688         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
1689         into a separate function. Also handle loaded non-dynamic modules.
1690
1691         * reflection.c (mono_image_basic_init): Fix memory allocation.
1692
1693         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1694
1695         * assembly.c (mono_assembly_load_references): Make this public.
1696
1697 2003-12-19  Martin Baulig  <martin@ximian.com>
1698
1699         * class.c (mono_class_initialize_generic): Made this static, take
1700         a `MonoGenericInst *' instead of a `MonoClass *'.
1701         (mono_class_from_generic): Call mono_class_initialize_generic()
1702         unless we're already initialized or being called from
1703         do_mono_metadata_parse_generic_inst().
1704
1705         * class.h (MonoGenericInst): Added `initialized' and
1706         `init_pending' flags.
1707
1708         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
1709         `mono_class_init (gklass)' or mono_class_initialize_generic()
1710         here; set `generic_inst->init_pending' while parsing the
1711         `type_argv'.
1712
1713 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
1714
1715         * locales.c: include string.h for memxxx prototypes
1716
1717 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
1718
1719         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
1720         constructor when accessing literal fields.
1721
1722 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
1723
1724         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1725
1726         * reflection.c (assembly_add_resource_manifest): New function to fill
1727         the MANIFESTRESOURCE table.
1728
1729         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
1730
1731         * reflection.h: Update to changes in class layout.
1732
1733         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
1734         Reenable call to mono_runtime_is_shutting_down ().
1735
1736         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
1737         determine if the runtime is shutting down.
1738
1739 2003-12-16  Jackson Harper <jackson@ximian.com>
1740
1741         * icall.c: comment out call to mono_runtime_is_shutting_down to
1742         fix build.
1743         
1744 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
1745
1746         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
1747         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
1748
1749 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
1750
1751         * reflection.c: move definition of swap_with_size
1752         to before its first call
1753
1754 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
1755
1756         * appdomain.c (mono_runtime_is_shutting_down): New public function.
1757
1758         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
1759         icall.
1760
1761         * object.c: Fix warnings.
1762
1763         * icall.c (ves_icall_Type_Get...): Only consider inherited static
1764         members if FlattenHierarchy is set.
1765
1766         * reflection.c (mono_image_add_decl_security): New function to emit
1767         declarative security.
1768
1769         * reflection.h reflection.c: Add support for declarative security.
1770
1771         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1772         
1773 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
1774
1775         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1776         
1777         * appdomain.c verify.c: Moved corlib version checking into its own
1778         function in appdomain.c since it needs to create vtables etc.
1779
1780 2003-12-13  Patrik Torstensson <p@rxc.se>
1781
1782         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
1783         instead of unwrapped server.
1784
1785 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
1786
1787         * verify.c (check_corlib): Fix field index.
1788
1789 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
1790
1791         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
1792         GetGacPath icall.
1793
1794 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
1795
1796         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
1797         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
1798         cope with sizeof(size_t) != sizeof(guint32).
1799
1800 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1801
1802         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
1803         in case of failure.
1804
1805 2003-12-10  Mark Crichton <crichton@gimp.org>
1806
1807         * icall.c: removed the GetNonZeroBytes.  We now handle this case
1808         in managed code.
1809
1810         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
1811
1812 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
1813
1814         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
1815         marked as deleted.
1816
1817 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
1818
1819         * verify.c (check_corlib): Handle the case when the version field is 
1820         initialized by a static constructor.
1821
1822 2003-12-08  Patrik Torstensson  <p@rxc.se>
1823
1824     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
1825
1826 2003-12-08  Martin Baulig  <martin@ximian.com>
1827
1828         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
1829         a MonoReflectionGenericParameter, also take the parameter index
1830         and name as arguments.
1831         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
1832         (ves_icall_MonoGenericParam_initialize): New interncall.
1833         (ves_icall_Type_make_byref_type): New interncall.
1834
1835         * reflection.h (MonoReflectionGenericParam): Derive from
1836         MonoReflectionType, not just from MonoObject.  Added `refobj' and
1837         `index' fields.
1838
1839         * reflection.c (mono_reflection_define_generic_parameter): Create
1840         and return a new MonoRefl
1841         from all modules inside the assembly.
1842         
1843 2003-11-11  Martin Baulig  <martin@ximian.com>
1844
1845         * reflection.c (mono_reflection_bind_generic_parameters): Make
1846         this work for interfaces.
1847
1848 2003-11-11  Martin Baulig  <martin@ximian.com>
1849
1850         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
1851
1852 2003-11-11  Martin Baulig  <martin@ximian.com>
1853
1854         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
1855         "MonoInflatedMethod" and "MonoInflatedCtor".
1856
1857 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
1858
1859         * reflection.c (resolution_scope_from_image): Use the assembly table
1860         from the manifest module, since other modules don't have it.
1861
1862         * debug-helpers.c (mono_type_full_name): New helper function.
1863
1864         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
1865
1866         * image.c (mono_image_load_file_for_image): New public function which
1867         is a replacement for the load_file_for_image in class.c.
1868
1869         * assembly.c (mono_assembly_load_module): A wrapper for the function
1870         above which does assembly association and reference loading too.
1871
1872         * class.c (mono_class_from_name): Call mono_assembly_load_module.
1873
1874 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1875
1876         * appdomain.c: not all of the attributes for the full assembly name
1877         are required and the order doesn't matter. Fixes bug #50787.
1878
1879 2003-11-10  Dick Porter  <dick@ximian.com>
1880
1881         * locales.c: Use platform-endian UTF16
1882
1883 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
1884
1885         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
1886         
1887 2003-11-10  Martin Baulig  <martin@ximian.com>
1888
1889         * metadata.c
1890         (mono_metadata_load_generic_params): Make this actually work.
1891
1892         * reflection.c (mono_reflection_bind_generic_parameters): If our
1893         parent is a generic instance, pass all the `types' to it, no
1894         matter whether it has the same number of type parameters or not.
1895
1896 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
1897
1898         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
1899
1900         * assembly.c (mono_assembly_load_references): Move the image<->assembly
1901         assignment code to this function so it gets called recursively for all
1902         modules.
1903
1904         * image.c (load_modules): Remove the assembly assignment since it is
1905         now done by mono_assembly_load_references.
1906         
1907         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
1908         Add 'module' argument.
1909         (mono_module_get_types): New helper function.
1910         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
1911
1912 2003-11-08  Martin Baulig  <martin@ximian.com>
1913
1914         * class.c (mono_class_inflate_generic_method): Interface method
1915         don't have a header.
1916
1917         * reflection.c (mono_image_get_methodspec_token): Take an
1918         additional `MonoGenericInst *' argument instead of reading it from
1919         the header; this is necessary to support interfaces.
1920         (mono_image_create_token): Pass the `MonoGenericInst *' from the
1921         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
1922         (inflated_method_get_object): Take an additional `MonoGenericInst *'
1923         argument.
1924
1925         * reflection.h (MonoReflectionInflatedMethod): Added
1926         `MonoGenericInst *ginst'.
1927
1928 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
1929
1930         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
1931
1932 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
1933
1934         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
1935
1936 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
1937
1938         * reflection.c 
1939         (reflection_methodbuilder_from_method_builder):
1940         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
1941         initialize a ReflectionMethodBuilder structure.
1942         (mono_image_get_methodbuilder_token):
1943         (mono_image_get_ctorbuilder_token): New functions to emit memberref
1944         tokens which point to types in another module inside the same assembly.
1945
1946         * reflection.c: Use the new helper functions.
1947         
1948         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
1949
1950         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
1951         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
1952
1953         * reflection.c (resolution_scope_from_image): Emit a moduleref if
1954         neccesary.
1955
1956         * reflection.c (mono_image_build_metadata): Emit metadata only for the
1957         current module. Emit the manifest only for the main module.
1958
1959         * reflection.c (mono_image_create_token): Add assertion when a 
1960         memberref needs to be created.
1961
1962         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
1963
1964         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
1965         larger buffer for the custom attribute blob. Fixes #50637.
1966         
1967 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1968
1969         * threadpool.c: notify listener on async processing handles after
1970         invoking the async callback. Thanks to Zoltan.
1971
1972 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
1973
1974         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
1975         avoid code duplication.
1976
1977         * reflection.h (MonoDynamicImage): New type which is currently unused,
1978         but will be used through the ref.emit code in place of 
1979         MonoDynamicAssembly.
1980
1981         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
1982         object layout.
1983
1984         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
1985         a MonoDynamicImage instead of just a MonoImage.
1986         
1987         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
1988         icalls to ModuleBuilder but keep their semantics, so they will work
1989         with moduleb->assemblyb. This will change later.
1990         
1991 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
1992
1993         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
1994         object layout.
1995
1996         * reflection.c (mono_image_build_metadata): Avoid creation of a default
1997         main module, since it is now done by the managed code.
1998
1999 2003-11-03  Martin Baulig  <martin@ximian.com>
2000
2001         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
2002         `ginst->klass' here.
2003         (method_encode_methodspec): Don't use the `ginst->generic_method's
2004         klass if it's a generic instance, use `ginst->klass' in this case.
2005
2006 2003-11-03  Martin Baulig  <martin@ximian.com>
2007
2008         * reflection.c (mono_image_get_generic_method_param_info):
2009         Removed, use mono_image_get_generic_param_info() instead.
2010         (mono_image_get_type_info): Write the GenericParam table before
2011         the Method table.  This is neccessary because in the GenericParam
2012         table, type parameters of the class (ie. '!0' etc.) must come
2013         before the ones from its generic methods (ie. '!!0' etc).
2014
2015 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
2016
2017         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
2018
2019 2003-11-02  Martin Baulig  <martin@ximian.com>
2020
2021         * reflection.c (create_generic_typespec): Take a
2022         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
2023         the generic parameters from it.
2024
2025 2003-11-02  Martin Baulig  <martin@ximian.com>
2026
2027         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
2028         instead of a `MonoClassField *' since we just need the type.
2029         (create_generic_typespec): New static function.  Creates a
2030         TypeSpec token for a generic type declaration.
2031         (mono_image_get_generic_field_token): New static function.
2032         (mono_image_create_token): If we're a FieldBuilder in a generic
2033         type declaration, call mono_image_get_generic_field_token() to get
2034         the token.
2035
2036 2003-11-02  Martin Baulig  <martin@ximian.com>
2037
2038         * reflection.h
2039         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
2040         `MonoReflectionGenericInst *declaring_type' and
2041         `MonoReflectionGenericInst *reflected_type' fields.
2042
2043         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
2044         `MonoReflectionGenericInst *declaring_type' and a
2045         `MonoReflectionGenericInst *reflected_type' argument instead of a
2046         single `MonoReflectionGenericInst *type' one.  Set
2047         `res->declaring_type' and `res->reflected_type' from them.
2048         (mono_reflection_inflate_field): Likewise.      
2049
2050 2003-11-02  Martin Baulig  <martin@ximian.com>
2051
2052         * class.c (mono_class_setup_vtable): Don't store generic methods
2053         in the vtable.  
2054
2055 2003-11-02  Martin Baulig  <martin@ximian.com>
2056
2057         * reflection.h (MonoReflectionGenericInst): Added
2058         `MonoReflectionType *declaring_type'.
2059
2060         * reflection.c (mono_reflection_bind_generic_parameters): Use
2061         `if (tb->parent)' instead of `klass->parent'.
2062
2063 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
2064
2065         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
2066         with an empty ASSEMBLY table.
2067
2068         * reflection.c (mono_image_build_metadata): Avoid using the same loop
2069         variable in the inner and outer loops.
2070
2071 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
2072
2073         * metadata.h (mono_metadata_make_token): Put parentheses around macro
2074         argument.
2075
2076         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
2077         
2078         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
2079         icalls. Instead, do everything in managed code. This is needed since
2080         it is hard to restore the original domain etc. in unmanaged code in the
2081         presence of undeniable exceptions.
2082
2083         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
2084         New icalls to push and pop appdomain refs.
2085
2086 2003-10-31  Martin Baulig  <martin@ximian.com>
2087
2088         * class.c (inflate_generic_type): Renamed to
2089         mono_class_inflate_generic_type() and made it public.
2090
2091         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
2092         New interncall.
2093
2094         * loader.c (mono_field_from_memberref): Also set the retklass for
2095         typespecs.
2096
2097         * fielder.c (mono_image_get_inflated_field_token): New static
2098         method; creates a metadata token for an inflated field.
2099         (mono_image_create_token, fixup_method): Added support for
2100         "MonoInflatedField".
2101         (fieldbuilder_to_mono_class_field): New static function.
2102         (mono_reflection_inflate_field): New public function.
2103
2104         * reflection.h
2105         (MonoReflectionGenericInst): Added `MonoArray *fields'.
2106         (MonoReflectionInflatedField): New typedef.     
2107
2108 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
2109
2110         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
2111         for Solaris and other platforms without s6_addr16
2112
2113 2003-10-30  Martin Baulig  <martin@ximian.com>
2114
2115         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
2116         argument instead of two.
2117         (mono_class_inflate_generic_signature): Likewise.
2118         (inflate_generic_header): Likewise.
2119         (mono_class_inflate_generic_method): Likewise.  In addition, if
2120         `ginst->klass' is set, it becomes the new `method->klass'.
2121
2122         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
2123         field.
2124
2125         * reflection.c (encode_generic_method_sig): Write a 0xa as the
2126         first byte. [FIXME]
2127         (method_encode_methodspec): If we have generic parameters, create
2128         a MethodSpec instead of a MethodRef.
2129         (fixup_method): Added support for "MonoInflatedMethod" and
2130         "MonoInflatedCtor".
2131         (mono_image_create_token): Added support for "MonoInflatedMethod"
2132         and "MonoInflatedCtor".
2133         (inflated_method_get_object): New static function; returns a
2134         managed "System.Reflection.MonoInflatedMethod" object.
2135         (mono_reflection_bind_generic_method_parameters): Return a
2136         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
2137         (mono_reflection_inflate_method_or_ctor): Likewise.
2138         (mono_image_get_generic_method_param_info): Initialize unused
2139         fields to zero.
2140         (mono_image_get_generic_param_info): Likewise.
2141
2142         * reflection.h (MonoReflectionInflatedMethod): New public
2143         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
2144         "S.R.MonoInflatedCtor" classes.
2145
2146         * loader.c (method_from_memberref): If we're a TypeSpec and it
2147         resolves to a generic instance, inflate the method.
2148
2149 2003-10-28  Dick Porter  <dick@ximian.com>
2150
2151         * object.c (mono_runtime_run_main): Convert command-line arguments
2152         into utf8, falling back to the user's locale encoding to do so.
2153
2154 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
2155
2156         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
2157         at this time.
2158
2159         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
2160
2161         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
2162         up icalls at method definition time. Partially fixes #33569.
2163
2164 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
2165
2166         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
2167         marshalling of arrays. Fixes #50116.
2168
2169         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
2170
2171         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
2172         points to a vtable in the dying appdomain.
2173
2174         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
2175         listeners into unmanaged code inside the lock.
2176
2177         * object.c (mono_class_vtable): Turn off typed allocation in non-root
2178         domains and add some comments.
2179
2180 2003-10-25  Martin Baulig  <martin@ximian.com>
2181
2182         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
2183
2184         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
2185
2186         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
2187         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
2188         currently parsing.  Create the generic class and store it in
2189         `generic_inst->klass' before parsing the type arguments.  This is
2190         required to support "recursive" definitions; see mcs/tests/gen-23.cs
2191         for an example.
2192         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
2193         to support recursive typespec entries.
2194
2195         * class.c (mono_class_setup_parent): If our parent is a generic
2196         instance, we may get called before it has its name set.
2197         (mono_class_from_generic): Splitted into
2198         mono_class_create_from_generic() and mono_class_initialize_generic().
2199
2200 2003-10-25  Martin Baulig  <martin@ximian.com>
2201
2202         * icall.c (ves_icall_Type_BindGenericParameters): Return a
2203         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
2204         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
2205         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
2206
2207         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
2208         (create_typespec): Likewise.
2209         (mono_reflection_bind_generic_parameters): Return a
2210         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
2211         (mono_reflection_inflate_method_or_ctor): New public function.
2212
2213         * reflection.h (MonoReflectionGenericInst): New typedef.        
2214
2215 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
2216
2217         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
2218         inside the domain lock. Fixes #49993.
2219         
2220         * object.c (mono_class_vtable): When typed allocation is used, 
2221         allocate vtables in the GC heap instead of in the mempool, since the
2222         vtables contain GC descriptors which are used by the collector even
2223         after the domain owning the mempool is unloaded.
2224
2225         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
2226
2227         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
2228         reflect what it does. Also invalidate mempools instead of freeing
2229         them if a define is set.
2230
2231         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
2232         of the appdomain.
2233         
2234         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
2235         hold the finalizable objects in this domain.
2236
2237         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
2238         appdomain.
2239
2240         * appdomain.c (mono_domain_set): New function to set the current
2241         appdomain, but only if it is not being unloaded.
2242
2243         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
2244         appdomain which is being unloaded.
2245         
2246         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
2247         unloading of the root appdomain.
2248
2249         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
2250         icall to execute a method in another appdomain. Intended as a 
2251         replacement for InternalSetDomain, which can confuse the code 
2252         generation in the JIT.
2253
2254         * appdomain.c (mono_domain_is_unloading): New function to determine
2255         whenever an appdomain is unloading.
2256
2257         * appdomain.c (mono_domain_unload): New function to correctly unload
2258         an appdomain.
2259
2260         * assembly.c (mono_assembly_load_references): Check that an assembly
2261         does not references itself.
2262
2263         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
2264         domain manually, it asks the finalizer thread to do it, then waits for
2265         the result. Also added a timeout.
2266
2267         * icall.c: Register the new icalls.
2268
2269         * threads.h threads.c: Export the mono_gc_stop_world and 
2270         mono_gc_start_world functions.
2271         
2272         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
2273         function to fill out the mempool with 0x2a.
2274
2275 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
2276
2277         * reflection.h (MonoReflectionMethodAux): New structure to store
2278         information which is rarely used, thus is not in the MonoMethod
2279         structure.
2280
2281         * reflection.h (MonoDynamicAssembly): New field 'method_
2282         culture, hash_alg and public_key. Fixes #49555.
2283
2284 2003-10-17  Martin Baulig  <martin@ximian.com>
2285
2286         * class.h (MonoGenericInst): Moved this declaration here and added
2287         `MonoMethod *generic_method'.
2288
2289         * icall.c
2290         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
2291         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
2292
2293         * metadata.c (mono_metadata_type_equal): Two types of
2294         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
2295         index; ie. don't compare the address of the `MonoGenericParam'
2296         structure.
2297         (mono_metadata_load_generic_params): Removed the `MonoMethod
2298         *method' argument.
2299
2300         * metadata.h (MonoGenericInst): Moved declaration to class.h.
2301         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
2302
2303         * reflection.c (method_encode_signature): Encode the number of
2304         generic parameters.
2305         (encode_generic_method_sig): New static function.
2306         (method_encode_methodspec): New static function; creates an entry
2307         in the MethodSpec table for a generic method.
2308         (mono_image_get_methodspec_token): New static function.
2309         (mono_image_create_token): Call mono_image_get_methodspec_token()
2310         for generic methods.
2311         (mono_reflection_bind_generic_method_parameters): New public
2312         function.  Instantiates a generic method.
2313
2314 2003-10-16  Martin Baulig  <martin@ximian.com>
2315
2316         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
2317         *gen_params' here from MonoMethodHeader.
2318
2319         * metadata.c (mono_metadata_parse_method_signature): If we have
2320         generic parameters, initialize `method->gen_params' and then set
2321         the correct `type->data.generic_param' in all the parameters.
2322
2323 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
2324
2325         * threads.c (mono_threads_get_default_stacksize): New function to 
2326         return the default stacksize.
2327
2328         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
2329         termination of the finalizer thread, since the previous method had
2330         race conditions. Fixes #49628.
2331
2332         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
2333         as for the other managed threads.
2334
2335 2003-10-16  Martin Baulig  <martin@ximian.com>
2336
2337         * class.c (inflate_generic_signature): Copy `generic_param_count'
2338         and `gen_params'.
2339
2340         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
2341         New interncall.
2342
2343         * metadata.c (mono_metadata_parse_method_signature): Actually set
2344         the `method->generic_param_count' here.
2345         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
2346
2347 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
2348
2349         * object.h: Add a new field to TypedRef to simplify the implementation
2350         of the REFANY opcodes in the JIT.
2351
2352         * icall.c: Make use of the new field.
2353
2354         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
2355         dynamically.
2356
2357 2003-10-15  Martin Baulig  <martin@ximian.com>
2358
2359         * class.c (mono_class_from_gen_param): Renamed to
2360         mono_class_from_generic_parameter() and moved most of the
2361         functionality from mono_reflection_define_generic_parameter()
2362         here; ie. we create a "real" class here.
2363         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
2364         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
2365         previously been called.
2366
2367         * class.h (MonoGenericParam): Moved the declaration of this struct
2368         here from metadata.h and added `MonoMethod *method'.
2369
2370         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
2371         interncall.
2372
2373         * loader.c (mono_get_method_from_token): If we have any generic
2374         parameters, call mono_metadata_load_generic_params() to read them
2375         from the MONO_TABLE_GENERICPAR.
2376
2377         * metadata.c (mono_metadata_load_generic_params): Added
2378         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
2379
2380         * metadata.h (MonoMethodSignature): Replaced
2381         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
2382         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
2383
2384         * reflection.c (mono_reflection_define_generic_parameter): Moved
2385         most of the functionality into the new
2386         mono_class_from_generic_parameter(); set the `method' field if
2387         we're a method parameter.       
2388
2389 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
2390
2391         * marshal.c (emit_struct_conv): if native size is 0
2392         emit no code.
2393
2394 2003-10-14  Martin Baulig  <martin@ximia
2395
2396         * object.c (mono_object_isinst): Synchronize this with the code
2397         generated by the JIT for casts.
2398
2399 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
2400
2401         * reflection.c (encode_type): Fix #38332.
2402
2403 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
2404
2405         * marshal.c (mono_marshal_method_from_wrapper): New function to return
2406         the original method from the wrapper method.
2407
2408 2003-09-25  Martin Baulig  <martin@ximian.com>
2409
2410         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
2411         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
2412         (ves_icall_Type_get_IsGenericInstance): New interncall.
2413
2414 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
2415
2416         * object.c: fix cast warning in big endian code.
2417
2418 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
2419
2420         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
2421         
2422 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2423
2424         * assembly.c: don't call check_env from mono_assembly_load. It's
2425         already done once in mono_assemblies_init and may cause headaches when
2426         multiple threads are loading assemblies.
2427
2428 2003-09-19  Martin Baulig  <martin@ximian.com>
2429
2430         * reflection.c (mono_reflection_define_generic_parameter): Don't
2431         allocate `klass->methods', set `klass->flags' to
2432         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
2433
2434 2003-09-18  Martin Baulig  <martin@ximian.com>
2435
2436         * class.c (mono_class_init): Don't create `class->methods' if it's
2437         already initialized.
2438
2439         * metadata.c (mono_metadata_load_generic_params): Make this
2440         actually work.
2441
2442         * reflection.c (mono_reflection_define_generic_parameter): Set
2443         parent class and interfaces from the constraints.
2444
2445         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
2446         to keep this struct in sync with the declaration in TypeBuilder.cs.
2447
2448 2003-09-17  Martin Baulig  <martin@ximian.com>
2449
2450         * metadata.h (MonoType): Replaced the data's `int type_param'
2451         field with `MonoGenericParam *generic_param'.
2452         (MonoGenericParam): Added `MonoClass *klass'.
2453
2454         * class.c (mono_class_from_gen_param): Removed the
2455         `MonoImage *image' and `int type_num' arguments.
2456
2457         * metadata.c (mono_metadata_parse_generic_param): New static
2458         method; creates a MonoGenericParam which just contains the index.
2459         (do_mono_metadata_parse_type): Call
2460         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
2461         MONO_TYPE_MVAR.
2462
2463         * reflection.c (mono_image_typedef_or_ref): Generic type
2464         parameters may be in the same assembly, but never use a typedef
2465         for them.
2466         (mono_reflection_define_generic_parameter): We're now creating a
2467         "real" class for the type parameter; it's now safe to call
2468         mono_class_from_mono_type() on the class'es type, it'll do the
2469         right thing.
2470
2471 2003-09-16  Martin Baulig  <martin@ximian.com>
2472
2473         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
2474         `symfile->range_entry_size' and `symfile->class_entry_size' here;
2475         the `symfile' data structure must be fully initialized before it
2476         gets added to the table.
2477
2478 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
2479
2480         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
2481
2482         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
2483         class init trampolines.
2484
2485 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
2486
2487         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
2488         to the built-in profiler to turn off time and allocation profiling
2489         respectively.
2490
2491 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
2492
2493         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
2494         g_direct_equal.
2495
2496         * debug-helpers.c (mono_method_full_name): Print the wrapper type
2497         in human readable form.
2498
2499 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
2500
2501         * reflection.c icall.c: Fixed warnings.
2502
2503         * image.c (load_class_names): Use a temporary hash table to hold the
2504         namespaces in order to avoid doing many string comparisons.
2505
2506         * image.h: Fix typo.
2507
2508         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
2509         Pass NULL instead of g_direct_equal to the GHashTable constructor 
2510         since the NULL case is short-circuited inside g_hash_table_lookup, 
2511         leading to better performance.  
2512
2513         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
2514         obtain the first custom attribute for a given index. Depends on the
2515         CustomAttribute table being sorted by the parent field.
2516
2517         * reflection.c (mono_custom_attrs_from_index): Use the new function 
2518         for better performance.
2519
2520 2003-09-07  Martin Baulig  <martin@ximian.com>
2521
2522         * class.c (mono_class_init): If we're a generic instance, inflate
2523         all our methods instead of loading them from the image.
2524         (mono_class_from_generic): Set `class->methods = gklass->methods'.
2525
2526 2003-09-07  Martin Baulig  <martin@ximian.com>
2527
2528         * mono-debug-debugger.c: Added support for constructors.
2529
2530 2003-09-06  Martin Baulig  <martin@ximian.com>
2531
2532         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
2533         New interncall.
2534
2535         * reflection.c (mono_reflection_setup_generic_class): Call
2536         ensure_runtime_vtable() to create the vtable.
2537
2538 2003-09-05  Martin Baulig  <martin@ximian.com>
2539
2540         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
2541         MONO_TYPE_MVAR.
2542
2543 2003-09-04  Martin Baulig  <martin@ximian.com>
2544
2545         * reflection.c (mono_reflection_define_generic_parameter): Generic
2546         parameters start with zero.
2547
2548 2003-09-04  Martin Baulig  <martin@ximian.com>
2549
2550         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
2551
2552         * reflection.h (MonoReflectionGenericParam): New typedef.
2553         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
2554         the generic parameters from the managed TypeBuilder.
2555
2556         * reflection.c (mono_reflection_define_generic_parameter): New function.
2557         (mono_reflection_create_runtime_class): Encode generic parameters.
2558         (mono_reflection_setup_generic_class): New function; this is
2559         called after adding adding all generic params to the TypeBuilder.
2560         (encode_type): Added MONO_TYPE_VAR.
2561
2562 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
2563
2564         * class.h class.c (mono_class_needs_cctor_run): Moved this method
2565         here from the JIT.
2566
2567         * assembly.h assembly.c: Moved the AOT loading code into an assembly
2568         load hook.
2569
2570 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
2571
2572         * reflection.h reflection.c class.h class.c: Delete duplicate 
2573         definition of mono_type_get_name () from reflection.c and export the
2574         one in class.c.
2575
2576         * class.c: Class loading fixes from Bernie Solomon 
2577         (bernard@ugsolutions.com).
2578
2579         * reflection.c: Endianness fixes from Bernie Solomon 
2580         (bernard@ugsolutions.com).
2581         
2582 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
2583
2584         * assembly.h assembly.c: Define a file format version for AOT
2585         libraries.
2586         
2587         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
2588
2589         * appdomain.h (MonoJitInfo): New field to determine whenever the
2590         code is domain neutral.
2591         
2592 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
2593
2594         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
2595
2596 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
2597
2598         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
2599         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
2600         Avoid caching the result since strings must be domain specific. Fixes
2601         #48050.
2602
2603 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
2604
2605         * marshal.c (mono_marshal_init): Make this callable multiple times
2606         since it is hard to find a correct place to call it.
2607
2608         * object.c (mono_runtime_class_init): Execute static constructors in
2609         the correct appdomain.
2610
2611         * image.c (build_guid_table): Handle the case when multiple images have
2612         the same GUID.
2613
2614 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2615
2616         * icall.c: added a couple of icalls for System.Web.
2617
2618 2003-08-28  Martin Baulig  <martin@ximian.com>
2619
2620         * icall.c (ves_icall_Type_BindGenericParameters): Use
2621         `klass->generic_inst' instead of `&klass->byval_arg' in the
2622         mono_type_get_object() call.  The returned type must be
2623         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
2624
2625 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
2626
2627         * NOTES: New file.
2628
2629         * object.c (mono_class_proxy_vtable): Make it thread safe.
2630
2631         * pedump.c: Fix warning.
2632
2633         * object.c appdomain.h: Get rid of metadata_section. 
2634         It is no longer needed and it was causing deadlocks with domain->lock.
2635
2636         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
2637
2638 2003-08-26  Martin Baulig  <martin@ximian.com>
2639
2640         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
2641
2642 2003-08-26  Martin Baulig  <martin@ximian.com>
2643
2644         * pedump.c (main): Call mono_metadata_init(),
2645         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
2646         and mono_loader_init().
2647
2648 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
2649
2650         * loader.h: Add missing include to fix build.
2651
2652         * image.h: mono_image_load_references is no more.
2653
2654         * assembly.c: Reworked assembly loading to make it really thread safe.
2655         After these changes, the assembly returned by mono_assembly_open is
2656         fully initialized, i.e. all its references assemblies are loaded.
2657
2658         * assembly.c (mono_image_load_references): Renamed to 
2659         mono_assembly_load_references, and made private, since clients no
2660         longer need to call it.
2661
2662         * class.c: Removed calls to mono_assembly_load_references, since it was
2663         a source of deadlocks.
2664
2665         * loader.h loader.c class.h class.c: Protect data structures using a 
2666         new lock, the loader lock.
2667
2668         * class.c (mono_class_setup_vtable): Create temporary hash tables and
2669         GPtrArrays only when needed.
2670
2671         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
2672         into empty structures by mcs. Fixes pinvoke7.cs.
2673         
2674         * domain.c (mono_init): Call a new initialization function.
2675
2676         * appdomain.c (mono_runtime_init): Call the new initializer function
2677         of the marshal module.
2678
2679         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
2680         inserted into empty structures by mcs. Fixes pinvoke7.cs.
2681
2682         * marshal.h marshal.c: Added locks around the wrapper caches to make
2683         this module thread safe.
2684
2685         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
2686         this argument. Fixes pinvoke1.exe.
2687
2688 2003-08-25  Lluis Sanchez <lluis@ximian.com>
2689
2690         * object.h: Added call_type field to MonoMethodMessage and the corresponding
2691         enumeration of values. Removed fields to store remote call output values in
2692         MonoAsyncResult. Not needed any more.
2693         * object.c: Initialize call_type and async_result fields in mono_message_init.
2694         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
2695         dispatching the message.
2696         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
2697         async call to finish. To do it use a message with EndInvoke call type.
2698
2699 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
2700
2701         * loader.h loader.c (mono_method_hash_marhal_info): New function which
2702         determines whenever a method has marshalling info.
2703
2704 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2705
2706         * assembly.c: fix the build on windows.
2707
2708 2003-08-22 Lluis Sanchez <lluis@ximian.com>
2709
2710         * object.cs: Fixed bug #47785.
2711
2712 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
2713
2714         * string-icalls.c (StringReplace): If their are no occurances of
2715         the old string found return a reference to the supplied
2716         string. This saves some memory and matches MS behavoir.
2717         
2718 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2719
2720         * socket-io.c: fixed compilation for systems that define AF_INET6
2721         and don't define SOL_IP/SOL_IPV6.
2722
2723 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
2724
2725         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
2726         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
2727
2728         * rawbuffer.c rawbuffer.h: Make this module thread safe.
2729
2730         * domain.c: Make this module thread safe.
2731
2732         * domain.c (mono_init): Call new initialization function.
2733
2734         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
2735         reference types too. Fixes #38812.
2736
2737         * image.c (mono_image_init): Fixed warnings.
2738
2739         * class.c (mono_class_from_typeref): Handle assembly load failure
2740         correctly.
2741
2742         * appdomain.c (add_assemblies_to_domain): Handle the case when
2743         the references of an assembly are not yet loaded.
2744
2745         * metadata.c image.c assembly.c: Moved initialization of global
2746         variables to a separate function called at startup since lazy 
2747         initialization of these variables is not thread safe.
2748         
2749         * image.c assembly.c: Made this module thread safe by adding locks in 
2750         the appropriate places.
2751
2752         * domain.c (mono_init): Call the new initialization functions of the
2753         three modules.
2754
2755 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
2756
2757         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
2758           make a direct call. It is proxy's work to make the call asynchronous.
2759           mono_delegate_end_invoke(): If the targe is a proxy, just collect
2760           the return values.
2761         * object.cs: mono_method_call_message_new(): read AsyncResult and
2762           state object from parameters list, if this info is requested.
2763         * object.h: Added fields to store remote call output values in
2764           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
2765
2766 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
2767
2768         * object.h: add needed fields to MonoThread.
2769         * threads.c, threads.h: allow registering a function to cleanup data
2770         allocated per thread by the JIT.
2771
2772 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
2773
2774         * loader.h: portability fix by Bernie Solomon
2775         * <bernard@ugsolutions.com>.
2776
2777 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
2778
2779         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
2780         return a MonoArray. This simplifies the code and also ensures that
2781         the cache allways contains an object reference as a value.
2782
2783         * icall.c (ves_icall_get_parameter_info): Simplified using the new
2784         function.
2785
2786 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2787
2788         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
2789         fixes a problem with byte ordering when getting the address family for
2790         a socket.
2791
2792 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
2793
2794         * .cvsignore: Added monosn.
2795
2796         * reflection.h reflection.c loader.c: Added support for parameter
2797         marshalling to dynamically created types. Fixes #47295.
2798
2799 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
2800
2801         * rand.c: remove useless warnings.
2802
2803 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
2804
2805         * class.c: implemented ldtoken for methods and fieldrefs.
2806
2807 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2808
2809         * threadpool.c: when mono_async_invoke was called, no one took care of
2810         monitoring the queue. So if the method invoked took some time and we
2811         got new async invoke requests after 500 ms (the thread created waited
2812         that long in WaitForSingleObject), the new async invoke was not called
2813         until the previous one finished.
2814
2815         This is fixed now. Thanks to Totte for helping with it.
2816
2817 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2818
2819         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
2820
2821 2003-08-11  Martin Baulig  <martin@ximian.com>
2822
2823         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
2824
2825 2003-08-06  Martin Baulig  <martin@ximian.com>
2826
2827         * mono-debug-debugger.c: Added support for static fields,
2828         properties and methods.
2829
2830 2003-08-06  Martin Baulig  <martin@ximian.com>
2831
2832         * mono-debug-debugger.c: Don't store the MonoString's vtable to
2833         make this work for applications with multiple application domains.
2834
2835 2003-08-04  Martin Baulig  <martin@ximian.com>
2836
2837         * mono-debug-debugger.c: Completely reworked the type support; the
2838         most important thing is that we're now just using one single
2839         `MonoType' instance per type.
2840
2841 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
2842
2843         * mono-endian.h, mono-endian.c, icall.c: Added icall
2844         ves_icall_System_Double_AssertEndianity to assert double word endianity
2845         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
2846
2847 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
2848
2849         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
2850         support, icalls and fixes.
2851
2852 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
2853
2854         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
2855         classes that are a punctuation character in .NET is not the same a
2856         g_unichar_ispunct.
2857
2858 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
2859
2860         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
2861
2862 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
2863
2864         * icall.c: Add new MemCopy internalcall.
2865         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
2866         Simplified code; It is not necessary to handle all the cases here,
2867         as the C# code takes care of it. 
2868         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
2869
2870 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
2871
2872         * icall.c: fixed GetElementType for byrefs (bug# 44792).
2873
2874 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
2875
2876         * reflection.c (mono_reflection_create_runtime_class): Add support for
2877         properties to dynamically created classes.
2878         * reflection.c: Fix a few places where non-MonoObjects were inserted
2879         into the tokens hashtable.
2880
2881 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
2882
2883         * object.c: some support to handle out of memory exceptions.
2884
2885 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
2886
2887         * marshal.c (mono_marshal_get_native_wrapper): support reference
2888         return types
2889
2890 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
2891
2892         * object.h, object.c: more portability stuff from Bernie Solomon.
2893         Unexport mono_object_allocate(). Added mono_object_unbox ().
2894         Set exitcode when an unhandled exception is thrown.
2895
2896 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
2897
2898         * marshal.c (mono_marshal_get_native_wrapper): use custom
2899         marshaler for return types.
2900
2901 2003-06-10  Dick Porter  <dick@ximian.com>
2902
2903         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
2904         ip_mreq is available
2905
2906 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
2907
2908         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
2909         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
2910         by Bernie Solomon <bernard@ugsolutions.com>.
2911
2912 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
2913
2914         * gc.c (mono_gc_init): Avoid error message on shutdown when
2915         GC_DONT_GC=1 is used.
2916
2917         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
2918         New icall to return the GUID of a module.
2919
2920 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
2921
2922         * class.c: ensure instance size always includes the parent's size
2923         even whem class size is set explicitly (fixes bug#44294).
2924
2925 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
2926
2927         * profiler.h, profiler.c: made the simple profiler thread-safe,
2928         get more accurate timing info. Allow the loading of an
2929         externally-developed profiler module.
2930
2931 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
2932
2933         * marshal.c (mono_marshal_get_native_wrapper): improved
2934         class/byref arguments.
2935         (mono_marshal_get_native_wrapper): better string marshaling support.
2936
2937 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
2938
2939         * class.c: ensure .pack and .size are handled correctly and
2940         simplified layout of static fields.
2941
2942 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
2943
2944         * appdomain.c
2945         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
2946
2947         * loader.c (mono_lookup_pinvoke_call): look for modules in the
2948         current directory (fix bug 44008)
2949
2950 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
2951
2952         * marshal.c (mono_marshal_get_native_wrapper): started support for
2953         custom marshalers.
2954         (mono_delegate_to_ftnptr): consider marshalling specifications
2955
2956 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
2957
2958         * reflection.c, reflection.h: emit custom marshal info.
2959
2960 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2961
2962         * object.c: free the GError.
2963         * icall.c: added CloseEvent_internal.
2964         * threads.[ch]:
2965         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
2966         call.
2967
2968 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
2969
2970         * loader.c (mono_method_get_signature): Add support for dynamic
2971         assemblies.
2972
2973 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
2974
2975         * reflection.c: fixed bug #43905.
2976
2977 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
2978
2979         * class.c, domain.c, icall.c, metadata.h, object.h: support for
2980         handling TypedReference and ArgIterator.
2981         * loader.c, loader.h: added function to get signature at call site.
2982
2983 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
2984
2985         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
2986         data readonly. Buglets and warning fixes. Some MethodSpec support.
2987
2988 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
2989
2990         * class.h, class.c, object.c: remove relative numbering support.
2991
2992 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
2993
2994         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
2995         free the string, until we get a chance to fix Gtk#
2996
2997 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2998
2999         * marshal.c: revert last patch.
3000
3001 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
3002
3003         * icall.c: updates for new mono_class_vtable() not calling
3004         the type constructor anymore.
3005
3006 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
3007
3008         * object.h, object.c: separate vtable creation from type
3009         initialization. Make running the .cctor thread safe.
3010
3011 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
3012
3013         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
3014
3015 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
3016
3017         * loader.c (mono_get_method): consider calling convention
3018
3019 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
3020
3021         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
3022         to return the invisible global type for a module.
3023
3024         * reflection.c (mono_image_build_metadata): Emit global fields too.
3025
3026 2003-05-20  Peter Williams  <peterw@ximian.com>
3027
3028         * loader.c (mono_lookup_internal_call): Add a few newlines.
3029
3030 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
3031
3032         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
3033         literal strings.
3034
3035         * appdomain.c (set_domain_search_path): Recalculate search path when
3036         AppDomainSetup.PrivateBinPath changes.
3037
3038         * object.c (mono_class_compute_gc_descriptor): It turns out some
3039         parts of the class libs (like System.Thread) holds pointers to
3040         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
3041         to treat native int a pointer type here.
3042         
3043 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
3044
3045         * appdomain.h, domain.c: add hashtable for jump target resolution.
3046
3047 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
3048
3049         * reflection.h reflection.c icall.c: Added new icalls 
3050         GetManifestResourceInfoInternal, GetModulesInternal and support
3051         infrastructure.
3052
3053 2003-05-16  Dick Porter  <dick@ximian.com>
3054
3055         * icall.c:
3056         * file-io.h:
3057         * file-io.c: Implement System.IO.MonoIO::GetTempPath
3058
3059 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
3060
3061         * object.c: mono_store_remote_field: little fix to previous patch.
3062
3063 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3064
3065         * class.c: add constructors to array classes.
3066         * icall.c: special case array construction for InternalInvoke (),
3067
3068 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
3069
3070         * class.h class.c reflection.c object.c: Added support for field
3071         defaults in dynamically generated classes.
3072
3073 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
3074
3075         * reflection.c: properly encode charset for ddlimport.
3076
3077 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
3078
3079         * threads.c: allow compiling without GC.
3080
3081 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
3082
3083         * appdomain.h, object.c, object.h, threads.c, threads.h: added
3084         handling of thread static data.
3085
3086 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3087
3088         * reflection.h, reflection.c: added mono_custom_attrs_free ().
3089
3090 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
3091
3092         * class.c (mono_array_class_get): always set the serializable flags
3093         (mono_array_class_get): always set the SEALED attribute for array types
3094
3095 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
3096
3097         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
3098         attributes (fix for bug 42021).
3099
3100 2003-05-12  Dick Porter  <dick@ximian.com>
3101
3102         * gc.c: Don't run finalizers when the finalizer thread is
3103         finishing up, because the default domain has already been
3104         destroyed.
3105
3106 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
3107
3108         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
3109         value is null, we should throw an exception.   This is slightly
3110         different than the other conventions used for the constructor.
3111
3112 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3113
3114         * socket-io.c: fixed windows build.
3115
3116 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3117
3118         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
3119
3120 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
3121
3122         * object.c (mono_string_new_wrapper): Compatibility fix for MS
3123         compilers.
3124
3125 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
3126
3127         * class.c (mono_class_layout_fields): Add experimental GC aware
3128         auto layout facility. Requires class library changes to work correctly.
3129
3130         (mono_class_setup_vtable): Avoid overriding explicit interface
3131         method implementations. Fixes iface3.exe test.
3132
3133         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
3134         object reference.
3135         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
3136         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
3137
3138         * metadata.h: Add new type classification macro which determines
3139         whenever the type holds an object reference.
3140
3141 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
3142
3143         * marshal.c (mono_marshal_get_native_wrapper): cleanups
3144
3145 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
3146
3147         * gc.c (finalizer_thread): Work around a GC bug.
3148
3149 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
3150
3151         * marshal.c (emit_struct_conv): allow unions
3152
3153         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
3154
3155 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
3156
3157         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
3158
3159 2003-05-06  Martin Baulig  <martin@ximian.com>
3160
3161         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
3162
3163 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3164
3165         * socket-io.c:
3166         (Select_internal): allow NULLs, don't create arrays if not needed.
3167         Coupled with Socket.cs changes.
3168
3169         * threadpool.c:
3170         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
3171         register a finalizer for it that will close the semaphore handle. This
3172         fixes the leak and make Lupus' test run with > 4080 loops.
3173
3174 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
3175
3176         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
3177         Jerome Laban (bug #42287)
3178
3179 2003-05-02  Martin Baulig  <martin@ximian.com>
3180
3181         * debug-mono-symfile.h
3182         (MonoSymbolFile): Moved declaration into mono-debug.h.
3183         (MonoDebugMethodJitInfo): Likewise.
3184         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
3185         argument.
3186         (_mono_debug_address_from_il_offset): Take a
3187         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
3188
3189         * mono-debug.h
3190         (MonoDebugDomainData): New struct.
3191         (mono_debug_get_domain_data): New function.
3192         (mono_debug_add_method): Take an additional `MonoDomain *'
3193         argument.
3194         (mono_debug_source_location_from_address): Likewise.
3195         (mono_debug_il_offset_from_address): Likewise.
3196         (mono_debug_address_from_il_offset): Likewise.
3197
3198 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
3199
3200         * reflection.c: one more check for null type in custom attrs.
3201
3202 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3203
3204         * reflection.c: avoid warning (comparison is always false due to limited
3205         range of data type).
3206
3207 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3208
3209         * icall.c: throw an exception in Type.GetField if the argument 'name'
3210         is NULL.
3211
3212 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
3213
3214         * reflection.c: fixed handling of enums in named arguments to custom
3215         attributes (bug #42123).
3216
3217 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
3218
3219         * reflection.c: use the right array element type and handle
3220         a null for a Type argument, too.
3221
3222 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
3223
3224         * reflection.c: handle arrays as arguments to custom attributes.
3225
3226 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
3227
3228         * reflection.c: handle a string value in a custom attr
3229         ctor that takes an object.
3230
3231 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
3232
3233         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
3234         (fix bug #42063)
3235
3236 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
3237
3238         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
3239
3240 2003-04-27  Martin Baulig  <martin@ximian.com>
3241
3242         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
3243         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
3244         MONO_DEBUGGER_EVENT_BREAKPOINT.
3245         (mono_breakpoint_trampoline_code): Removed.
3246         (mono_debugger_event_handler): The last argument is now a
3247         `guint32'.
3248         (mono_debugger_insert_breakpoint_full): Removed the
3249         `use_trampoline' argument.
3250         (mono_debugger_method_has_breakpoint): Likewise.
3251         (mono_debugger_trampoline_breakpoint_callback): Renamed to
3252         mono_debugger_breakpoint_callback(); take the method and
3253         breakpoint number as arguments.
3254
3255 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
3256
3257         * metadata.c: fix off by one when loading parameters attributes.
3258
3259 2003-04-24  Martin Baulig  <martin@ximian.com>
3260
3261         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
3262
3263 2003-04-24  Martin Baulig  <martin@ximian.com>
3264
3265         * mono-debug-debugger.c: Moved all code which interacts with the
3266         Mono Debugger here.
3267
3268         * debug-mono-symfile.c: This code now just deals with the symbol
3269         file itself, the debugger code is now in mono-debug-debugger.c.
3270
3271 2003-04-23  Martin Baulig  <martin@ximian.com>
3272
3273         * mono-debug.c (mono_debug_source_location_from_il_offset):
3274         New method; like mono_debug_source_location_from_address(), but
3275         takes an IL offset instead of a machine address.
3276
3277 2003-04-23  Martin Baulig  <martin@ximian.com>
3278
3279         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
3280         `line' field; this is now computed by the debugger.
3281
3282 2003-04-23  Martin Baulig  <martin@ximian.com>
3283
3284         * mono-debug.[ch]: New files.  This is the new debugging interface.
3285
3286         * mono-debug-debugger.[ch]: New files.  Moved all code which
3287         interacts with the Mono Debugger here.
3288
3289 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
3290
3291         * domain.c (mono_init): initialize mono_defaults.monitor_class
3292
3293 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
3294
3295         * reflection.c (method_encode_code): Add a spicy exception to help
3296         future compiler authors.
3297
3298 2003-04-21  Martin Baulig  <martin@ximian.com>
3299
3300         * icall.c
3301         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3302         Make this work with relative pathnames; g_filename_to_uri() needs
3303         an absolute filename.
3304
3305 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
3306
3307         * icall.c: Track name changes in Object and ValueType.
3308
3309 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
3310
3311         * metadata.c (mono_type_stack_size): size should be a multiple of
3312         sizeof (gpointer)
3313
3314 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3315
3316         * gc.c:
3317         (internal_domain_finalize): moved into mono_domain_finalize. No need
3318         to create another thread because the finalizers will be run in the
3319         finalizer thread.
3320         
3321         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
3322         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
3323         to be run (MS does this too).
3324
3325 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
3326
3327         * object.c (mono_class_compute_gc_descriptor): Update comment.
3328
3329         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
3330
3331         * image.h: Add synchronized wrapper cache.
3332
3333         * image.c (do_mono_image_open): Initialize cache.
3334
3335         * reflection.c (create_dynamic_mono_image): Initialize cache.
3336
3337 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3338
3339         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
3340         ves_icall_System_Buffer_ByteLengthInternal.
3341
3342 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
3343
3344         * reflection.c: setup klass->nested_in earlier. Allow
3345         a dash in the assembly name.
3346
3347 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
3348
3349         * metadata.c (mono_type_to_unmanaged): dont access
3350         type->data.klass for MONO_TYPE_OBJECT
3351         (mono_type_to_unmanaged): consider System.Delegate class
3352
3353 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
3354
3355         * class.c: just setup supertypes in the proper place instead of
3356         initializing the full element class for arrays.
3357
3358 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
3359
3360         * class.c: ensure the element class of arrays is initialized.
3361         Setup the supertype info for array classes, too.
3362
3363 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
3364
3365         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
3366
3367 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3368
3369         * Makefile.am: re-added -m option when running cygpath. This way,
3370         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
3371         separator.
3372         * mono-config.c: same codepath for locating mono config file for WIN32
3373         an
3374
3375         * reflection.c, reflection.h: implemented and exported functions
3376         to retrieve info about custom attributes.
3377
3378 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3379
3380         * appdomain.c: moved Uri handling to assembly.c
3381         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
3382         work when using a file Uri in *nix and windows.
3383
3384         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
3385         GetReferencedAssemblies.
3386
3387 2003-03-18  Dick Porter  <dick@ximian.com>
3388
3389         * icall.c: Rename a couple of internal calls
3390
3391         * threads.c: Set the thread state to Stopped when a thread exits.
3392         Fixes bug 39377.
3393
3394 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
3395
3396         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
3397         New icall.
3398
3399         * object.c (mono_class_vtable): fix warning.
3400
3401 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
3402
3403         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
3404
3405         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
3406         memory.
3407         (method_encode_clauses): Create exception info structures in the right
3408         order.
3409         (mono_reflection_setup_internal_class): Initialize supertypes field.
3410
3411         * class.c object.c: Handle interfaces which implement other interfaces 
3412         correctly.
3413
3414         * class.h class.c: Move the supertypes array initialization code into 
3415         a separate function so it can be used for dynamic types too. Also call
3416         it earlier, in mono_class_init(), since it can be used before the
3417         type is initialized.
3418
3419 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3420
3421         * Makefile.am:
3422         * assembly.c:
3423         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
3424
3425         * appdomain.c:
3426         * appdomain.h:
3427         * marshal.c:
3428         * object.c: remove warnings.
3429
3430 2003-03-13  Martin Baulig  <martin@ximian.com>
3431
3432         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
3433         (MonoDebugLexicalBlockEntry): New types.
3434
3435         * debug-mono-symfile.c
3436         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
3437
3438 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3439
3440         * process.c: ret can be any non-zero value accroding to MS doc.
3441
3442 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
3443
3444         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
3445         fixing a warning for a miss-used prototype, would have cause
3446         random memory corruption.
3447
3448 2003-03-07  Martin Baulig  <martin@ximian.com>
3449
3450         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
3451         getting really annoying ....
3452
3453 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
3454
3455         * reflection.c (fixup_method): added support for array methods.
3456
3457 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
3458
3459         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
3460         (pointed out by Michael Adams).
3461
3462 2003-03-04  Dick Porter  <dick@ximian.com>
3463
3464         * icall.c: Temporarily reverted the Double and Single ToString()
3465         change, because it broke nunit.
3466
3467 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
3468
3469         * object.h, threads.h: make include files compatible with C++
3470         (patch by Jerome Laban <jlaban@wanadoo.fr>).
3471
3472 2003-03-04  Pedro Martínez Juliá  <yoros@wanadoo.es>
3473
3474         * icall.c: Erased ToString helper functions for Double and Single.
3475         Now, that implementations ar all in managed code (Double and Single
3476         Formatters).
3477
3478 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
3479
3480         * appdomain.c: Added method for initializing the default context of
3481         a domain. Added internal call for getting the default context.
3482         * appdomain.h: Added context variable in MonoDomain struct.
3483         * domain.c: mono_domain_set also sets the default context of the domain
3484         * icall.c: Mapped internal method InternalGetDefaultContext.
3485         * object.c: mono_object_get_virtual_method returns always a remoting
3486         wrapper if the object is a transparent proxy.
3487         mono_runtime_invoke_array: when creating an object by calling the
3488         constructor, if the created object is a proxy, then the constructor should
3489         be called using the a remoting wrapper.
3490
3491 2003-03-03  Dick Porter  <dick@ximian.com>
3492
3493         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
3494         variable so it compiles on solaris.  Problem spotted by
3495         Christopher Taylor <ct@cs.clemson.edu>
3496
3497 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3498
3499         * appdomain.c:
3500         (get_info_from_assembly_name): don't leak value.
3501
3502         * icall.c:
3503         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
3504         result.
3505
3506 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
3507
3508         * assembly.c: export mono_image_load_references ().
3509         * class.c: handle function pointers. mono_class_from_name() now
3510         supports nested type names directly.
3511
3512 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
3513
3514         * reflection.h reflection.c: Encode already created dynamic methods 
3515         and fields correctly as a DEF instead of a REF.
3516
3517         * reflection.c: Get rid of the force_ref argument to 
3518         mono_image_typedef_or_ref since it was wrong in the first place.
3519
3520         * string-icalls.c: add error checking to string constructors according
3521         to the MSDN docs.
3522
3523         * reflection.c: Emit types in the order their TypeBuilders were 
3524         created. Previously, a new table index was assigned to each type before
3525         the tables were emitted. This was wrong because the signature blob
3526         might already refer to a type by its original table index.
3527
3528 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
3529
3530         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
3531         change.
3532         
3533 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3534
3535         * Makefile.am: make assemblies dir have \ instead of / on windows.
3536
3537 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
3538
3539         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
3540         iterate over the NESTEDCLASS table using a linear search since the
3541         table is not guaranteed to be sorted by the secondary key.
3542
3543         * class.c (mono_class_create_from_typedef): fixed up call to
3544         mono_metadata_nesting_typedef.
3545         
3546 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
3547
3548         * marshal.c (mono_string_to_byvalstr): clear the memory as
3549         suggested by Jerome Laban <jlaban@wanadoo.fr>
3550
3551 2003-02-26  Dick Porter  <dick@ximian.com>
3552
3553         * process.c: Cope with padding in .rsrc blocks
3554
3555 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
3556
3557         * metadata.h: reverted the filter_len change, it breaks reflection
3558         
3559 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
3560
3561         * metadata.h: added a new field to store the filter_len
3562         
3563
3564 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
3565
3566         * reflection.c: handle custom attributes for types and members
3567         created with Reflection.Emit (bug#38422).
3568
3569 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
3570
3571         * reflection.c: define RTSpecialName automatically for constructors for
3572         compatibility with MS.NET.
3573
3574         * reflection.c (mono_reflection_create_runtime_class): initialize
3575         nested_in field of dynamically created classes.
3576
3577 2003-02-22  Martin Baulig  <martin@ximian.com>
3578
3579         * debug-mono-symfile.h: Incremented version number.
3580
3581 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
3582
3583         * object.h icall.c process.c: fix warnings.
3584
3585 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
3586
3587         * appdomain.h appdomain.c:
3588         (mono_domain_try_type_resolve): split the 
3589         name_or_tb argument into a name and a tb argument.
3590         (mono_domain_has_type_resolve): new function to check whenever the
3591         application has registered a TypeResolve event handler.
3592         
3593         * icall.c reflection.h reflection.c: move the type resolve logic into
3594         mono_reflection_get_type () so it will be invoked when 
3595         Assembly::GetType () is called.
3596
3597         * reflection.c:
3598         (mono_reflection_get_type): renamed to get_type_internal.
3599         (mono_reflection_get_type): fixed type name generation so it works 
3600         for nested types too.
3601         (mono_reflection_get_type): call has_type_resolve () to avoid the 
3602         costly type name generation if there is no resolve event handler.
3603
3604 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
3605
3606         * class.c, image.c: load exported types from file references.
3607
3608 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
3609
3610         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
3611           used to cache the managed methods used to create proxies and make 
3612           remote invocation of methods.
3613         * class.h: Added in MonoVTable a flag to indicate that a class needs 
3614           to be remotely created.
3615         * object.c: Modified the method mono_class_vtable(). It now initializes 
3616           the remote flag of the vtable. Modified mono_object_new_specific(), 
3617           so now it checks the remote flag.
3618         * icall.c: Added a couple of internal methods, one for enabling instance 
3619           creation interception for a type, and one for creating objects bypassing
3620           the remote check.
3621
3622 2003-02-18  Martin Baulig  <martin@ximian.com>
3623
3624         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
3625         New interncall to get a method's metadata token.
3626
3627         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
3628         New interncall for the debugger.
3629
3630 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
3631
3632         * class.c (mono_class_setup_vtable): allocate supertype array
3633
3634 2003-02-18  Martin Baulig  <martin@ximian.com>
3635
3636         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
3637
3638 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3639
3640         * reflection.c:
3641         (assembly_name_to_aname): jump over unknown properties (i've found
3642         something like: 'type, assembly, version=xxx, custom=null, public...',
3643         so now will ignore custom=null and still get the rest of the values).
3644
3645 2003-02-17  Dick Porter  <dick@ximian.com>
3646
3647         * threads.c: Have Thread.Start() wait for a semaphore to signal
3648         that the thread has set up all its local data.  This fixes bug
3649         34323, where Abort() raced the new thread's TLS data.
3650
3651         Also removes the handle_store() call from start_wrapper, because
3652         threads are now always created suspended and there is no longer a
3653         race between the parent and child threads to store the info.
3654
3655 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
3656
3657         * image.c: explain the #- heap issue in a message, hopefully
3658         avoiding FAQs on mono-list.
3659
3660 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3661
3662         * icall.c:
3663         (GetEntryAssembly): if the domain has not invoked
3664         AppDomain.ExecuteAssembly yet, return the assembly of the default
3665         AppDomain.
3666
3667 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
3668
3669         * class.c (mono_ldtoken): make it work in dynamic assemblies.
3670
3671 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
3672
3673         * metadata.c, reflection.c: simple speedup to type hash
3674         and equals code.
3675
3676 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
3677
3678         * image.c, image.h, class.c, assembly.c: move module loading
3679         to MonoImage. When loading metadata, consider alignemnet from
3680         the start of metadata, not from the metadata address in memory.
3681
3682 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
3683
3684         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
3685         AssemblyBuilder objects. Factored out custom attribute creation into
3686         a separate function.
3687         (create_custom_attr): new function to create custom attributes.
3688
3689 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
3690
3691         * Makefile.am: Got tired of typing the full pathname to pedump.
3692         Until there is another option, am installing this.
3693
3694 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
3695
3696         * class.c (class_compute_field_layout): always set field->parent 
3697         (mono_ldtoken): use mono_defaults.fieldhandle_class;
3698
3699 2003-02-11  Dick Porter  <dick@ximian.com>
3700
3701         * threads-types.h:
3702         * monitor.c: Rewrote Monitor, making lock much faster and
3703         Pulse/Wait work as specified.  Also uses much fewer handles, and only
3704         creates them as needed.
3705
3706         * exception.c: Added SynchronizationLockException
3707
3708         * threads.c: Deleted old Monitor implementation.  The new one is
3709         in a new file.
3710
3711 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
3712
3713         * class.c: handled TypedReference type code. Set the correct size for
3714         class data. Setup interface_offsets for interface classes, too.
3715
3716 2003-02-09  Martin Baulig  <martin@ximian.com>
3717
3718         * debug-mono-symfile.h: Reflect latest symbol writer changes.
3719
3720 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
3721
3722         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
3723         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
3724         * object.c: fixed mono_object_get_virtual_method () for interfaces.
3725         * verify.c: check for code that runs after the end of the method.
3726
3727 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
3728
3729         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
3730         "System.Mat
3731
3732 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
3733
3734         * marshal.c (mono_marshal_get_icall_wrapper): like
3735         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
3736         instead of a MonoMethod.
3737
3738 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3739
3740         * decimal.c: fixed bug #36537.
3741
3742 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
3743
3744         * marshal.c: throw a missing method exception if a
3745         P/Invoke method is not found.
3746
3747 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
3748
3749         * icall.c: allow a null this for constructors.
3750
3751 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
3752
3753         * icall.c: raise the proper exceptions if the arguments to the
3754         internal Invoke are incorrect.
3755
3756 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
3757
3758         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
3759
3760 2003-01-03  Martin Baulig  <martin@ximian.com>
3761
3762         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
3763
3764 2002-12-31  Martin Baulig  <martin@ximian.com>
3765
3766         * debug-mono-symfile.c: Completely rewrote the type section.
3767         Instead of using individual malloc()ed fields, we use one big
3768         continuous memory area and offsets into this area.
3769         See the comments in the source code for details.
3770
3771 2002-12-30  Martin Baulig  <martin@ximian.com>
3772
3773         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
3774
3775 2002-12-30  Martin Baulig  <martin@ximian.com>
3776
3777         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
3778         line number table in this data blob instead of using an external
3779         pointer.
3780
3781 2002-12-28  Martin Baulig  <martin@ximian.com>
3782
3783         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
3784
3785 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
3786
3787         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
3788         as a boxed return type.
3789
3790 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
3791
3792         * appdomain.c
3793         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
3794         g_build_filename to properly get separators on the filename created.
3795
3796         * object.h: Small change, introduce MonoMarshalByRefObject to
3797         track the layout of that structure in the C# universe as we make
3798         changes there.
3799
3800 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
3801
3802         * object.c: removed assert to allow static fields on interfaces.
3803         * loader.c: a TypeSpec may be used for any type, not just arrays.
3804
3805 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
3806
3807         * class.c, class.h: added mono_class_array_element_size ().
3808         Ignore static methods in interfaces.
3809
3810 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3811
3812         * threads.c: fixed the build under cygwin.
3813
3814 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
3815
3816         * reflection.c: handle nullref constants. Allocate keys for
3817         reflection handles with the GC.
3818
3819 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
3820
3821         * threads.c, threads.h: added mono_thread_get_abort_signal()
3822         to get a suitable signal for thread abort.
3823
3824 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
3825
3826         * metadata.c: fix handling of ExportedType table.
3827
3828 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3829
3830         * icall.c: added WriteWindowsDebugString internal call.
3831
3832 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3833
3834         * reflection.h: added fields to match C# implementation.
3835
3836 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3837
3838         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
3839
3840 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
3841
3842         * gc.h, gc-internal.h: Rename header for GC internal calls to
3843         gc-internal.h from gc.h as to not clash with Boehm GC having its
3844         header installed as <gc.h> in outside include paths.
3845         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
3846         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
3847
3848 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3849
3850         * icall.c: assign minor, build and revision in FillName.
3851
3852 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
3853
3854         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
3855         Added support for running code generated by Reflection.Emit.
3856
3857 2002-12-11  Gonzalo P
3858         mono_mempool_stats().
3859
3860 2002-10-23  Dick Porter  <dick@ximian.com>
3861
3862         * file-io.c: 
3863         * file-io.h: 
3864         * icall.c: Added MonoIO.GetFileType internal call
3865
3866 2002-10-17  Dick Porter  <dick@ximian.com>
3867
3868         * appdomain.c (mono_runtime_cleanup): Don't signal the async
3869         delegate semaphore before waiting for all threads to finish,
3870         because new threads can also call async delegates.  Fixes bug
3871         32004.
3872
3873         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
3874         of 3 seconds, in case another async job is queued.  (This part is
3875         needed because the bug fix reintroduced the 3s exit lag.)  This
3876         makes the mono_runtime_shutdown flag superfluous.
3877
3878 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
3879
3880         * reflection.c: include ehader size in method section headers.
3881         Really check for suplicated modules entries.
3882
3883 2002-10-17  Martin Baulig  <martin@gnome.org>
3884
3885         * debug-mono-symfile.c: Added back support for locals.
3886
3887 2002-10-14  Martin Baulig  <martin@gnome.org>
3888
3889         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
3890         MONO_TYPE_VOID.
3891
3892 2002-10-14  Martin Baulig  <martin@gnome.org>
3893
3894         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
3895         mono_class_get() instead of looking in the class cache. 
3896
3897 2002-10-13  Martin Baulig  <martin@gnome.org>
3898
3899         * debug-mono-symfile.c: Set version number to 28, include the
3900         signature in method names.
3901
3902 2002-10-13  Martin Baulig  <martin@gnome.org>
3903
3904         * debug-mono-symfile.h: Set version number to 27.
3905
3906 2002-10-11  Martin Baulig  <martin@gnome.org>
3907
3908         * gc.c: Don't register/unregister NULL pointers as disappearing links.
3909
3910 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
3911
3912         * metadata.c, metadata.h: added helper function to allocate signatures.
3913
3914 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3915
3916         * icall.c: added internal call to get the location of machine.config.
3917
3918 2002-10-08  Martin Baulig  <martin@gnome.org>
3919
3920         * debug-mono-symfile.c: Ignore classes with a pending init for the
3921         moment.
3922
3923 2002-10-03  Dick Porter  <dick@ximian.com>
3924
3925         * threads.c: Freebsd pthread_t is a pointer
3926
3927 2002-10-03  Dick Porter  <dick@ximian.com>
3928
3929         * socket-io.c: Implemented GetHostName_internal
3930
3931 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3932
3933         * mono-config.c:
3934         (mono_config_parse_file): don't leak the text.
3935
3936 2002-10-02  Martin Baulig  <martin@gnome.org>
3937
3938         * debug-mono-symfile.c: Added support for methods.
3939
3940 2002-10-01  Martin Baulig  <martin@gnome.org>
3941
3942         * debug-mono-symfile.c: Don't emit methods and line numbers for
3943         the dynamic symbol file, just write the type table.  We can easily
3944         have an external helper program which creates a symbol file for an
3945         IL file.        
3946
3947 2002-10-01  Dick Porter  <dick@ximian.com>
3948
3949         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
3950         Only add the handle to the cleanup array when we're about to
3951         launch the thread.  Bug 31425 deadlocked when the test was run on
3952         mono under w32.
3953
3954 2002-10-01  Martin Baulig  <martin@gnome.org>
3955
3956         * debug-mono-symfile.c: Added support for properties.
3957
3958 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
3959
3960         * reflection.c: unaligned store fix from Mark Crichton
3961         <crichton@gimp.org>.
3962
3963 2002-09-27  Martin Baulig  <martin@gnome.org>
3964
3965         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
3966         New interncall.
3967
3968 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
3969
3970         * assembly.h, assembly.c: use a sane API to hook into the assembly
3971         loading process instead of a useless special-purpouse hack
3972         (ngen needs a hook, too, for example).
3973
3974 2002-09-27  Dick Porter  <dick@ximian.com>
3975
3976         * threads.c (mono_thread_init): Call GetCurrentProcess() so
3977         io-layer can set up some process handle info.  Not needed on w32,
3978         but doesn't hurt either.
3979
3980         * process.c: Pass the program name in the second parameter to
3981         CreateProcess, so the path is searched.  Include the working
3982         directory. Implemented process name, process enumeration, and some
3983         process detail internal calls.
3984         
3985         * icall.c: Added internal calls for process lookup, and some
3986         process details
3987
3988 2002-09-26  Martin Baulig  <martin@gnome.org>
3989
3990         * assembly.c (mono_install_open_assembly_hoo
3991
3992 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
3993
3994         * object.c: added a define for a good string and array
3995         creation speedup (not enabled by default because we need to deal with
3996         the synch stuff).
3997
3998 2002-08-26  Martin Baulig  <martin@gnome.org>
3999
4000         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
4001         function to create a dynamic symbol file.  This is used by the
4002         debugger to create a symbol file for IL code on-the-fly.
4003
4004 2002-08-26  Martin Baulig  <martin@gnome.org>
4005
4006         * loader.c (mono_lookup_pinvoke_call): Include the error message
4007         from g_module_error() in the error message.
4008
4009 2002-08-24  Martin Baulig  <martin@gnome.org>
4010
4011         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
4012         function to update the symbol file.  The symbol file is mmap()ed
4013         writable, but private.  This allows us to install the symbol file
4014         together with the assembly.
4015
4016 2002-08-24  Martin Baulig  <martin@gnome.org>
4017
4018         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
4019         but they can read the new symbol file format which mcs is now creating.
4020
4021         * debug-symfile.c (mono_debug_find_source_location): Moved to
4022         debug-mono-symfile.c; this is now operating on the new symbol file.
4023
4024 2002-08-23  Martin Baulig  <martin@gnome.org>
4025
4026         * debug-helpers.c (mono_method_desc_from_method): New function to get
4027         a MonoMethodDesc from a MonoMethod.
4028
4029 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
4030
4031         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
4032         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
4033
4034 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
4035
4036         * string-icalls.[ch]: make helper methods static.
4037
4038 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4039
4040         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
4041         types to it and to SetValueInternal.
4042
4043         * object.c: Moved handle_enum label to its proper place. This was the
4044         f... bug! ;-)
4045
4046         This time i compiled mcs and gtk-sharp and they both work.
4047
4048 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4049
4050         * icall.c: reverted partially my previous patch until 
4051         object.c:set_value handles enums correcly.
4052
4053 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4054
4055         * icall.c:
4056         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
4057         (ves_icall_System_Environment_get_MachineName): removed warning when
4058         compiling under cygwin.
4059
4060 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
4061
4062         * object.c: fixed field_get_value() for reference types.
4063
4064 2002-08-22  Dick Porter  <dick@ximian.com>
4065
4066         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
4067         Don't free a buffer while it's still needed.  Patch from Jonathan
4068         Liger <Jonathan.liger@wanadoo.fr>
4069
4070 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
4071
4072         * icall.c (ves_icall_System_Environment_get_Platform): Add new
4073         internal call.
4074
4075 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
4076
4077         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
4078         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
4079
4080         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
4081         we call unmanaged code which throws exceptions.
4082
4083 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
4084
4085         * appdomain.h: added per-domain entry_assembly.
4086         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
4087         arguments.
4088         * icall.c: Assembly::GetEntryAssembly icall.
4089         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
4090         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
4091
4092 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
4093
4094         * appdomain.h, gc.c: added mono_domain_finalize ().
4095
4096 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4097
4098         * object.c:
4099         (mono_print_unhandled_exception): changed g_warning by g_printerr
4100         because g_log has a 1024 characters limit (yeah, i got a big stack
4101         trace). Don't print exception name, that should be in ToString 
4102         returned string.
4103
4104 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4105
4106         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
4107         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
4108
4109 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4110
4111         * object.c:
4112         (mono_print_unhandled_exception): after previous commit, i realized
4113         that MS calls ToString on the exception. I changed this function to
4114         do that. This way we get stack_trace for free.
4115
4116 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4117
4118         * object.c:
4119         (mono_print_unhandled_exception): invoke Message property instead of
4120         getting 'message' field from Exception. Don't allocate memory for
4121         'trace' and 'message' if not needed.
4122
4123 2002-08-18  Dick Porter  <dick@ximian.com>
4124
4125         * unicode.c: Fix asserts to match Encoder.cs checks
4126
4127 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
4128
4129         * marshal.c: fix unaligned store issue and a few wrong
4130         opcode argument types.
4131
4132 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4133
4134         * icall.c: added GetUninitializedObjectInternal internal call.
4135
4136 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
4137
4138         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
4139         to the right domain.
4140
4141 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
4142
4143         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
4144
4145         * class.c (class_compute_field_layout): set blittable to false for Strings
4146
4147         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
4148
4149 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
4150
4151         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
4152         first chunk of code to create types at runtime. Code to
4153         handle ReflectedType/DeclaringType. Make reflection handles
4154         domain specific.
4155
4156 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
4157
4158         * class.c: set correct name in arrays.
4159
4160 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
4161
4162         * appdomain.c (mono_domain_transfer_object): make it work with
4163         valuetypes. bug fixes.
4164
4165 2002-08-12  Dick Porter  <dick@ximian.com>
4166
4167         * object.h: Rename some parameters to avoid c++ keywords (Patch
4168         from Joseph Wenninger <kde@jowenn.at>)
4169
4170 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
4171
4172         * icall.c: added icall to implement Assembly.GetFile*.
4173
4174 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
4175
4176         * reflection.h, reflection.c: code to embed managed resources.
4177
4178 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
4179
4180         * class.c: move all the type size stuff into
4181         class_compute_field_layout().
4182
4183 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
4184
4185         * class.c: ensure enums have always the correct instance size.
4186         * unicode.c: remove wrong assert.
4187
4188 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
4189
4190         * assembly.c: fix mem corruption issue.
4191         * image.h, image.c: added mono_image_get_resource () to access
4192         managed resources.
4193         * icall.c: implemented Assembly.EntryPoint property and some
4194         Managed Resources related internalcalls.
4195
4196
4197 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
4198
4199         * image.c, image.h: impemented mono_image_get_entry_point ().
4200         * appdomain.c: use mono_image_get_entry_point.
4201
4202 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
4203
4204         * reflection.c: support the object type argument when loading
4205         custom attributes.
4206
4207 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
4208
4209         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
4210         String as return type.
4211
4212 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
4213
4214         * reflection.c: fix encoding of named args for custom attrs to match
4215         the ms implementation. Read them back when instantiating custom
4216         attributes.
4217
4218 2002-08-02  Radek Doulik  <rodo@ximian.com>
4219
4220         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
4221         by Dietmar as quick fix
4222         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
4223         16 as stack size, used on more places as quick fix before Dietmar
4224         will fix it properly
4225
4226 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
4227
4228         * object.h, object.c: added accessors for fields and properties.
4229
4230 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
4231
4232         * class.c, class.h: made mono_class_get_field_from_name ()
4233         loop on parent types.
4234         Added mono_class_
4235
4236         * debug-helpers.c (mono_method_full_name): this can now generate
4237         method names with signatures
4238
4239         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
4240         method dont have this pointers.
4241
4242 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
4243
4244         * reflection.c: fixup typebuilder tokens.
4245         * image.c: fix buglet.
4246         * marshal.h: remove whitespace.
4247         * metadata.h, metadata.c: reinstate code that was removed.
4248         * verify.c: handle catch directives and fix another couple of bugs.
4249
4250 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
4251
4252         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
4253         (mono_marshal_get_native_wrapper): make it comp. with the old code
4254         (mono_marshal_get_native_wrapper): support boolean
4255         (mono_marshal_get_managed_wrapper): support more types
4256
4257 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
4258
4259         * class.c (class_compute_field_layout): compute class->blittable attribute.
4260
4261 2002-07-09  Dick Porter  <dick@ximian.com>
4262
4263         * threads.c: Make the thread cleaning up cope with threads that
4264         call ExitThread()
4265
4266 2002-07-08  Radek Doulik  <rodo@ximian.com>
4267
4268         * reflection.c (method_encode_code): use non-translated values to
4269         compute finally_start, this fixes exception handling on ppc, yay!
4270
4271         * decimal.h (struct signscale): fix endianess
4272
4273 2002-07-07  Radek Doulik  <rodo@ximian.com>
4274
4275         * reflection.c: swap box_val and not val
4276
4277 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
4278
4279         * reflection.c, reflection.h: handle full assembly info in type name.
4280         Handle Type arguments when loading custom attributes.
4281         * icall.c: updated to use new mono_reflection_type_from_name () method.
4282
4283 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4284
4285         * loader.c:
4286         (method_from_memberref): also print assembly name when method not found.
4287
4288 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4289
4290         * icall.c:
4291         (ves_icall_TypeGetProperties): fixed bug #27473. 
4292
4293 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4294
4295         * reflection.c: display image name and token when cannot find the
4296         .ctor for an attribute.
4297
4298 2002-07-05  Martin Baulig  <martin@gnome.org>
4299
4300         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
4301
4302 2002-07-04  Dick Porter  <dick@ximian.com>
4303
4304         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
4305         compile on mingw.  This will cause mingw builds to not wait for
4306         subthreads to terminate after the main thread does.  I've lodged a
4307         bug with the mingw developers for them to wrap OpenThread().
4308
4309 2002-07-03  Dick Porter  <dick@ximian.com>
4310
4311         * threads.c: Store thread IDs instead of handles, because
4312         GetCurrentThread() returns a pseudohandle and therefore stores
4313         useless values.  mono_thread_cleanup() continues checking the
4314         array of threads until it is empty, to cope with subthreads
4315         spawning new threads after the main thread has finished.
4316
4317         * profiler.h:
4318         * profiler.c:
4319         * profiler-private.h: Pass the thread ID to thread profiler
4320         functions, instead of a handle
4321
4322 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
4323
4324         * verify.c: fixes to make it more usable.
4325         * pedump.c: added --verify code to verify IL code in an assembly.
4326
4327 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4328
4329         * reflection.c: turn errors into warnings to allow compiling corlib.
4330
4331 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
4332
4333         * reflection.c: add special cases to compile corlib.
4334
4335 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
4336
4337         * reflection.c: handle properties with only a set method.
4338
4339 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
4340
4341         * opcodes.h: add enum with opcodes in opval order.
4342
4343 2002-07-01  Dick Porter  <dick@ximian.com>
4344         
4345         * object.h:
4346         * object.c (mono_runtime_run_main): Removed unneeded argument
4347
4348 2002-06-28  Martin Baulig  <martin@gnome.org>
4349
4350         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
4351
4352 2002-06-27  Dick Porter  <dick@ximian.com>
4353
4354         * threads.c: Store the handle in both the parent thread and in the
4355         subthread, to minimise the time between starting a new thread and
4356         storing its ID.
4357
4358 2002-06-26  Dick Porter  <dick@ximian.com>
4359
4360         * appdomain.c (mono_runtime_cleanup): Close the socket library
4361         after all the threads have finished, not before
4362
4363 2002-06-26  Martin Baulig  <martin@gnome.org>
4364
4365         * debug-symfile.c (mono_debug_find_source_location): Added
4366         `guint32 *line_number' argument.  If it's not NULL, store the line number
4367         there and return the file name without the line number.
4368
4369 2002-06-25  Dick Porter  <dick@ximian.com>
4370
4371         * icall.c:
4372         * process.h:
4373         * process.c: Process forking and other support functions
4374
4375 2002-06-25  Dick Porter  <dick@ximian.com>
4376
4377         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
4378         things dont happen when the image is closed.
4379         (mono_image_lookup_resource): Walk the resource section looking
4380         for a particular entry
4381
4382         * cil-coff.h: PE resource section decoding
4383
4384 2002-06-25  Dick Porter  <dick@ximian.com>
4385         
4386         * assembly.h:
4387         * assembly.c: 
4388         (mono_assembly_foreach): Accessor functions to walk the list of
4389         loaded assemblies
4390         (mono_assembly_set_main):
4391         (mono_assembly_get_main): Process methods need to know which
4392         assembly is the "main" one
4393
4394         * object.c (mono_runtime_run_main): Record the main assembly
4395
4396         * debug-helpers.c: Fix typo
4397
4398 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
4399
4400         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
4401         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
4402
4403 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
4404
4405         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
4406
4407 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
4408
4409         * image.c (do_mono_image_open): Initialize reference count,
4410         otherwise we leak the MonoImage.
4411
4412 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
4413
4414         * reflection.c: small tweak to handle self-hosting.
4415
4416 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
4417
4418         * reflection.c: fix type name parse code.
4419
4420 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
4421
4422         * reflection.c: break out of the loop.
4423         * image.c: special case corlib.
4424
4425 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
4426
4427         * reflection.c: add all the custom attrs at the end to ensure the
4428         ctors have been properly initialized when the attributes are defined
4429         in the current assembly.
4430
4431 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
4432
4433         * reflection.c: handle correctly multiple-nested types.
4434
4435 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
4436
4437         * row-indexes.h: fix typos.
4438         * reflection.c: adjust for typos and fix method_def_or_ref
4439         encoding in MethodImpl table.
4440
4441 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
4442
4443         * reflection.c: fix entry point patching (thanks Serge!).
4444
4445 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
4446
4447         * verify.c: add check for System.Exception
4448
4449 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
4450
4451         * image.c, class.c: minifix for code just c&p'ed.
4452         * reflection.c: warning fix.
4453         * object.h, loader.h, domain.c: load also StringBuilder.
4454
4455 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
4456
4457         * marshal.h, marshal.c: some support code to handle complex marshaling.
4458
4459 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4460
4461         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
4462         Better signatures with vtable error dump.
4463
4464 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
4465
4466         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
4467
4468 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
4469
4470         * icall.c (ves_icall_Type_GetField): impl.
4471
4472 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4473
4474         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
4475         to retrieve a marshal description blob for a field or param.
4476
4477 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
4478
4479         * reflection.h, reflection.c: change order of nested type emission
4480         to avoid table corruption. The NestedTypes table is sorted.
4481         * icall.c: change order of GetConstructor results to workaround mcs bug.
4482
4483 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
4484
4485         * reflection.h, reflection.c: handle field and param marshal
4486         information.
4487
4488 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
4489
4490         * icall.c, marshal.c marshal.h: more Marshal class implementation.
4491
4492 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4493
4494         * reflection.c: fix call convention.
4495
4496 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4497
4498         * reflection.h, reflection.c: mono_image_get_memberref_token()
4499         takes a type instead of a class, now. Added
4500         mono_image_get_array_token() to create tokens for the special
4501         multi-dim array methods.
4502
4503 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
4504
4505         * assembly.c: handle modules (no assembly table). Split
4506         loading references in its own function.
4507         * class.c: handle moduleref resolution scope.
4508         * image.c, image.h: cache module name in image.
4509
4510 2002-06-07  Martin Baulig  <martin@gnome.org>
4511
4512         * reflection.c (mono_image_get_type_info): Only add a class layout entry
4513         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
4514
4515 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
4516
4517         * icall.c: more signature fixes that used uint instead of int.
4518
4519 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4520
4521         * reflection.c: fixed signature of field refs.
4522
4523 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
4524
4525         * class.c, reflection.c: handle typerefs of nested types
4526         (both on read and when writing files).
4527
4528 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
4529
4530         * icall.c: fix method signatures that tried to workaround the previous
4531         typo, d'oh!
4532
4533 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
4534
4535         * debug-helpers.c: fix typo.
4536
4537 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
4538
4539         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
4540         rewrote the PE/COFF writing code (our programs are understood by the
4541         ms runtime, now).
4542
4543 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
4544
4545         * gc.c, gc.h, icall.c: weakreference support.
4546
4547 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4548
4549         * Makefile.am, mono-config.c: use $(sysconfdir).
4550
4551 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
4552
4553         * icall.c: changed default precision of Double.ToString() to 15.
4554         Fixed memory leak. Unified with Single.ToString.
4555
4556 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
4557
4558         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
4559
4560 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
4561
4562         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
4563         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
4564         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
4565         and myself.
4566
4567 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
4568
4569         * debug-symfile.c, sysmath.c: yet more compilation fixes.
4570
4571 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4572
4573         * reflection.c, socket-io.c: more compilation fixes.
4574
4575 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
4576
4577         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
4578         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
4579         unicode.c: warning and compiler compatibility fixes.
4580
4581 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
4582
4583         * class.h, metadata.c: fixed warnings/compilation errors.
4584
4585 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
4586
4587         * Makefile.am, mono-config.c, mono-config.h: configuration file
4588         support routines.
4589         * loader.c, loader.h: make Dll mapping configurable at runtime in the
4590         config file. Export methods to insert and lookup mappings.
4591
4592 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
4593
4594         * reflection.c: handle types and boxed objects in custom attr
4595         constructors.
4596
4597 2002-05-30  Martin Baulig  <martin@gnome.org>
4598
4599         * debug-symfile.c
4600         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
4601
4602 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
4603
4604         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
4605         to lookup the implmap row for a P/Invoke method.
4606         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
4607         P/Invoke method from the runtime on an as needed basis.
4608
4609 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
4610
4611         * metadata.c (mono_metadata_parse_signature): impl.
4612
4613 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
4614
4615         * class.c: handle .pack directive.
4616
4617 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
4618
4619         * object.c: initialize static fields with RVA data.
4620
4621 2002-05-25  Martin Baulig  <martin@gnome.org>
4622
4623         * debug-symfile.c
4624         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
4625
4626 2002-05-24  Martin Baulig  <martin@gnome.org>
4627
4628         * debug-symfile.c
4629         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
4630         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
4631         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
4632
4633 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
4634
4635         * object.c: special case string ctros in invoke.
4636         * gc.c: silly whitespace changes.
4637
4638 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
4639
4640         * threadpool.[ch]: impl. a threadpool that can
4641         be used by mint and mono.
4642
4643 2002-05-22  Martin Baulig  <martin@gnome.org>
4644
4645         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
4646         The first argument is now a `MonoReflectionModuleBuilder *', the return
4647         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
4648         `methods' field to get the method builder.  The `token' argument is the
4649         unfixed token.
4650
4651         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
4652         invalid characters instead of g_assert_not_reached()ing.  This seems
4653         to be the behaviour of mscorlib.
4654
4655 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
4656
4657         * object.c (mono_runtime_invoke_array): applied patch from Rachel
4658         Hestilow to fix bug #25104
4659
4660 2002-05-21  Martin Baulig  <martin@gnome.org>
4661
4662         * debug-symfile.c (mono_debug_find_source_location): New function.
4663         Looks up an IL offset in the line number table and returns the source
4664         location as a string.
4665
4666 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4667
4668         * icall.c:
4669         (mono_double_ToStringImpl): changed %f by %g until we have something
4670         better.
4671
4672 2002-05-21  Nick Drochak  <ndrochak@gol.com>
4673
4674         * icall.c : Use different name for Math.Pow's icall.  Needed to check
4675         parameters first in C#.
4676
4677 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
4678
4679         * icall.c, reflection.h: added icall to get info about an event.
4680
4681 2002-05-20  Radek Doulik  <rodo@ximian.com>
4682
4683         * object.c (mono_value_box): don't use memcpy for boxing on BIG
4684         endian
4685         (mono_value_box): don't use memcpy for small sizes on
4686         architectures with unaligned access
4687
4688 2002-05-20  Martin Baulig  <martin@gnome.org>
4689
4690         * reflection.c (mono_reflection_setup_internal_class): Don't crash
4691         if `tb->parent == NULL'.
4692         (mono_reflection_create_internal_class): New function.  This is
4693         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
4694         for enum types.
4695
4696         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
4697         New interncall.
4698
4699 2002-05-19  Martin Baulig  <martin@gnome.org>
4700
4701         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
4702         argument to get the length, don't default to the array length.
4703
4704 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
4705
4706         * assembly.c (mono_assembly_setrootdir): New function used to
4707         override the MONO_ASSEMBLIES directory.
4708
4709 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
4710
4711         * icall.c: ValueType_GetHashCode() initialize local var.
4712
4713 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
4714
4715         * reflection.c: sort custom attributes table.
4716
4717 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
4718
4719         * reflection.c: support named args in custom attributes (write support).
4720
4721 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
4722
4723         * reflection.c: fix finally position calculation.
4724
4725 2002-05-15  Radek Doulik  <rodo@ximian.com>
4726
4727         * reflection.c: fixed endianess at many places
4728
4729         * icall.c (ves_icall_InitializeArray): comment out debug msg
4730
4731 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
4732
4733         * object.c (mono_unhandled_exception): new function to handle
4734         unhandled exceptions.
4735         (mono_unhandled_exception): call the UnhandledException event.
4736         (mono_runtime_delegate_invoke): impl.
4737
4738 Wed Ma
4739         * object.c (mono_runtime_invoke_array) : handle null in params
4740
4741 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
4742
4743         * string-icalls.c: fixed bug in split (one off bug)
4744
4745 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
4746
4747         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
4748         * icalls.c: added String::Equals as internal method
4749
4750 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
4751
4752         * threads.c: fixed bug in the double interlocked functions
4753
4754 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
4755
4756         * threads.c: implemented all of the new interlocked icalls.
4757         * string-icalls.c: fix a bug in insert.
4758         * icalls.c: added the icalls for interlocked, removed old string functions.
4759         
4760 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
4761
4762         * loader.c: fix off-by-one error when reading argument names.
4763
4764 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
4765
4766         * profiler.c: win32 counter implementation (untested).
4767         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
4768         (the latter needs testing and more complete impl. from win32 folks).
4769
4770 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
4771
4772         * object.c: mono_array_new_full workaround mono_array_class_get
4773         problem.
4774
4775 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
4776
4777         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
4778         * object.h (mono_string_chars): Changed casting type.
4779
4780 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
4781
4782         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
4783                            method signatures to use gunichar2 instead of gint16.
4784
4785 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
4786
4787         * object.h, object.c: domain-specific versions of mono_object_new and
4788         mono_array_new.
4789
4790 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
4791
4792         * object.c: changed String layout
4793
4794         * string-icalls.c (mono_string_Internal_ctor_chara): added
4795         internal string constructors.
4796
4797 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
4798
4799         * threads.c: pass 'this' to the thread start routine.
4800
4801 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4802
4803         * string-icalls.c: fix IndexOf and LastIndexOf. Now
4804         InternalCompareStr don't call twice mono_string_cmp_char for the last
4805         character. Improved performance in mono_string_cmp_char.
4806
4807 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
4808
4809         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
4810         code into its own library: libmonoruntime.
4811
4812 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
4813
4814         * object.h, object.c: changed array format so that szarrays do not
4815         require a bounds structure.
4816         * icall.c, appdomain.c: support for new szarray format.
4817
4818 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
4819
4820         * metadata.c: compare also the retuns type when comparing signatures:
4821         we didn't do this as an optimization since really overloaded methods
4822         must differ also in the arguments, but this doesn't work with
4823         low-level IL code (or when using explicit conversion operators: see
4824         bug#23498 for an example).
4825
4826 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
4827
4828         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
4829
4830 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
4831
4832         * icall.c: make MonoType::GetElementType its own icall.
4833
4834 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
4835
4836         * icall.c: remove MonoMethod_get_Name().
4837         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
4838         object.
4839
4840 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
4841
4842         * string-icalls.c: optimized a few methods.
4843
4844 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
4845
4846         * icall.c: added all new string internal calls
4847         * string-icalls.c: added, new string internal call implementation.
4848         * object.c: added mono_string_new_size for allocating a string a size
4849
4850 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
4851
4852         * object.c (mono_object_isinst): use the same code as in the
4853         optimized x86 version.
4854
4855 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
4856
4857         * profiler.c: TSC-based timer code (f
4858
4859 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
4860
4861         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
4862         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
4863
4864 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
4865
4866         * assembly.h: fix function prototype.
4867         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
4868         * mono-endian.h: use const cast.
4869
4870 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
4871
4872         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
4873
4874 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
4875
4876         * loader.c: don't assert when a typeref can't be loaded, give
4877         a chance to the runtime to trow an exception instead.
4878         * loader.h: fix warning.
4879
4880 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
4881
4882         * class.c (mono_class_proxy_vtable): added proxy support
4883
4884 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
4885
4886         * icall.c: removed last of PAL calls, added System.Environment
4887         * file-io.h, file-io.c: MonoIO implementation
4888         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
4889
4890 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
4891
4892         * appdomain.c: do not use the byte marker in ldstr table lookup.
4893         * debug-helpers.c: allow two ':' to separate class and method name.
4894         * object.c: allocate arrays bounds with the GC, too.
4895         * verify: add a few more checks.
4896
4897 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
4898
4899         * reflection.c: output also literal strings. Allocate parameter data
4900         with GC_malloc() (thanks, Martin, for catching this!).
4901
4902 2002-03-26  Martin Baulig  <martin@gnome.org>
4903
4904         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
4905         include the `this' offset in the `param_offsets'.
4906
4907 2002-03-25  Martin Baulig  <martin@gnome.org>
4908
4909         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
4910         mono_debug_get_class() function to get the classes. Added new
4911         relocation types for arrays and strings.
4912         (mono_debug_get_class): New static function to search in all
4913         referenced assemblies for a metadata token.
4914
4915         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
4916
4917 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
4918
4919         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
4920         hold gc-allocated objects. Make the string heap a stream like the
4921         others. Removed duplicated code when writing stream info.
4922         Added asserts to catch possible buffer overflows. Set the sorted map
4923         for tables that need sorting. Added some documentation.
4924
4925 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
4926
4927         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
4928         for interned strings and vtables.
4929
4930 2002-03-24  Martin Baulig  <martin@gnome.org>
4931
4932         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
4933         it in the array since it was created with g_slist_prepend().
4934
4935 2002-03-24  Martin Baulig  <martin@gnome.org>
4936
4937         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
4938         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
4939         (mono_debug_method_from_token): Renamed to
4940         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
4941         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
4942
4943         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
4944         relocation types.
4945
4946         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
4947
4948 2002-03-24  Martin Baulig  <martin@gnome.org>
4949
4950         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
4951         (mono_debug_method_from_token): New func.
4952
4953         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
4954         New interncall, calls mono_debug_local_type_from_signature().
4955         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
4956         calls mono_debug_method_from_token().
4957
4958 2002-03-23  Martin Baulig  <martin@gnome.org>
4959
4960         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
4961         specifies the number of bytes to be converted, not the array size.
4962         Return the number of chars, not the number of bytes.
4963         (ves_icall_iconv_get_chars): The `byteCount' argument
4964         specifies the number of bytes to be converted, not the array size.
4965
4966 2002-03-23  Martin Baulig  <martin@gnome.org>
4967
4968         * reflection.h (MonoReflectionSigHelper): New type.
4969
4970         * reflection.c (mono_reflection_sighelper_get_signature_local),
4971         (mono_reflection_sighelper_get_signature_local): New functions.
4972
4973         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
4974         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
4975         interncalls.
4976
4977 2002-03-23  Martin Baulig  <martin@gnome.org>
4978
4979         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
4980         is_writeable is set.
4981         (mono_raw_buffer_update): New function to write the modified map
4982         back to disk.
4983
4984         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
4985
4986         * debug-symfile.c (mono_debug_update_symbol_file): Call
4987         mono_raw_buffer_update() when done writing.
4988
4989 2002-03-23  Martin Baulig  <martin@gnome.org>
4990
4991         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
4992
4993         * debug-symfile.c: Added support for arguments and local variables.
4994
4995 2002-03-23  Dick Porter  <dick@ximian.com>
4996
4997         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
4998         protected by ifdefs, hence breaking the w32 build.
4999
5000 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5001
5002         * object.c: implement is_interned() the right way.
5003
5004 2002-03-21  Martin Baulig  <martin@gnome.org>
5005
5006         * debug-symfile.[ch]: New files to handle debugging information
5007         files. There's also support to dynamically update these symbol
5008         files to include machine dependent information.
5009
5010 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
5011
5012         * threads.c (mono_thread_create): new function to create thread
5013         from C
5014
5015 2002-03-20  Martin Baulig  <martin@gnome.org>
5016
5017         * icall.c (ves_icall_InternalInvoke): Create a new object if the
5018         method is a constructor.
5019         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
5020         points to ves_icall_InternalInvoke().
5021
5022 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
5023
5024         * file-io.c: Flush shouldn't throw exceptions.
5025
5026 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
5027
5028         * file-io.c: FileStream flush support; FileSetLength now
5029         restores file pointer.
5030
5031 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
5032
5033         * class.c: set image for pointer classes.
5034
5035 2002/03/19  Nick Drochak <ndrochak@gol.com>
5036
5037         * sysmath.c: Forgot one.
5038
5039 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
5040
5041         * sysmath.c: Avoid redefining existing names.
5042
5043 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
5044
5045         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
5046         handled by runtime as icall rather than dllimport from libm.so
5047         * file-io.c, file-io.h: fixed handle argument type.
5048
5049 2002-03-18  Dick Porter  <dick@ximian.com>
5050
5051         * reflection.c (mono_image_get_type_info): rename interface to
5052         iface, because of "#define interface struct" on windows.
5053
5054 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
5055
5056         * class.c, class.h: rename and export mono_ptr_class_get().
5057         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
5058         * reflection.c, reflection.h, icall.c: better/saner type name
5059         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
5060         method signatures.
5061
5062 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
5063
5064         * class.c (mono_class_init): removed hardcoded GHC_SLOT
5065
5066         * icall.c (ves_icall_InternalInvoke): impl.
5067
5068 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
5069
5070         * reflection.c: output the interface map table, too.
5071
5072 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
5073
5074         * class.c (class_compute_field_layout): separate computation of 
5075         static field layout
5076
5077 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
5078
5079         * icall.c: added System.Buffer support.
5080         * file-io.c: moved file icalls from PAL to FileStream.
5081
5082 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
5083
5084         * icall.c (ves_icall_System_Object_GetHashCode): impl.
5085
5086 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
5087
5088         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
5089
5090 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5091
5092         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
5093
5094 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
5095
5096         * debug-helpers.{c,h}: moved here from monograph some useful functions
5097         to locate a method by name/signature in a class or image. Included
5098         also a small and flexible IL disassembler.
5099
5100 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
5101
5102         * reflection.c: fixup tokens in methods with small header size, too.
5103
5104 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
5105
5106         * object.c (mono_string_to_utf8): remove assert(!error), instead
5107         print a warning. 
5108
5109 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
5110
5111         * icall.c: update to the new mono_Array_class_get interface.
5112
5113 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
5114
5115         * appdomain.c, object.c: Boehm-GC enable.
5116         * icall.c: make get_data_chunk() support split data requests.
5117         Ensure a class is initialized in more cases. Return only the first
5118         property found in GetProperties() or the compiler gets confused. 
5119         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
5120         * reflection.h, reflection.c: add fixup mechanism for field and method
5121         tokens. Initialize assembly->typeref in a single place. Output
5122         properties after events. Support custom attributes for events, too.
5123         Typo fix for paramter custom attrs.
5124
5125 2002-03-07  Martin Baulig  <martin@gnome.org>
5126
5127         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
5128
5129 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
5130
5131         * class.c (mono_array_class_get): fix. for multi. dim. arrays
5132
5133 2002-03-06  Martin Baulig  <martin@gnome.org>
5134
5135         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
5136         non-zero lower bounds. See testcases #F10-#F13.
5137
5138 2002-03-05  Martin Baulig  <martin@gnome.org>
5139
5140         * exception.c (mono_get_exception_argument_out_of_range): New exception.
5141
5142         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
5143         ves_icall_System_Array_GetValue(), only calculate the absolute array position
5144         here.
5145         (ves_icall_System_Array_SetValue): Likewise.
5146         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
5147         as argument and does the actual work. This function is used when copying a
5148         multi-dimensional array.
5149         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
5150         now do all the widening conversions of value types.
5151         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
5152
5153 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5154
5155         * class.c: remove some magic numbers and use the smbolic names,
5156         instead. Added init_events() to load event info at class init time.
5157         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
5158         and mono_metadata_methods_from_event().
5159         * reflection.h, reflection.c: added support for writing out the evnets
5160         related information.
5161
5162 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
5163
5164         * reflection.h, icall.c: use a different method (GetInterfaces)
5165         to gather interface info and add isbyref, isprimitive and
5166         ispointer to the ves_icall_get_type_info() return value.
5167
5168 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
5169
5170         * class.h: stared adding support for events.
5171         * icall.c: split find_members implementation. Added debug icall to get
5172         the address of an object.
5173         * reflection.c: handle TypeBuilders in mono_type_get_object().
5174
5175 2002-03-01  Martin Baulig  <martin@gnome.org>
5176
5177         * icall.c (ves_icall_System_Array_GetLength): This must throw an
5178         ArgumentOutOfRangeException(), not an ArgumentException().
5179         (ves_icall_System_Array_GetLowerBound): Likewise.
5180         (ves_icall_System_Array_GetValue): Improved argument checking.
5181         (ves_icall_System_Array_SetValue): Improved argument checking.
5182
5183 2002-03-01  Martin Baulig  <martin@gnome.org>
5184
5185         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
5186         called with invalid arguments rather than just dying with g_assert().
5187         (ves_icall_System_Array_SetValue): Likewise.
5188         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
5189         raise a NotImplementedException instead.
5190         (ves_icall_System_Array_GetLength): Added argument checking.
5191         (ves_icall_System_Array_GetLowerBound): Added argument checking.
5192
5193 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
5194
5195         * object.h (mono_assert): new macros mono_assert and
5196         mono_assert_not_reached
5197
5198 2002-02-28  Martin Baulig  <martin@gnome.org>
5199
5200         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
5201         and "System::String::IsInterned" to "System::String::_IsInterned".
5202
5203 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
5204
5205         * icall.c: remove hacks for typebuilder. Added icall to create a
5206         modified type from a tybebuilder.
5207         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
5208         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
5209         to create a backing MonoClass for a TypeBuilder.
5210
5211 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
5212
5213         * class.c, class.h: more refactoring of class init.
5214         Export mono_class_setup_mono_type() and mono_class_setup_parent().
5215
5216 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
5217
5218         * marshal.c, marshal.h: start of marshaling interface.
5219
5220 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
5221
5222         * icall.c: fix order in assembly qualified name icall.
5223
5224 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
5225
5226         * class.c: do not free str, since we store it in the hash table.
5227         * reflection.h: add label field to MonoILExceptionInfo.
5228         * reflection.c: handle references to more than one assembly. Handle
5229         case when there isn't a module created in the assembly.
5230
5231 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
5232
5233         * class.c: Fix typo. Start refactoring of class init code.
5234
5235 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
5236
5237         * appdomain.c: exit with 1 on error.
5238         * class.c: we already have the name in MonoClassField.
5239         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
5240         MonoStreamHeader instead of an offset of image->raw_metadata.
5241
5242 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
5243
5244         * appdomain.c (mono_init): Be even more descriptive about the error.
5245
5246 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
5247
5248         * appdomain.c: give the user an informative message when corlib can't
5249         be loaded.
5250
5251 2002-02-26  Martin Baulig  <martin@gnome.org>
5252
5253         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
5254         New icall to get the time zone data.
5255
5256 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
5257
5258         * reflection.c: set virtual and raw size of section correctly.
5259         * threads.c: transfer domain information to newly created threads.
5260
5261 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
5262
5263         * class.c: when instancing a class in a domain, load the default
5264         vaules for static fields from the constant table. Fix System.Enum to
5265         not be an enum.
5266         * icall.c: implement Object::GetType() internalcall. Implemented
5267         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
5268         Fixed checking of binding flags in find_members().
5269         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
5270         * reflection.c: handle enumerations when writing to the constant
5271         table. Use a different object cache for types.
5272
5273
5274 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
5275
5276         * object.c (mono_object_isinst): fix for arrays
5277
5278         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
5279
5280 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
5281
5282         * object.c: don't use mprotect ()  and fix intern pool hash table
5283         lookup for big endian systems.
5284
5285 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
5286
5287         * icall.c: change type_is_subtype_of () signature.
5288
5289 2002-02-21  Mark Crichton  <crichton@gimp.org>
5290
5291         * rand.c, rand.h: Added random number generator for
5292         System.Security.Cryptography classes.
5293
5294         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
5295
5296         * icall.c: Added System.Security.Cryptography calls.
5297
5298 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
5299
5300         * class.c, icall.c, metadata.c: better support for pointer types.
5301         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
5302         * reflection.c: Add support for getting custom attrs for properties
5303         and simplify some code.
5304
5305 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
5306
5307         * icall.c: change getToken () and add custom attribute GetBlob()helper
5308         method.
5309         * reflection.h: add custom attrs array to the reflection builder structures.
5310         * reflection.c: encode and emit custom attributes for all the relevant
5311         reflection objects. Cache fieldref and methodref tokens. Change
5312         mono_image_create_token() interface to take a MonoDynamicAssembly.
5313         More complete custom attributes decoder. Load custom attributes for
5314         Assembly, Field, Method and Constructor objects, too. Make the
5315         returned array an Attribute[] one, not object[]. Added
5316         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
5317         custom attribute constructor.
5318
5319 2002-02-20  Dick Porter  <dick@ximian.com>
5320
5321         * icall.c:
5322         * rawbuffer.c:
5323         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
5324         problem code out for now).
5325
5326 2002-02-19  Radek Doulik  <rodo@ximian.com>
5327
5328         * object.c (mono_ldstr): use hash table to avoid multiple swapping
5329
5330 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
5331
5332         * icall.c: register the GetCustomAttributes method.
5333         * object.c, object.h: add mono_string_new_len ().
5334         * reflection.h, reflection.c: added mono_runtime_invoke(),
5335         mono_install_runtime_invoke(). Added
5336         mono_reflection_get_custom_attrs () to load custom attributes and
5337         create the attribute objects.
5338
5339 2002-02-19  Dick Porter  <dick@ximian.com>
5340         * threads-dummy-types.c:
5341         * threads-dummy-types.h:
5342         * threads-dummy.c:
5343         * threads-dummy.h:
5344         * threads-pthread-types.c:
5345         * threads-pthread-types.h:
5346         * threads-pthread.c:
5347         * threads-pthread.h:  Deleted obsolete files
5348
5349 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
5350
5351         * class.c (mono_class_vtable): runtime init the class when we
5352         allocate static class data.
5353
5354         * icall.c (ves_icall_System_Array_SetValue): check for null values.
5355
5356         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
5357         and String - but we will need generic marshalling support in the
5358         future. 
5359         (mono_init): set the domain name in a ms compatible way
5360
5361         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
5362         String[].
5363
5364 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
5365
5366         * object.c (mono_array_clone): use alloca() instead of g_malloc  
5367         for sizes
5368
5369         * appdomain.c (mono_domain_unload): impl.
5370
5371 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
5372
5373         * appdomain.c, object.c: fix intern pool implementation.
5374         * class.c: fix alignment code.
5375
5376 2002-02-16  Radek Doulik  <rodo@ximian.com>
5377
5378         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
5379         and s2 > s1, just copy lower bytes to be compatible with little
5380         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
5381         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
5382
5383         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
5384         force big_endian to be 1 for big endian machines 
5385         (ves_icall_iconv_new_decoder): ditto
5386
5387 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
5388
5389         * socket-io.c (convert_sockopt_level_and_name): If the system
5390         doesn't define SOL_IP or SOL_TCP, get them by hand using
5391         getprotobyname() and caching the values (because this could be a
5392         slow operation).
5393         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
5394         Use the appropriate struct when the system does support it. Ie,
5395         not all systems have struct ip_mreqn so use struct ip_mreq when
5396         appropriate.
5397
5398 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
5399
5400         * reflection.c: handle finally clauses.
5401
5402 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
5403
5404         * socket-io.c: use g_snprintf() instead of snprintf.
5405
5406 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
5407
5408         * reflection.c (mono_param_get_objects): Cast second argument to
5409         mono_method_get_param_names to a const char** to silence the
5410         compiler warning.
5411
5412         * appdomain.c (mono_domain_assembly_open): Put parens around the
5413         truth statement in the for-loop.
5414
5415         * unicode.c (iconv_convert): Got rid of a compiler warning about
5416         int i being unused when the system has a new iconv.
5417         (iconv_get_length): Same.
5418
5419         * image.c (load_class_names): Cast the second argument to
5420         g_hash_table_insert() to char* to hush compiler warnings about the
5421         arg being a const.
5422         (mono_image_open): Same here.
5423
5424         * socket-io.c: Don't conditionally include sys/filio.h or
5425         sys/sockio.h here anymore since we now get them from
5426         io-layer/io-layer.h
5427         (inet_pton): If the system doesn't support inet_aton, implement
5428         using inet_addr and also #define INADDR_NONE if it isn't defined
5429         by the system.
5430
5431 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
5432
5433         * metadata.c, metadata.h: added function to get packing and size info
5434         of a typedef.
5435         * reflection.h, reflection.c: handle field RVA data. Save info about
5436         the table layout if needed. Assign typedef indexes to all the types
5437         before dumping the info about them to avoid forward reference problems.
5438
5439 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
5440
5441         * socket-io.c (convert_sockopt_level_and_name): ifdef
5442         SO_ACCEPTCONN because it is not defined on my system (old debian)
5443
5444 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
5445
5446         * opcode.c: use stddef.h to get NULL.
5447
5448 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
5449
5450         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
5451         for FIONBIO, FIONREAD and SIOCATMARK.
5452         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
5453         define INADDR_NONE and besides, inet_addr() is deprecated and
5454         should not be used. Use inet_pton() instead - it also has the
5455         added bonus that it can easily handle IPv6 addresses as well.
5456         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
5457
5458 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
5459
5460         * decimal.c: remove _MSC_VER conditional.
5461
5462 2002-02-13  Dick Porter  <dick@ximian.com>
5463
5464         * socket-io.c: 
5465         * icall.c: Internal calls for Blocking, Select, Shutdown,
5466         GetSocketOption and SetSocketOption
5467
5468 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5469
5470         * assembly.cs: better resolver: use it instead of some kludgy
5471         code.
5472
5473 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
5474
5475         * reflection.c: the best way to speed-up the compiler is to avoid
5476         infinite loops.
5477
5478 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
5479
5480         * class.c (mono_class_vtable): changed the object layout
5481         (obj->vtable->class). 
5482         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
5483
5484 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5485
5486         * assembly.c: look for assemblies in the assembly dir, too.
5487
5488 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5489
5490         * class.c: fix thinko in mono_class_from_type().
5491
5492 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
5493
5494         * exception.h, exception.c: added TypeLoadException.
5495         * object.h, object.c: added mono_array_clone ().
5496         * icall.c: handle throwOnError in AssemblyGetType().
5497         Added Array.Clone().
5498         * opcode.h, opcode.c: use a single value for the opcode val.
5499         Compile fix for non-gcc compilers.
5500
5501 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
5502
5503         * opcodes.c, opcodes.h: export interesting info about opcodes.
5504
5505 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
5506
5507         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
5508         icalls. 
5509
5510         * class.c (class_compute_field_layout): set element_class for enums
5511         (mono_class_create_from_typedef): set element_class for normal classes
5512
5513         * icall.c (ves_icall_System_Enum_get_value): impl.
5514
5515         * class.c (mono_class_create_from_typedef): do not set valuetype
5516         flag for System.ValueType and System.Enum
5517
5518 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
5519
5520         * unicode.c (iconv_convert): fix big endian problem.
5521
5522 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
5523
5524         * class.c: add asserts if we are ever going to scribble over memory.
5525         * socket-io.c: not all systems have AF_IRDA defined.
5526
5527 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
5528
5529         * class.c (class_compute_field_layout): do not consider static
5530         fields to compute alignment
5531
5532 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
5533
5534         * appdomain.c (mono_appdomain_get): impl.
5535         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
5536
5537 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
5538
5539         * icall.c: ignore "file://" prefix when loading an assembly.
5540
5541 2002-01-23  Dick Porter  <dick@ximian.com>
5542
5543         * socket-io.c:
5544         * icall.c:
5545         * Makefile.am: Added socket support
5546
5547 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
5548
5549         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
5550         code back.  This should return the assemblies that are loaded by
5551         the runtime on behalf of an application domain. 
5552
5553         The current implementation is still broken, it just returns every
5554         assembly loaded, but until we get real applications domain this
5555         will do.
5556
5557 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
5558
5559         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
5560         AppDomain object.
5561
5562 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
5563
5564         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
5565         the mono_class_from_name lookup.
5566         (ves_icall_get_parameter_info): ditto.
5567         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
5568         method.
5569         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
5570
5571 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
5572
5573         * class.c: load also nested classes on class init.
5574         System.ValueType instance methods gets passed boxed
5575         values, unless methods in derived classed that get a pointer to the
5576         data.
5577         * icall.c: use better name parsing code in GetType().
5578         * image.c, image.h: add mono_image_loaded ().
5579         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
5580         * reflection.c, reflection.h: added mono_reflection_parse_type().
5581
5582 2002-01-22  Veronica De Santis <veron78@interfree.it>
5583
5584         * icall.c : Added mapping of internal calls for Manual and Auto reset events
5585         * threads.c : Added the implementation of internal calls for events
5586         * threads.h : Added prototypes of internal calls for events
5587         
5588 2002-01-21  Radek Doulik  <rodo@ximian.com>
5589
5590         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
5591
5592 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
5593
5594         * class.c (mono_class_init): set min_align to 1 (instead of 0)
5595         (mono_class_value_size): use min_align
5596
5597 2002-01-20  Dick Porter  <dick@ximian.com>
5598
5599         * threads.h:
5600         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
5601         so it compiles on w32.
5602
5603 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
5604
5605         * metadata.c (mono_type_stack_size): impl.
5606
5607         * class.c (mono_class_get_field): impl. memberref token
5608
5609 2002-01-16 Veronica De Santis <veron78@@interfree.it>
5610
5611         * icall.h : Added the internal calls mapping for CreateMutex_internal
5612                     and ReleaseMutex_internal.
5613         * threads.h : Added the prototype of mutexes internal calls.
5614         * threads.c : Added the implementations of mutexes internal calls.
5615
5616 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
5617
5618         * metaparse.h: removed unused file.
5619         * reflection.c, reflection.h: added stream_data_align () function 
5620         to align data in streams and keep stream aligned. Add support for
5621         exception support in method headers.
5622
5623 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
5624
5625         * unicode.c: make iconv_convert () return the number of bytess written
5626         in the output buffer.
5627
5628 2002-01-15  Dick Porter  <dick@ximian.com>
5629         * threads.c: Make the runtime's idea of infinite timeouts coincide
5630         with the class library's
5631
5632         Fix a particularly egregious bug in mono_thread_cleanup(). That
5633         code was so utterly bogus it must have been written on a Monday.
5634
5635 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
5636
5637         * reflection.h: add subtypes field to TypeBuilder.
5638         * reflection.c: encode constants for literal fields.
5639         Handle subtypes. Fix user string token (and add a zero byte)
5640         at the end.
5641         
5642 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
5643
5644         * class.c (mono_class_init): bug fix: assign slot numbers for
5645         abstract methods.
5646
5647 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5648
5649         * reflection.c: don't try to output a code RVA for abstract methods.
5650         Small fixes for method header format. Output parameter info to the
5651         ParamDef table. Save method overriding info to MethodImpl table.
5652         Fix property support. Allow typedef.extends to be a type in the
5653         building assembly.
5654         * verify.c: fix off-by-one error.
5655
5656 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
5657
5658         * class.c: fix mono_class_from_mono_type () for szarray types.
5659         Remove unused cache check in mono_class_from_type_spec().
5660         * icall.c: *
5661         mono_method_get_object(), mono_field_get_object(): methods to return
5662         objects that parallel the C representation of assemblies, types,
5663         methods, fields.
5664
5665 2001-12-11  Dick Porter  <dick@ximian.com>
5666
5667         * icall.c:
5668         * file-io.c: Internal calls for file IO.
5669
5670 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
5671
5672         * tabledefs.h: missing FileAttributes.
5673         * verify.h, verify.c: use is_valid_string () to simplify and check for
5674         valid strings more correctly. Fix warnings and speeling.
5675         Check more tables: Filed, File, ModuleRef, StandAloneSig.
5676         Check code: branches, maxstack, method calls.
5677
5678 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
5679
5680         * object.c (mono_object_allocate): removed static, so that the jit
5681         can allocate value types.
5682
5683         * icall.c (ves_icall_System_DateTime_GetNow): impl.
5684
5685 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
5686
5687         * class.c: init enum types right away and register the
5688         token->MonoClass map in mono_class_create_from_typedef ().
5689         * verify.h, verify.c: first cut of the verifier.
5690         * pedump.c: add --verify switch to verify metadata tables.
5691         * tabledefs.h: add some missing enums.
5692
5693 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
5694
5695         * class.c (mono_install_runtime_class_init): impl.
5696         (mono_class_init): renamed mono_class_metadata_init to
5697         mono_class_init, also removed the metadata_inited flag
5698
5699         * object.c (mono_object_isinst): use faster algorithm
5700
5701 2001-11-30  Radek Doulik  <rodo@ximian.com>
5702
5703         * mono-endian.h: reverted last change
5704         added function prototypes
5705
5706         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
5707         add mono-endian.c back
5708
5709         * mono-endian.c: returned back, as Paolo pointed out, it's needed
5710         for unaligned access, I've mistaked it with endianess. I am
5711         sorry.
5712         (mono_read16): fix reverted endianess
5713         (mono_read64): ditto
5714         (mono_read32): ditto
5715
5716 2001-11-30  Dick Porter  <dick@ximian.com>
5717
5718         * exception.c: Implement mono_exception_from_name()
5719
5720 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
5721
5722         * metadata.h, metadata.c: remove params_size and locals_size and their
5723         calculation from the metadata code: they are only usefult to the
5724         interp.
5725
5726 2001-11-29  Radek Doulik  <rodo@ximian.com>
5727
5728         * object.c (mono_ldstr): swap bytes here, it's probably not the
5729         best place, but works for me now, I'll redo it once I know mono
5730         better, also note that I add PROT_WRITE and don't reset back, also
5731         note that it's only affects big endians, so x86 should be OK
5732
5733         * mono-endian.h (read16): use just glib macros for both endians
5734
5735         * mono-endian.c: removed as glib macros are used in in
5736         mono-endian.h so we don't need to care about endianess for read
5737         macros as glib does that for us already
5738
5739 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
5740
5741         * class.h, class.h: take minimum alignment into consideration so
5742         that the fields of a class remain aligned also when in an array.
5743
5744 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
5745
5746         * loader.h, loader.c: add mono_method_get_param_names().
5747         * class.c: 0-init class fields.
5748
5749 2001-11-26  Dick Porter  <dick@ximian.com>
5750
5751         * icall.c:
5752         * threads-types.h:
5753         * threads.c: New file that handles System.Threading on all platforms
5754
5755         * object.c: 
5756         * object.h: Remove the synchronisation struct from MonoObject,
5757         replace it with a pointer that gets initialised on demand
5758
5759         * Makefile.am: Replace all the system-specific threading code with
5760         a single file that uses the new wrapper library
5761
5762 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
5763
5764         * class.c, class.h: add mono_install_trampoline() so that the runtime
5765         can register a function to create a trampoline: removes the ugly
5766         requirement that a runtime needed to export arch_create_jit_trampoline.
5767         * object.h, object.c: added mono_install_handler() so that the runtime
5768         can install an handler for exceptions generated in C code (with
5769         mono_raise_exception()). Added C struct for System.Delegate.
5770         * pedump.c: removed arch_create_jit_trampoline.
5771         * reflection.c: some cleanups to allow registering user strings and
5772         later getting a token for methodrefs and fieldrefs before the assembly
5773         is built.
5774         * row-index
5775         ves_icall_set_method_body (), ves_icall_type_from_handle ().
5776         * image.c: properly skip unknown streams.
5777         * loader.h, loader.c: add type_class to mono_defaults.
5778         * metadata.c, metadata.h: export compute_size () as
5779         mono_metadata_compute_size () with a better interface.
5780         Typo and C&P fixes.
5781         * pedump.c: don't try to print the entry point RVA if there is no entry point.
5782         * reflection.c, reflection.h: many cleanups, fixes, output method
5783         signatures and headers, typedef and typeref info, compress the metadata
5784         tables, output all the heap streams, cli header etc.
5785         * row-indexes.h: typo fixes.
5786
5787 2001-10-04  Dick Porter  <dick@ximian.com>
5788
5789         * object.h: Add a synchronisation mutex struct to MonoObject
5790
5791         * object.c (mono_new_object): Initialise the object
5792         synchronisation mutexes
5793
5794         * icall.c: System.Threading.Monitor internal calls
5795         
5796         * threads-pthread.h:
5797         * threads-pthread.c: System.Threading.Monitor internal calls
5798
5799         * threads-types.h: New file, includes the system-specific thread
5800         structures
5801         
5802         * threads-pthread-types.h:
5803         * threads-pthread-types.c: New files, handle pthread-specific
5804         synchronisation types
5805
5806         * threads-dummy-types.h: 
5807         * threads-dummy-types.c: New files of dummy support for
5808         thread-specific types
5809
5810         * metadata.c:
5811         * image.c:
5812         * pedump.c: include mono-endian.h not endian.h
5813         
5814         * Makefile.am: More threads files.
5815         Name mono-endian.h not endian.h
5816
5817 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
5818
5819         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
5820         stuff and implement a few more bits.
5821         * icall.c: a field needs to be dereferenced twice. Do not use the same
5822         name for two variables in the same scope.
5823         * image.c, image.h: cleanups.
5824
5825 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
5826
5827         * class.c (mono_class_metadata_init): bug fix: compute the right size
5828
5829 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
5830
5831         * icall.c: implemented some of the Reflection internalcalls.
5832         * image.c, image.h: start writing out the PE/COFF image.
5833         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
5834         that does the reverse than decode_blob_size ().
5835         * object.c: use mono_metadata_encode_value (). Move here
5836         temporary implementation of mono_string_to_utf8 ().
5837         * rawbuffer.c: make malloc_map static.
5838
5839 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
5840
5841         * metadata.c: fix type comparison for arrays.
5842         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
5843         Added a couple of new classes to monodefaults.
5844         * icall.c: added a couple of Reflection-related internalcalls.
5845         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
5846         Added a byval_arg MonoType to MonoClass.
5847
5848 2001-09-28  Dick Porter  <dick@ximian.com>
5849
5850         * icall.c:
5851         * threads-pthread.h: 
5852         * threads-pthread.c: Implemented internal calls for
5853         LocalDataStoreSlot operations.  Applied mutexes around all shared
5854         data.  Reworked the thread creation and Start() operations to
5855         avoid a race condition.
5856         
5857         * threads-dummy.h:
5858         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
5859
5860 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
5861
5862         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
5863
5864 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
5865
5866         * class.c, loader.c: warn and return NULL instead of erroring out.
5867         * icall.c: added System.AppDomain::getCurDomain().
5868         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
5869
5870 2001-09-25  Dick Porter  <dick@ximian.com>
5871
5872         * threads-pthread.h:
5873         * threads-pthread.c: Implemented timed thread joining and added
5874         System.Threading.Thread::Join_internal internal call
5875
5876         * icall.c: Added System.Threading.Thread::Join_internal internal call
5877
5878         * threads-dummy.h:
5879         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
5880
5881 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
5882
5883         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
5884         mono_string_intern () to implement the semantics of the ldstr opcode
5885         and the interning of System.Strings.
5886         * icall.c: provide hooks to make String::IsIntern and String::Intern
5887         internalcalls.
5888
5889 2001-09-23  Dick Porter  <dick@ximian.com>
5890
5891         * threads-dummy.c: 
5892         * threads-dummy.h: New files of dummy threading routines
5893
5894         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
5895         support code based on system specifics
5896
5897         Rename PTHREAD_LIBS to THREAD_LIBS
5898         
5899 2001-09-23  Dick Porter  <dick@ximian.com>
5900
5901         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
5902         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
5903         internal calls.
5904         (mono_thread_init): Set up a Thread object instance to return when
5905         the main thread calls Thread.CurrentThread
5906         (mono_thread_cleanup): Wait for all subthreads to exit
5907
5908         * icall.c: New internal calls for System.Threading.Thread::Sleep
5909         (including Schedule) and CurrentThread
5910
5911         * threads.h: New file, to insulate thread-specific stuff from the
5912         rest of the code
5913
5914 2001-09-21  Dick Porter  <dick@ximian.com>
5915
5916         * threads-pthread.h: 
5917         * threads-pthread.c: New file, for handling pthreads-style
5918         threading support.  Start() now starts a new thread and executes
5919         the ThreadStart delegate instance.
5920
5921         * icall.c: Added the internalcall for
5922         System.Threading.Thread::Start_internal
5923
5924         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
5925
5926 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
5927
5928         * loader.c: work around the different signatures for delegates
5929         constructors csc generates in compiled code vs the ones compiled in mscorlib.
5930
5931 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
5932
5933         * class.h, class.c: add mono_class_get_field_from_name ().
5934         * *: Fix C comments and other ANSI C issues.
5935
5936 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
5937
5938         * endian.h, assembly.c: fix some endianness issues.
5939
5940 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
5941
5942         * loader.h, load.c: add delegate_class to mono_defaults.
5943         Handle runtime provided methods in mono_get_method ().
5944
5945 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
5946
5947         * loader.c (mono_get_method): use pinvoke for internal call
5948
5949         * icall.c: use pinvoke for internal call
5950
5951         * loader.c (method_from_memberref): set the method name
5952
5953 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
5954
5955         * metadata.c: help the compiler generate better code for
5956         mono_class_from_mono_type ().
5957
5958 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
5959
5960         * class.c (mono_class_metadata_init): delayed computing of the
5961         class size to mono_class_metadata_init ()
5962
5963 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
5964
5965         * class.c, class.h: add an interfaces member to MonoClass.
5966         * image.c, image.h: add assembly_name field to MonoImage
5967         from the assembly table.
5968         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
5969
5970 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
5971
5972         * class.c: Handle Array in mono_class_from_mono_type ().
5973         * metadata.c, pedump.c: some endian fixes.
5974
5975 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
5976
5977         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
5978         * metadata.c: fix small problem introduced with the latest commit.
5979
5980 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
5981
5982         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
5983         We don't need a MonoMetadata pointer anymore to compare signatures in
5984         mono_metadata_signature_equal (), update callers.
5985         Reduced memory usage an number of allocations for MonoMethodHeader and
5986         MonoMethodSignature.
5987
5988 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
5989
5990         * metadata.c: added compare for szarray.
5991
5992 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
5993
5994         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
5995         and add a couple more types to it and mono_defaults. Give an hint on
5996         classes that need implementing in our corlib and are referenced
5997         in mscorlib.
5998
5999 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
6000
6001         * class.h, class.c: keep track if a class is also an Enum.
6002         * loader.c: Implement a couple more types for use in libffi
6003         marshalling. Gives better diagnostics when failing to dlopen
6004         a library. Set method->klass for P/Invoke methods, too.
6005
6006 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
6007
6008         * class.c, class.h: add a MonoType this_arg to MonoClass that
6009         represents a pointer to an object of the class' type that
6010         can be used by the interpreter and later the type cache.
6011         Add best guess alignment info for valuetype objects.
6012
6013 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
6014
6015         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
6016         into MonoType: one less level of indirection and allocation and
6017         simplifies quite a bit of code. Added cache for MonoTypes that are
6018         used frequently, so that we don't need to allocate them all the time.
6019
6020 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
6021
6022         * class.c (mono_class_create_from_typedef): System.Enum is also a
6023         value type, although it does not derive from System.ValueType
6024         (maybe a bug in the ms compiler?)
6025
6026         * metadata.c (mono_type_size): return the right size for value types
6027
6028         * loader.c (mono_get_method): only initialize method header if not abstract
6029
6030         * class.c (mono_class_from_mono_type): use mono_default values. 
6031
6032 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
6033
6034         * *: use MonoClass pointers instead of <type_tokens>
6035         
6036         * class.h: new flag: metadata_inited.
6037
6038         * class.c (mono_class_metadata_init): impl.
6039         (mono_class_instance_size): impl.
6040         (mono_class_data_size): impl.
6041
6042 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
6043
6044         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
6045         MonoClass now has the name and name_space fields. 
6046         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
6047         mono_get_method () takes and optional MonoClass as argument.
6048         Removed mono_typedef_from_name() and added mono_class_token_from_name()
6049         instead that takes advantage of a map from class names to typedef
6050         tokens in MonoImage.
6051
6052 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
6053
6054         * metadata.c: zero is not a valid alignment boundary.
6055         Merge MONO_TYPE_VOID in default decoding code.
6056
6057 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
6058
6059         * image.h: merged MonoMetadata into MonoImage
6060
6061         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
6062         identify the type of elements.
6063
6064 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
6065
6066         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
6067         * cil-coff.h: split MonoMSDOSHeader and add size info.
6068         * image.c: add some consistency checks.
6069         * metadata.c: fix row size computation: one programmer
6070         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
6071         add explanation for the locator routine.
6072         Fix decoding of size in method header.
6073         
6074 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
6075
6076         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
6077         (g_concat_dir_and_file): Bring g_concat_dir_and_file
6078         function from gnome-libs.  This uses the right path separator
6079         based on the OS, and also works around a bug in some systems where
6080         a double slash is not allowed. 
6081         (default_assembly_name_resolver): Use g_concat_dir_and_file
6082         (mono_assembly_open): ditto.
6083
6084 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
6085
6086         * metadata.c (mono_metadata_signature_equal): impl.
6087
6088         * *: void is now a realy MonoType (instead of using NULL)
6089         
6090         * metadata.c (do_mono_metadata_parse_type): use
6091         mono_metadata_parse_type to parse void value.
6092
6093 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
6094
6095         * metadata.c, metadata.h: in the signature and method header store
6096         only the space required for holding the loca vars and incoming arguments.
6097
6098 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
6099
6100         * metadata.c (do_mono_metadata_parse_type): treat void like any
6101         other type (instead of assigning NULL);
6102
6103 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
6104
6105         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
6106
6107 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
6108
6109         * image.c (do_mono_image_open): added a cache for arrays.
6110
6111 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
6112
6113         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
6114         decode a single column from a row in a metadata table and change
6115         index in mono_metadata_locate(). Implement mono_get_method () to retreive
6116         all the info about a method signature and invocation. Remove check on
6117         uninitialized local var in parse_mh() and fix memory leak.
6118
6119 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
6120
6121         * metadata.h: More macros.
6122
6123         * tokentype.h: New file.
6124
6125 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
6126
6127         * assembly.c: added a consistency check and initialize
6128         some structures with g_new0().
6129         * metadata.c: fixed a couple more bugs in table size computation
6130         and add other checks for out-of bound access to metadata.
6131
6132 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
6133
6134         * metatada.c: fix bugs computing table sizes. Spew a
6135         warning when index in string heap is out of bounds.
6136
6137 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
6138
6139         * metadata.h: Add a couple of macros to manipulate tokens. 
6140
6141 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
6142
6143         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
6144         cli_section_tables).
6145
6146 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
6147
6148         * metadata.c (mono_metadata_user_string): New function, provides
6149         access to the UserString heap. 
6150
6151 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
6152
6153         * metadata.c: Add inline documentation.
6154
6155 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
6156
6157         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
6158         files. 
6159
6160 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
6161
6162         * typeattr.h: New file, TypeAttribute flags. 
6163
6164 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
6165
6166         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
6167         mono_assembly_ensure_section): Section loading code.
6168         (load_section_tables): Load the sections.
6169
6170         * mono/metadata/metadata.c (mono_metadata_locate_token,
6171         mono_metadata_locate): Functions to locate the information
6172         definition given a token or a table and an index.
6173         (mono_metadata_compute_table_bases): New.
6174         (compute_size): New function to compute the sizes of the various
6175         tables.
6176
6177         * mono/metadata/metadata.h: Finish listing the different index
6178         types. 
6179
6180         * mono/metadata/pedump.c: Improve to dump new information.
6181
6182 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
6183
6184         * mono/metadata/metadata.c: Entered all the tables matching
6185         Beta2. 
6186
6187         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
6188
6189
6190
6191
6192
6193
6194
6195