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