2007-06-12 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
2
3         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
4
5         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
6
7 2007-06-12  Raja R Harinath  <rharinath@novell.com>
8
9         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
10         the tables.
11
12 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
13
14         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
15
16 2007-06-11  Raja R Harinath  <harinath@gmail.com>
17
18         MonoGenericMethod on a diet
19         * class-internals.h (_MonoMethodInflated::reflection_info): Move
20         here ...
21         (_MonoGenericMethod::reflection_info): ... from here.
22         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
23         Update to changes.
24         * reflection.c (inflate_mono_method): Likewise.
25         (mono_reflection_bind_generic_method_parameters): Likewise.
26
27 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
28
29         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
30         *verify.c: factored long ldarg forms to share code with short forms
31
32 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
33
34         *verify.c: fixed code formating factored some duplicate code
35         into a new function
36
37         *verify.h: fixed binary incompatibility introduced earlier
38
39         *pedump.c: fixed formating
40
41 2007-06-11  Raja R Harinath  <harinath@gmail.com>
42
43         Fix assertion when disassembling Mono.C5.dll
44         * loader.c (method_from_methodspec): Avoid inflating a method
45         twice with the same context.  If the methodref is inflated, use
46         the declaring method instead.
47
48         * class.c (mono_class_from_generic_parameter): Fix case similar to
49         bug #81830 handled below, but for method containers.
50
51 2007-06-10  Raja R Harinath  <harinath@gmail.com>
52
53         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
54         get_shared_generic_class.  Directly inflate the instance.
55         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
56         (inflate_generic_class): Delete.
57         (get_shared_generic_class): Delete.  Move setting of
58         'cached_class' and 'cached_context' ...
59         * metadata.c (mono_metadata_lookup_generic_class): ... here.
60
61         * metadata.c (mono_metadata_lookup_generic_class): Change
62         signature to take the components of a MonoGenericClass rather than
63         an allocated MonoGenericClass.  Change semantics to be intern-like.
64         * reflection.c (mono_class_bind_generic_parameters): Update to
65         changes.  Make locking region tighter.
66         * class.c (inflate_generic_class): Update to changes.
67         (get_shared_generic_class): Likewise.
68         * metadata-internals.h: Likewise.
69
70         * reflection.c (mono_class_bind_generic_parameters): Take and
71         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
72         (mono_reflection_bind_generic_parameters): Use
73         'mono_class_bind_generic_parameters' rather than duplicate the code.
74         * class.c (mono_bounded_array_class_get): Update to changes.
75         * object-internals.h: Likewise.
76
77         * reflection.c (mono_class_bind_generic_parameters): Only support
78         parameterizing generic type definitions.  Remove support for other
79         open types.
80
81 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
82
83         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
84
85         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
86         in the dynamic case.
87
88 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
89
90         * threads.c: When cleaning up thread, reset the Background bit.
91         Fixes bug #81720.
92
93 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
94
95        * metadata.c: Move variable declarations to top of scope.
96        * verify.c: Move variable declarations to top of scope.
97
98        Code is contributed under MIT/X11 license.
99
100 2007-06-08  Raja R Harinath  <rharinath@novell.com>
101
102         * reflection.c (mono_class_bind_generic_parameters): Replace
103         open-coded loop with mono_metadata_inflate_generic_inst.
104
105         * class.c (get_shared_generic_class): Don't call
106         mono_get_shared_generic_inst.  Use the container's own
107         'class_inst'.
108
109         * metadata.c (mono_metadata_load_generic_params): Move
110         initialization of 'context' field here from ...
111         * class.c (mono_class_create_from_typedef): ... here, and ...
112         * loader.c (mono_get_method_from_token): ... here.
113
114         * class.c (get_shared_generic_class): Rename from
115         mono_get_shared_generic_class and make static.
116         (mono_get_shared_generic_inst): Move to metadata.c.
117         * loader.c (mono_get_shared_generic_method): Likewise.
118         * class-internals.h, metadata-internals.h: Update to changes.
119
120         Fix #81830
121         * class.c (mono_class_from_generic_parameter): Don't assume a
122         generic container owner exists.  Generic containers from monodis
123         don't have any.
124
125 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
126
127         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
128         * verify.h: new typedefs to returns the non-verifiable status
129         * verify.c: initial implementation of generics, stack merging and object compatibility check
130
131 2007-06-06  Mark Probst  <mark.probst@gmail.com>
132
133         * class.c, image.c, class-internals.h (MonoImage): class_cache is
134         a MonoInternalHashTable again (fixed bug in internal hash table
135         code).
136
137 2007-06-06  Mark Probst  <mark.probst@gmail.com>
138
139         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
140         MonoInternalHashTable again (fixed bug in internal hash table
141         code).
142
143 2007-06-06  Mark Probst  <mark.probst@gmail.com>
144
145         * class.c, image.c, class-internals.h, domain.c,
146         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
147         changes.  Have to figure out what makes them break the SWF
148         regression.
149
150 2007-06-04  Mark Probst  <mark.probst@gmail.com>
151
152         * class.c, image.c, class-internals.h (MonoImage): class_cache is
153         a MonoInternalHashTable now.
154
155 2007-06-04  Mark Probst  <mark.probst@gmail.com>
156
157         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
158         MonoInternalHashTable now.
159
160 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
161
162         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
163         invoke_impl code.
164
165         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
166
167         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
168         dependent trampoline.
169
170         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
171
172         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
173
174 2007-05-29  Robert Jordan  <robertj@gmx.net>
175
176         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
177
178 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
179
180         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
181
182 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
183
184        * marshal.c: Fix interface lookup loops for
185        cominterop_get_com_slot_for_method and 
186        cominterop_get_method_interface. Only need to lookup
187        if type is a class, else use interface type method is on.
188
189        Code is contributed under MIT/X11 license.
190
191 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
192
193         * reflection.c: HasSecurity can be present even if no specially 
194         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
195         SecurityAttribute). Fix CAS regression tests on buildbot.
196
197 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
198
199        * appdomain.c: Add configure checks for header files.
200        * image.c: Add configure checks for header files.
201        * file-io.c: Add configure checks for header files.
202        * debug-mono-symfile.c: Add configure checks for header files.
203        * threadpool.c: Add configure checks for header files.
204        * console-io.c: Add configure checks for header files.
205        * profiler.c: Add configure checks for header files.
206        * rawbuffer.c: Add configure checks for header files.
207        * icall.c: Add configure checks for header files.
208        * rand.c: Add configure checks for header files.
209        * socket-io.c: Add configure checks for header files.
210
211        Code is contributed under MIT/X11 license.
212
213 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
214
215         * reflection.c (mono_custom_attrs_from_builders): Remove the 
216         assertion as it breaks the build.
217         
218         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
219
220         * reflection.c (lookup_custom_attr): Make a copy here too.
221
222         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
223         dynamic images.
224
225         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
226         images.
227
228         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
229         info.
230
231 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
232
233         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
234         (load_cattr_value): Ditto.
235
236 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
237
238         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
239
240 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
241
242         * threads.c: In "start_wrapper", set apartment_state to MTA if
243         apartment_state is Unknown and we're running on 2.0 profile or
244         higher.
245         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
246         to main method, then set apartment_state to Unknown on 1.0 profile,
247         and MTA on 2.0 profile.
248
249 2007-05-16  Jb Evain  <jb@nurv.fr>
250
251         * class-internals.h (MonoDefaults): Add an attribute_class and
252           customattribute_data_class.
253         * domain.c (mono_init_internal): Populate them.
254         * reflection.c: Use them to remove duplicates. Make a vew
255         MonoClass variables `static'.
256
257 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
258
259         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
260         step in implementing IMT, so that all isinst checks now can go
261         through the bitmap.
262         This was needed because vtables for TransparentProxy need to look
263         like the vtable of the "target" class, so they need to point to
264         its interface bitmap directly.
265
266         * object.c: inside "mono_class_create_runtime_vtable" and
267         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
268
269 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
270
271         * object-internals.h
272           culture-info.h : added territory field in MonoCulture and
273           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
274         * locales.c : fill territory field above too.
275         * culture-info-table.h : regenerated.
276
277 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
278
279         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
280         Fixes #81599.
281
282 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
283
284         * object.c: Always initialize apartment, even if 
285         there is no custom attributes on entry point.
286         
287         Code is contributed under MIT/X11 license.
288
289 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
290
291         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
292         * metadata.c: If no encoding is set, check for unicode
293         on class.
294         
295         Code is contributed under MIT/X11 license.
296
297 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
298
299         * threads.c: Handle if mono_thread_current returns NULL 
300         
301         Code is contributed under MIT/X11 license.
302
303 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
304
305         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
306         in start_wrapper. Added mono_thread_init_apartment_state and
307         mono_thread_cleanup_apartment_state.
308         * object.c: Initialize thread apartment state on main thread
309         by checking for STAThreadAttribute on entry point.
310         * object-internals.h: Add apartment_state field to MonoThread.
311         * threads-types.h: Add unmanaged definition of 
312         System.Threading.ApartmentState, MonoThreadApartmentState.
313         
314         Code is contributed under MIT/X11 license.
315         
316 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
317
318         * class.c: Fix windows build.
319         * class-internals.h: Fix windows build.
320         
321         Code is contributed under MIT/X11 license.
322
323 2007-05-08  Robert Jordan  <robertj@gmx.net>
324
325         * process.c (CreateProcess_internal):
326         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
327         .CreateNoWindow was specified. Fixes #81496.
328
329 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
330
331         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
332         step in implementing IMT, replaced it with two compact arrays
333         (interfaces_packed and interface_offsets_packed) and a bitmap that
334         is used for isinst checks (interface_bitmap).
335
336         * class.c: (compare_interface_ids): compare function to pass to
337         bsearch when looking for an interface with a given id.
338         (mono_class_interface_offset): reimplemented using bsearch on
339         interfaces_packed, getting the offset from interface_offsets_packed.
340         (print_implemented_interfaces): utility debugging function.
341         (setup_interface_offsets): reworked to initialize interfaces_packed,
342         interface_offsets_packed and interface_bitmap.
343
344         * object.c: replaced all accesses to "MonoClass.interface_offsets"
345         with uses of interfaces_packed and interface_offsets_packed.
346
347 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
348
349         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
350         mono_class_interface_offset prototype to wrap all accesses to
351         "MonoClass.interface_offsets".
352
353         * class.c: Implemented mono_class_interface_offset, and wrapped all
354         accesses to "MonoClass.interface_offsets".
355
356         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
357         "MonoClass.interface_offsets".
358
359 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
360
361         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
362         GetMethodFromHandle overloads (bug #78637).
363
364 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
365
366         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
367         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
368
369 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
370
371         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
372         #81498.
373
374         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
375         gracefully.
376         (mono_custom_attrs_from_index): Ditto.
377
378         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
379         Fixes #81501.
380
381 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
382
383         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
384         is now allocated from a mempool.
385
386 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
387
388         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
389         caller holds threads_lock, leading to deadlocks. Fixes #81476.
390
391 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
392
393         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
394         mono_loader_clear_error () too late. Fixes #81463.
395
396 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
397
398         * culture-info-table.h : regenerated.
399
400 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
401
402         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
403         is missing.
404
405 2007-04-25  Dick Porter  <dick@ximian.com>
406
407         * Makefile.am: Put the mingw enforced-optimisation back into the
408         PLATFORM_WIN32 section.
409
410 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
411
412         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
413         patch.
414
415         * image.c (mono_image_load_module): New API function to load a module reference.
416
417         * image.c (load_modules): Load modules lazily. Fixes #80812.
418
419         * class.c (mono_class_from_typeref): Use mono_image_load_module.
420         
421         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
422
423         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
424         to mono_image_load_module_dynamic.
425
426 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
427
428         * marshal.c: Fix calling convention for CCW on non-windows
429         platforms. STDCALL on windows, CDECL everywhere else to work 
430         with XPCOM and MainWin COM.
431         
432         Code is contributed under MIT/X11 license.
433
434 2007-04-23  Martin Baulig  <martin@ximian.com>
435
436         Fix #80969.
437
438         * loader.c
439         (method_from_memberref): Added `gboolean *used_context' argument.
440         (mono_get_method_from_token): Likewise.
441         (mono_get_method_full): Don't insert the method in the cache when
442         `used_context' is true.
443
444 2007-04-23  Raja R Harinath  <rharinath@novell.com>
445
446         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
447
448         * reflection.c (mono_reflection_bind_generic_parameters): Don't
449         create new MonoTypes for returned types.
450         * class.c (mono_generic_class_get_class): Export mono-internal.
451         * class-internals.h: Update to changes.
452
453 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
454
455         * threadpool.c, threadpool.h, icall-def.h: patch from
456         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
457
458 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
459
460         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
461         
462         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
463
464         * threads.c (mono_thread_get_stack_bounds): New helper function.
465
466         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
467         Correctly compute stack bounds when attaching. Fixes #81394.
468
469 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
470
471         * reflection.c: fix handling of doubles in custom attributes
472         for the arm-fpa format (bug #81368).
473
474 2007-04-18  Raja R Harinath  <rharinath@novell.com>
475
476         * reflection.c (assembly_add_win32_resources): Mildly relax an
477         bounds check to let the end pointer point just past the end of the
478         allocated buffer.  (may fix #81384)
479
480 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
481
482         * culture-info-table.h : regenerated.
483
484 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
485
486         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
487         the thread is aborted early.
488
489 2007-04-05  Dick Porter  <dick@ximian.com>
490
491         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
492         FindFirstFile()/FindNextFile() to find entries.  This lets the
493         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
494         81038.
495
496         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
497         the parameters of
498         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
499
500 2007-04-04  Martin Baulig  <martin@ximian.com>
501
502         * debug-helpers.c
503         (mono_method_desc_full_match): Add support for nested classes.
504
505 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
506
507         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
508
509 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
510
511         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
512         waiting for too many threads.
513
514 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
515
516         * environment.c: Fix return value check on uname so we can get the 
517         executing version on Solaris operating systems.
518
519 2007-03-28  Jb Evain  <jbevain@gmail.com>
520
521         * class.c (mono_type_get_name_recurse): Complete the
522         fix for the creation of assembly qualified names for
523         pointer types. Fixes #81208.
524
525 2007-03-27  Dick Porter  <dick@ximian.com>
526
527         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
528         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
529         changed.
530
531         * threads.c
532         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
533         the value of ReleaseMutex().
534
535 2007-03-27  Dick Porter  <dick@ximian.com>
536
537         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
538         in little-endian order, not network endian, so must be converted
539         to host endian here.  Fixes bug 80593.
540
541 2007-03-22  Jb Evain  <jbevain@gmail.com>
542
543         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
544         qualified names for pointer types. Fixes #81208.
545
546 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
547
548         * marshal.c: Add support for PreserveSigAttribute. 
549         
550         Code is contributed under MIT/X11 license.
551
552 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
553
554         * process.c: Fix endianness issues. Fixes #81126.
555
556         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
557         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
558
559         * image.c (mono_image_lookup_resource): Make this work on big-endian
560         machines.Change API contract so the caller needs to free the return value.
561         
562         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
563         API change.
564         
565 2007-03-14  Martin Baulig  <martin@ximian.com>
566
567         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
568         mono_type_get_desc() as well.
569
570 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
571
572         * icall.c:  Fix environ access in VS.  
573         
574 2007-03-13  Alp Toker  <alp@atoker.com>
575
576         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
577         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
578         #63841.
579
580 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
581
582         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
583         circular references among dynamic methods. Fixes #81091.
584
585         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
586
587 2007-03-09  Martin Baulig  <martin@ximian.com>
588
589         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
590
591 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
592
593         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
594         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
595         
596         Code is contributed under MIT/X11 license.
597         
598 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
599
600         * loader.c: Reapply patch for bug #79424.
601
602 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
603
604         * metadata.c (mono_type_to_unmanaged): Only convert object to
605         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
606
607 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
608
609         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
610         (and incorrectly set) is_reference field from MonoGenericInst.
611
612 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
613
614         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
615         a little earlier.
616
617         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
618
619         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
620
621 2007-03-05  Miguel de Icaza  <miguel@novell.com>
622
623         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
624         FileOptions.1 value to mean "temporary", map that to
625         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
626
627         Fixes 80688
628
629 2007-03-03  Marek Habersack  <mhabersack@novell.com>
630
631         * appdomain.c: implement MS .Net style shadow copying. Copies of
632         the assemblies are made in a subdirectory of the dynamic base
633         directory, the assembly names are preserved.
634         Copy .mdb and .config files along with the assemblies being shadowed.
635
636 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
637
638         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
639         (emit_marshal_handleref): Ditto.
640
641         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
642         on Visual C++. Fixes #80671.
643
644 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
645
646         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
647         for clone operations.
648
649 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
650
651         * marshal.c: Fix warnings.
652
653 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
654
655         * loader.c: allow case-insensitive matching of the dll name
656         in dllmap handling when prefixed with "i:".
657
658 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
659
660         * threads.c: Fix #ifdef for dummy_apc function for VS.
661
662 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
663
664         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
665
666 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
667         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
668         giving precedence to the methods with a fully qualified name
669         (InterfaceName.MethodName) when building the interface sections
670         of the vtable.
671
672 2007-02-16  Dick Porter  <dick@ximian.com>
673
674         * threadpool.c (append_job): Fix fast-path array handling, so it's
675         less likely the array will grow exponentially when the load is
676         heavy.
677
678 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
679
680         * metadata-internals.h, loader.c: fix dllmap lookup order
681         for non-function maps, too, and prepare for fallback code.
682
683 2007-02-12  Robert Jordan  <robertj@gmx.net>
684
685         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
686         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
687         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
688         GlobalFree. Fixes a part of bug #77075.
689
690 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
691
692         * loader.c: implemented typedef parent in field memberref.
693
694 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
695
696         * marshal.c: Fix warnings and remember to call Release on
697         IUnknown of RCW.
698         
699         Code is contributed under MIT/X11 license.
700
701 2007-02-10  Miguel de Icaza  <miguel@novell.com>
702
703         * class-internals.h: Add MonoHandleRef definition, and
704         handleref_class to mono_defaults. 
705
706         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
707         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
708
709         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
710         (do nothing on this stage)
711         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
712         (emit_marshal_handleref): New method, used for argument handling
713         of HandleRefs. 
714
715 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
716
717         * class.c (mono_class_setup_parent): Lazily init com types.
718         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
719         init com types.
720         * object.c (mono_remote_class_vtable): Lazily init com types.
721         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
722         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
723         * domain-internals.h: Expose mono_init_com_types.
724         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
725         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
726         Add support for COM Callable Wrapper marshalling.
727         * marshal.h: Add icall definitions.
728         * gc.c: Handle freeing of CCWs in finalizer code.
729         
730         Code is contributed under MIT/X11 license.
731
732 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
733
734         * reflection.c: changed all the signature encoding code to use
735         a variable-sized buffer.
736
737 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
738
739         * marshal.c: locking fixes: never take the loader lock
740         or other runtime locks when holding the marshal lock
741         (fixes bug#80664).
742
743 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
744
745         * marshal.c: make the delegate function pointer mapping
746         work for the moving GC.
747
748 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
749
750         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
751         for bug #80618.
752
753 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
754
755         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
756         gmodule.
757
758 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
759
760         * threadpool.c: made the code moving-GC safe.
761
762 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
763
764         * assembly.c, boehm-gc.c, class-internals.h, class.c,
765         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
766         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
767         warning cleanup.
768         * reflection.c: warning cleanup, some threading and moving GC fixes.
769
770 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
771
772         * class.c, loader.c: create the needed Set/Get/Address array methods
773         as well as the .ctors in mono_class_init (), fixes bug #80567.
774
775 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
776
777         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
778         we doesn't decrease its alignment. Should fix the sparc build.
779
780 2007-01-24  Dick Porter  <dick@ximian.com>
781
782         * socket-io.c
783         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
784         Create the returned object if we need to ignore an unsupported
785         socket option.  Fixes a segfault reported by Atsushi.
786
787 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
788
789         * class.c, object.c: restrict GC-tracked fields to
790         UIntPtr fields used inside corlib, so we provide better
791         type info to the GC and also allow broken packing as in
792         bug #80580.
793
794 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
795
796         * sgen-gc.c: removed duplicated function.
797
798 2007-01-19  Miguel de Icaza  <miguel@novell.com>
799
800         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
801         value that means that the value is not supported, but that we
802         should not return a failure, but instead report this as a
803         successful operation.
804
805 2007-01-19  Raja R Harinath  <rharinath@novell.com>
806
807         Fix tests/bug79956.2.il
808         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
809         (mono_generic_class_get_class): If the generic definition in an
810         enum, copy over other fields related to it.
811
812 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
813
814         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
815         genericinst enums (bug #79215).
816
817 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
818         * class.c: Fix bug 80307.
819
820 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
821
822         * image.c: if the file table is not present, try to load
823         all the modules, since we don't have info about them
824         having or not metadata (bug #80517).
825         * assembly.c: allow mono_assembly_load_references () to
826         work for netmodules.
827
828 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
829
830         * image.c, metadata-internals.h, object.c: execute module
831         cctors when running on the 2 runtime if present (bug #80487).
832
833 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
834
835         * icall.c: optimized InitializeArray() on bigendian.
836
837 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
838
839         * icall.c: fix for the broken ARM FPA double format.
840
841 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
842
843         * icall.c: handle endian issues for r4 and r8 types, too, in
844         the InitializeArray() icall.
845
846 2007-01-15  Miguel de Icaza  <miguel@novell.com>
847
848         * loader.c (mono_loader_error_prepare_exception): Clear the error
849         once we have extracted the information from it, do this before we
850         call into the JIT's class loading mechanisms.
851
852         * object.c (mono_class_create_runtime_vtable): Do not clear the
853         loader error before calling mono_class_get_exception_for_failure
854         as the loader error is needed inside
855         mono_class_get_exception_for_failure to throw the error (thinko).
856
857         Fixes #80521
858         
859 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
860
861         * reflection.c: align fields rva data so it's faster to load at
862         runtime.
863
864 2007-01-12  Raja R Harinath  <rharinath@novell.com>
865
866         Prepare to simplify GenericMethod handling.
867         * class-internals.h (mono_method_get_context): New accessor function.
868         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
869         rather than directly accessing '->context' field.
870
871         * class-internals.h (_MonoGenericParam.method): Move ...
872         (_MonoGenericContainer): ... here.  Add into union with klass field.
873         * class.c, icall.c, loader.c, metadata.c, reflection.c:
874         Update to changes.
875
876 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
877
878         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
879         the wrapper type enum and reduce relocations.
880
881 2007-01-12  Raja R Harinath  <rharinath@novell.com>
882
883         * reflection.c (inflate_mono_method): Reuse method instantiation
884         from the generic method, if available.
885
886 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
887
888         * marshal.c (emit_marshal_variant): Fix conv_arg
889         type in last commit, based on whether parameter is byref.
890         
891 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
892
893         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
894         marshalling.
895         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
896         MONO_TYPE_OBJECT back for VARIANT support.
897
898 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
899
900         * marshal.c, marshal.h, icall-def.h: Implement 
901         Marshal.ReAllocCoTaskMem.
902
903 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
904
905         * marshal.c: memory retention fixes: use the proper
906         image cache for runtime_invoke method lookups.
907
908 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
909
910         * mempool.c: added code to help debug mempool allocations.
911
912 2007-01-11  Dick Porter  <dick@ximian.com>
913
914         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
915         support (experimenting with faking it with IP_MTU_DISCOVER for
916         systems that don't have IP_DONTFRAGMENT.)
917         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
918         icall.
919
920         * icall-def.h: new System.Net.Sockets.Disconnect icall.
921
922         * socket-io.h: Add new fields to MonoSocketAsyncResult
923         corresponding to the new ones in Socket.cs.
924
925 2007-01-11  Raja R Harinath  <rharinath@novell.com>
926
927         Fix IronPython regression mentioned in #80249
928         * metadata.c (do_mono_metadata_parse_generic_class): Clear
929         'cached_context' field, since it may have been initialized as a
930         side-effect of metadata parsing.
931
932         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
933         (_MonoGenericClass.cached_class): Move here and rename from lone
934         remaining field of ...
935         (_MonoInflatedGenericClass): ... this.  Remove.
936         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
937         to changes.
938
939         Fix mcs/tests/test-128.cs regression.
940         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
941         2007-01-10 change below.
942         [MONO_TYPE_OBJECT]: Recurse into array case.
943
944 2007-01-11  Raja R Harinath  <harinath@gmail.com>
945
946         * class-internals.h (mono_get_inflated_generic_class): Remove.
947         * class.c (mono_get_inflated_generic_class): Remove.
948         (mono_generic_class_get_class): Rename from
949         mono_class_create_generic.
950         (mono_class_from_mono_type) [GENERICINST]: Use it.
951         * reflection.c, metadata.c: Update to changes.  Use
952         'mono_class_from_mono_type'.
953
954 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
955
956         * reflection.c: use passed type when encoding an array element
957         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
958
959 2007-01-09  Robert Jordan  <robertj@gmx.net>
960
961         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
962         result arguments (someDelegate.EndInvoke (unrelatedAres)).
963         Fixes bug #80392.
964
965 2007-01-09  Raja R Harinath  <rharinath@novell.com>
966
967         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
968
969         * object.c (set_value): Avoid aliasing between type->data.klass
970         and type->data.generic_class.
971
972         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
973
974 2007-01-08  Raja R Harinath  <rharinath@novell.com>
975
976         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
977         between type->data.klass and type->data.generic_class.
978
979 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
980
981         * marshal.c: In MS.NET, StringBuilder objects are not copied by
982         value in out parameters.
983
984 2007-01-08  Raja R Harinath  <rharinath@novell.com>
985
986         Simplify invariant for MonoGenericClass::klass field.
987         * class.c (mono_class_create_generic): Verify 'klass' is null.
988         * metadata.c (do_mono_metadata_parse_generic_class): Don't
989         initialize 'klass' field.
990
991 2007-01-05  Raja R Harinath  <rharinath@novell.com>
992
993         Ongoing work to avoid redundant data and simplify invariants.
994         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
995         'generic_class', and change type to a GenericInst.
996         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
997         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
998
999 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
1000
1001         * class.c : skip io-layer under PLATFORM_WIN32.
1002
1003 2007-01-03  Tor Lillqvist  <tml@novell.com>
1004
1005         Fix #80305: In a bundled executable, look in the bundled exe
1006         assembly to determine the runtime version. Add the possibility to
1007         bundle also the machine.config file.
1008         
1009         * assembly.c (mono_assembly_open_from_bundle): Make
1010         non-static. Allow being called even if we have no bundled
1011         assemblies, and return NULL right away in that case.
1012
1013         * domain-internals.h: Declare mono_assembly_open_from_bundle()
1014         here.
1015
1016         * domain.c (app_config_parse): Take an assembly exe file name as
1017         parameter instead of a config file name. Check for a bundled
1018         config file for that assembly by calling
1019         mono_config_string_for_assembly_file() (see below) before looking
1020         for one in the file system.
1021         (get_runtimes_from_exe): Corrsponding change to call of
1022         app_config_parse().
1023         (get_runtimes_from_exe): Check for bundled assembly exe file first
1024         by calling mono_assembly_open_from_bundle(). If no bundled
1025         assembly exe file is found, call mono_image_open() as before to
1026         look it up in the file system.
1027
1028         * mono-config.c: Add variable bundled_machinec_onfig.
1029         (mono_config_string_for_assembly_file): New function.
1030         (mono_config_for_assembly): Move code snippet that looks for a
1031         bundled assembly .config file into the above new function. Call
1032         it.
1033         (mono_register_machine_config, mono_get_machine_config): New
1034         functions to set and retrieve
1035
1036         * assembly.h: Declare mono_register_machine_config().
1037
1038         * mono-config.h: Declare mono_get_machine_config() and
1039         mono_config_string_for_assembly_file().
1040
1041         * icall.c: No declaration of environ necessary on Win32. It is
1042         declared (as a macro expanding to a function call) in stdlib.h.
1043         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
1044         New internal mono function. Returns the value of
1045         mono_get_machine_config() as a Mono string.
1046
1047         * icall-def.h: Add get_bundled_machine_config().
1048
1049 2007-01-04  Raja R Harinath  <rharinath@novell.com>
1050
1051         Remove redundant field
1052         * class-internals.h (_MonoGenericContext.container): Remove field.
1053         * loader.c (mono_method_get_signature_full): Don't parse a
1054         "container" for a signature parse when the signature is inflated
1055         immediately.
1056         (method_from_methodspec): Likewise, for a generic_inst.
1057         * class.c, metadata.c, reflection.c: Update to changes.
1058
1059 2006-01-04  Raja R Harinath  <rharinath@novell.com>
1060
1061         * class-internals.h (_MonoGenericClass): Rename 'context' field to
1062         'cached_context', and change semantics -- it starts off NULL, and
1063         is initialized on demand.
1064         * class.c (mono_generic_class_get_context): New accessor to
1065         replace 'context' field accesses.
1066         (mono_class_get_context): New helper.
1067         (*): Update to changes.
1068         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
1069
1070 2007-01-03  Miguel de Icaza  <miguel@novell.com>
1071
1072         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
1073         before the memcpy.   Fixes Marshal2 regression.
1074
1075 2007-01-02  Jb Evain  <jbevain@gmail.com>
1076
1077         * blob.h: add a MONO_TYPE_ENUM definition
1078         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
1079         fix the encoding of arrays of enums in custom attributes.
1080
1081         Fixes #79666.
1082
1083 2007-01-01  Miguel de Icaza  <miguel@novell.com>
1084
1085         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
1086         string is null terminated, but only cut the string short if it
1087         overflows the buffer.   
1088         
1089         (mono_string_to_byvalstr): Also fix this routine.   The code here
1090         was not properly terminating a string (it was only terminated
1091         because of the previous catch-all memset). 
1092
1093         I left the memset, because I do not know if applications expect
1094         the runtime to clear this region. 
1095
1096         Fixes #79944.
1097
1098         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1099         Clear the error before returning to unmanaged code to prevent the
1100         runtime from being confused later on (fixes  80420).
1101         (ves_icall_type_from_name): Always call mono_loader_clear_error
1102         after parsing a type that could have failed.
1103         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
1104
1105         * loader.c (mono_loader_clear_error): Fix indentation.
1106
1107 2006-12-28  Martin Baulig  <martin@ximian.com>
1108
1109         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
1110
1111 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
1112
1113         * reflection.c: patch from Rolf Bjarne Kvinge to fix
1114         getting a token for an EnumBuilder.
1115
1116 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1117
1118         * reflection.c: be more careful in case resource generation
1119         fails to create the data array.
1120
1121 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
1122
1123         * sgen-gc.c: write barrier for clone and fix unregister handles.
1124
1125 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
1126
1127         * reflection.c: some fixes needed in the generics code for the moving GC.
1128
1129 2006-12-22  Robert Jordan  <robertj@gmx.net>
1130
1131         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
1132         account. Fixes bug #80299.
1133
1134 2006-12-21  Raja R Harinath  <rharinath@novell.com>
1135
1136         Fix WaitHandle usage in delegates.
1137         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
1138         * object.c (mono_wait_handle_new): Use the property set method to
1139         initialize the handle.
1140         (mono_wait_handle_get_handle): New.
1141         * threadpool.c (mono_async_invoke): Use it.
1142         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
1143         Likewise.
1144         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
1145
1146 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
1147
1148         * marshal.c (emit_marshal): Call emit_marshal_variant and
1149         emit_marshal_com_interface when applicable.
1150         (emit_marshal_variant, emit_marshal_com_interface): Add
1151         methods for this case and remove if's from emit_marshal_object.
1152         
1153 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
1154
1155         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
1156
1157 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
1158
1159         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
1160         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
1161         and GlobalFree on Windows. Remove FIXME.
1162
1163 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1164
1165         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
1166         implementation for managed objects.
1167
1168 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
1169
1170         * object.c: implemented code to be used for checking
1171         that no reference field overlaps with non-references.
1172
1173 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1174
1175         * threadpool.c: fix queue code to be compatible with the
1176         moving GC.
1177
1178 2006-12-18  Miguel de Icaza  <miguel@novell.com>
1179
1180         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
1181         in structures by throwing ArgumentNullException.
1182
1183         (emit_marshal_safehandle): Also when they are null parameters.
1184
1185         (emit_marshal_safehandle): Add support for ref
1186         SafeHandles parameters
1187
1188 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1189
1190         * profiler.c: updated to use the mono-dl API instead of
1191         gmodule.
1192
1193 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1194
1195         * profiler.c: updated to use the mono-dl dynamic loading
1196         API instead of gmodule.
1197
1198 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
1199
1200         * profiler.c: use readlink, older versions of glib don't have
1201         g_file_read_link ().
1202
1203 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1204
1205         * profiler.c: try to detect the path to mono if libc fails to provide
1206         a useful name (bug #80286).
1207
1208 2006-12-16  Raja R Harinath  <rharinath@novell.com>
1209
1210         Fix #80242
1211         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
1212         instance, use the generic type definition instead.
1213         (ves_icall_Type_GetNestedTypes): Likewise.
1214         * class.c (mono_class_create_generic): Always set the
1215         nested_classes of a generic instance to NULL, even if the generic
1216         type definition has nested types.
1217
1218 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
1219
1220         * marshal.c (mono_string_from_bstr): Revert previous Windows change
1221         and fix on Linux.
1222         
1223 2006-12-15  Miguel de Icaza  <miguel@novell.com>
1224
1225         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
1226         my arguments were in the wrong order.   I also fixed the Windows
1227         version which seems to have had the same issue.
1228
1229         (mono_free_bstr): On Unix, this is g_free.
1230         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
1231         conversions (for the tests in corlib to pass).
1232
1233 2006-12-14  Miguel de Icaza  <miguel@novell.com>
1234
1235         * marshal.c (emit_ptr_to_object_conv): For now, ignore
1236         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
1237         exception if a ref SafeHandle in a struct has changed).
1238         
1239         (emit_struct_conv): Do not perform layout checks for classes
1240         derived from SafeHandle, as those are specially handled. 
1241
1242         (emit_object_to_ptr_conv): Add support for
1243         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
1244
1245         (emit_marshal_safehandle): Implement conversion of return values
1246         of safehandles (MARSHAL_ACTION_CONV_RESULT).
1247         
1248         * threads.c: WaitHandle now is compiled with two different handles
1249         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
1250         for 2.0.
1251         
1252         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
1253         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
1254         these routines to cope with both kinds of fields.
1255
1256 2006-12-12  Miguel de Icaza  <miguel@novell.com>
1257
1258         * metadata.c (mono_type_to_unmanaged): Handle the case where
1259         type->data.klass is a SafeHandle, and in that case, return the
1260         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
1261         MONO_MARSHAL_CONV_SAFEHANDLE. 
1262
1263 2006-12-11  Miguel de Icaza  <miguel@novell.com>
1264
1265         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
1266         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
1267         calling emit_marshal_object.
1268
1269         (emit_marshal_safehandle): Implement marshalling of
1270         SafeHandle parameters (no ref support yet).
1271
1272         (MarshalAction): Document the defines as I implement
1273         them for SafeHandle.
1274
1275         (emit_marshal_object): indentation police.
1276
1277         * class-internals.h: Define MonoSafeHandle.
1278         Add safehandle_class to MonoDefaults type.
1279
1280         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
1281         list of classes to check for fields. 
1282
1283         * domain.c (mono_init_internal): Add SafeHandle to the list of
1284         mono_defaults loaded.
1285
1286 2006-12-15  Raja R Harinath  <rharinath@novell.com>
1287
1288         Fix #80253
1289         * reflection.c (mono_reflection_bind_generic_parameters): If the
1290         generic type definition is a type builder, ensure that it is fully
1291         initialized before instantiating it.  Kill some dead code.
1292
1293 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
1294
1295         * object.c: clear the loader_error () before loading
1296         more metadata stuff (bug #80258).
1297
1298 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
1299
1300         * icall.c, icall-defs.h: type modifiers icalls for
1301         parameters and properties.
1302
1303 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
1304
1305         * object.c, icall.c: fixed warnings.
1306
1307 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1308
1309         * marshal.c: fixed a couple of leaks and coding style in a few places.
1310
1311 2006-12-08  Dick Porter  <dick@ximian.com>
1312
1313         * process.c: Cope with NULL ProcessStartInfo arguments on windows
1314         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
1315         80173.
1316
1317 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1318
1319         * process.c: ProcessStartInfo may have only filename set and
1320         arguments can be NULL.
1321
1322 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1323
1324         * icall.c: fix leak found by Robert Jordan.
1325
1326 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1327
1328         * marshal.c, marshal.h: generate managed method to access an element
1329         of a multi-dimensional array.
1330
1331 2006-11-30  Paolo Molaro (lupus@ximian.com)
1332
1333         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
1334
1335 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1336
1337         * icall.c: back out GetFields () fix until the serialization code is
1338         fixed to not depend on the incorrect behaviour.
1339
1340 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
1341
1342         * profiler.c: provide defaults if none are set.
1343
1344 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
1345
1346         * Makefile.am, attrdefs.h: new public header file with
1347         constants for attributes for use by embedders.
1348
1349 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
1350
1351         * icall.c: GetFields () fix for bug #80064.
1352
1353 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
1354
1355         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
1356         removed long unused icalls.
1357
1358 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
1359   
1360         * marshal.c: 
1361                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
1362                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
1363                 can be generated without a delegate class.
1364                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
1365         
1366         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1367
1368 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1369
1370         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
1371         #80069.
1372
1373 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1374
1375         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
1376         icall-def.h: added icalls needed by System.GC.
1377
1378 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
1379
1380         * loader.c: ensure the class in catch clauses is handled
1381         correctly for generics methods (fixes bug#79980).
1382
1383 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
1384
1385         * monitor.h, monitor.c: added mono_locks_dump () function
1386         to help debug deadlocks involving managed locks.
1387
1388 2006-11-13  Dick Porter  <dick@ximian.com>
1389
1390         * file-io.c (get_file_attributes): If the file is a symlink try
1391         and get the stat data for the target, but also add the
1392         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
1393         the specs for the windows symlink support, but will probably have
1394         to be reworked when I have test data from a vista machine.  Fixes
1395         bug 79887.
1396
1397 2006-11-13  Dick Porter  <dick@ximian.com>
1398
1399         * gc.c (mono_domain_finalize): 
1400         * marshal.c (mono_delegate_begin_invoke): 
1401         * threadpool.c (socket_io_init, mono_thread_pool_init)
1402         (mono_thread_pool_finish): 
1403         * monitor.c (mono_monitor_try_enter_internal): 
1404         * threads.c (mono_thread_resume, mono_thread_init)
1405         (mono_thread_suspend_all_other_threads)
1406         (mono_thread_execute_interruption): 
1407         * appdomain.c (mono_domain_unload): Check for NULL error returns
1408         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
1409         75733.
1410
1411 2006-11-11  Miguel de Icaza  <miguel@novell.com>
1412
1413         * process.c
1414         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
1415         Only close the handle if the value of the handle is not
1416         INVALID_HANDLE_VALUE.  This just makes the process a bit more
1417         robust.
1418
1419         Improvement for #75733, so that we do not run into this problem. 
1420
1421         
1422         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
1423         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
1424         internal variables.  Fixes #79462 
1425         
1426
1427 2006-11-09  Dick Porter  <dick@ximian.com>
1428
1429         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1430         Use poll() not select().  Fixes bug 79397.
1431
1432 2006-11-09  Raja R Harinath  <rharinath@novell.com>
1433
1434         Fix #79872
1435         * assembly.c (mono_assembly_load_from_full): Check that the given
1436         image has an assembly manifest.
1437
1438 2006-11-09  Ankit Jain  <jankit@novell.com>
1439
1440         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
1441         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
1442         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
1443
1444 2006-11-07  Dick Porter  <dick@ximian.com>
1445
1446         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1447         Put the old resolver behaviour back for pre-2.0 profiles.
1448
1449 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1450
1451         * threadpool.c: precise GC and locking fixes.
1452
1453 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
1454
1455         * class.c: don't load types that have an explicit unaligned
1456         managed reference. Provide better info in the TypeLoad exception.
1457         Part of the fix for bug #79744.
1458         * object.c: use the correct check for class type load issues.
1459
1460 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1461
1462         * class.c: enforce alignment of fields with managed references
1463         even when Pack=1 is forced by the user (bug #77788).
1464
1465 2006-11-03  Dick Porter  <dick@ximian.com>
1466
1467         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1468         If the address reverse lookup fails, return it as the hostname
1469         anyway.  Fixes bug 79721.
1470
1471 2006-11-03  Dick Porter  <dick@ximian.com>
1472
1473         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
1474         Fix build on Windows.
1475
1476 2006-11-02  Dick Porter  <dick@ximian.com>
1477
1478         * icall-def.h: 
1479         * object-internals.h: 
1480         * exception.c (mono_get_exception_thread_interrupted): 
1481         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
1482         Fixes bug 74525.
1483
1484         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
1485         Check for pending Thread.Interrupt.
1486
1487 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
1488         * loader.c: Fixed bug 79684.
1489
1490 2006-10-27  Dick Porter  <dick@ximian.com>
1491
1492         * file-io.c (get_file_attributes): Force symlinks to directories
1493         to be returned as a regular file.  Fixes bug 79733.
1494 2006-10-26  Dick Porter  <dick@ximian.com>
1495
1496         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
1497         CreateFile to open a directory then we need to set the
1498         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
1499
1500 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
1501
1502         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
1503         friends.
1504
1505 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1506
1507         * sgengc.c: small cleanup of timer code.
1508
1509 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1510
1511         * sgen-gc.c: fix some warnings and start adding support for
1512         complete object removal on domain unload.
1513
1514 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
1515
1516         * assembly.c: build_assembly_name should not consider a version
1517         number without build or revision number invalid. Fixes bug #79715.
1518
1519 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
1520
1521         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
1522         call kernel32 function OutputDebugString directly.
1523         
1524         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1525         
1526 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
1527
1528         * reflection.c: small cleanup, using a function to insert a MonoString
1529         in the string heap.
1530
1531 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
1532
1533         * reflection.c: moving GC fixes.
1534
1535 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
1536
1537         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
1538         all the objects with finalizers belonging to an unloading appdomain.
1539
1540 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
1541
1542         * sgen-gc.c: added ability to allocate even when the nursery is fully
1543         pinned and fixed a couple of bugs.
1544
1545 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
1546
1547         * threads.h: Revert the last change for now.
1548
1549         * threads.h (mono_thread_get_pending_exception): Rename this to
1550         mono_thread_get_undeniable_exception ().
1551
1552 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
1553
1554         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
1555         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
1556         when fname does not refer to valid assembly. This result in a more
1557         meaningful error message.
1558         * exception.c: added mono_get_exception_bad_image_format2 which 
1559         constructs a BadImageFormatException using the ctor taking a custom
1560         message and the file name. Passing in a NULL msg results in a default
1561         message.
1562         * exception.h: define mono_get_exception_bad_image_format2 function.
1563         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
1564         when file name pointed to an invalid IL image. Use 
1565         mono_get_exception_file_not_found2 to construct FileNotFoundException,
1566         as this results in a more meaningful error message.
1567
1568 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
1569
1570         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
1571         #79465.
1572
1573 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
1574
1575         * metadata.c (mono_type_size): Change the align parameter to guint32 for
1576         consistency with the other _size functions.
1577         (mono_type_stack_size): Ditto.
1578
1579         * class.c object.c icall.c: Fix warnings caused by the above change.
1580
1581         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
1582
1583         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
1584
1585         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
1586
1587 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1588
1589         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
1590         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
1591         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
1592         threadpool.h, threads-types.h: mark more internal functions.
1593
1594 2006-10-11  Dick Porter  <dick@ximian.com>
1595
1596         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1597         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
1598         reproduce the bug even before applying the fix.)
1599
1600 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
1601
1602         * reflection.c: allow retrieving attributes for arguments in generic
1603         methods (bug #79241).
1604
1605 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
1606
1607         * debug-mono-symfile.c: properly check fopen () result (found by
1608         coverity).
1609
1610 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
1611
1612         * reflection.c: make error message clearer and fixed two
1613         issuelets found by Coverity.
1614
1615 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
1618
1619 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1620
1621         * object-internals.h, gc-internal.h, profiler-private.h:
1622         mark internal functions.
1623
1624 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1625
1626         * reflection.c: put data in the text section.
1627         * icall.c: recognize more types in type_from_typename ().
1628         * process.c, marshal.c: added some GC FIXMEs.
1629
1630 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1631
1632         * loader.c: check for NULL before initializing.
1633
1634 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
1635
1636         * gc.c (finalizer_thread): Use a non-alertable wait here.
1637
1638         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
1639         until the correct solution is found.
1640
1641 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
1642
1643         * reflection.c (mono_module_get_object): Avoid an assert when operating on
1644         modules with no metadata. Fixes #79596.
1645
1646         * image.c (load_metadata_ptrs): Put back the error message when
1647         the #- heap is encountered since the support is not complete yet.
1648
1649 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1650
1651         * gc.c: do not allow the user to SuppressFinalize () a
1652         delegate because it would leak the trampoline if present.
1653
1654 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
1655
1656         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
1657         PropertyPtr table.
1658
1659 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
1660
1661         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
1662
1663         * metadata.c (mono_metadata_get_param_attrs): Ditto.
1664
1665         * row-indexes.h: Add definitions for *Ptr tables.
1666
1667         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
1668
1669         * metadata.c (mono_metadata_translate_token_index): New helper function to
1670         translate table indexes used in uncompressed metadata.
1671         (mono_metadata_decode_table_row): Ditto.
1672         (mono_metadata_decode_table_row_col): Ditto.
1673
1674         * metadata.c: Add table schema for *Ptr tables.
1675
1676         * class.c loader.c: Use the new helper function to access the affected metadata
1677         tables.
1678         
1679         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
1680         #38532.
1681         
1682 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
1683
1684         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
1685         sequences which can be unbounded in size. Fixes #79583.
1686
1687 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
1690         static initialization.
1691
1692         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
1693
1694         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
1695
1696         * domain.c (mono_domain_free): Free up type_init_exception_hash.
1697
1698         * object.c (mono_runtime_class_init): Implement correct semantics when a static
1699         ctor fails, i.e. throw the same exception on subsequent accesses.
1700         
1701 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
1702
1703         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
1704         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
1705         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
1706         Handle marshalling of interfaces and VARIANTs contained in structs.
1707         
1708         Code is contributed under MIT/X11 license.
1709         
1710 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
1711
1712         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
1713         
1714         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
1715         mempool.
1716
1717 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1718
1719         * console-io.c: ignore previous SIGINT handler.
1720
1721 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
1722
1723         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
1724         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
1725         #79460, #79461, #79485.
1726
1727         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
1728
1729         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
1730         #79217.
1731
1732 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
1733
1734         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
1735         could be generated from it.
1736
1737 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
1738
1739         * rand.c: fix read loop to correctly handle EINTR.
1740
1741 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1742
1743         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
1744         internal calls are defined to keep methods closer to the declaring
1745         type and allow a significant reduction in runtime relocations and
1746         memory usage.
1747
1748 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
1749
1750         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
1751         exception message to have FileNotFoundException use the default
1752         assembly load error message. Fixes bug #79426.
1753         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
1754
1755 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1756
1757         * threadpool.c: (start_thread_or_queue) use the root domain when
1758         creating the thread instead of the async object one.
1759
1760 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
1761
1762         * class.c, object.c, class-internals.h, reflection.c:
1763         for arrays, store element_size inside MonoClass (speedup
1764         for array object creation).
1765
1766 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
1767
1768         * icall.c: fixed CodeBase to use the file name and not the module
1769         name (bug #79365).
1770
1771 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
1772
1773         * mono-debug.c, mono-debug.h: export find_method as
1774         mono_debug_find_method ().
1775
1776 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1777
1778         * debug-helpers.c, class-internals.h: added a few functions useful
1779         when debugging under gdb.
1780
1781 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1782
1783         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
1784         characters that need special handling.
1785
1786 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
1787
1788         * mono-config.c: make the os/cpu specification more flexible,
1789         allowing lists and negation.
1790
1791 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
1792
1793         * marshal.c: COM Interop fixes. Handle case where method->klass.
1794         is interface. Handle BSTR/MonoString when null. Use CDECL as 
1795         calling convention on non-windows platforms. This is for
1796         compatibility with XPCOM and MainWin COM.
1797         
1798         Code is contributed under MIT/X11 license.
1799         
1800
1801 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
1804         correctly. Fixes #79217.
1805
1806         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
1807
1808 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
1809
1810         * mono-config.c: allow both an os and cpu attribute for dllmap
1811         and dllentry elemnets to enable a single config file to be used
1812         for multiple architectures.
1813
1814 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
1815
1816         * loader.c: MonoLoaderError was cleared too soon on load failure.
1817         Fixes bug #79424.
1818
1819 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
1820
1821         * icall.c: use the defining class vtable when accessing a
1822         static field, not a pobblibly derived class.
1823
1824 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
1825
1826         * icall.c string-icalls.c: Remove references to unicode.h.
1827
1828         * unicode.h unicode.c Makefile.am: Remove these unused source files.
1829
1830         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
1831
1832         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
1833         indicating the image where custom marshaller types should be looked up.
1834         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
1835         custom marshallers, instead of corlib. Fixes #79425.
1836
1837 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
1838
1839         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
1840
1841 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
1842
1843         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
1844         Implement Environment.ProcessorCount.
1845         
1846         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
1847         Implement Environment.ProcessorCount.
1848         
1849         * icall.c: 
1850         Add Environment.ProcessorCount icall.
1851         
1852         Patch by Jason McFall.
1853
1854 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1855
1856         * assembly.c: don't append .exe/.dll when the filename already contains
1857         one of those extensions.
1858
1859 2006-09-12  Martin Baulig  <martin@ximian.com>
1860
1861         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
1862         to array interfaces.
1863
1864 2006-09-11  Martin Baulig  <martin@ximian.com>
1865
1866         * reflection.c (mono_image_build_metadata): Create the
1867         MethodImpl's after emitting all types and methods, so we don't
1868         need another fixup pass for them.
1869
1870 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
1871
1872         * class.c (mono_class_from_name_case): Fix regression introduced by the last
1873         change.
1874
1875 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
1876
1877         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
1878         unload.
1879
1880 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
1883         args is not set. Fixes #78926.
1884
1885 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
1886
1887         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
1888
1889         * image.c (load_class_names): Move this to class.c, and rename it to 
1890         'mono_image_init_name_cache'.
1891         (load_modules): Fix a warning.
1892
1893         * class.c icall.c image.c: Initialize image->name_cache lazily.
1894
1895         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
1896         on its name using information in the AOT file.
1897
1898         * class.c (mono_class_from_name): Use the new hook function.
1899
1900 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * reflection.c (mono_param_get_objects): Handle enum default parameter values
1903         correctly.
1904
1905         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
1906         Fixes #79289.
1907         
1908 2006-09-06  Martin Baulig  <martin@ximian.com>
1909
1910         * icall.c (mono_lookup_internal_call): Small fix.
1911
1912 2006-09-05  Raja R Harinath  <rharinath@novell.com>
1913
1914         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
1915         double g_free.
1916
1917 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
1918
1919         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
1920         when --debug is specified.
1921
1922 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
1923
1924         * class.c (setup_generic_array_ifaces): Fix a warning.
1925
1926 2006-09-04  Miguel de Icaza  <miguel@novell.com>
1927
1928         * Temporarily remove the patch to assemly.c that checks the
1929         assembly versions as it breaks our gacutil.
1930
1931 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
1934
1935         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
1936         a net 1.0 runtime.
1937
1938         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
1939         created using the default ctor. Fixes #79152.
1940         (mono_string_builder_to_utf16): Ditto.
1941
1942 2006-09-01  Martin Baulig  <martin@ximian.com>
1943
1944         Fix handling of the generic array interfaces.
1945
1946         * class-internals.h
1947         (MonoDefaults): Removed `generic_array_class' and added
1948         `generic_ilist' class.
1949
1950         * class.c
1951         (mono_bounded_array_class_get): Add the new generic array interfaces.
1952         (setup_generic_array_ifaces): New static method; create vtable
1953         entries for each method in the generic array interfaces.
1954
1955         * metadata.c
1956         (select_container): Allow "parent-less" generic methods.
1957
1958         * marshal.c
1959         (mono_marshal_get_generic_array_helper): New public method.
1960
1961         * icall.c
1962         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
1963         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
1964         moved the interncall into System.Array.
1965
1966 2006-09-01  Raja R Harinath  <rharinath@novell.com>
1967
1968         A few more cases of avoiding work on types with ->byref set.
1969         Has the real fix for #79238
1970         * icall.c (is_generic_parameter): New helper.
1971         (ves_icall_Type_GetGenericParameterPosition): Use it.
1972         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
1973         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1974         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1975         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
1976         reference types.
1977         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
1978         reference types.
1979         (ves_icall_Type_get_IsGenericInstance): Likewise.
1980         (ves_icall_Type_get_IsGenericType): Likewise.
1981
1982 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
1985         class if possible.
1986
1987         * mempool.h (mono_mempool_get_allocated): New helper function.
1988
1989         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
1990         change.
1991
1992         * mempool.c: Fix warnings and the calculation of stats.
1993
1994         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
1995
1996         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
1997
1998         * loader.c (mono_get_method_from_token): Update method_count stat.
1999
2000         * class-internals.h (MonoStats): Add some stats.
2001
2002 2006-08-31 Robert Jordan  <robertj@gmx.net>
2003
2004         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
2005         with managed variants.
2006         All code is contributed under the MIT/X11 license.
2007         
2008 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
2009
2010         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
2011         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
2012
2013         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
2014
2015         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
2016         with cycles in classes.
2017
2018         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
2019
2020         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
2021         missing a [MarshalAs] directive. Fixes #79203.
2022
2023         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
2024         klass->marshal_info. Fixes #79217.
2025
2026 2006-08-30  Martin Baulig  <martin@ximian.com>
2027
2028         Committing a patch from Joachim Ante <joe@otee.dk>:
2029         Add support for binary data symbol stores.
2030
2031         * debug-mono-symfile.c
2032         (mono_debug_open_mono_symbol_file): Renamed into
2033         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
2034         arguments.
2035
2036         * mono-debug.c
2037         (mono_debug_open_image): Added `raw_contents' and `size' args.
2038         (mono_debug_init_2_memory): New public function.
2039
2040 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
2041
2042         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
2043
2044 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2045
2046         * appdomain.c: implement support for ShadowCopyFiles.
2047
2048 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
2049
2050         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
2051         when value is NULL (and should remove CID #51).
2052
2053 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2054
2055         * image.c: moved 2 functions to ../utils.
2056
2057 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
2058
2059         * gc.c: cope with the target object of a GC handle being NULL
2060         (bug #78877).
2061
2062 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
2063
2064         * class.c: recursively check parent's explicit implementations
2065         of interface methods (fixes bug #79125).
2066
2067 2006-08-19  Miguel de Icaza  <miguel@novell.com>
2068
2069         * filewatcher.c: Avoid warnings when building, do not redefine
2070         constants that are defined.
2071
2072         Remove warnings.
2073
2074 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2075
2076         * image.c: don't fail when the link points to an absolute path.
2077
2078 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
2079
2080         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
2081         Fix CID #3.
2082
2083 2006-08-17  Miguel de Icaza  <miguel@novell.com>
2084
2085         * image.c (full_path): A new method used to obtain the actual path
2086         of an assembly even in the presence of symbolic links.  
2087
2088         This is necessary for the case where we are running a binary that
2089         has been GACed, but we are using the "published" path name
2090         ($prefix/mono/1.0/blah.exe) which happens to point to the real
2091         file in the GAC.
2092
2093         This was the source of the failure for the `xsp' command with the
2094         recent AppDomain changes, as far as the runtime was concerned,
2095         there were two different assemblies: $prefix/mono/1.0/blah.exe and
2096         $prefix/mono/gac/blah/version/blah.exe.
2097
2098         (do_mono_image_open): use full path
2099
2100 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2101
2102         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
2103
2104 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
2105
2106         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
2107         domain_id is supplied. Fix CID #241 and corlib's unit tests.
2108
2109 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2110
2111         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
2112         small structures. Fixes #78990.
2113
2114 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2115
2116         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
2117
2118         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
2119
2120 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2121
2122         * appdomain.c:
2123         * marshal.c: don't load all the assemblies from a domain into newly
2124         created ones. The new domains might have different rules and load
2125         assemblies from different locations. Fixes bug #76757.
2126
2127         Patch by Lluis. Conflicts resolved by Brian Crowell.
2128
2129 2006-08-16  Alp Toker  <alp@atoker.com>
2130
2131         * socket-io.c: First half of the fix for #79084.
2132         Set sa_size to the length of the content, not that of the struct.
2133         Don't add NULL suffix to the content, this should be done in
2134         managed code if needed.
2135
2136 2006-08-14  Raja R Harinath  <rharinath@novell.com>
2137
2138         Fix part of #79012
2139         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
2140         mono_metadata_parse_type returns NULL.
2141
2142 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
2143
2144         * normalization-tables.h : new file for string normalization data.
2145         * locales.c, locales.h, icall.c :
2146           added load_normalization_resource() for string normalization,
2147           and icall as well.
2148         * Makefile.am : added normalization-tables.h to the sources.
2149
2150 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * marshal.c: Add more helper functions to reduce code duplication and use them
2153         everywhere.
2154
2155 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
2156
2157         * marshal.c: Fix non-x86 stdcall warnings.
2158         
2159         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
2160         them everywhere.
2161
2162 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
2163
2164         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
2165         type check on multi-dimensional arrays. Fixes #79000.
2166
2167 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
2168
2169         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
2170         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
2171         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
2172         * class-internals.h: add is_com_object to class structure.
2173         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
2174         null checks to COM object marshalling. Fix .ctor call on RCW.
2175         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
2176         
2177         All code is contributed under the MIT/X11 license.
2178
2179 2006-08-09  Dick Porter  <dick@ximian.com>
2180
2181         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
2182         racing mono_monitor_allocator_lock() somewhere, so don't delete
2183         the critical section for now.  Found by running and exiting
2184         monodevelop.
2185
2186 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
2187
2188         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
2189         (ves_icall_System_ComObject_FindInterface): Ditto.
2190         (ves_icall_System_ComObject_CacheInterface): Ditto.
2191
2192         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
2193         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
2194
2195 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2196
2197         * threadpool.c: treat pipes from process asynchronous reads as sockets
2198         when reading from them, so we get select/poll or epoll to wait for
2199         data.
2200
2201 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
2202
2203         * loader.c: Fix a typo (CID #233) in the null check.
2204
2205 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
2206
2207         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
2208         Hopefully fixes #78949.
2209         
2210         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
2211         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
2212         bytes. Fixes #78972.
2213
2214 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2215
2216         * filewatcher.c: we need to set errno here.
2217
2218 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2219
2220         * filewatcher.c: let Win32Exception get the error value.
2221
2222 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2223
2224         * filewatcher.c: translate errno into win32 errors for Win32Exception
2225         to know what happened.
2226
2227 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
2228
2229         * threadpool.c: Fix more warnings.
2230
2231         * assembly.c (search_loaded): Fix warnings.
2232
2233         * threadpool.c (mono_thread_pool_finish): Fix warnings.
2234         (mono_async_invoke): Ditto.
2235
2236 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
2237
2238         * object.c (mono_remote_class_vtable): Need to create proxy vtable
2239         entries for __ComObject type in addition to ComImport types.
2240         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
2241         about hash table.
2242         
2243         All code is contributed under the MIT/X11 license.
2244
2245 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
2246
2247         * image.c: avoid tentative loading of modulerefs that contain
2248         no metadata (P/Invoke library names).
2249
2250 2006-07-28  Dick Porter  <dick@ximian.com>
2251
2252         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
2253         mono_loader_lock() somewhere, so don't delete the critical section
2254         for now.  Found by running and exiting monodevelop.
2255
2256 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2257
2258         * filewatcher.c: define the inotify syscalls when we're building on
2259         linux and have sys/syscall.h. The build system might not have support
2260         for inotify but the target system might have it.
2261
2262 2006-07-26  Miguel de Icaza  <miguel@novell.com>
2263
2264         * domain.c: Documentation updates.
2265
2266         * loader.c (mono_free_method): Do not release the method
2267         information if we are being profiled, as profilers will use this
2268         information at shut down to present some data to the user.
2269
2270         This is needed so that the profiler does not crash, as the
2271         profiler tends to keep MonoMethods around, and they might become
2272         invalid if we free these.
2273
2274         (mono_get_method_constrained): Return the original CIL stream
2275         method as well, so verification can be performed against it.
2276
2277 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2278
2279         * filewatcher.[ch]: support for inotify file system watcher.
2280         * icall.c: add new internal calls for the inotify file system watcher.
2281
2282 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2283
2284         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
2285         #78888.
2286
2287 2006-07-20  Dick Porter  <dick@ximian.com>
2288
2289         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
2290         warning.
2291
2292 2006-07-20  Dick Porter  <dick@ximian.com>
2293
2294         * threads.c (start_wrapper): Do the thread cleanup while we still
2295         hold a reference to its object.  Fixes bug 78123.
2296
2297 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
2298
2299         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
2300         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
2301           "managed-to-managed".
2302         * icall.c: Redirect string constructors that take sbyte* to
2303           ves_icall_System_String_ctor_RedirectToCreateString.
2304         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
2305           to CreateString () methods with matching signature.
2306         * reflection.c: Use original security informations for
2307           MONO_WRAPPER_MANAGED_TO_MANAGED.
2308         * security-manager.c: Use original security informations for
2309           MONO_WRAPPER_MANAGED_TO_MANAGED.
2310         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
2311           that is a placeholder and only its address should be used.
2312         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
2313           that is a placeholder and only its address should be used.
2314
2315 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
2316
2317         Begin implementing COM Interop.
2318         * appdomain.c: Increment corlib version.
2319         * class.c: Set ComImport classes' parent to __ComObject.
2320         * loader.c: Mark cominterop methods as such.
2321         * domain.c: Add __ComObject class to MonoDefaults structure.
2322         * image.c: Add 2 hashtables to the image for COM Interop related methods
2323         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
2324         using the mempool allocator
2325         
2326         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
2327         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
2328         declaration for mono_metadata_type_dup_mp.
2329         
2330         * debug-helpers.c: Added strings for two additional wrapper types
2331         * object.c: Create proxy objects for ComImport classes
2332         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
2333         and added __ComObject class to MonoDefaults structure.
2334         
2335         * object-internals.h: Finish MonoRealProxy definition, and add definition of
2336         MonoComInteropProxy and MonoComObject.
2337         
2338         * marshal.c: Added support for COM Interop
2339         (signature_cominterop): Converts managed signature to corresponding
2340         unmanaged COM signature.
2341         (cominterop_get_function_pointer): gets unmanaged function pointer via
2342         COM object vtable
2343         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
2344         (cominterop_get_method_interface): returns interface type that method is defined on
2345         (mono_mb_emit_cominterop_call): emits native call to function pointer
2346         gotten from vtable
2347         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
2348         that matches signature of unmanaged function.
2349         (cominterop_get_native_wrapper): wrapper around adjusted method call.
2350         (cominterop_get_invoke): forwards call from proxy to __ComObject
2351         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
2352         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
2353         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
2354         
2355         * marshal.h: Added Marshal icall declarations.
2356         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
2357         so we can access them in finalizer
2358         
2359 2006-07-14  Dick Porter  <dick@ximian.com>
2360
2361         * object.c (mono_type_initialization_cleanup): Fix a race
2362         condition by temporarily commenting out the critical section
2363         deletion.
2364
2365 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
2366
2367         * reflection.c (create_custom_attr): Fix some warnings.
2368         (create_custom_attr_data): Ditto.
2369         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
2370         types. Fixes #78855.
2371
2372 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
2373
2374         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
2375
2376         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
2377
2378 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
2379
2380         * reflection.c (resolve_object): Add support for DynamicMethod.
2381
2382         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
2383         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
2384
2385 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
2386
2387         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
2388         don't leak GPtrArray's pdata has we have no use (nor free) for it.
2389
2390 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
2391
2392         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
2393         Fixes #77888.
2394
2395 2006-06-30  Raja R Harinath  <rharinath@novell.com>
2396
2397         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
2398         slightly: remove a shadow local variable.
2399
2400 2006-06-29  Raja R Harinath  <rharinath@novell.com>
2401
2402         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
2403         definition that introduces the virtual function slot.
2404         Also fix Coverity #105.
2405
2406 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
2407
2408         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
2409         for dynamic assemblies. Fixes #78724.
2410
2411 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
2412
2413         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
2414         Fixes #78722.
2415
2416 2006-06-21  Martin Baulig  <martin@ximian.com>
2417
2418         * reflection.c
2419         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
2420         fixes #76484.
2421
2422 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
2425
2426 2006-06-20  Raja R Harinath  <rharinath@novell.com>
2427
2428         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
2429         nor TYPEREFs.
2430         * class.c (mono_class_create_from_typespec): Add 'context' argument.
2431         Inflate result if necessary.
2432         (mono_class_get_full): Remove old version.  Rename from
2433         'mono_class_get' and add 'context' argument.  Pass it to
2434         ..._create_from_typespec.
2435         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
2436         (mono_ldtoken): Revert change below.
2437
2438 2006-06-20  Martin Baulig  <martin@ximian.com>
2439
2440         * class.c (mono_ldtoken): Don't pass the generic context to
2441         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
2442
2443 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
2444
2445         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
2446         and later freeing it. Fixes #78638.
2447
2448 2006-06-15  Miguel de Icaza  <miguel@novell.com>
2449
2450         * icall.c (mono_class_get_throw): Revert over-zealous error
2451         throwing, the caller for mono_class_get_throw will cope with
2452         errors when classes are not properly initialized already.
2453
2454         The code still copes with loader exceptions though.
2455
2456         Fixes the regression in reftype1 and reftype3 from the CAS tests.
2457         
2458 2006-06-14  Miguel de Icaza  <miguel@novell.com>
2459
2460         Fixes the `make run1' version of RuntimeAbort (to be commited,
2461         source is in Bugzilla).
2462         
2463         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
2464         FALSE on class loading failure instead of returning true.
2465
2466         * class.c (mono_class_create_from_typedef): It is possible for
2467         mono_metadata_interfaces_from_typedef_full to fail if a class is
2468         not found, cope with this.
2469         
2470
2471 2006-06-14  Dick Porter  <dick@ximian.com>
2472
2473         * socket-io.c: 
2474         * process.c: Fix a bunch of signed/unsigned warnings from gcc
2475         4.1.1
2476
2477 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
2478
2479         * culture-info-table.h : oops, forgot to make it nsync with r61548.
2480
2481 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
2482
2483         * icall.c: Another fix for building mono in Visual Studio.
2484
2485 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
2486
2487         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
2488         
2489 2006-06-09  Martin Baulig  <martin@ximian.com>
2490
2491         * debug-mono-symfile.c: Put this back and really fix it this
2492         time. Sorry for all the trouble.
2493
2494 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
2495
2496         * icall.c (mono_class_get_throw): Fix a warning.
2497         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
2498         ReflectionTypeLoadException if needed. Fixes #78606.
2499
2500         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
2501         (mono_class_init): Ditto.
2502
2503         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
2504         ref_only exceptions.
2505         (mono_loader_clear_error): Make this work even if there is no error.
2506
2507 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
2508
2509         * object-internals.h marshal.c marshal.h icall.c: Implement method 
2510         Marshal.GetComSlotForMethodInfo using internal call.
2511
2512 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
2513
2514         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
2515         a function for signalling it.
2516
2517         * class.c (mono_class_from_typeref): Use the new kind of loader error when
2518         a referenced assembly is not found.
2519
2520         * loader.c (mono_loader_error_prepare_exception): Add support for 
2521         LOADER_ERROR_ASSEMBLY. Fix formatting.
2522
2523 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
2524
2525         * domain.c appdomain.c class-internals.h marshal.c: Add support 
2526         for VARIANT marshalling on windows and increment corlib version
2527         since Variant struct was added.
2528
2529 2006-06-03  Miguel de Icaza  <miguel@novell.com>
2530
2531         * debug-mono-symfile.c: Revert Martin's previous patch which broke
2532         stack trace line information:
2533
2534         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
2535         (Martin) when looking up B which is between A and C, return A not C.
2536
2537         Bug is #78573.
2538
2539         Thanks to Alexander Olk for tracking this down.
2540
2541 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
2542
2543         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
2544         
2545         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
2546         avoid clobbering its value.
2547         (mono_string_to_lpstr): Fix a warning on windows.
2548
2549 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
2550
2551         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
2552
2553         * reflection.c loader.c: Removed references to 'dummy' flag.
2554
2555         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
2556
2557         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
2558         it gets GC tracking.
2559
2560         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
2561         GC tracking.
2562         
2563         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
2564
2565         * marshal.c threadpool.c: Update callers of mono_async_result_new.
2566
2567         * appdomain.c: Bump corlib version.
2568
2569 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
2570
2571         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2572         CEE_STIND_REF when working with object references.
2573
2574 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
2575
2576         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
2577         Fixes #78539.
2578
2579 2006-05-30  Miguel de Icaza  <miguel@novell.com>
2580
2581         * loader.c (method_from_memberref): Fix argument value for
2582         mono_loader_set_error_method_load (I was passing the MonoClass
2583         instead of the class name char *).
2584
2585 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
2586
2587         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2588         CEE_STIND_REF when working with object references.
2589
2590 2006-05-30  Martin Baulig  <martin@ximian.com>
2591
2592         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
2593         mono_method_full_name() change and replace the ':' with a '.'
2594         here.
2595
2596 2006-05-30  Martin Baulig  <martin@ximian.com>
2597
2598         * debug-mono-symfile.c
2599         (mono_debug_symfile_lookup_location): Fix the algorithm:
2600         when looking up B which is between A and C, return A not C.
2601
2602 2006-05-29  Martin Baulig  <martin@ximian.com>
2603
2604         * mono-debug.h
2605         (MonoDebugMethodInfo): Make the typedef public.
2606         (MonoDebugSourceLocation): New public struct.
2607
2608         * mono-debug.c
2609         (mono_debug_source_location_from_address): Removed.
2610         (mono_debug_source_location_from_il_offset): Removed.
2611         (mono_debug_il_offset_from_address): Removed.
2612         (mono_debug_address_from_il_offset): Removed.
2613         (mono_debug_lookup_method): New public function.
2614         (mono_debug_lookup_source_location): New public function; replaces
2615         the old mono_debug_source_location_from_*() functions; see the
2616         inline documentation.
2617         (mono_debug_free_source_location): New public function.
2618         (mono_debug_print_stack_frame): New public function; see the
2619         inline documentation.
2620
2621         * debug-mono-symfile.c
2622         (mono_debug_find_source_location): Renamed into
2623         mono_debug_symfile_lookup_location(); only take a
2624         `MonoDebugMethodInfo *' and an `offset' argument; added inline
2625         documentation.
2626         (mono_debug_find_method): Renamed into
2627         mono_debug_symfile_lookup_method().
2628
2629 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
2630
2631         * assembly.c (mono_assembly_open_full): Dont overwrite the status
2632         returned by mono_image_open_full ().
2633
2634         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
2635         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
2636         #78517.
2637
2638         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
2639         #78518.
2640
2641 2006-05-27  Miguel de Icaza  <miguel@novell.com>
2642
2643         * class.c (mono_class_from_typeref): handle missing images
2644         earlier, deals with bug #78418.   Refactor code; 
2645
2646         Fix a warning introduced in my previous commit (some stale code
2647         from before I revisited my patch).
2648
2649         * class.c (mono_class_create_from_typedef): On failure, remove the
2650         class from the MonoImage->class_cache as the class is not
2651         initialized;   Fixes the leak pointed out by Paolo.
2652
2653 2006-05-25  Dick Porter  <dick@ximian.com>
2654
2655         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
2656         DeleteCriticalSections until I figure out which one may still be
2657         sometimes locked when mono_thread_cleanup is called.
2658
2659 2006-05-24  Dick Porter  <dick@ximian.com>
2660
2661         * threads.c (mono_thread_cleanup): Move the threading cleanup out
2662         of mono_thread_manage and back into its own function, so it can be
2663         called after the finalizer thread has finished.
2664
2665         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
2666
2667 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
2668
2669         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
2670         Fixes #78495.
2671
2672         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
2673         with non-blittable elements.
2674         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
2675
2676 2006-05-24  Martin Baulig  <martin@ximian.com>
2677
2678         * mono-debug-debugger.h (MonoDebuggerEvent): Added
2679         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
2680
2681         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
2682         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
2683         `mono_debugger_event_handler' to NULL.
2684
2685 2006-05-24  Martin Baulig  <martin@ximian.com>
2686
2687         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
2688
2689 2006-05-24  Martin Baulig  <martin@ximian.com>
2690
2691         * mono-debug-debugger.h
2692         (mono_debugger_create_notification_function): Added
2693         `MonoCodeManager *' argument.
2694
2695 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
2696
2697         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
2698
2699 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
2700
2701         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
2702         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
2703         implementation.
2704
2705 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
2706
2707         * icall.c: precise GC support: objects can't be stored in unmanaged
2708         memory anymore, even if they are kept alive by other references: since
2709         they can move the GC needs to be able to always find them.
2710
2711 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2712
2713         * object.c: precise GC support for static fields. Support
2714         for moving GCs: write barriers and pinned allocation for interned
2715         strings.
2716
2717 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
2718
2719         * domain.c, domain-internals.h: precise GC support for the MonoDomain
2720         structure.
2721
2722 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2723
2724         * class.c, gc.c: sgen and precise GC updates.
2725
2726 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
2727
2728         * marshal.h, marshal.c: added write barrier wrapper and precise type
2729         fixes.
2730
2731 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
2732
2733         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
2734         support.
2735
2736 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
2737
2738         * reflection.c: precise and sgen GC updates.
2739
2740 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
2741
2742         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
2743
2744 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
2745
2746         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
2747
2748 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
2749
2750         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
2751         MONO_TYPE_OBJECT. Fixes #78462.
2752
2753 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
2754
2755         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
2756         and blittable types.
2757
2758 2006-05-17  Miguel de Icaza  <miguel@novell.com>
2759
2760         * class.c (mono_class_get_exception_for_failure): Implement parts
2761         of a TODO: if the loader error is set (instead of the class
2762         error), we return a Loader exception that can be properly thrown
2763         elsewhere.
2764
2765         This was exposed by some Winforms 2.0 code that I tried to run
2766         (Atsushi pointed me to it).
2767
2768 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
2769
2770         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
2771         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
2772         
2773         * marshal.c (emit_marshal_vtype): Add limited support for 
2774         UnmanagedType.LPStruct. Fixes #78427.
2775
2776         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
2777         Applied a patch from kangaroo to fix #77523.
2778
2779 2006-05-17  Martin Baulig  <martin@ximian.com>
2780
2781         * threads.c
2782         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
2783         (debugger_thread_created): Removed.
2784         (debugger_thread_exited): Removed.
2785
2786 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
2787
2788         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2789
2790         * object-internals.h (MonoReflectionResource): Sync with managed version.
2791
2792 2006-05-12  Wade Berrier <wberrier@novell.com>
2793
2794         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
2795
2796 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
2797
2798         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
2799         functions try to allocate from the image mempool.
2800
2801 2006-05-12  Dick Porter  <dick@ximian.com>
2802
2803         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
2804
2805 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
2806
2807         * object.c: The FieldGetter and FieldSetter methods require the full
2808         name of the class, not only the name. Fixes bug #78277.
2809
2810 2006-05-11  Miguel de Icaza  <miguel@novell.com>
2811
2812         * loader.c (method_from_memberref): Do not pass the NULL klass to
2813         mono_loader_set_error_() methods.  Pass the non-NULL value
2814         (class). 
2815
2816 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
2819         (mono_assembly_close): Null out assembly->image->references after freeing it.
2820
2821         * image.c (mono_image_close): Free image->references.
2822         
2823         * reflection.c (mono_image_basic_init): Fix a small memory leak.
2824
2825 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
2826
2827         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
2828         before checking if it's NULL (g_assert).
2829
2830 2006-05-10  Martin Baulig  <martin@ximian.com>
2831
2832         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
2833         I thought I already killed that two months ago, but now it somehow reappeared.
2834
2835 2006-05-10  Martin Baulig  <martin@ximian.com>
2836
2837         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
2838
2839 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
2840
2841         * reflection.c: Allocate memory for dynamically created methods in the image
2842         mempools.
2843
2844 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
2845
2846         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
2847         don't use the ad pointer before checking if it's NULL (g_assert).
2848
2849 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
2850
2851         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
2852         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
2853
2854         * marshal.c: Allocate all signatures from mempools.
2855
2856         * marshal.c: Allocate some more signatures from mempools.
2857
2858 2006-05-09  Miguel de Icaza  <miguel@novell.com>
2859
2860         * object.c (mono_load_remote_field): The code used to provide a
2861         temporary variable for returning results if the user did not
2862         provide a result pointer.  But our temporary variable was allocted
2863         on the satck.
2864
2865         Fix calling code to always pass a result area.   Coverity ID 103.
2866
2867 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
2868
2869         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
2870         value, not the old. Fixes #78312.
2871         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
2872
2873         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
2874         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
2875         per-image cache.
2876
2877         * assembly.c (mono_assembly_close): Free image->references.
2878
2879         * assembly.c (mono_assembly_names_equal): Fix a warning.
2880         (mono_assemblies_cleanup): Cleanup more global data.
2881
2882         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
2883
2884         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
2885         ptr_cache and image->modules.
2886
2887         * image.c (mono_image_init): Allocate array_cache lazily.
2888         
2889 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2890
2891         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
2892         behavior was changed recently and has bad side effects.
2893
2894 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
2895
2896         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
2897         
2898         * assembly.c (mono_assembly_close): Remove a debug printf.
2899
2900         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
2901
2902         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
2903         to also allow for temporary references between mono_image_open ()/close ().
2904
2905         * domain.c (get_runtimes_from_exe): Add a FIXME.        
2906
2907 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
2908
2909         * marshal.c: Fix support for dynamic methods.
2910
2911         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
2912
2913         * marshal.c (mono_marshal_cleanup): New cleanup function.
2914
2915         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
2916         image mempools.
2917
2918         * class.c (mono_class_init): Fix leaking class->nested_classes.
2919
2920         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
2921
2922         * image.c (mono_image_init): Initialize the new cashes.
2923
2924         * image.c (mono_image_close): Destroy the new cashes.
2925
2926         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
2927
2928         * mempool.c (mono_mempool_strdup): New helper function.
2929
2930         * class-internals.h: Add prototype for mono_loader_unlock ().
2931
2932         * domain.c (mono_jit_info_table_find): Fix a warning.
2933         (mono_debugger_check_runtime_version): Ditto.
2934
2935         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
2936         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
2937         functions to these modules.
2938
2939         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
2940         metadata modules.
2941         
2942         * marshal.c (mono_free_bstr): Fix a warning.
2943
2944         * assembly.c (mono_assembly_open_full): Fix another small leak.
2945
2946         * object.c: Fix some unload leaks in the remoting code.
2947
2948         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
2949         function.
2950
2951         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
2952
2953         * reflection.c: Fix some unload leaks in dynamic assemblies.
2954
2955 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
2956
2957         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
2958         * marshal.h: Add BSTR support on Win32
2959         * icall.c: Add BSTR icalls
2960         * metadata.h: Add BSTR enums
2961
2962 2006-04-28  Miguel de Icaza  <miguel@novell.com>
2963
2964         Work to catch the crash from #76795 and turn it into an
2965         exception.   As I stubbed out pieces of the VisualBasic support,
2966         I found a number of places where the code was failing and I added
2967         checks to those places. 
2968         
2969         * metadata.c (do_mono_metadata_parse_generic_class): Make this
2970         function return a status code.  If we fail to parse the signature
2971         from mono_metadata_parse_generic_inst, return FALSE.
2972
2973         * loader.c (mono_get_method_from_token): If we fail to load the
2974         method (mono_class_get) return NULL.   
2975
2976         * (method_from_memberref): Return NULL if we are unable to parse
2977         the method signature
2978
2979         (mono_loader_error_prepare_exception): Since we now use the
2980         loader_error flag internally to stop processing, and obtaining
2981         exceptions that might be thrown will walk this code path the
2982         proper way of going from a MonoLoaderError into a
2983         MonoException was convoluted.   This new routine encapsulates the
2984         process of turning the error into an exception and *clearing* the
2985         error afterwards.
2986         
2987 2006-04-27  Miguel de Icaza  <miguel@novell.com>
2988
2989         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
2990         with missing assemblies), and to cope with:
2991
2992                 * Missing fieldref from a non-existing assembly.
2993                 * Missing methodref from a non-existing assembly.
2994
2995         The first batch of work to address *some* of the issues from 76661.
2996         
2997         * object.c (mono_class_create_runtime_vtable): If we fail to
2998         initialize the class raise the exception here. 
2999
3000         * metadata.c (mono_class_get_overrides_full): If any methods fail
3001         to load return the failure to the caller.
3002
3003         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
3004         flagging assemblies that failed to load.   
3005
3006         Do not crash if we are unable to load the assembly.
3007
3008         (mono_assembly_close): Do nothing with REFERENCE_MISSING
3009         assemblies. 
3010
3011         * loader.c (mono_loader_set_error_type_load): Change the
3012         convention to always pass unallocated strings, so we make our own
3013         copies (I know our own code had duplicated strings before, but
3014         this keeps the normal conventions).
3015         (method_from_memberref): Call mono_loader_set_error_method_load
3016         for all possible failures of loading the class. 
3017         Remove assert, turn into a loader error.
3018
3019         (mono_loader_error_to_exception): Move this routine from mini
3020         (mini_loader_error_to_exception) there was no need to have that in
3021         mini. 
3022
3023         * class.c (mono_class_from_typeref): If we were not able to load
3024         the assembly with mono_assembly_load_reference, call the
3025         mono_loader_set_error_type_load to register the problem.
3026
3027         (mono_class_setup_fields): If we fail to load the type from
3028         mono_metadata_parse_type_full, call mono_class_set_failure and
3029         break from the loop.
3030
3031         If class->exception_type is set, we do not layout the fields as
3032         that might crash the runtime, and instead return (from breaking
3033         from the previous loop).
3034
3035         (mono_class_setup_vtable): This now returns a boolean indicating
3036         whether the table was properly setup.   The decision is driven by
3037         mono_class_get_overrides_full which might run into non-existing
3038         methods. 
3039         
3040         (mono_class_init): Returns TRUE on success or FALSE if there was a
3041         problem in loading the type (incorrect assemblies, missing
3042         assemblies, methods, etc).
3043
3044         When we call mono_class_setup_fields we also check for a potential
3045         error inside this call (either a class exception or a general
3046         loader exception).
3047
3048         (mono_class_create_from_typedef): If the parent fails to load
3049         (calling mono_class_get_full) return NULL.
3050         
3051         ** Important **
3052
3053         calls to mono_metadata_parse_type_full should be checked
3054         everywhere and set the mono_class_set_failure
3055         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
3056
3057         The current patch checks the places where my manually constructed
3058         tests show the errors are showing up, but we should do it
3059         everywhere. 
3060
3061         ** Important2 **
3062
3063         mono_class_init return values should be tested everywhere, like
3064         the previous case this is something that we should audit
3065         everywhere and not only on the cases exposed by the tests I
3066         created. 
3067
3068 2006-04-26  Miguel de Icaza  <miguel@novell.com>
3069
3070         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
3071         boolean parameter and instead pass the information on `options'
3072         parameter (FileOptions).
3073
3074         * icall.c: Register the new signature for MonoIO.Open.
3075
3076         * debug-helpers.c (dis_one): Trying to understand how coverity
3077         works.  Fix Run 5, item 78.
3078
3079 2006-04-26  Dick Porter  <dick@ximian.com>
3080
3081         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
3082         dereference.
3083
3084 2006-04-25  Martin Baulig  <martin@ximian.com>
3085
3086         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
3087
3088         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
3089         debugger_thread_created().
3090         (debugger_gc_push_all_stacks): Don't handle the main thread in any
3091         special way.
3092         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
3093         (mono_debugger_finalize_threads): New function; undo the effects
3094         of mono_debugger_init_threads().
3095         (mono_debugger_create_all_threads): Removed.
3096
3097 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
3098
3099         * image.c (mono_image_close): Tidy up trace messages.
3100
3101         * assembly.c (mono_assembly_close): Ditto.
3102
3103         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
3104         no longer references an already freed assembly. Fixes #78168.
3105
3106 2006-04-21  Dick Porter  <dick@ximian.com>
3107
3108         * threads.c (mono_thread_detach): Fix reference counting when
3109         detaching threads.
3110
3111 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
3112
3113         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
3114         #78155.
3115
3116 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
3117
3118         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
3119         (mono_type_to_stind): Ditto.
3120
3121         * marshal.c: Use the new helper functions to simplify code.
3122
3123         * image.c (mono_image_close): Add some code for help debug assembly unloading
3124         problems.
3125
3126         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
3127         image mempool.
3128
3129         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
3130         assembly was already loaded in another appdomain. Fixes #78083.
3131
3132 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
3133
3134         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
3135         referenced assemblies.
3136         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
3137
3138         * domain.c (mono_domain_free): Add a trace message.
3139
3140         * appdomain.c (add_assemblies_to_domain): Ditto.        
3141
3142         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
3143         field.  
3144
3145 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
3146
3147         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
3148
3149 2006-04-12  Martin Baulig  <martin@ximian.com>
3150
3151         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
3152         `USE_INCLUDED_LIBGC'.   
3153
3154 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
3155
3156         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
3157         the patch contains ../ and a small directory name later. Hopefully fixes
3158         #78035.
3159
3160 2006-04-10  Martin Baulig  <martin@ximian.com>
3161
3162         Clean up the debugger's thread-handling code.
3163
3164         The debugger's thread-handling code has been moved from
3165         ../mini/debug-debugger.c to threads.c.  We now iterate directly
3166         over the `threads' hash, keep track of exiting threads and also
3167         use proper locking.
3168
3169         We can now debug XSP and XSP based applications with the debugger.
3170
3171         * object-internals.h (MonoThread): Added `gpointer end_stack'.
3172
3173         * threads.h
3174         (MonoThreadCallbacks): Removed; this was only used by the debugger.
3175         (mono_install_thread_callbacks): Likewise.      
3176
3177         * threads.c (mono_thread_callbacks): Removed.
3178         (debugger_thread_created, debugger_thread_exited): New static functions.
3179         (start_wrapper): Call debugger_thread_created().
3180         (thread_cleanup): Call debugger_thread_exited().
3181         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
3182         (mono_debugger_init_threads): New public function.
3183         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
3184         iterate directly over the `threads' hash and also use proper locking.
3185
3186         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
3187
3188         * mono-debug-debugger.h
3189         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
3190
3191 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
3192
3193         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
3194         argument type=array. Fixes #78057.
3195
3196 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
3197
3198         * culture-info-table.h : regenerated. Fixed bug #69652.
3199
3200 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
3201
3202         * loader.c metadata.c: Reapply a variant r59116.
3203         
3204         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
3205
3206         * class.c (mono_class_setup_interface_offsets): New internal function.
3207
3208         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
3209         interfaces too. Fixes #77398.
3210
3211         * reflection.c (encode_cattr_value): Add support for 
3212         parameter type=object, argument type=array.
3213         (load_cattr_value): Ditto. Fixes #77916.
3214
3215         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
3216         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
3217
3218         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
3219         a byval char array and CharSet is Ansi.
3220
3221         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
3222
3223 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
3224
3225         * metadata.c: Add some locking comments.
3226         
3227         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
3228         mempool.
3229         (mono_metadata_free_method_signature): Don't free the signature itself.
3230
3231         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
3232
3233         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
3234         reference the same MonoImage.
3235         (mono_assembly_load_from_full): Add an assert.
3236
3237 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
3238
3239         * image.c (mono_image_close): Don't put the image we are about to free into the
3240         loaded_images_guid_hash.
3241
3242         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
3243         to reduce code duplication.
3244
3245         * marshal.c: Register the native functions called by this module as icalls, to
3246         somewhat centralize the creation of MonoMethodSignature's.
3247
3248         * loader.c (mono_method_signature): Add a cache for method signatures.
3249
3250         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
3251         the parameter attributes of a method.
3252         (mono_metadata_parse_method_signature_full): Refactored the computation of
3253         parameter attributes into a separate function. Also avoid one allocation in
3254         most cases.
3255
3256         * assembly.c (mono_assembly_close): Ditto.
3257
3258         * image.c (mono_image_close): Log trace messages with INFO level.
3259
3260         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
3261
3262         * image.c reflection.c: Correct reference counting of image modules.
3263         
3264         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
3265         of this function from the image mempool.
3266         
3267         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
3268         to allow more cached types to be used.
3269
3270         * mono-debug.c (mono_debug_add_method): Appled patch from
3271         David S. Miller  <davem@sunset.davemloft.net>: Access 
3272         minfo->lexical_blocks[] entry elements using read32().
3273
3274 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
3275
3276         * loader.c (mono_free_method): No longer free the method header for non-dynamic
3277         methods as it is allocated from the mempool.
3278
3279         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
3280         image mempool.
3281
3282         * metadata-internals.h: Add comments describing the reference counting scheme
3283         used for MonoImage and MonoAssembly.
3284
3285         * image.c assembly.c reflection.c: Rework reference counting of images and 
3286         assemblies so they are freed when the runtime is shut down. Free some 
3287         additional memory structures when an image is unloaded.
3288         
3289 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
3290
3291         * class.c loader.c reflection.c: Allocate more data structures in
3292         the image mempool.
3293
3294 2006-03-31  Miguel de Icaza  <miguel@novell.com>
3295
3296         * icall.c
3297         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
3298         build on pre glib 2.4 systems.
3299
3300 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
3301
3302         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
3303
3304         * icall.c: Fix some warnings.
3305
3306 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
3307
3308         * culture-info-table.h : regenerated.
3309
3310 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
3311
3312         * threads.c, object-internals.h, verify.c: changed the culture caching
3313         code to use a normal MonoArray for storage so the GC can keep track of
3314         them easily. Fixed bits of the cache logic, too and simplified the
3315         code.
3316
3317 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
3318
3319         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
3320         thread for non-Boehm GCs.
3321
3322 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
3323
3324         * domain.c, object.c, domain-internals.h: reduce the amount of memory
3325         needed to keep track of the data for static fields.
3326
3327 2006-03-29  Raja R Harinath  <rharinath@novell.com>
3328
3329         Fix #75172
3330         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
3331         for interface classes.  Use 'num_methods' instead.
3332         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
3333         before using '->vtable_size' field.
3334
3335 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3336
3337         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
3338         doesn't contain managed pointers, so use a normal hashtable.
3339
3340 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
3341
3342         * reflection.c, class-internals.h, domain.c: fixed handling of types
3343         used as values for objects in custom attributes (bug #77915):
3344
3345 2006-03-24  Martin Baulig  <martin@ximian.com>
3346
3347         * class.c (mono_class_setup_fields): Added support for generic
3348         instances; fixes #77580.
3349
3350 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3351
3352         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
3353
3354 2006-03-24  Dick Porter  <dick@ximian.com>
3355
3356         * file-io.c (get_file_attributes): More stat macro breakage.
3357         Fixes bug 77759.
3358
3359 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
3360
3361         * profiler.c: added the file=filename option in the default profiler
3362         to output the profile data to filename.
3363
3364 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3365
3366         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
3367         bug #77877.
3368
3369 2006-03-22  Martin Baulig  <martin@ximian.com>
3370
3371         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
3372         allocated `MonoClassField *' in `fb->handle'.
3373
3374 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3375
3376         * class.c, image.c, metadata-internals.h: implemented new mechanism to
3377         allocate interface ID to save memory and allow better ID reuse on
3378         appdomain unload. setup_generic_vtable () removal from Martin.
3379
3380 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3381
3382         * object.h, appdomain.c, domain.c, exception.c, icall.c,
3383         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
3384         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
3385         write barriers for reference stores with managed objects accessed with
3386         C structures in the runtime and in embedding programs.
3387
3388 2006-03-20  Raja R Harinath  <rharinath@novell.com>
3389
3390         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
3391         'interface_id' and 'max_interface_id' fields of MonoClasses
3392         representing open generic types.
3393
3394 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
3395
3396         * object.h, object.c, icall.c: added functions to deal with
3397         storing valuetypes that contain references in managed objects.
3398         * reflection.c, string-icalls.c, threads.c, marshal.c: small
3399         fixes and comments around uses of mono_array_addr ().
3400
3401 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
3402
3403         * object.h, icall.c, monitor.c: object.GetHashCode ()
3404         implementation that supports the moving garbage collector.
3405
3406 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3407
3408         * icall.c, threads-types.h, threads.c: implemented finalizer for
3409         LocalDataStoreSlot.
3410
3411 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
3412
3413         * metadata.c (mono_type_size): Add a fixme.
3414         (mono_type_stack_size): Ditto.
3415
3416         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
3417         'type_forwarders' field.
3418
3419         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
3420         attribute from net 2.0.
3421
3422         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
3423         from class.c.
3424
3425         * class.c (mono_class_setup_fields): Fix a warning.
3426         
3427         * class.c (mono_class_from_name): Add support for assemblyref entries
3428         in the EXPORTEDTYPE table.
3429
3430         * reflection.c: Add support for handling type forwarders under net 2.0.
3431
3432         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
3433         
3434 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
3435
3436         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
3437         overwriting entries in ModuleBuild->types, also clean up the code
3438         a little. Fixes #77774.
3439
3440 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3441
3442         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
3443         load friend assembly info when present.
3444
3445 2006-03-14  Raja R Harinath  <rharinath@novell.com>
3446
3447         Fix crasher on gtest-158.cs.
3448         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
3449         the return value if the MonoClass we want is yet in an
3450         inconsistent state.
3451         * class.c (mono_class_create_from_typedef): Add an comment
3452         explaining an order dependency between mono_class_setup_parent and
3453         mono_class_setup_mono_type.
3454
3455 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
3456
3457         * class.c: documentation updates and events bug fix.
3458
3459 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
3460
3461         * class.c: some cleanup, locking fixes.
3462
3463 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3464
3465         * class.c: fix the generics code to setup nested
3466         type info to the instantiated type (bug #77770).
3467
3468 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
3469
3470         * marshal.c: fixed a few type correctness issues.
3471
3472 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3473
3474         * loader.c: the Set/Get/Addrtess array methods should be public.
3475
3476 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
3477
3478         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
3479         
3480         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
3481         info->wrapper.
3482
3483 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
3484
3485         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
3486
3487         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
3488
3489         * mempool.c (mono_mempool_alloc): Speed this up a bit.
3490         (mono_mempool_alloc0): Ditto.
3491
3492 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3493
3494         * socket-io.c:
3495         (create_object_from_sockaddr): it was allocating 4 extra bytes
3496         for the AF_UNIX data. Fixes bug #77747.
3497
3498 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
3499
3500         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
3501
3502 2006-03-09  Dick Porter  <dick@ximian.com>
3503
3504         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
3505         Fixes bug 76966 again.
3506
3507 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
3508
3509         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
3510         names from r57532
3511         * appdomain.c: Bumped corlib version to 48 (due to r57532)
3512
3513 2006-03-07  Martin Baulig  <martin@ximian.com>
3514
3515         * object.c
3516         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
3517
3518 2006-03-07  Martin Baulig  <martin@ximian.com>
3519
3520         * class.c
3521         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
3522         regression introduced in r56970; see gtest-252.cs.
3523
3524         * loader.c (mono_get_method_constrained): Correctly handle generic
3525         methods; see gtest-253.cs.
3526
3527 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
3528
3529         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
3530
3531 2006-03-04  Martin Baulig  <martin@ximian.com>
3532
3533         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
3534         compute the parent type at runtime, just like we're already doing
3535         it for interfaces.
3536
3537         * reflection.c
3538         (mono_reflection_bind_generic_parameters): Don't compute the
3539         parent type anymore.
3540
3541         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
3542
3543 2006-03-04  Martin Baulig  <martin@ximian.com>
3544
3545         * mono-debug-debugger.h
3546         (mono_debugger_create_notification_function): Allocate memory at
3547         runtime and return a pointer to it.
3548
3549 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
3550
3551         * assembly.c: Fix windows build.
3552         
3553         * assembly.c: Fix build.
3554
3555         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
3556
3557         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
3558         
3559 2006-03-03  Dick Porter  <dick@ximian.com>
3560
3561         * process.c
3562         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3563         Check parameters before dereferencing them.  Fixes Aaron's part of
3564         bug 77393.
3565
3566 2006-03-03  Raja R Harinath  <rharinath@novell.com>
3567
3568         Fix performance regression.
3569         * loader.c (find_method_in_class): Add 'from_class' argument.
3570         Rename 'klass' argument to 'in_class'.  The signature is compared
3571         against the method in 'in_class', and the corresponding method is
3572         returned from 'from_class'.
3573         (find_method): Walk both 'in_class' and 'from_class' in parallel.
3574         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
3575         type definition and generic instantiation in parallel.
3576         (mono_get_method_constrained): Update to changes.
3577
3578 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3579
3580         * threads.c: make sure the domain is correct, too when doing
3581         mono_thread_attach ().
3582
3583 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
3584
3585         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
3586         windows. Fixes #77683.
3587
3588 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3589
3590         * object.h, *: introduced specific way to set elements of an array
3591         of references to be used as write barrier. Still need to audit the
3592         uses of mono_array_addr.
3593
3594 2006-03-01  Miguel de Icaza  <miguel@novell.com>
3595
3596         * object-internals.h: New field to cache the assmebly name, patch
3597         from Tambet Ingo (tambet@ximian.com)
3598
3599 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3600
3601         * decimal.h, class-internals.h, metadata-internals.h,
3602         file-io.h: mark a few function declarations as internal, to
3603         reduce the number of PLT entries.
3604
3605 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3606
3607         * file-io.c: fix typo in warning message.
3608
3609 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
3610
3611         * loader.c: on unix, lookup the "*A" version of a function
3612         if charset is auto as a second option before failing.
3613
3614 2006-02-28  Raja R Harinath  <rharinath@novell.com>
3615
3616         * class.h (mono_class_inflate_generic_method): Revert to two
3617         argument version.
3618         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
3619         (mono_class_inflate_generic_method_full): Add.
3620         * class.c (mono_class_inflate_generic_method_full): Rename from
3621         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
3622         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
3623         * loader.c, reflection.c: Update to changes.
3624
3625 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
3626
3627         * icall.c: const fixes and small improvements.
3628
3629 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3630
3631         * threadpool.c: for asynchronous connect(), enable the same workaround
3632         for BSD 6 as for the Mac. Fixes bug #77637.
3633
3634 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
3635
3636         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
3637         formatted classes. Fixes #77524.
3638
3639 2006-02-24  Raja R Harinath  <rharinath@novell.com>
3640
3641         * class.c (inflate_generic_type): Add a couple more
3642         micro-optimizations.
3643         (inflate_generic_context): Don't use the 'gmethod' from
3644         'inflate_with'.
3645         (mono_class_inflate_generic_method): If the method has generic
3646         parameters, but the passed-in context doesn't have a 'gmethod',
3647         create one.  Use the possibly simplified generic instantiation
3648         from the declaring class instead of the one passed in.
3649
3650 2006-02-24  Raja R Harinath  <harinath@gmail.com>
3651
3652         Make generic method signature and method header handling lazy.
3653         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
3654         (inflate_generic_header): Likewise.
3655         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
3656         parameter to avoid inflating types.
3657         (mono_get_inflated_method): Empty out.
3658         * class.h (mono_class_inflate_generic_method): Update to changes.
3659         * loader.c (mono_get_method_from_token): Don't parse signature for
3660         generic methods, nor methods of generic classes.
3661         (mono_method_signature): Rename from 'mono_method_signature'.
3662         Inflate signature on demand.
3663         (mono_method_get_header): Inflate method header on demand.
3664         * reflection.c: Update to changes.
3665
3666 2006-02-23  Raja R Harinath  <rharinath@novell.com>
3667
3668         * metadata.c (mono_metadata_inflate_generic_inst): If the
3669         instantiation is closed, don't bother expanding it in the new
3670         context.
3671         * class.c (inflate_generic_class): If the generic instantiation
3672         doesn't change after inflation, return the argument itself.
3673         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
3674         Add bounds checks.
3675         (inflate_generic_context): If neither the generic class nor the
3676         generic method instantiations change, return the original context.
3677         * reflection.c (mono_method_get_object): Do
3678         'mono_get_inflated_method' before accessing the ->klass field.
3679         (inflate_mono_method): Don't create a MonoGenericMethod unless
3680         necessary.
3681         (inflate_method): Don't pass a constructed type as the declaring
3682         type of a methodbuilder.
3683
3684 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
3685
3686         * object.c: fix memory overwrite.
3687
3688 2006-02-22  Dick Porter  <dick@ximian.com>
3689
3690         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
3691         it doesn't work any more.
3692         (mono_threads_request_thread_dump): Fix unused variable warnings.
3693
3694 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3695
3696         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
3697         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
3698         the public header file.
3699
3700 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
3701
3702         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
3703
3704 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3705
3706         * class-internals.h, object.c: reduce the size of MonoVTable
3707         and store the interface_offsets array at negative offsets.
3708
3709 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
3710
3711         * metadata.c: tweak table descriptors data structures to reduce
3712         size and runtime relocations.
3713
3714 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3715
3716         * marshal.c: fix some types and opcodes to be type-safe
3717         in marshaling wrappers.
3718
3719 2006-02-21  Ankit Jain  <jankit@novell.com>
3720
3721         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
3722
3723 2006-02-21  Raja R Harinath  <rharinath@novell.com>
3724
3725         * metadata.c (get_constraints): Relax debugging checks for monodis.
3726
3727 2006-02-21  Ankit Jain  <jankit@novell.com>
3728
3729         * metadata.c (mono_metadata_load_generic_params): Move the code
3730         checking for ambiguous generic params from here to mono/dis/get.c
3731         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
3732
3733 2006-02-21  Raja R Harinath  <harinath@gmail.com>
3734
3735         Fix assertion triggered when compiling nemerle.
3736         * class.c (mono_get_shared_generic_inst): Rename from
3737         get_shared_inst and make non-static.
3738         * loader.c (mono_get_shared_generic_method): New.  Used to create
3739         the MonoGenericContext-equivalent of a MonoGenericContainer.
3740         (mono_get_method_from_token): Initialize the 'context' field of
3741         the created MonoGenericContainer.
3742         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
3743         * metadata.c (get_constraints): Add sanity check.
3744         * class-internals.h: Add new internal methods.
3745
3746         * reflection.c (verify_safe_for_managed_space): New sanity check.
3747         Currently checks that owner-less generic parameters aren't allowed
3748         in managed space.
3749         (mono_type_get_object): Use it.
3750         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
3751         that are now in mono_type_get_object.
3752         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
3753
3754 2006-02-19  Raja R Harinath  <harinath@gmail.com>
3755
3756         * metadata.c (mono_type_create_from_typespec): Rename from
3757         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
3758         argument and caching of types in the generic container.
3759         (unwrap_arrays, find_generic_param): Remove.
3760         * metadata-internals.h: Update.
3761         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
3762
3763 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * class.c (mono_class_get_exception_for_failure): Fix a warning.
3766
3767         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
3768         return values. Fixes #77581.
3769
3770         * class.c (mono_fnptr_class_get): Switch name and name_space.
3771
3772         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
3773         classes and add support for [In, Out] attributes.
3774         (mono_marshal_free_asany): Ditto. Fixes #77524.
3775
3776 2006-02-18  Raja R Harinath  <harinath@gmail.com>
3777
3778         * class.c (mono_class_from_generic_parameter): Make more robust to
3779         incomplete MonoGenericContainers from monodis.
3780
3781 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3782
3783         * class-internals.h: added some more exception types.
3784         * class.c, metadata.c: added a few checks to handle missing
3785         types.
3786
3787 2006-02-17  Raja R Harinath  <rharinath@novell.com>
3788
3789         Use owner-less generic-params some more.
3790         * class.c (my_mono_class_from_generic_parameter): Remove.
3791         (mono_class_from_generic_parameter): Handle null image,
3792         param->name and param->owner.
3793         (mono_class_from_mono_type): Update.
3794         (mono_class_create_from_typespec): Remove 'container' parameter.
3795         If that parameter is non-null, the result is always inflated by
3796         'mono_class_get_full' anyway.
3797         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
3798         parameter.
3799         (mono_class_get_full): Update.
3800
3801         * class.c (inflate_generic_type) [GENERICINST]: If the generic
3802         instance is not open, don't bother inflating.
3803         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
3804         parse metadata for inflated classes.
3805         (_mono_class_get): Change GenericContext* parameter to
3806         GenericContainer*.
3807         (mono_class_create_from_typespec): Likewise.  Simplify, and
3808         implement trivially.  All the cases are handled in
3809         mono_class_from_mono_type.  Don't inflate returned class.
3810         (mono_class_get_full): Delegate GENERICINST optimization to
3811         inflate_generic_type.
3812         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
3813
3814 2006-02-16  Dick Porter  <dick@ximian.com>
3815
3816         * socket-io.c (create_object_from_sockaddr): Fix typo.
3817         (create_sockaddr_from_object): Check array lengths before
3818         potentially accessing items off the end.
3819         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
3820         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
3821         (ves_icall_System_Net_Sockets_Socket_Send_internal)
3822         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
3823         length checks to avoid wraparound overflows.
3824         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
3825         contents of the array of sockets
3826         (hostent_to_IPHostEntry2)
3827         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
3828         Check return value of inet_ntop ().
3829         (addrinfo_to_IPHostEntry): Fix typo
3830
3831 2006-02-16  Raja R Harinath  <rharinath@novell.com>
3832
3833         Type metadata parsing doesn't use generic-instantiation information.
3834         * metadata.c (mono_metadata_parse_array_full): Change
3835         MonoGenericContext* parameter to MonoGenericContainer*.
3836         (mono_metadata_parse_type_full): Likewise.
3837         (mono_type_create_from_typespec_full): Likewise.
3838         (mono_metadata_parse_mh_full): Likewise.
3839         (mono_metadata_parse_generic_inst): Likewise.
3840         (do_mono_metadata_parse_generic_class): Likewise.
3841         (do_mono_metadata_parse_type): Likewise.
3842         * metadata-internals.h: Update to changes.
3843         * class.c (mono_class_find_enum_basetype): Likewise.
3844         (mono_class_setup_fields): Likewise.
3845         (mono_class_create_from_typespec): Likewise.
3846         * loader.c (method_from_methodspec): Likewise.
3847         (mono_get_method_from_token): Likewise.
3848         (mono_method_get_header): Likewise.
3849
3850 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3851
3852         * marshal.c: handle additional GENERICINST case (patch from
3853         Thong Nguyen <tum@veridicus.com>).
3854         Fix a few cases where LDIND_I/STIND_I was used for references.
3855
3856 2006-02-16  Raja R Harinath  <rharinath@novell.com>
3857
3858         * reflection.c (mono_reflection_get_token): Remove unused variable.
3859
3860 2006-02-16  Martin Baulig  <martin@ximian.com>
3861
3862         * reflection.c (mono_reflection_get_token): Add support for fields
3863         in instantiated generic types.
3864
3865         * icall.c
3866         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
3867
3868 2006-02-15  Martin Baulig  <martin@ximian.com>
3869
3870         * icall.c
3871         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
3872         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
3873         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
3874         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
3875
3876 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
3877
3878         * class.c, metadata.c, metadata.h, object.c, icall.c,
3879         marshal.c: changed mono_type_get_underlying_type () to do
3880         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
3881         Fixed handling of instantiated generic valuetypes (bug #75479).
3882
3883 2006-02-15  Raja R Harinath  <rharinath@novell.com>
3884
3885         * metadata.c (mono_metadata_decode_signed_value): Simplify.
3886         Delegate to mono_metadata_decode_value, and work on the returned value.
3887
3888         * icall.c (ves_icall_MonoType_GetGenericArguments):
3889         Add consistency check here too.
3890         
3891 2006-02-15  Ankit Jain  <jankit@novell.com>
3892
3893         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
3894         char/short etc.
3895
3896 2006-02-15  Ankit Jain  <jankit@novell.com>
3897
3898         * metadata.c (mono_metadata_decode_signed_value): New function to decode
3899         signed values, used only for representing lower bounds of arrays.
3900         (mono_metadata_parse_array_full): Use new
3901         mono_metadata_decode_signed_value to decode lower bounds.
3902
3903 2006-02-14  Martin Baulig  <martin@ximian.com>
3904
3905         * reflection.c
3906         (mono_reflection_get_token): Support "MonoGenericMethod" and
3907         "MonoGenericCMethod" and allow generic instances / methods.
3908
3909 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
3910
3911         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
3912         to obtain the terminal size using an ioctl.
3913
3914         * object.c (mono_nullable_init): Revert this as nullable reference
3915         types are not valid.
3916         (mono_nullable_box): Ditto.
3917
3918 2006-02-09  Dick Porter  <dick@ximian.com>
3919
3920         * threads.c (mono_thread_detach): Drop a reference to the thread
3921         we're detaching.
3922
3923 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
3924
3925         * object.c (mono_nullable_init): Handle nullable reference types.
3926         (mono_nullable_box): Ditto. Fixes #77446.
3927
3928 2006-02-07  Martin Baulig  <martin@ximian.com>
3929
3930         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
3931
3932 2006-02-07  Ankit Jain  <jankit@novell.com>
3933
3934         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
3935         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
3936         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
3937         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
3938         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
3939         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
3940
3941 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
3942
3943         * class.c (mono_class_create_generic): Set type_token as well.
3944
3945         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
3946         compatible with MS.
3947
3948 2006-02-02  Martin Baulig  <martin@ximian.com>
3949
3950         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
3951         has never been used so far.
3952
3953 2006-02-02  Martin Baulig  <martin@ximian.com>
3954
3955         * mono-debug-debugger.h: Changed comment at the top of this file;
3956         the header is not installed, but it's safe to #include it from
3957         within the JIT.
3958
3959         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
3960         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
3961
3962 2006-02-02  Martin Baulig  <martin@ximian.com>
3963
3964         * mono-debug.h
3965         (MonoSymbolTable): Removed the `metadata_info' field.
3966
3967         * mono-debug.c
3968         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
3969
3970         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
3971         (mono_debugger_add_builtin_types): Removed.
3972         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
3973         (mono_debugger_create_notification_function): We now operate on a
3974         pre-allocated area; take a `gpointer' and return `void'.
3975
3976         * mono-debug-debugger.c
3977         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
3978         (mono_debugger_add_builtin_types): Removed.
3979
3980 2006-02-02  Martin Baulig  <martin@ximian.com>
3981
3982         * threads.c (mono_debugger_create_all_threads): New public method.
3983
3984 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3985
3986         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
3987         breaks on several platforms.
3988
3989 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
3990
3991         * assembly.c: the VS.NET build doesn't supply default values for
3992         MONO_ASSEMBLIES and MONO_CFG_DIR.
3993
3994 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
3995
3996         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
3997         helper function.
3998
3999         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
4000
4001         * loader.c (method_from_memberref): Fix a warning.
4002
4003         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
4004
4005         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
4006         with explicit layout. Fixes #77433.
4007
4008 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
4009
4010         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
4011         max_interface_id is initialized before using it. Fixes #77398.
4012         (ves_icall_Type_GetInterfaces): Ditto.
4013
4014 2006-01-30  Raja R Harinath  <rharinath@novell.com>
4015
4016         * metadata.c (mono_metadata_parse_method_signature_full): Don't
4017         allocate memory for parameter attributes when parsing memberref
4018         signatures.
4019         * loader.c (mono_loader_set_error_method_load): Don't warn.
4020         (method_from_memberref): Ensure MissingMethodException gets thrown
4021         if method is not found.  Make warning more informative.
4022
4023 2006-01-29  Raja R Harinath  <harinath@gmail.com>
4024
4025         Fix #77397
4026         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
4027         return true if is byref.
4028         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4029         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
4030         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4031
4032 2006-01-27  Raja R Harinath  <rharinath@novell.com>
4033
4034         Fix tests/find-method.2.il
4035         * loader.c (find_method, find_method_in_class): Remove is_inflated
4036         argument.  Revert 2006-01-18 change.
4037         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
4038         is generic, search for method in its generic definition.
4039         * class.c (mono_class_setup_vtable_general): Print generic
4040         arguments of generic types in debugging printf.
4041
4042 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
4043
4044         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
4045
4046         * threads.c (mono_threads_request_thread_dump): New helper function.
4047
4048 2006-01-25  Raja R Harinath  <rharinath@novell.com>
4049
4050         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
4051
4052 2006-01-25  Ankit Jain  <jankit@novell.com>
4053
4054         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
4055         move definition to ..
4056         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
4057         
4058 2006-01-25  Ankit Jain  <jankit@novell.com>
4059             Raja R Harinath  <rharinath@novell.com>
4060
4061         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
4062         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
4063         as necessary.
4064
4065 2006-01-25  Martin Baulig  <martin@ximian.com>
4066
4067         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
4068         `MonoDebuggerThread' into debug-debugger.c.
4069
4070 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4071
4072         * profiler.c: fix printing of data.
4073
4074 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
4075
4076         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
4077           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
4078
4079 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4080
4081         * object.c: fix deadlock related to string interning.
4082
4083 2006-01-23  Martin Baulig  <martin@ximian.com>
4084
4085         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
4086
4087         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
4088
4089 2006-01-23  Martin Baulig  <martin@ximian.com>
4090
4091         * mono-debug.h: Moved the prototypes of some functions which are
4092         used by the JIT here from mono-debug-debugger.h.
4093
4094 2006-01-21  Martin Baulig  <martin@ximian.com>
4095
4096         * Makefile.am: Don't install mono-debug-debugger.h.
4097
4098 2006-01-21  Martin Baulig  <martin@ximian.com>
4099
4100         * mono-debug-debugger.h: Enforce the private status of this header
4101         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
4102         Moved some stuff from mono-debugger-jit-wrapper.h here.
4103
4104 2006-01-20  Raja R Harinath  <rharinath@novell.com>
4105
4106         * class.c (mono_class_from_typeref): Add a sanity test to help
4107         catch lack of assembly load/search hooks.
4108
4109 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
4110
4111         * marshal.c (emit_struct_conv): Relax the fields with same offset
4112         check even more. Fixes #77230.
4113
4114 2006-01-18  Martin Baulig  <martin@ximian.com>
4115
4116         * loader.c (find_method_in_class): Added `gboolean is_inflated'
4117         argument; if false, we compare the uninstantiated signatures.
4118         (method_from_memberref): Compare the uninstantiated signatures;
4119         fixes #76417.
4120
4121 2006-01-18  Robert Jordan  <robertj@gmx.net>
4122
4123         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
4124         Clear the weak link. Fixes bug #77170.
4125
4126         * gc.c (mono_gchandle_free):
4127         Reflect *-gc.c changes (tiny optimization).
4128
4129 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
4130
4131         * metadata.c (mono_metadata_signature_dup): Applied patch from
4132         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
4133         Fixes #77288.
4134
4135 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
4136
4137         * marshal.c (emit_struct_conv): Allow fields with the same offset when
4138         marshalling from native to managed code. Fixes #77230.
4139
4140 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4141
4142         * threadpool.c: fix problem (Mac only) when more than one asynchronous
4143         connect. Fixes bug #77020.
4144
4145 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4146
4147         * class.c: fixed id assignement for nested interfaces (bug #77275).
4148         Added also better info for --print-vtable debugging.
4149
4150 2006-01-12  Martin Baulig  <martin@ximian.com>
4151
4152         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
4153         interfaces on-the-fly; fixes #76625.
4154
4155         * class-internals.h
4156         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
4157         don't need that anymore.
4158
4159 2006-01-12  Miguel de Icaza  <miguel@novell.com>
4160
4161         * socket-io.c
4162         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
4163         To avoid initing the nested_classes when not needed I turned the
4164         PeerCredData as a toplevel internal class, as it has to be shared
4165         anyways. 
4166
4167         Fixes the CASA issue.
4168
4169 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
4170
4171         * domain.c: Accessors for MonoJitInfo
4172
4173         * profiler-private.h: Add jitinfo to the end jit hook
4174
4175         * profiler.[ch]: Define new hooks, called after jitting which give
4176         the MonoJitInfo that was compiled
4177
4178 2006-01-10  Martin Baulig  <martin@ximian.com>
4179
4180         * class.c (mono_class_setup_events): Add support for generic
4181         classes; fixes #76440.
4182
4183 2006-01-06  Raja R Harinath  <rharinath@novell.com>
4184
4185         Fix #77160.
4186         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
4187         on passed-in method.
4188
4189 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
4190
4191         * object.c (mono_runtime_invoke_array): Add Nullable support.
4192
4193         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
4194
4195 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
4196
4197         * file-io.c: Don't consider sockets as directory and avoid an endless
4198         loop. Fix bug #76966.
4199
4200 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
4201
4202         * object.c (mono_nullable_init): New helper function.
4203         (mono_nullable_box): Ditto.
4204
4205         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
4206
4207         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
4208
4209         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
4210         
4211 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
4212
4213         * class.c (mono_class_is_assignable_from): Make T assignable to 
4214         Nullable<T>.
4215
4216 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
4217
4218         * appdomain.c: Bump corlib version to 46.
4219         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
4220         serialization purpose) and changed ves_icall_System_Reflection_
4221         Assembly_get_code_base signature to accept a boolean (to escape, or 
4222         not, the assembly code base).
4223
4224 2005-12-23  Dick Porter  <dick@ximian.com>
4225
4226         * icall.c: 
4227         * threads-types.h: 
4228         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
4229         CreateEvent icall now returns "created" boolean parameter.
4230
4231 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
4232
4233         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
4234         #76967.
4235
4236         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
4237         when attr_klass is an interface. Fixes #77045.
4238
4239 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
4240
4241         * marshal.c (emit_struct_conv): Fix previous patch.
4242         
4243         * marshal.c (emit_struct_conv): Add a check for fields with the same
4244         offset.
4245
4246 2005-12-20  Raja R Harinath  <rharinath@novell.com>
4247
4248         Fix regression in Mono.C5.
4249         * class.c (mono_class_create_generic): If 'klass' is an interface
4250         set up the interface offsets.
4251         (mono_class_is_assignable_from): Don't throw away generic arguments.
4252
4253 2005-12-19  Raja R Harinath  <rharinath@novell.com>
4254
4255         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
4256         type parameters.
4257
4258 2005-12-15  Raja R Harinath  <rharinath@novell.com>
4259
4260         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
4261         dead store.
4262         (do_mono_metadata_parse_generic_class): Don't pass the current
4263         generic context when parsing the type being instantiated: it
4264         cannot use it, anyway.
4265
4266         * loader.c (method_from_memberref): Don't inflate a signature if
4267         it doesn't contain any type parameters.
4268
4269 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
4270
4271         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
4272
4273 2005-12-14  Martin Baulig  <martin@ximian.com>
4274
4275         * class.c
4276         (mono_type_get_name_recurse): Don't return null for type
4277         parameters and open generic classes.
4278         (mono_class_setup_methods): Don't exclude generic instances.
4279         (mono_get_unique_iid): Use different IDs for different
4280         instantiations of the same generic type.
4281         (mono_class_setup_vtable): Only use setup_generic_vtable() for
4282         open generic instances; create a normal vtable for closed generic
4283         instances.
4284         (mono_class_setup_vtable_general): We're now also called for
4285         closed generic instances.
4286
4287         * reflection.c
4288         (mono_reflection_bind_generic_parameters): Correctly use
4289         mono_metadata_lookup_generic_inst() everywhere.
4290
4291 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
4292
4293         * object.c (mono_class_create_runtime_vtable): Call 
4294         mono_class_setup_vtable ().
4295
4296         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
4297         function.
4298         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
4299         #76959.
4300
4301         * loader.c (mono_loader_set_error_type_load): Print the type load
4302         warnings to the console so they are more visible to the user.
4303         (mono_loader_set_error_method_load): Ditto.
4304
4305         * reflection.c (ensure_runtime_vtable): Revert the last change as it
4306         is still broken.
4307         
4308         * reflection.c (ensure_runtime_vtable): Fix build.
4309
4310         * reflection.c (ensure_runtime_vtable): Disable an optimization which
4311         doesn't work in all cases.
4312
4313 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
4314
4315         * object.c (mono_array_new_full): Treat a single dimensional array
4316         with 0 lower bounds as an szarray. Fixes #76973.
4317
4318         * reflection.c (custom_attr_visible): Really fix this.
4319
4320 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
4321
4322         * reflection.c (custom_attr_visible): Allow nested public attributes
4323         as well.
4324
4325         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
4326         interface check.
4327
4328 2005-12-12  Raja R Harinath  <harinath@gmail.com>
4329
4330         * class.c (set_generic_param_owner): Delete.
4331         (mono_class_create_from_typedef): Don't set ->owner field of
4332         generic parameters to "param containers" of enclosing classes.
4333         * reflection.c (mono_reflection_initialize_generic_parameter):
4334         Likewise.
4335
4336 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
4337
4338         * reflection.c (custom_attr_visible): Fix build.
4339
4340 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
4341
4342         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
4343         private attributes.
4344         
4345         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
4346         handling of null parameter defaults.
4347
4348 2005-12-09  Raja R Harinath  <rharinath@novell.com>
4349
4350         * class.c (mono_class_from_generic_parameter): Don't set
4351         klass->generic_container.
4352         (my_mono_class_from_generic_parameter): Likewise.
4353
4354 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
4355
4356         * reflection.c (load_public_key): Fix a warning.
4357         (method_encode_code): Fix unaligned accesses.
4358
4359 2005-12-07  Martin Baulig  <martin@ximian.com>
4360
4361         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
4362
4363         * reflection.c
4364         (write_generic_param_entry): Encode our custom attrs.
4365
4366         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
4367
4368 2005-12-07  Martin Baulig  <martin@ximian.com>
4369
4370         * reflection.c (encode_new_constraint): Removed; we don't use the
4371         `NewConstraintAttribute' anymore.
4372
4373 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
4374
4375         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
4376         not fire a TypeResolve event when Assembly.GetType () is called.
4377
4378 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
4379
4380         Beginning of support for nullable types in the runtime. Parts of
4381         this patch are from Martin.
4382
4383         * appdomain.c (MONO_CORLIB_VERSION): Bump
4384
4385         * domain.c (mono_init_internal): get the nullable type
4386
4387         * class.c (mono_class_is_nullable): New method
4388         (mono_class_get_nullable_param): New mehod
4389         (mono_class_create_generic): In types T? set cast_class to T
4390
4391         * class-internals.h (MonoDefaults): new nullable default class
4392         (mono_class_get_nullable_param, mono_class_get_nullable_param):
4393         new methods.
4394
4395 2005-12-05  Raja R Harinath  <rharinath@novell.com>
4396
4397         * metadata.c (select_container): New.  Refactor code to select the
4398         appropriate GenericContainer given the type of generic parameter
4399         we are looking for.
4400         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
4401         not a MonoGenericContext.  Use select_container.  Update parameters.
4402         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
4403         and MONO_TYPE_MVAR.
4404         (unwrap_arrays): Remove duplicate tests.
4405         (find_generic_param): Rename from 'has_same_context'.  Now walks a
4406         generic instantiated class to find any arguments that are generic
4407         parameters.
4408         (mono_type_create_from_typespec_full): Use find_generic_param to
4409         avoid evicting some generic instantiations from the typespec
4410         cache.
4411
4412 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
4413
4414         * reflection.c: fixed writing of doubles on ARM FPA.
4415
4416 2005-12-02  Robert Jordan  <robertj@gmx.net>
4417
4418         * icall.c: Fixed EventInfo.ReflectedType (#76829).
4419
4420 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4421
4422         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
4423         least on SUSE 10 they are not the same (on debian, they are just the
4424         same thing).
4425
4426 2005-12-01  Raja R Harinath  <rharinath@novell.com>
4427
4428         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
4429         DeclaringType for VARs and MVARs.
4430         * class.c (set_generic_param_owner): Fix initialization of owner
4431         fields.
4432
4433 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4434
4435         * icall.c: fixed Enum.ToObject() to correctly convert the values.
4436
4437 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4438
4439         * threadpool.c: workaround for a bug that shows up on the Mac:
4440         select()+connect() on a blocking socket is not like it should
4441         be, so we proceed to connect() in that case, wasting the I/O
4442         threadpool thread until connect succeedes. Fixes bug #75436.
4443
4444 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4445
4446         * threadpool.c: fix typo when setting file descriptor states.
4447
4448 2005-11-28  Raja R Harinath  <rharinath@novell.com>
4449
4450         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
4451         * metadata.c (mono_metadata_parse_method_signature_full): Don't
4452         create a temporary signature container.
4453         (mono_metadata_parse_generic_param): Update to changes.
4454         (mono_type_create_from_typespec_full): Update to changes.
4455         * loader.c (method_from_memberref): Don't use a
4456         MonoGenericContainer while parsing a memberref signature.
4457         (method_from_methodspec): Remove dead-store of the 'container'
4458         variable.  It's overwritten before use.
4459
4460         * metadata.c (mono_type_create_from_typespec_full): Make debugging
4461         checks tighter.
4462         (mono_metadata_parse_generic_param): Likewise.
4463         * loader.c (find_method_in_class): Does not need a
4464         MonoGenericContainer.  Use 'mono_method_signature' rather than
4465         'mono_method_signature_full'.
4466         (find_method, mono_get_method_constrained, method_from_memberref):
4467         Update to changes.
4468
4469         * metadata.c (mono_type_create_from_typespec_full): Ensure that
4470         owner-less generic-parameters are never evicted from the typespec
4471         cache.
4472
4473         * loader.c (method_from_memberref): Don't use the current context
4474         when parsing signatures.
4475         (method_from_methodspec, mono_get_method_from_token): Update to changes.
4476
4477         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
4478         side-effects in g_assert.
4479         * loader.c (mono_get_method_from_token): Resolve klass earlier so
4480         that we don't potentially lose information.
4481
4482 2005-11-26  Dick Porter  <dick@ximian.com>
4483
4484         * icall.c:
4485         * threads.c: icalls to implement basic (ie, not named)
4486         System.Threading.Semaphore.
4487
4488 2005-11-24  Dick Porter  <dick@ximian.com>
4489
4490         * process.c
4491         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
4492         Use GetProcessId() if it's available.
4493
4494 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
4495
4496         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
4497
4498 2005-11-23  Raja R Harinath  <rharinath@novell.com>
4499             Ankit Jain  <jankit@novell.com>
4500
4501         * loader.c (mono_get_method_from_token): Initialize 'method' field
4502         of all generic parameters before parsing the signature.  Remove
4503         code that "fixed"-up MVAR references.
4504
4505 2005-11-23  Ankit Jain  <jankit@novell.com>
4506
4507         * metadata.c (mono_metadata_has_generic_params):
4508         (mono_metadata_load_generic_param_constraints):
4509         (mono_metadata_load_generic_params): Move duplicate code ...
4510         (mono_metadata_get_generic_param_row): ... here. Returns the
4511         first row-id in GenericParam table for a given owner (token).
4512         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
4513         prototype.
4514
4515 2005-11-23  Raja R Harinath  <rharinath@novell.com>
4516             Ankit Jain  <jankit@novell.com>
4517
4518         * metadata.c (mono_metadata_class_equal): Pass signature_only when
4519         comparing VARs too.
4520         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
4521         type->data.generic_param only if the type is an MVAR.
4522         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
4523         leak owner-less VARs and MVARs into managed space.
4524
4525 2005-11-21  Martin Baulig  <martin@ximian.com>
4526
4527         * class-internals.h
4528         (MonoMethod): Moved the `generic_container' here from
4529         `MonoMethodNormal' since we now also need it for
4530         `MonoMethodPInvoke';
4531         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
4532         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
4533         an union containing both `MonoMethodNormal' and
4534         `MonoMethodPInvoke'.
4535
4536         * loader.c
4537         (mono_get_method_from_token): Allow implementing generic methods
4538         as interncalls.
4539
4540         * threads.c
4541         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
4542         icall.
4543
4544 2005-11-17  Dick Porter  <dick@ximian.com>
4545
4546         * icall.c: 
4547         * process.h: 
4548         * process.c: Split the Process Start_internal icall into
4549         ShellExecuteEx_internal and CreateProcess_internal, which are
4550         called depending on whether UseShellExecute is true.  Fixes bug
4551         76670.
4552
4553         * appdomain.c (MONO_CORLIB_VERSION): Incremented
4554
4555 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
4556
4557         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
4558         'msize' parameters, use the information in 'mspec' instead.
4559         (emit_object_to_ptr_conv): Ditto.
4560
4561         * marshal.c (emit_struct_conv): Handle explicit layout structs with
4562         fields out of order. Fixes #76733.
4563
4564 2005-11-17  Ankit Jain  <jankit@novell.com>
4565
4566         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
4567
4568 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
4569
4570         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
4571           bug #76575.
4572
4573 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
4574
4575         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
4576         for types with non-auto layout. Fixes #76717.
4577
4578 2005-11-16  Ankit Jain  <jankit@novell.com>
4579
4580         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
4581         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
4582         if generic_context is null.
4583           (mono_metadata_generic_param_equal): param->owner can be null.
4584           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
4585         null.
4586
4587 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
4588
4589         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
4590         the correct value.
4591
4592 2005-11-15  Martin Baulig  <martin@ximian.com>
4593
4594         * object.c (set_value): Use mono_class_from_mono_type() instead of
4595         the hack for generic instances; fixes #76136.
4596
4597 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
4598
4599         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
4600         fields.
4601
4602         * image.c (load_metadata_ptrs): Initialize the new fields.
4603
4604         * reflection.c (create_dynamic_mono_image): Ditto.
4605
4606         * reflection.c (build_compressed_metadata): Use the new fields.
4607
4608         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
4609         icall.
4610
4611         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
4612         icall.
4613         
4614 2005-11-15  Ankit Jain  <jankit@novell.com>
4615             Raja R Harinath  <harinath@gmail.com>
4616
4617         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
4618         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
4619         new per-generic_container cache if the cached MonoType's context matches
4620         the current context.
4621           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
4622         to the expected context.
4623           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
4624
4625 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4626
4627         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
4628         we changed the signature of an icall.
4629         * icall.c: Modify to mono_double_ParseImpl return true/false 
4630         depending on the success, instead of throwing the exception. This will
4631         help us in Double.TryParse methods.
4632         
4633 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
4634
4635         * marshal.c (emit_marshal_object): Throw an exception when
4636         marshalling 'object' instead of crashing. Fixes #76696.
4637
4638 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
4639
4640         * class-internals.h: Add prototype for mono_type_get_full_name ().
4641
4642 2005-11-11  Dick Porter  <dick@ximian.com>
4643
4644         * threads.c (mono_thread_manage): Make sure the main thread has
4645         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
4646
4647 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
4648
4649         * loader.c (mono_loader_set_error_type_load): Log a warning to the
4650         console about the missing type.
4651         (mono_loader_set_error_method_load): Ditto.
4652
4653 2005-11-09  Miguel de Icaza  <miguel@novell.com>
4654
4655         * mono-config.c (mono_get_config_dir): Set the system defaults if
4656         none is specified.
4657
4658         * assembly.c (mono_set_dirs): New API entry point to set the
4659         assembly and the config directory in one call
4660
4661 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
4662
4663         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
4664         the ftnptr was created from a delegate in a domain other than the
4665         current domain. Fixes #75377.
4666
4667         * exception.h exception.c: Add mono_get_exception_not_supported ().
4668
4669 2005-11-08  Martin Baulig  <martin@ximian.com>
4670
4671         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
4672
4673 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
4674
4675         * security-manager.h: Added definitions to deal with strongname key 
4676         pairs bigger (and smaller) than 1024 bits.
4677         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
4678         adjust wrt the public key length being used.
4679
4680 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
4681
4682         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
4683           Windows build (r51396-51397).
4684
4685 2005-11-03  Martin Baulig  <martin@ximian.com>
4686
4687         * class.c (mono_class_setup_vtable_general): Also add generic
4688         methods to the vtable; fixes #76581.
4689
4690 2005-11-01  Miguel de Icaza  <miguel@novell.com>
4691
4692         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
4693         sure that we lookup GetString method from the System.Text.Encoding
4694         class, not the derived class or we get an empty method.
4695
4696         Fixed class #76612.
4697
4698 2005-10-25  Miguel de Icaza  <miguel@novell.com>
4699
4700         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
4701         if it has been previously set (embedders). 
4702
4703         Make mono_set_rootdir available also on Unix.
4704
4705 005-10-24  Robert Jordan  <robertj@gmx.net>
4706
4707         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
4708
4709 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
4710
4711         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
4712         only calls which are made to native code use this flag.
4713
4714         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
4715
4716 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
4717
4718         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
4719         Add support for FieldBuilders.
4720
4721 2005-10-29  Martin Baulig  <martin@ximian.com>
4722
4723         * mono-debug.c
4724         (mono_debug_using_mono_debugger): New public method; returns
4725         whether we're running inside the debugger.
4726
4727 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
4728
4729         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
4730         for Method/Constructor/FieldBuilders.
4731
4732 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
4733
4734         * reflection.c (module_add_cattrs): Save custom attributes for global methods
4735         and fields as well.
4736
4737 2005-10-26  Martin Baulig  <martin@ximian.com>
4738
4739         * mono-debug-debugger.c
4740         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
4741
4742 2005-10-24  Raja R Harinath  <harinath@gmail.com>
4743
4744         * icall.c (base64_to_byte_array): Don't pass an out-of-range
4745         integer to isspace.
4746
4747 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
4748
4749         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
4750         when passing valuetypes byref. Fixes #76502.
4751
4752 2005-10-19  Jackson Harper  <jackson@ximian.com>
4753
4754         * profiler.c: Don't put a . in front of types that are not in a
4755         namespace.
4756
4757 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
4758
4759         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
4760
4761 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
4762
4763         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
4764         #76436.
4765         (mono_marshal_get_ldflda_wrapper): Fix a warning.
4766
4767 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4768
4769         * assembly.c metadata-internals.h icall.c: Define an additional
4770         parameter for mono_assembly_name_parse_full, so we can avoid creating
4771         S.R.AssemblyName.Version when no version info wasn't passed.
4772         
4773 2005-10-09  Miguel de Icaza  <miguel@novell.com>
4774
4775         * class.c (mono_type_get_full_name): Reimplement method that was
4776         removed. 
4777
4778         * image.c: Some docs
4779
4780 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
4781
4782         * profiler.c (output_newobj_profile): Fix printing of Total memory
4783         on x86.
4784
4785 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
4786
4787         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
4788
4789 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
4790
4791         * threads.c: remove debug output.
4792
4793 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
4794
4795         * threads.c (mono_thread_manage): Fix crashes if more than 64
4796         threads need to be aborted. Hopefully fixes #75899.
4797
4798         * assembly.c (mono_stringify_assembly_name): New helper function.
4799
4800         * class.c: Use mono_stringify_assembly_name instead of the similar
4801         static function.
4802
4803         * assembly.h assembly.c: Add support for calling a postload search 
4804         hook if an assembly cannot be loaded.
4805
4806         * appdomain.c: Register new search hooks which call the AssemblyResolve
4807         events in AppDomain. Fixes #75231
4808
4809 2005-10-07  Martin Baulig  <martin@ximian.com>
4810
4811         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
4812         methods without debug info.
4813
4814 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
4815
4816         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
4817         wrappers.
4818
4819 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4820
4821         * file-io.c: now that we return symlinks, use lstat and, when the file
4822         is a symbolic link, stat, to get the file attributes. Also avoid the
4823         conversion to/from utf16/external.
4824
4825 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
4826
4827         * class.c (mono_class_layout_fields): Compute klass->has_references
4828         correctly if an embedded valuetype is not yet initialized. Fixes
4829         #76331.
4830
4831 2005-10-04  Martin Baulig  <martin@ximian.com>
4832
4833         * metadata.c
4834         (mono_metadata_load_generic_param_constraints): New public
4835         function; splitted the constraints loading out from
4836         mono_metadata_load_generic_params().
4837
4838         * class.c (mono_class_create_from_typedef): Call
4839         mono_metadata_load_generic_param_constraints() after setting up
4840         the type and creating our parent; fixes #75329.
4841
4842 2005-10-04  Martin Baulig  <martin@ximian.com>
4843
4844         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
4845         non-dynamic parent classes.
4846
4847 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
4848
4849         * file-io.c : win32 build fix (ETXTBSY seems not found).
4850
4851 2005-10-04  Martin Baulig  <martin@ximian.com>
4852
4853         * reflection.c
4854         (mono_image_get_methodspec_token): Make the cache actually work;
4855         fixes #75974.
4856
4857 2005-10-04  Martin Baulig  <martin@ximian.com>
4858
4859         * class.c (mono_class_name_from_token): Removed the unneccessary
4860         `MonoGenericContext *' argument.
4861
4862 2005-10-04  Martin Baulig  <martin@ximian.com>
4863
4864         * loader.c
4865         (method_from_methodspec): Make the caching work again; fixes the
4866         performance regression from #76262.
4867
4868 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4869
4870         * file-io.c:
4871         * file-io.h:
4872         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
4873         GetFileSystemEntries that performs the same work but without going
4874         into io-layer, locking, etc.
4875
4876 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
4877
4878         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
4879         ThreadState_Stopped as well. Fixes #76047.
4880
4881 2005-09-29  Martin Baulig  <martin@ximian.com>
4882
4883         * class.c
4884         (inflate_generic_context): If the new context has a `gmethod', set
4885         its `container' that that gmethod's `container'.
4886
4887         * metadata.c
4888         (mono_metadata_parse_generic_param): Simplify things;
4889         `generic_container = generic_context->container;' is just fine.
4890
4891         * loader.c (method_from_methodspec): Code cleanups.
4892
4893 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
4894
4895         * decimal.c: fix warning (and let gcc generate correct
4896         code on ARM with optimizations).
4897
4898 2005-09-28  Martin Baulig  <martin@ximian.com>
4899
4900         * loader.c
4901         (method_from_memberref): Added `MonoGenericContext *class_context'
4902         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
4903         (method_from_methodspec): If we're a memberref, use the enclosing
4904         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
4905
4906 2005-09-28  Martin Baulig  <martin@ximian.com>
4907
4908         * object.c (mono_runtime_invoke_array): Added support for
4909         MONO_TYPE_GENERICINST; fixes #75917.
4910
4911 2005-09-27  Martin Baulig  <martin@ximian.com>
4912
4913         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
4914         `k->byval_arg.type' to determine the actual type.
4915
4916         * loader.c (method_from_methodspec): Removed some hacks.
4917
4918 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
4919
4920         * class-internals.h (mono_field_is_deleted): Do the test for
4921         rtspecialname before we check the actual name of the field. This
4922         prevents us from dereferencing a pointer into the string table,
4923         saving us from accessing a few pages
4924
4925         * *.c: Replace the use of {Enter,Leave}CriticalSection with
4926         macros. This will allow a deadlock debugger to easily be plugged
4927         in.
4928
4929 2005-09-27  Martin Baulig  <martin@ximian.com>
4930
4931         * loader.c (method_from_methodspec): Create a "signature"
4932         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
4933
4934 2005-09-27  Martin Baulig  <martin@ximian.com>
4935
4936         * class.c
4937         (inflate_generic_class): Correctly set the new context's
4938         container.
4939
4940         * loader.c
4941         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
4942         instead of a `MonoGenericContext *'.
4943         (mono_method_signature_full): Take a `MonoGenericContainer *'
4944         instead of a `MonoGenericContext *'.
4945
4946         * metadata.c
4947         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
4948         instead of a `MonoGenericContext *'.
4949         (mono_metadata_parse_method_signature_full): Likewise.
4950
4951 2005-09-26  Martin Baulig  <martin@ximian.com>
4952
4953         * class.c
4954         (mono_class_from_generic_parameter): Set `klass->generic_container'
4955         (mono_class_from_generic_parameter): Likewise.
4956         (mono_bounded_array_class_get): We inherit the generic container
4957         from the element class.
4958
4959         * loader.c
4960         (find_method, find_method_in_class): Take a `MonoGenericContext *'
4961         argument rather than computing it here.
4962         (method_from_memberref): Correctly set the generic context before
4963         parsing the signature.  Fixes #75681.
4964
4965 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
4966
4967         * object.c (mono_class_has_special_static_fields): Fix warnings.
4968
4969 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4970
4971         * assembly.c: Add parse_public_key function, to
4972         par the public keys. Also added mono_assembly_name_parse_full,
4973         to define it the parsed key should be freed or not.
4974         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
4975         to parse a long format assembly name.
4976         * metadata-internals.h: Keep mono_assembly_name_parse_full as
4977         private, since calling it to preserve the key requires
4978         freeing it manually.
4979         
4980 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
4981
4982         * locales.c : removed HAVE_ICU part.
4983
4984 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
4985
4986         * object.c (mono_class_create_runtime_vtable): Avoid calling 
4987         field_is_special_static if the klass has no special static fields.
4988
4989         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
4990         (MonoCachedClassInfo): Likewise.
4991
4992         * object.c (mono_class_has_special_static_fields): New helper function.
4993
4994 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
4995
4996         * class.c (mono_class_create_from_typedef): Don't call 
4997         interfaces_from_typedef_full for enums.
4998         (mono_class_create_from_typedef): Compute the base types of enums directly
4999         without calling mono_class_setup_fields ().
5000         (mono_class_find_enum_basetype): New helper function.
5001
5002         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
5003         one place inside the string heap.
5004         
5005 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
5006
5007         * class.c: locking fixes, code cleanups, some docs added.
5008         Allocate some data structures in the image mempool.
5009
5010 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5011
5012         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5013         the example code.
5014         
5015 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
5016
5017         * class-internals.h, class.c, reflection.c: reduce memory taken by
5018         MonoClass.
5019
5020 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
5021
5022         * metadata.c, metadata.h, loader.h: documentation updates, code and
5023         API cleanups.
5024
5025 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5026
5027         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5028         the example code.
5029
5030         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
5031         page faults caused by the runtime while reading metadata.
5032
5033 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5034
5035         * socket-io.c: the field names were changed 3 months ago and no one
5036         realized until bug #76077 got filed!
5037
5038 2005-09-20  Martin Baulig  <martin@ximian.com>
5039
5040         * icall.c (assembly_icalls): Removed some unused debugger icalls.
5041
5042 2005-09-20  Martin Baulig  <martin@ximian.com>
5043
5044         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
5045         write the rank into the class entry.
5046
5047 2005-09-20  Martin Baulig  <martin@ximian.com>
5048
5049         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
5050
5051 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
5052
5053         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5054
5055         * icall.c (custom_attrs_defined_internal): New icall.
5056
5057         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
5058         function.
5059         (mono_custom_attrs_construct_by_type): New helper function.
5060
5061 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
5062
5063         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
5064         terminate the resulting string. Fixes #76123.
5065
5066 2005-09-16  Martin Baulig  <martin@ximian.com>
5067
5068         * mono-debug.c
5069         (mono_debug_add_method): Ignore inflated methods for the moment.
5070
5071 2005-09-14  Martin Baulig  <martin@ximian.com>
5072
5073         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
5074
5075 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
5076
5077         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
5078         return a success/failure indication.
5079         (mono_metadata_interfaces_from_typedef_full): Ditto.
5080         (get_constraints): Ditto.
5081
5082 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
5083
5084         * marshal.c (emit_marshal_array): Fix handling of null arrays.
5085         
5086         * marshal.c (emit_marshal_array): Add support for returning string
5087         arrays from delegates. Fixes #76063.
5088
5089         * marshal.c: Use the emit_ldloc/stloc macros where possible.
5090
5091 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
5092
5093         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
5094         icall.
5095
5096 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
5097
5098         * reflection.c icall.c: Fix after mono_get_exception_type_load
5099         signature change.
5100
5101         * assembly.c (mono_assembly_get_assemblyref): New helper function.
5102         (mono_assembly_load_reference): Use the new helper.
5103
5104         * class-internals.h (MonoLoaderError): New structure containing 
5105         information about type loading errors.
5106
5107         * class-internals.h loader.c: Add APIs to store per-thread loader
5108         error information.
5109
5110         * loader.c class.c: Set the loader error if needed.
5111
5112         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
5113
5114 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
5115
5116         * decimal.c: fixed to handle the broken ARM fp format.
5117
5118 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
5119
5120         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
5121         broken.
5122
5123 2005-09-06  Martin Baulig  <martin@ximian.com>
5124
5125         * domain.c (supported_runtimes): Added v2.0.50727.
5126
5127 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
5128
5129         * culture-info.h: reduce the size of some structures.
5130
5131 2005-09-05  Martin Baulig  <martin@ximian.com>
5132
5133         Reflect latest API changes in the August CTP.
5134
5135         * icall.c
5136         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
5137         ("MonoType.HasGenericArguments"): Removed.
5138         ("MonoMethod.BindGenericParameters"): Renamed to
5139         "MakeGenericMethod".
5140         ("MethodBuilder.BindGenericParameters"): Renamed to
5141         "MakeGenericMethod".    
5142
5143 2005-09-05  Martin Baulig  <martin@ximian.com>
5144
5145         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
5146
5147 2005-09-05  Martin Baulig  <martin@ximian.com>
5148
5149         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5150
5151         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
5152         generic_container is non-NULL.
5153
5154 2005-09-05  Martin Baulig  <martin@ximian.com>
5155
5156         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5157
5158         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
5159
5160 2005-08-29  Michal Moskal  <malekith@nemerle.org>
5161
5162         * reflection.c (encode_locals,
5163         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
5164         for large generic types.
5165
5166 2005-09-05  Martin Baulig  <martin@ximian.com>
5167
5168         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5169
5170         * class.c (mono_dup_array_type): New public method.
5171         (mono_metadata_signature_deep_dup): New public method.
5172         (dup_type): Correctly duplicate array and function types.
5173
5174 2005-09-05  Martin Baulig  <martin@ximian.com>
5175
5176         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5177
5178         * reflection.c (get_default_param_value_blobs): Handle generic types
5179         and generic methods.
5180
5181 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
5182
5183         * class.c: Fixed error reporting (method/class were inversed) for 
5184         inheritance demands.
5185         * security-manager.c|h: Added the AppDomain when calling the managed
5186         System.Security.SecurityManager.InheritanceDemand method.
5187
5188 2005-09-01  Raja R Harinath  <rharinath@novell.com>
5189
5190         * reflection.c (encode_marshal_blob): 'marshaltype' and
5191         'marshaltyperef' are alternate sources for the custom marshaler
5192         name.
5193
5194 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
5195
5196         * class.c: fix creation of array classes with rank == 1
5197         (patch by Ankit Jain <jankit@novell.com>).
5198
5199 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
5200
5201         * object.c: fix check for creating the bound data for arrays vs
5202         szarrays.
5203
5204 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5205
5206         * object.c: configuration file name is now based on the executable name,
5207         not the image name. Fixes bug #75931.
5208
5209 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
5210
5211         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
5212         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
5213
5214 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
5215
5216         * rand.c: Use wincrypt.h instead of WinCrypt.h.
5217
5218 2005-08-24  Ankit Jain  <jankit@novell.com>
5219             Raja R Harinath  <rharinath@novell.com>
5220
5221         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
5222           called by it recursively.
5223           (mono_class_init): Remove special case in pending_init handling, since it's
5224           superseded by the fix to mono_class_from_typeref.
5225
5226 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
5227
5228         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
5229         BROKEN_THREAD_START stuff.
5230
5231 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
5232
5233         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
5234         trampoline.
5235
5236         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
5237         
5238         * object.c (mono_delegate_ctor): Replace the original function address with
5239         a delegate trampoline.
5240
5241 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
5242
5243         * icall.c: add boolean argument to base64_to_byte_array and 
5244         InternalFromBase64String to control whether a whitespace-only string
5245         is allowed (or should casue a FormatException to be thrown). We need
5246         this as the behavior has changed between MS.NET 1.x and 2.0, and we
5247         to match the MS behaviour in both profiles.
5248         * appdomain.c: Bump corlib version.
5249
5250 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5251
5252         This patch implements a big portion of publisher policy
5253         support, used to bind assembly versions and redirect
5254         one assembly from version A to version B.
5255
5256         * assembly.c:
5257         New GSList loaded_assembly_bindings, for storing the cached
5258         assembly bindings.
5259         (assembly_binding_maps_name): New static function for checking if a 
5260         assembly binding information maps an assembly name.
5261         (mono_assembly_binding_info_free): New function for freeing
5262         assembly binding information resources.
5263         (get_publisher_policy_info): New static function for retrieving 
5264         assembly binding information from a MonoImage.
5265         (compare_versions): New static function for comparing an assembly
5266         binding information data and the version of an assembly name.
5267         (check_policy_versions): New static function for checking if an
5268         assembly binding info mapping an assembly name is valid for it.
5269         (mono_assembly_load_publisher_policy): New static function for
5270         loading the 'policy.major.minor.MyAssembly' image for an assembly
5271         with an assembly name 'aname'.
5272         (mono_assembly_bind_version): New static function for updating
5273         assembly redirection.
5274         (mono_assembly_apply_binding): New static function for applying
5275         assembly binding.
5276         (search_binding_loaded): New static function for searching 
5277         loaded assembly binding infos in the cache domain.
5278         (mono_assembly_load_full): Don't apply assembly binding for
5279         reflection only assemblies.
5280
5281         * metadata-internals.h: Add MonoAssemblyBindingInfo,
5282         which contains information about assembly binding. Also
5283         declare signature for mono_config_parse_publisher_policy ()
5284         function, used to retrieve pub policy info.
5285         
5286         * mono-config.c:
5287         (publisher_policy_start): New static function used to parse publisher 
5288         policy config files.
5289         (publisher_policy_parser): New static MonoParseHandler containing 
5290         the functions used when parsing config files.
5291         (mono_config_parse_publisher_policy): New function for parsing
5292         publisher policy files.
5293         
5294 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
5295
5296         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
5297
5298         * marshal.c (mono_delegate_free_ftnptr): Ditto.
5299
5300         * object.c (mono_get_addr_from_ftnptr): New helper function.
5301
5302         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
5303
5304         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5305
5306 2005-08-19  Dick Porter  <dick@ximian.com>
5307
5308         * threads.c, threads.h, appdomain.c, appdomain.h,
5309         profiler-private.h, monitor.c, object.c, object-internals.h,
5310         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
5311         store the thread ID, so it can hold a 64 bit value if needed.
5312
5313 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
5314
5315         * reflection.c (mono_reflection_create_dynamic_method): Store the
5316         handle class into the method references as well so ldtoken works in
5317         dynamic methods.
5318
5319         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
5320         types.
5321
5322 2005-08-19  Ankit Jain <jankit@novell.com>
5323
5324         Fix #75847.
5325         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
5326           here rather than using the method signature of a arbitrary function
5327           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
5328           two arguments.
5329           Hack done with Harinath.
5330
5331 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5332
5333         * threadpool.c: disable printing stack traces when we get a exception
5334         in a threadpool thread. I need to do more testing to figure out which
5335         cases actually print this. Fixes bug #75828.
5336
5337 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5338
5339         * icall.c: there might be ignored whitespace after the last '='. This
5340         fixes length computation and bug #75840.
5341
5342 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
5343
5344         * assembly.c (mono_assembly_load_full): Consider .exe extension as
5345         well. Fixes #75809.
5346
5347         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
5348         #75784.
5349         
5350         * reflection.c (create_custom_attr_data): Ditto.
5351
5352 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
5353
5354         * locales.c, culture-info.h : removed RegionLCIDMap.
5355         * culture-info-tables.h : regenerated.
5356
5357 2005-08-16  Martin Baulig  <martin@ximian.com>
5358
5359         * class.c (mono_type_get_name_recurse): Small fix.
5360
5361 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
5362
5363         * locales.c : indentation fixie.
5364
5365 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
5366
5367         * object-internals.h,
5368           locales.h,
5369           locales.c,
5370           culture-info.h,
5371           icall.c : added RegionInfo table support.
5372         * culture-info-table.h : regenerated for region support.
5373
5374 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
5375
5376         * reflection.c (resolve_object): handle all kinds of MonoMethod
5377         including generic ones
5378
5379 2005-08-12  Ankit Jain <jankit@novell.com>
5380
5381         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
5382           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
5383
5384 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
5385
5386         * process.c: Don't close a thread handle when it's NULL. This is a
5387         workaround for bug #75733.
5388
5389 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
5390
5391         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
5392
5393 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
5394
5395         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
5396
5397 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5398
5399         * threadpool.c: if a work item in the thread pool has a callback that
5400         catches a exception, don't propagate it after invoking the callback.
5401         Fixes bug #75336.
5402
5403 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
5404
5405         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
5406
5407         * class-internals.h (MonoCachedClassInfo): Add some new fields.
5408
5409         * class.c (mono_class_init): Load field info lazily in the AOT case.    
5410
5411         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
5412
5413 2005-08-03  Ankit Jain  <jankit@novell.com>
5414
5415         Fix #75683.
5416         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
5417           PInvoke calling convention is 0.
5418
5419 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
5420
5421         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
5422         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
5423
5424 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
5425
5426         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
5427         to handle threads not started by the GC (patch by Michael Meeks
5428         <michael.meeks@novell.com>).
5429
5430 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
5431
5432         * reflection.c: Make buffer used in emitting types larger for some
5433         big generic types (patch by Michal Moskal).
5434
5435 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
5436
5437         * mono-debug.c: Fix some (not all) alignment problems.
5438
5439 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5440
5441         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
5442         Invoke mono_image_load_from_data_full passing the refonly
5443         parameter.
5444
5445         * assembly.c
5446         (mono_assembly_open_from_bundle): Add the refonly argument, 
5447         in order to pass it to other methods it calls to.
5448         (do_mono_assembly_open): Add the refonly argument, in order 
5449         to pass it to other methods it calls to.
5450         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
5451         the refonly parameter to it.
5452
5453         * image.c: Add loaded_images_refonly_hash and
5454         loaded_images_refonly_guid_hash to cache the reflection
5455         only loaded images.
5456         (mono_images_init): Initialize the hash tables used for
5457         caching the reflection only images.
5458         (load_modules): Invoke mono_image_open_full passing the refonly
5459         parameter to load the modules the correct way.
5460         (build_guid_table): Add the refonly argument, to re-build the 
5461         correct hash table.
5462         (do_mono_image_open): Added the refonly argument, in order to
5463         define it for the loaded image.
5464         (mono_image_loaded_full): New function, which receives an
5465         additional parameter to look for the image in the refonly or
5466         non-refonly section.
5467         (mono_image_loaded): Updated, using mono_image_loaded_full.
5468         (mono_image_loaded_by_guid_full): The same case that happens
5469         with mono_image_loaded_full.
5470         (mono_image_loaded_by_guid): Likewise.
5471         (register_image): Use the ref_only variable inside MonoImage
5472         to decide in which hash table store the current image.
5473         (mono_image_open_from_data_full): Rename
5474         mono_image_open_from_data to mono_image_open_from_data_full,
5475         adding the refonly argument, to define the ref_only variable 
5476         inside MonoImage.
5477         (mono_image_open_from_data): Return 
5478         mono_image_open_from_data_full.
5479         (mono_image_open_full): Rename mono_image_open to
5480         mono_image_open_full, receiving the new refonly argument,
5481         to pass it to inner methods.
5482         (mono_pe_file_open): Update this function, to open
5483         a MonoImage as a non-refonly image.
5484         (mono_image_close): Use the refonly variable inside
5485         MonoImage to remove the image from the correct caches.
5486
5487         * image.h: Add the signatures of mono_image_open_full,
5488         mono_image_open_from_data_full, mono_image_loaded_full,
5489         mono_image_loaded_by_guid_full.
5490
5491         * metadata-internals.h: Add the ref_only field to 
5492         MonoImage.
5493         
5494 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5495
5496         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
5497         Fix the last behavior, which used to load the assemblies and
5498         extract MonoReflectionAssemblyName information, instead of
5499         extract it from the metadata tables. Needed for Reflection
5500         Only assemblies.
5501         
5502 2005-07-29  Martin Baulig  <martin@ximian.com>
5503
5504         * mono-debug-debugger.c
5505         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
5506         not initialized.
5507
5508         * mono-debug.c
5509         (mono_debug_address_from_il_offset): Check whether we have
5510         debugging support before attempting to take the lock.
5511         (mono_debug_source_location_from_address): Likewise.
5512         (mono_debug_source_location_from_il_offset): Likewise.
5513         (mono_debug_il_offset_from_address): Likewise.
5514         (mono_debug_address_from_il_offset): Likewise.
5515
5516 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
5517
5518         * class.c (mono_class_from_name_case): Add support for dynamic images.
5519         Fixes #75650.
5520
5521         * object.c (mono_class_compute_gc_descriptor): Add a workaround
5522         for #75479.
5523
5524 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
5525         
5526         * reflection.c (mono_method_get_object): Fix warning.
5527
5528 2005-07-28  Martin Baulig  <martin@ximian.com>
5529
5530         * mono-debug.c
5531         (mono_debug_add_wrapper): Also write the wrapper type.
5532
5533 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
5534
5535         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
5536         
5537         * class.c (mono_class_init): Avoid reading nested classes if the AOT
5538         data indicates the class has none.
5539
5540 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
5541
5542         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
5543         loader lock with the debugger lock. Prevents deadlocks for beagle.
5544
5545         Beagle can now run on an smp box for a weekend without any
5546         issues. Woohoo!
5547
5548 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
5549
5550         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
5551         in a module. Fixes #75629.
5552
5553 2005-07-26  Martin Baulig  <martin@ximian.com>
5554
5555         * mono-debug.c (mono_debug_add_wrapper): New static method.
5556         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
5557         interncall or a wrapper.
5558
5559         * mono-debug.h (MonoDebugWrapperData): New public typedef.
5560         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
5561         (MONO_DEBUGGER_VERSION): Bump to 51.
5562
5563         * mono-debug-debugger.c
5564         (mono_debugger_add_type): Removed this empty function.
5565         (mono_debugger_add_method): Likewise.
5566
5567 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
5568
5569         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
5570         before accessing method->slot.
5571
5572 2005-07-21  Jb Evain  <jbevain@gmail.com>
5573
5574         * reflection.c (method_encode_clauses/class): Handle filters clauses.
5575         Fixes #75010.
5576
5577 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
5578
5579         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
5580         #75587.
5581
5582 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
5583
5584         * image.h image.c: Add mono_image_get_guid () API function.
5585
5586 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
5587
5588         There were issues when multiple threads tried to load
5589         assemblies. A deadlock was created between assemblies_mutex and
5590         mono_domain_assemblies_lock. This fixes the issue by making the
5591         assembly ref counting be lock free. See bug 75586.
5592         
5593         * image.c (mono_image_close): The add ref function here was using
5594         Interlocked operations while the unref was using a mutex and a
5595         --. I don't think this was ever a bug that would be exposed in a
5596         non-pendantic way (ie, by an embedder doing a ref on one thread
5597         and an unref on another), but for the sake of correctness, this is
5598         now Interlocked.
5599
5600         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
5601         (mono_assembly_load_reference): Call mono_assembly_addref rather
5602         than touching the refcount ourselves.
5603         (mono_assembly_close): Use InterlockedDecrement to unref the
5604         assembly. Don't acquire the lock unless it is actually needed.
5605
5606 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
5607
5608         * class.c (mono_class_layout_fields): Fix calculation of has_references
5609         for generic types.
5610
5611 2005-07-12  Martin Baulig  <martin@ximian.com>
5612
5613         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5614
5615         * metadata.c
5616         (mono_type_hash): Provide better hashing for generic instances.
5617         (mono_generic_inst_hash): Improve hashing.
5618         (mono_generic_class_hash): Likewise.
5619
5620         * reflection.c (mymono_metadata_type_hash): Improve hashing for
5621         generic instances.
5622
5623 2005-07-12  Martin Baulig  <martin@ximian.com>
5624
5625         * reflection.c (mono_reflection_create_runtime_class): Remove the
5626         hack for generic type definitions and non-`Run' assemblies.
5627         (mono_reflection_bind_generic_parameters): Also use
5628         `klass->wastypebuilder' to check for TypeBuilders.
5629
5630 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
5631
5632         * class.c (mono_class_layout_fields): Fix calculation of has_references
5633         for generic types.
5634
5635         * class.c (inflate_generic_class): Fix a leak.
5636         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
5637         for generic types.
5638
5639 2005-07-11  Martin Baulig  <martin@ximian.com>
5640
5641         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
5642         on error.
5643
5644 2005-07-11  Martin Baulig  <martin@ximian.com>
5645
5646         * loader.c (find_method): Also lookup in
5647         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
5648
5649 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5650
5651         * appdomain.c (mono_domain_unload): Don't free the error message
5652         before passing it to mono_get_exception_...
5653
5654         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
5655         
5656 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
5657
5658         * threads.c: try to better guess an available RT signal (bug #75387).
5659
5660 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5661
5662         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
5663         and CACHE_OBJECT.
5664
5665 2005-07-07  Martin Baulig  <martin@ximian.com>
5666
5667         * class.c (mono_type_get_name_full): Return NULL for
5668         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
5669         fixes #75408.
5670
5671 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5672
5673         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
5674         exit the appdomain as well being aborted.
5675
5676         * threadpool.c: Create all threadpool threads inside the root appdomain, and
5677         change back to the root domain after calling managed code. This enables
5678         appdomains using threadpools to be unloaded.
5679
5680 2005-07-07  Martin Baulig  <martin@ximian.com>
5681
5682         * class-internals.h
5683         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
5684         into `MonoDynamicGenericClass' since we only need it for dynamic
5685         types.
5686
5687         * reflection.c (mono_class_bind_generic_parameters): We don't need
5688         to compute the `parent' here.
5689
5690 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
5691
5692         * culture-info-table.h : regenerated.
5693
5694 2005-07-06  Martin Baulig  <martin@ximian.com>
5695
5696         * icall.c
5697         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
5698
5699         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
5700
5701 2005-07-06  Martin Baulig  <martin@ximian.com>
5702
5703         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
5704         we're doing a signature-only comparision; fixes #74945.
5705
5706 2005-07-06  Martin Baulig  <martin@ximian.com>
5707
5708         * class-internals.h (MonoGenericClass): Moved some things out into
5709         a new `MonoInflatedGenericClass' type.  
5710         (MonoInflatedGenericClass): New type; the `klass' of a
5711         `MonoGenericClass' is now computed lazyly in
5712         mono_get_inflated_generic_class().      
5713
5714         * class.c (mono_get_inflated_generic_class): New public function.
5715         (mono_class_inflate_generic_method): Removed the unused
5716         `MonoClass *' argument.
5717         (setup_generic_vtable): Don't call mono_get_inflated_method() on
5718         all the methods.
5719         (mono_class_create_generic): Make this static and merge it with
5720         mono_class_create_generic_2(); we're now called automatically from
5721         mono_get_inflated_generic_class().
5722
5723         * loader.c (mono_method_signature): Call
5724         mono_get_inflated_method() here.
5725
5726 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
5727
5728         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
5729         type of fields with RVA.
5730
5731         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
5732         for this pseudo class.
5733         (my_mono_class_from_generic_parameter): Likewise.
5734         (mono_class_init): Allow interfaces to have cctors.
5735
5736 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
5737
5738         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
5739         lazily for AOT methods.
5740
5741 2005-07-05  Martin Baulig  <martin@ximian.com>
5742
5743         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
5744         returns FALSE for a successful match, not TRUE.
5745
5746 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
5747
5748         * loader.c (mono_method_get_index): Optimize this a bit.
5749
5750 2005-07-04  Martin Baulig  <martin@ximian.com>
5751
5752         * class.c
5753         (class_compute_field_layout): Move the check for generic type
5754         definitions into mono_class_layout_fields().  Fixes #74684.
5755         (mono_class_from_generic_parameter): Correctly compute
5756         `klass->parent'; fixes #75457.
5757
5758         * reflection.c (register_assembly, register_module): Make sure
5759         `domain->rejobject_hash' is already created.
5760
5761 2005-07-02  Martin Baulig  <martin@ximian.com>
5762
5763         * class-internals.h
5764         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
5765         `MonoDynamicGenericClass'.      
5766
5767 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
5768
5769         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
5770         returned by a field getter is null, since null is a valid value.
5771
5772 2005-07-01  Martin Baulig  <martin@ximian.com>
5773
5774         * reflection.c (mono_reflection_generic_class_initialize): Update
5775         the `dgclass->fields [i].parent' to the correct class.
5776         (mono_image_get_fieldref_token): Use the declaring type, not the
5777         reflected type.
5778
5779 2005-07-01  Martin Baulig  <martin@ximian.com>
5780
5781         * loader.c (find_method): Also look in the interfaces; fixes #75429.
5782
5783 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
5784
5785         * threads.c (thread_cleanup): assert that thread != NULL
5786         (wait_for_tids_or_state_change): We were using the wrong variable
5787         when accessing wait->threads. `i' was always out of the bounds of
5788         the array.
5789
5790 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5791
5792         * loader.c: map user32 and kernel32 to libMonoSupportW
5793
5794 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
5795
5796         * appdomain.c (unload_thread_main): Mark this as WINAPI.
5797
5798 2005-06-28  Martin Baulig  <martin@ximian.com>
5799
5800         * loader.c (method_from_methodspec): Fix #75334.
5801
5802 2005-06-28  Martin Baulig  <martin@ximian.com>
5803
5804         Fix #74953 - Arrays now implement the generic IList<T> interface
5805         on the 2.0 platform.
5806
5807         * class-internals.h (MonoDefaults): Added `generic_array_class'.
5808
5809         * reflection.c (mono_class_bind_generic_parameters): New public
5810         function; similar to mono_reflection_bind_generic_parameters(),
5811         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
5812
5813         * domain.c (mono_init_internal): Try to initialize.
5814         `mono_defaults.generic_array_class' here; this'll only succeed if
5815         we're using the 2.0 corlib.
5816
5817         * icall.c
5818         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
5819         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
5820         (mono_lookup_internal_call): Added support for nested classes.
5821
5822         * loader.c
5823         (mono_get_method_from_token): Set `result->signature->pinvoke' if
5824         we're an interncall and have generic arguments.
5825
5826         * class.c
5827         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
5828         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
5829         instance of System.Array.InternalArray<T> for arrays, so they
5830         implement the generic IList<T> interface.
5831
5832 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
5833
5834         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
5835         (chastamar@yahoo.com). Fixes #75374.    
5836
5837 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
5838
5839         * culture-info-table.h: regenerated.
5840
5841 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5842
5843         * icall.c: handle spaces correctly for base64 strings.
5844
5845 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
5846
5847         * *.c: Kill some warnings.
5848
5849 2005-06-23  Duncan Mak  <duncan@novell.com>
5850
5851         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
5852         that this builds on Solaris 10 (x86).
5853
5854 2005-06-23  Martin Baulig  <martin@ximian.com>
5855
5856         * class.c
5857         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
5858         generic type definitions.
5859
5860 2005-06-23  Martin Baulig  <martin@ximian.com>
5861
5862         Fix #75331.
5863
5864         * metadata.c (mono_class_get_overrides): Renamed to
5865         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
5866         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
5867         pass it to mono_get_method_full().
5868
5869 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
5870
5871         * reflection.c (mono_reflection_create_runtime_class): take the
5872         mono_domain_lock in this method. Prevents deadlocks
5873
5874 2005-06-22  Martin Baulig  <martin@ximian.com>
5875
5876         * loader.c (method_from_methodspec): Fix #75330.
5877
5878 2005-06-22  Martin Baulig  <martin@ximian.com>
5879
5880         * reflection.c (type_get_qualified_name): Use
5881         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
5882         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
5883         argument; use it if we don't have an assembly name.
5884
5885 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
5886
5887         * object.c: In mono_message_init, set "copy out" flag for in
5888         parameters with the [Out] flag.
5889
5890 2005-06-21  Martin Baulig  <martin@ximian.com>
5891
5892         * class.c
5893         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
5894         and MONO_TYPE_PTR.
5895
5896 2005-06-21  Martin Baulig  <martin@ximian.com>
5897
5898         * class.c (mono_class_init): Don't initialize `class->fields' for
5899         generic instances since they're initialized again in
5900         compute_field_layout(). 
5901         (compute_field_layout): Set the field's `generic_info' here; fix
5902         #75320. 
5903
5904 2005-06-21  Martin Baulig  <martin@ximian.com>
5905
5906         * class-internals.h
5907         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
5908
5909         * metadata.c (mono_metadata_generic_method_equal): Also
5910         distinguish the `generic_class'; fixes #75334.
5911
5912 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5913
5914         * domain.c:
5915         * appdomain.c:
5916         * domain-internals.h:
5917         * reflection.c: 'domain_assemblies' field is now protected by its own
5918         lock. Don't call into managed code to run the AssemblyLoad event if we
5919         now there are no registered delegates for it.
5920
5921 2005-06-20  Martin Baulig  <martin@ximian.com>
5922
5923         * class.c (mono_class_is_assignable_from): Use a custom version of
5924         mono_class_has_parent() to make things work for generic instances;
5925         fix #75300.
5926
5927 2005-06-20  Martin Baulig  <martin@ximian.com>
5928
5929         * loader.c (method_from_methodspec): Apply a patch from
5930         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
5931
5932 2005-06-20  Martin Baulig  <martin@ximian.com>
5933
5934         * class.c (mono_class_init): Reverted Zoltan's last change; it
5935         breaks generics.
5936
5937 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
5938
5939         * threads.c (wait_for_tids_or_state_change): Add missing locking.
5940
5941 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5942
5943         * socket-io.c: fix the index in the socket array for writable/error
5944         sockets. Fixes bug #75306.
5945
5946 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
5947
5948         * class.c (mono_class_init): Allow interfaces to have static ctors.
5949
5950 2005-06-17  Martin Baulig  <martin@ximian.com>
5951
5952         * loader.c (method_from_methodspec): Use `context->container' when
5953         parsing the `gmethod->inst'.
5954
5955 2005-06-17  Martin Baulig  <martin@ximian.com>
5956
5957         * class.c (mono_type_get_name_recurse): Don't add the assembly
5958         name for type arguments.
5959
5960 2005-06-15  Martin Baulig  <martin@ximian.com>
5961
5962         * reflection.c (mono_image_get_inflated_method_token): Encode
5963         correct klass; fixes #75260.
5964
5965 2005-06-13 Michal Moskal <malekith@nemerle.org>
5966
5967         * icall.c: Make GetCorrespondingMethod/Constructor take
5968         MonoReflectionMethod method not MonoMethod. Removed
5969         MonoType.GetCorrespondingField, and make
5970         MonoGenericType.GetCorrespondingField take name not
5971         MonoClassField.
5972
5973 2005-06-13  Michal Moskal <malekith@nemerle.org>
5974
5975         * reflection.c (field_encode_signature, encode_locals):
5976          Make sizes of buffers for types larger (for big generic types).
5977          (create_generic_typespec,
5978          mono_reflection_sighelper_get_signature_local,
5979          mono_reflection_sighelper_get_signature_field):
5980          Add asserts for too small buffers.
5981
5982 2005-06-15  Martin Baulig  <martin@ximian.com>
5983
5984         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
5985         if our parent is not a dynamic type.
5986
5987 2005-06-15  Martin Baulig  <martin@ximian.com>
5988
5989         * class-internals.h (MonoTypeNameFormat): New enum.
5990
5991         * class.c
5992         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
5993         (mono_type_get_full_name): Removed.
5994         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
5995         argument instead of the boolean's.
5996
5997         * icall.c (ves_icall_System_MonoType_getFullName):
5998         Added `gboolean assembly_qualified'.    
5999
6000         * reflection.h
6001         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
6002
6003         * reflection.c (mono_reflection_parse_type): Parse the new type
6004         name format.
6005
6006 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6007
6008         * icall.c: no need to convert from utf16 to utf8 and then back again
6009         after the call to GetLogicalDrives.
6010
6011 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6012
6013         * icall.c: frombase64. Fix problems exposed by new tests.
6014
6015 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6016
6017         * icall.c: added internal calls for converting char [] and strings in
6018         base64 into byte [].
6019
6020 2005-06-10  Martin Baulig  <martin@ximian.com>
6021
6022         * class.c (mono_class_create_generic_2): Read the nested classes
6023         from the metadata rather than from `gklass->nested_classes' since
6024         `gklass' might not be initialized yet.
6025
6026 2005-06-09  Duncan Mak  <duncan@novell.com>
6027
6028         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
6029         all public headers. Fixes #74919.
6030
6031 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
6032
6033         * domain.c: The key for proxy_vtable_hash is now a pointer
6034         array. Added new GHashFunc and GCompareFunc functions for this.
6035
6036         * class.h: The list of interfaces in MonoRemoteClass is known in
6037         advance and can't grow (we create a new MonoRemoteClass if needed),
6038         so now the interface array can be allocated together with
6039         MonoRemoteClass.
6040         
6041         * object.c: Added a new method create_remote_class_key.
6042         Fixed mono_remote_class so it does not depend on
6043         mono_upgrade_remote_class.
6044         Removed extend_interface_array.
6045         Added new method clone_remote_class(), which makes a copy of a remote
6046         class and adds a new interface or class to it.
6047         mono_upgrade_remote_class() now creates a new remote class (or gets
6048         it from the cache) if an vtable upgrade is needed. In this way
6049         we make sure that other objects sharing the same remote class
6050         don't get the new vtable with unwanted interfaces.
6051         
6052         * object-internals.h:
6053         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
6054         
6055         * marshal.c: Track changes in mono_upgrade_remote_class().
6056
6057 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
6058         * icall.c: Add runtime methods for obtaining members of inflated
6059         class, which were created from supplied non-inflated members. It
6060         is used in internal Get{Method,Constructor,Field} methods in
6061         System.Type
6062
6063 2005-06-09  Martin Baulig  <martin@ximian.com>
6064
6065         * reflection.c
6066         (mono_reflection_bind_generic_method_parameters): Fix #75169.
6067
6068 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6069         * reflection.c (mono_image_basic_init): Define
6070         Version in MonoDynamicAssembly. 
6071         
6072 2005-06-08  Martin Baulig  <martin@ximian.com>
6073
6074         Fix #75136.
6075
6076         * loader.c
6077         (mono_method_signature_full): New public method; takes a
6078         `MonoGenericContext *'.
6079         (find_method): Use mono_method_signature_full() and pass the
6080         klass'es context to it.
6081
6082         * class.c (mono_class_is_inflated_method): Use
6083         mono_method_signature_full() and pass the context to it.
6084
6085 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
6086
6087         * object.c: add proper locking in mono_remote_class_vtable(),
6088         fixes possible memory corruption.
6089
6090 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
6091
6092         * marshal.c (mono_remoting_marshal_init): set
6093         initialized after initialization.
6094
6095 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
6096
6097         * locales.c : hush.
6098
6099 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
6100
6101         * object.c (extend_interface_array): fix really silly
6102         memory corrupting / comparison bug.
6103
6104 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6105
6106         * reflection.c: Functions added to support the creation
6107         of CustomAttributeData, which includes Attribute data
6108         used by ReflectionOnly methods.
6109
6110         * reflection.h:  mono_reflection_get_custom_attrs_data and
6111          mono_custom_attrs_data_construct added (functions exposed).
6112
6113          * icall.c: Added mono_reflection_get_custom_attrs_data
6114          as icall.
6115         
6116 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
6117
6118         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
6119         lupus's request.
6120
6121 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
6122
6123         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
6124
6125         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
6126         dynamic DllImportAttribute.
6127
6128         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
6129         dynamic DllImportAttribute.
6130
6131         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
6132         Fixes #75162.
6133
6134 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6135
6136         * threads.c: avoid segfault when an unstarted thread is aborted.
6137
6138 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
6139
6140         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
6141         Returns the name and version of the runtime for reporting.
6142
6143 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6144
6145         * appdomain.c: bump corlib version.
6146         * object-internals.h: new field in MonoReflectionAssembly.
6147
6148 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6149
6150         * object-internals.h: Carlos forgot to add this field.
6151
6152 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6153
6154         * icall.c: Added create_version to create instances
6155         of Version of MonoReflectionAssemblyName. This change helps
6156         the AssemblyName tests to keep running fine.
6157         
6158 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
6159   
6160         * object.c (mono_method_return_message_restore): A somehow less
6161         intrusive fix for #75138.
6162
6163 2005-06-03  Raja R Harinath  <rharinath@novell.com>
6164
6165         * object.c (mono_method_return_message_restore): Fix computation
6166         of expected number of out args.
6167
6168 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
6169
6170         * reflection.c (mono_image_get_method_info): Fix the case when the
6171         charset is empty.
6172
6173 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
6174
6175         * object.c: Added missing null check in
6176           mono_method_return_message_restore.
6177
6178 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
6179
6180         * reflection.c (mono_image_get_method_info): Handle the case when
6181         dllentry is empty.
6182
6183 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
6184
6185         * object.c: When creating the vtable for a proxy, take into account
6186         all inherited interfaces, not only the ones registered in
6187         iclass->interfaces. This fixs bug #74996.
6188         Also, in mono_method_return_message_restore, verify that the array
6189         of out args has the expected lengh.
6190
6191 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6192
6193         * socket-io.c: update the timeout in Poll when the call is interrupte.
6194
6195 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6196
6197         * socket-io.c: support abort/suspend in Select_internal after last
6198         change.
6199
6200 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6201
6202         * threadpool.c: remove warning.
6203
6204 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6205
6206         * icall.c:
6207         * socket-io.[ch]: Select_internal uses poll() now when available, thus
6208         removing the 1024 limit from select(). Runtime part of the fix for
6209         bug #71203.
6210
6211 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6212
6213         * socket-io.c: when resolving the addresses for the same
6214         host returned by gethostname(), get the local IPs from the interface
6215         list. Loopback addresses are discarded if the are interfaces up with
6216         non-loopback ones. Fixes bug #63265.
6217
6218 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
6219
6220         * appdomain.c, verify.c, object-internals.h, reflection.c:
6221         bumped corlib number to 36, and added new extra_flags field
6222         to ReflectionMethodBuilder and friends.  Fixes #75060.
6223
6224 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
6225
6226         * gc.c: register a new weak link only if the object is non-null
6227         (fixes bug#75047).
6228
6229 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6230
6231         * culture-info.h : short time pattern too.
6232
6233 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6234
6235         * culture-info.h : expand long time pattern string length.
6236
6237 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
6238
6239         * culture-info-table.h : update (more French date format; #72788).
6240
6241 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
6242
6243         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
6244         the method is static. Fixes #75029.
6245
6246 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
6247
6248         * reflection.c: Update the table_idx field of method builders after
6249         saving the module, since it can change. This is a workaround for
6250         bug #74914. 
6251
6252 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
6253
6254         * culture-info-table.h : update (additional French date format).
6255
6256 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
6257
6258         * icall.c (ves_icall_type_Equals): Revert last change.
6259         
6260         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
6261
6262         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
6263
6264 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
6265
6266         * class-internals.h: Added executioncontext_class field to 
6267         MonoDefaults structure.
6268         * domain.c: Cache System.Threading.ExecutionContext class in 
6269         mono_defaults.
6270         * object.c: Capture the ExecutionContext for asynchroneous calls in
6271          mono_async_result_new.
6272         * object-internals.h: Added execution_context and original_context 
6273         fields to MonoAsyncResult. Added execution_context to MonoThread.
6274         * security-manager.c|.h: Added mono_get_context_capture_method to 
6275         return the capture method (if required by the security manager or by
6276         the framework version used).
6277         * threadpool.c: Apply capture (if present) ExecutionContext in 
6278         mono_async_invoke and revert to original context after it completes.
6279
6280 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
6281
6282         * culture-info-table.h : updated (real hacky solution for zh-CHT).
6283
6284 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
6285
6286         * culture-info-table.h : zh-CHT related workaround.
6287
6288 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
6289
6290         * marshal.c (emit_marshal_custom): Add some error checking and call the
6291         methods in the ICustomMarshaler interface. Fixes #74875.
6292         
6293         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
6294         native->managed wrappers.
6295
6296 2005-05-12  Martin Baulig  <martin@ximian.com>
6297
6298         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
6299         here and use the loader lock.
6300
6301         * mono-debug.c: Properly lock when the debugger is not attached.
6302         (mono_debug_init): Release the initial lock if we're not running
6303         in the debugger.
6304
6305 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
6306
6307         * marshal.c (emit_marshal_custom): Pass through NULL values without
6308         calling the custom marshalling routines.
6309
6310         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
6311         conversion in structures. Fixes #74882.
6312
6313 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
6314
6315         * culture-info-table.h : zh-* cultures were missing.
6316
6317 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
6318
6319         * threads.c: Added a new event background_change_event which is signaled
6320         when a thread changes its background mode.
6321         Moved here several checks previously done in managed code. The checks
6322         require the thread lock, and using the thread lock in managed code
6323         can result in deadlocks.
6324         Merged Start_internal and Thread_internal into a single method. Now 
6325         Thread_internal does all work of creating and starting a thread.
6326         Added icalls for setting and getting the state of the object. Moved from
6327         managed code to avoid locking there.
6328         Added wait_for_tids_or_state_change() which is called instad of
6329         wait_for_tids when waiting for non-backround threads to end. This method
6330         will return if one of the threads ends or the background_change_event
6331         is signaled.
6332         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
6333         the background mode. This method signals the background_change_event
6334         event.
6335         * icall.c:
6336         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
6337         removed Start_internal.
6338         
6339 2005-05-11  Martin Baulig  <martin@ximian.com>
6340
6341         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
6342         to order of some fields to get proper alignment on 64-bit machines.
6343
6344 2005-05-11  Martin Baulig  <martin@ximian.com>
6345
6346         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
6347         changes as they're broken and completely fuck up the debugger.
6348
6349         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
6350
6351 2005-05-10  Martin Baulig  <martin@ximian.com>
6352
6353         * reflection.c (mono_reflection_generic_class_initialize): Don't
6354         call mono_class_setup_parent() here.
6355
6356 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6357
6358         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
6359         send/receive timeout use an integer in milliseconds. We were using a
6360         struct timeval.
6361
6362 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6363
6364         * locales.c:
6365         (internal_get_cultures): reserve the first slot of the array for the
6366         InvariantCulture, which will be filled in managed code.
6367
6368 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
6369
6370         * reflection.c (mono_image_fill_module_table): Initialize the
6371         GENERATION field as well.
6372
6373 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6374
6375         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
6376         Monitor.Enter on the object.
6377
6378 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
6379
6380         * threads.c: Enable the wait for running threads when exiting.
6381         * icall.c: Suspend all threads before exiting.
6382
6383 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
6384
6385         * assembly.c (mono_assembly_load_reference): Fix warning.
6386
6387 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6388
6389         * threadpool.c: changed the default number of threads per cpu. From now
6390         on, the default will be 20 + (5 * number of cpus) instead of 50.
6391
6392 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
6393
6394         * loader.c (mono_method_get_signature_full): Add locking here.
6395
6396 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
6397
6398         * appdomain.c: Moved methods for parsing and freeing assembly
6399         names to assembly.c.
6400         * assembly.c, domain-internals.h: Created public methods for parsing
6401         assembly names. Fixed mono_assembly_load_with_partial_name:
6402         it now finds the best match, taking into account the version,
6403         token and culture specified in the partial name. Also return
6404         the latest version if no version information is specified.
6405
6406 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
6407
6408         * threadpool.c: replace check for SocketAsyncCall class.
6409
6410 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6411
6412         * threadpool-internals.h:
6413         * Makefile.am: added threadpool-internals.h
6414
6415         * threadpool.c: call mono_unhandled_exception on exceptions not handled
6416         that happen in threadpool threads (tested on MS).
6417         (mono_thread_pool_remove_socket): new function that dispatch any pending
6418         AIO call on a socket that is closing. By now only epoll really needs it,
6419         as select/poll wake up when the socket closes.
6420
6421
6422         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
6423
6424 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
6425
6426         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
6427
6428 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
6429
6430         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
6431
6432 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
6433
6434         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
6435         has an abort request, convert it into a suspend request.
6436
6437 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
6438
6439         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
6440         warning for the usage of `UnmanagedFunctionPointerAttribute' which
6441         is not supported yet.
6442
6443 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6444
6445         * image.c: register assemblies loaded from data (bundles) in the loaded
6446         assemblies hash. Fixes bug #74772.
6447
6448 2005-04-29  Martin Baulig  <martin@ximian.com>
6449
6450         * class.c (mono_type_get_name_recurse): Update to the new naming
6451         schema from the latest .NET 2.x beta2.
6452         (mono_class_setup_vtable_general): If we're a generic instance,
6453         copy the vtable from our generic type definition and inflate all
6454         the methods in it.
6455
6456         * loader.c (find_method): Update to the new naming schema from the
6457         latest .NET 2.x beta2.
6458
6459 2005-04-29  Raja R Harinath  <harinath@gmail.com>
6460
6461         * class.c (mono_class_init): Add a mono_loader_unlock to the
6462         #74734 fix.
6463
6464 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
6465
6466         * icall.c (ves_icall_System_Environment_Exit): Remove the 
6467         suspend_all_other_threads () call for the time being, since it can hang.
6468
6469         * threads.c (mono_thread_manage): Similarly, disable the waiting for
6470         the background threads to exit, since it can also hang.
6471
6472         * class.c (mono_class_init): Applied patch from Ankit Jain 
6473         (radical@gmail.com). Avoid pending init errors when a field refers
6474         to a nested class using a typeref. Fixes #74734.
6475
6476         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
6477         this for dynamic modules.
6478
6479 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6480
6481         * threads.c: don't wait for threads that are in the process of aborting
6482         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
6483         and waiting for background threads to finish. This makes xsp and
6484         mod-mono-server exit without random length delays and/or hangs.
6485
6486 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6487
6488         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
6489
6490 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
6491
6492         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
6493         dynamic types to prevent infinite loops. Fixes #74727.
6494
6495         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
6496         ..._is_assignable_to.
6497
6498 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
6499
6500         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
6501
6502 2005-04-25  Martin Baulig  <martin@ximian.com>
6503
6504         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
6505
6506         * domain.c
6507         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
6508
6509         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
6510
6511         * reflection.c (build_compressed_metadata): Set metadata header
6512         version to 2.0.
6513
6514 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
6515
6516         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
6517         number into an integral and a decimal part. Fixes #70473.
6518
6519         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
6520
6521 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
6522
6523         * culture-info-table.h : reflected the latest locale-builder output.
6524
6525 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6526
6527         * threadpool.c: check for SuspendRequested too when deciding if
6528         mono_thread_interruption_checkpoint should be called.
6529
6530 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6531
6532         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
6533         * threads.c: remove interruption_mutex and use Interlocked instead. When
6534         suspending all the threads, wait for all the suspended events at once.
6535         If we're shutting down and get an APC that is going to be queued,
6536         call mono_thread_execute_interruption immediately, as the thread might
6537         be sleeping on a pthread condition or mutex.
6538
6539         * icall.c: call mono_runtime_set_shutting_down before suspending the
6540         threads.
6541
6542         Fixes bug #74693. And now xsp is happier when exiting.
6543
6544 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
6545
6546         * loader.c (mono_stack_walk): Fix #74690.
6547
6548 2005-04-22  Martin Baulig  <martin@ximian.com>
6549
6550         * mono-debug.h (MonoDebugMethodJitInfo): Added
6551         `MonoDebugMethodJitInfo *jit'.
6552
6553         * mono-debug.c (mono_debug_read_method): Cache the
6554         MonoDebugMethodJitInfo in `address->jit'.
6555         (mono_debug_free_method_jit_info): New public method.
6556
6557 2005-04-22  Martin Baulig  <martin@ximian.com>
6558
6559         * class.c (mono_class_is_assignable_from): Disallow
6560         type parameter -> interface.
6561
6562 2005-04-21  Dick Porter  <dick@ximian.com>
6563
6564         * threads.c (mono_thread_create): Turn an assertion into an error.
6565
6566 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
6567
6568         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
6569         
6570         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
6571         Fix some gcc 4.0 warnings.
6572
6573 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
6574
6575         * file-io.c: fix alt dir separator char on unix systems
6576         and cleanup (fixes bug #71214).
6577
6578 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
6579
6580         * marshal.c: Use CALLVIRT instead of CALL when dispatching
6581         a call to a remote domain, since the method may be an
6582         interface method in the client domain. This fixes bug #74192.
6583
6584 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6585
6586         * threadpool.c: recv/send are now performed before going back to managed
6587         code to save one transition.
6588
6589 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6590
6591         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
6592
6593         * metadata/threadpool.c: removed hack to workaround the bug above.
6594
6595         Fixes bug #74618.
6596
6597 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
6598
6599         * reflection.c reflection.h: Fix handling of parameter defaults in
6600         dynamic methods. Also fixes handling of parameter attributes.
6601         Fixes #74609.
6602
6603         * mono-debug.c (mono_debug_close_image): Fix warning.
6604
6605 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6606
6607         * socket-io.h: replaced old unused field with new 'blocking'.
6608         * threadpool.c: restore socket blocking state on windows(tm).
6609
6610 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
6611
6612         * icall.c: don't return the codebase in the AssemblyName[] returned by
6613         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
6614         * object-internals.h: Removed FIXME (fields were presents) and fixed
6615         versioncompat declaration.
6616
6617 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6618
6619         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
6620         not closed, so don't cleanup when it happens.
6621
6622 2005-04-13  Chris Toshok  <toshok@ximian.com>
6623
6624         * mono-debug-debugger.h: change prototype for
6625         mono_debugger_lookup_type.
6626
6627         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
6628         this function, although it should probably be named
6629         mono_debugger_init_type.
6630
6631 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6632
6633         * threadpool.c: fix non-AIO case.
6634
6635 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
6636
6637         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
6638         the built-in profiler to measure just JIT compilation times.
6639
6640 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6641
6642         * threadpool.c: the epollfd might be closed by another thread at
6643         any time, so ignore EBADF at treat it as a "we're closing" sign.
6644
6645 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6646
6647         * threadpool.c: release the semaphores with a count equals to the number
6648         of working threads in both IO and regular pools. Fixed typo that messed
6649         up the count of IO pool threads. Don't initialize the pipe handles if
6650         we're using epoll.
6651
6652 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6653
6654         * threadpool.c: some systems don't like a NULL when deleting the socket
6655         from epoll.
6656
6657 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6658
6659         * threadpool.c: fix semaphore allocation.
6660
6661 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6662
6663         * threadpool.c: added epoll() based implementation for asynchronous IO
6664         that is used instead of the default poll() when available.
6665         It can be disabled by setting MONO_DISABLE_AIO.
6666
6667 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6668
6669         * threadpool.c: windows needs 'closesocket' and instead of returning
6670         0 when the stream is closed while in select, it returns -1. Fixes bug
6671         #74573.
6672
6673 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
6674
6675         * class.c (class_compute_field_layout): Fix the regression caused by
6676         the previous try.
6677
6678 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6679
6680         * threadpool.c: separate pool for socket async. IO.
6681         * threadpool.h: mono_max_worker_threads is not a global any more.
6682
6683 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
6684
6685         * class.c (class_compute_field_layout): Fix #74549.
6686
6687 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6688
6689         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
6690         use 2 connected sockets instead.
6691
6692 2005-04-08  Miguel de Icaza  <miguel@novell.com>
6693
6694         * mono-config.c: Add new entry point for mkbundle
6695         mono_config_parse_memory. 
6696
6697 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6698
6699         * threadpool.c: removed another unused function.
6700
6701 2005-04-08  Ankit Jain  <radical@corewars.org>
6702
6703         * reflection.c (get_default_param_value_blobs): Add 'types'
6704         parameter to get the types encoded in the constant table.
6705         (mono_param_get_objects): Use the type from the constant table,
6706         not the type of the parameter, when creating default values.
6707         Handle null default values correctly.
6708
6709 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6710
6711         * file-io.c:
6712         * file-io.h:
6713         * threadpool.c:
6714         * threadpool.h:
6715         * icall.c:
6716         * socket-io.c: removed dead code for async IO.
6717
6718 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6719
6720         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
6721
6722         * threadpool.c: intercept socket async. calls and pass them to a thread
6723         that is polling and dispatching the job items to the threadpool as
6724         socket become ready. Fixes bugs #71217, #71933.
6725
6726         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
6727         between char and short/ushort arrays.
6728
6729         * socket-io.c: remove dead code.
6730
6731 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
6732
6733         * locales.c,
6734           icall.c : removed InternalToUpper_Comp() and
6735           InternalToLower_Comp().
6736
6737 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
6738
6739         * char-conversions.h : The tables were incorrectly generated. Should
6740           be generated against invariant culture.
6741
6742 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
6743
6744         * object.c (mono_runtime_invoke_array): Fix return value when 
6745         passing pre-created valuetype objects to ctors.
6746
6747         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
6748         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
6749         Fixes #74338.
6750
6751 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
6752
6753         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
6754         only used with --security and hides the wrong corlib version error.
6755
6756 2005-03-30  Joshua Tauberer  <tauberer@for.net>
6757
6758         * class.c: Changed mono_class_name_from_token so that types
6759         outside of a namespace don't have an initial period.  Improved
6760         the g_warning message used in _mono_class_get when loading
6761         fails.
6762         * assembly.c: In mono_assembly_load_reference, when an assembly
6763         can't be found, "No such file or directory" is misleading and
6764         unhelpful because a few paths were checked for the presence of
6765         the assembly.  When that happens (ENOENT), display a nicer
6766         message indicating the directories that were searched.  In all
6767         cases, the warning is made easier to read for non-hackers.
6768
6769 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
6770
6771         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
6772         project/solution.
6773         * appdomain.h|domain.c: Removed inline from functions.
6774         * appdomain.c: Reduced warnings when compiling on windows.
6775         * icall.c: Fixed output_debug declaration to gunichar2*.
6776         * mono-config.c: Reduced warnings when compiling on windows.
6777         * rand.c: Added missing "windows.h". Added missing return value.
6778         * rawbuffer.c: Added missing winsock2.h for windows.
6779         * sysmath.h: Added mono-compiler.h header to allow/ease 
6780         compilation with non-GCC compilers.
6781         * threads.c: Fixed declarations to compile with VS.NET C compiler.
6782         Removed cast warnings.
6783
6784         Adapted from the work of J Lothian (for VC6).
6785
6786 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
6787
6788         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
6789         from default_path.
6790
6791 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
6792
6793         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
6794         the 2.0 profile.
6795
6796 2005-03-27  Raja R Harinath  <harinath@gmail.com>
6797
6798         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
6799         has to be in $(exec_prefix).  $(prefix) is for arch-independent
6800         stuff, and it would probably use $(prefix)/share rather than
6801         $(prefix)/lib.
6802
6803 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6804
6805         * console-io.c: added 2 includes that might be missing.
6806
6807 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
6808
6809         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
6810         profile.
6811
6812         * reflection.c (create_custom_attr): Allocate the params array using
6813         alloca so it gets GC tracking.
6814
6815 2005-03-23  Chris Toshok  <toshok@ximian.com>
6816
6817         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
6818         out some spew.
6819
6820 2005-03-24  Raja R Harinath  <rharinath@novell.com>
6821
6822         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
6823         changes to pick up any changes in prefix, etc.
6824
6825 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
6826
6827         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
6828         
6829         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
6830         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
6831
6832 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
6833
6834         * class-internals.h object-internals.h class.c reflection.c: Extend the
6835         mono_lookup_dynamic_token () function to return the class of the
6836         token as well. 
6837
6838         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
6839         well. Fixes #73848.
6840
6841 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
6842
6843         * security-manager.c: Skip inheritance checks for intra-corlib
6844         class inheritance and method overrides. This skips a lot of checks
6845         and (anyway) permissions cannot work until corlib is loaded.
6846
6847 2005-03-23  Martin Baulig  <martin@ximian.com>
6848
6849         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
6850         MONO_TYPE_GENERICINST.  
6851
6852 2005-03-23  Martin Baulig  <martin@ximian.com>
6853
6854         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
6855
6856 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6857
6858         * class.c: added locking comments to some functions.
6859         Cache the interface offsets arrays (saves about 20 KB
6860         of runtime memory in a typical app).
6861         Reduce the time overhead in mono_class_setup_supertypes ().
6862
6863 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
6864
6865         * icall.c: speedup and fix leaks in GetMethodsByName and
6866         GetPropertiesByName.
6867
6868 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6869
6870         * reflection.c: some locking fixes.
6871
6872 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6873
6874         * metadata.c: added missing break in case statement.
6875
6876 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
6877
6878         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
6879         typedbyref return values. Fixes #73941.
6880
6881 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
6882
6883         * security-manager.c|h: Added demandunmanaged method and 
6884         suppressunmanagedcodesecurity class to MonoSecurityManager.
6885         Renamed aptc class to allowpartiallytrustedcallers.
6886
6887 2005-03-17  Martin Baulig  <martin@ximian.com>
6888
6889         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
6890
6891 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6892
6893         * file-io.c: disabled file async. IO using aio_*. It uses the
6894         threadpool now. Workaround for bug #73718.
6895
6896 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6897
6898         * assembly.h, mono-config.c: added code to deal with bundled configs
6899         for bundled assemblies.
6900
6901 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
6902
6903         * *.c, private.h: cleanup, removing old private.h header file.
6904
6905 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
6906
6907         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
6908         and throw_on_unmappable_char attributes.
6909
6910 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
6911
6912         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
6913         _ProcessName_internal.
6914
6915 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
6916
6917         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
6918         #73631.
6919
6920         * icall.c threads.c threads-types.h: Remove slothash icalls as they
6921         are no longer used.
6922
6923 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
6924
6925         * object.c (compute_class_bitmap): Add support for generics. Fixes
6926         #73527.
6927
6928 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
6929
6930         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
6931
6932 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6933
6934         * filewatcher.c: commented out the code for windows watcher, as we don't
6935         use it (we use the managed implementation instead).
6936
6937 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
6938
6939         * object-internals.h (MonoThread): Remove 'unused1' field.
6940
6941         * appdomain.c: Bump corlib version.
6942
6943         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
6944
6945         * reflection.c (mono_reflection_create_runtime_class): Remove the
6946         AssemblyBuilder.Save optimization since it causes too many problems.
6947
6948 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
6949
6950         * exception.c|h: Added mono_get_exception_reflection_type_load to
6951         create a ReflectionTypeLoadException object.
6952         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
6953         to return NULL is a InheritanceDemand fails during reflection. Updated
6954         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
6955         ReflectionTypeLoadException if an InheritanceDemand fails during 
6956         reflection. Added icall mapping for GetLinkDemandSecurity.
6957         * security-manager.c|h: Added ves_icall_System_Security_
6958         SecurityManager_GetLinkDemandSecurity internal call to return the
6959         class and methods permissions set for a LinkDemand. Removed unused
6960         fields in MonoSecurityManager.
6961
6962 2005-03-10  Martin Baulig  <martin@ximian.com>
6963
6964         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
6965         it's a generic instance.
6966
6967 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
6968
6969         * reflection.c (mono_get_object_from_blob): Applied patch from
6970         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
6971
6972         * class.c (mono_class_is_assignable_from): Another try at fixing 
6973         #73469 without breaking anything.
6974
6975 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
6976
6977         * class.c: (mono_class_is_assignable_from): Revert the last changes
6978         since they don't work with generics.
6979         
6980         * class.c (mono_class_is_assignable_from): Fix build bustage.
6981
6982         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
6983         the managed IsAssignableFrom method. Fixes #73469.
6984
6985         * reflection.c (mono_reflection_call_is_assignable_from): New helper
6986         function.
6987
6988 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
6989
6990         * object.c (mono_load_remote_field_new): Fix returning uninitialized
6991         memory when the remoting callback does not sets the out arguments.
6992         Fixes #73007.
6993
6994         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
6995         by mistake.
6996
6997         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
6998
6999         * object-internals.h (MonoStackFrame): Sync with managed object layout.
7000
7001         * appdomain.c: Bump corlib version.
7002
7003 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7004
7005         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
7006         function.
7007
7008         * threads.c (mono_thread_attach): Detect threads which are not started
7009         by the GC pthread wrappers.
7010
7011 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
7012
7013         * icall.c: Added new icall for RNG.
7014         * rand.c|h: Added new icall to open the RNG. This allows to share a 
7015         single handle on Linux to access /dev/urandom and fix #73183.
7016
7017 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7018
7019         * object.c: setting the new vtable in a transparent proxy object must
7020         not change the GC descriptor.
7021
7022 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7023
7024         * object.c: fixed compilation without GCJ support.
7025         * reflection.c: for runtime-created types ensure klass->has_references
7026         is correct (bug #73215).
7027
7028 2005-03-02  Martin Baulig  <martin@ximian.com>
7029
7030         * class.c (mono_class_is_assignable_from): Make this work if
7031         `oklass' is a generic instance; fixes #72831.
7032
7033 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
7034
7035         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
7036         with hasthis set.
7037         
7038         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
7039
7040         * marshal.c: Reorganize native->managed marshalling code to also use
7041         the emit_marshal_... functions.
7042
7043 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7044
7045         * object.c: typed allocs have issues with bitmap sizes > 30,
7046         so check for max_set >= 30.
7047
7048 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
7049
7050         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
7051         managed code. Fixes #73012.
7052
7053         * metadata.h (MonoMarshalSpec): Add elem_mult field.
7054
7055         * metadata.c reflection.c: Load/Emit elem_mult as well.
7056         
7057         * metadata.h (MonoMarshalSpec): Add comment.
7058
7059         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
7060
7061         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
7062         num_elem to -1 if not given.
7063
7064         * object-internals.h (MonoReflectionMarshal): Add has_size field.
7065
7066         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
7067         given values.
7068
7069 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
7070
7071         * null-gc.c (mono_gc_free_fixed): Was not compilable.
7072
7073 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
7074
7075         * reflection.c (encode_marshal_blob): Encode param_num field as well.
7076
7077         * object-internals.h (MonoReflectionMarshal): Add param_num field.
7078
7079 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7080
7081         * object.c: generalized the reference bitmap creation
7082         and added hooks for the new GC.
7083         * class-internals.c: removed the gc_bitmap field from MonoClass.
7084
7085 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7086
7087         * domain.c: help the compiler to produce better code
7088         in mono_jit_info_table_find ().
7089
7090 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7091
7092         * object.c: make all allocations look typed.
7093
7094 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7095
7096         * socket-io.c: load Mono.Posix if it's not loaded already
7097         (fixes bug#73033).
7098
7099 2005-02-24  Martin Baulig  <martin@ximian.com>
7100
7101         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
7102         * reflection.c (dup_type): Likewise.
7103
7104 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
7105
7106         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
7107         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
7108
7109 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7110
7111         * domain.c, threads.c, object-internals.h: make the critical thread
7112         local vars use the fast access mode (even when we're compiled in
7113         a lib). Provide accessors to be used by the jit during codegen.
7114
7115 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7116
7117         * appdomain.c: Changed hook functios behavior to include
7118         support for the reflection only assemblies. Some icalls were changed
7119         to support the mentioned assemblies too. Signatures of static methods
7120         try_assembly_resolve and real_load now have an additional parameter:
7121         refonly.
7122
7123         * assembly.c: General changes to mono_assembly_ methods to support
7124         reflection only api. Functions mono_assembly_open, mono_assembly_load,
7125         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
7126         suffix, to support an additional gbool parameter to specify whether
7127         the assembli is reflection only or not. Created some new hook functions 
7128         to add support for reflection only assemblies. Signatures of static 
7129         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
7130         have now an additional parameter: refonly.
7131
7132         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
7133         indicating whether the assembly is reflection only or not.
7134
7135         * exception.c: Add mono_get_exception_invalid_operation.
7136
7137         * icall.c: Throw an InvalidOperationException when trying to invoke
7138         a property/method/event, or trying to set/get the value of a field.
7139         Also add an icall to retrieve the ref_only flag to the
7140         MonoReflectionAssembly.
7141
7142 2005-02-23  Chris Toshok  <toshok@ximian.com>
7143
7144         Part of fix for #72827.
7145         * mono-debug.c (mono_debug_add_method): add lexical block data to
7146         the info we write.  Kind of a hack at the moment - we copy the
7147         lexical block info from the MonoDebugMethodInfo to the
7148         MonoDebugMethodJitInfo here, before writing it.
7149         (mono_debug_read_method): read the lexical block info.
7150
7151         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
7152
7153         * debug-mono-symfile.h: add lexical block support.
7154
7155         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
7156         support.
7157
7158 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7159
7160         * loader.c (mono_lookup_pinvoke_call): Fix warning.
7161
7162         * object.c (mono_runtime_free_method): Call mono_free_method () and
7163         put the TODOs there.
7164
7165         * loader.c (mono_free_method): Free up most memory allocated for 
7166         dynamic methods.
7167
7168 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7169
7170         * reflection.c: properly flag a Type argument to a
7171         named custom attr value (bug #72248).
7172
7173 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7174
7175         * reflection.c: reduce code duplication in named custom
7176         attribute encoding.
7177
7178 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
7179
7180         * reflection.c: properly encode custom attrs of type object
7181         (bug #72649).
7182
7183 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7184
7185         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
7186
7187 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
7188
7189         * socket-io.c: load System.dll if it's not loaded already
7190         (bug #72850 and #70477).
7191
7192 2005-02-21  Martin Baulig  <martin@ximian.com>
7193
7194         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
7195         generic instances.
7196
7197 2005-02-21  Martin Baulig  <martin@ximian.com>
7198
7199         * reflection.c (mono_image_build_metadata): We also need to
7200         "fixup" the MethodImpl table after we computed the final method
7201         indices.  Call fixup_methodimpl() to do that.
7202         (fixup_methodimpl): New private method.
7203
7204 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7205
7206         * assembly.c: special case mscorlib.dll (bug#72536),
7207         patch from Carlos Alberto Cortez.
7208
7209 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7210
7211         * threads-types.h threads.c: Fix build bustage.
7212
7213         * threads.c: Use a union for long<->double conversions.
7214
7215         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
7216         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
7217
7218         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
7219         containing the checkpoint call with NOT_TAKEN.
7220         
7221         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
7222         checkpoint before pushing the arguments, so they won't have to be
7223         spilled to stack.
7224
7225 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7226
7227         * domain.c, assembly.c, domain-internals.h: make some data
7228         const and relocation-free.
7229
7230 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
7231
7232         * object.c, appdomain.c, class-internals.h: introduce the
7233         MonoClassRuntimeInfo structure to hold the info needed to
7234         use a class at runtime. Made mono_class_vtable() lock-free
7235         for all the appdomains.
7236
7237 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
7238
7239         * metadata-internals.h, image.c: introduce a per-image mempool to
7240         be used for memory that has the same lifetime as the image.
7241
7242 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
7243
7244         * domain.c: In mono_init_internal(), instead of selecting the first
7245         runtime version supported by an executable, get a list of all
7246         supported versions and select the one for which an mscorlib exists
7247         (since even if the runtime supports a given version, it doesn't mean
7248         that the framework for that version is installed).
7249         Modified get_runtimes_from_exe to support this behavior.
7250         In supported_runtimes, added information about additional system
7251         assembly versions.
7252         
7253         * assembly.c: Added support for more than one system assembly version
7254         per runtime version. Updated the assembly list.
7255         In mono_assembly_remap_version, removed the initial version check,
7256         since we don't know to which version we need to compare until we
7257         get the version set on which the assembly is based.
7258         Moved the code for loading corlib into the new method
7259         mono_assembly_load_corlib(), so it can be used by the initialization
7260         code.
7261         
7262         * domain-internals.h: Updated data structures and added declaration
7263         for mono_assembly_load_corlib.
7264
7265 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7266
7267         * reflection.c (resolve_object): Fix the creation of the signature in 
7268         the SignatureHelper case.
7269
7270         * assembly.c (mono_assembly_remap_version): Fix binary search.
7271         
7272 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
7273  
7274         * class.c: Added inheritance check when a method is overloaded (from a
7275         virtual method or when implementing an interface) and when a class is
7276         inherited. Added functions to set a failure for a class and to 
7277         retreive the exception from a failure.
7278         * class-internals.h: Added fields to MonoClass to keep the exception
7279         information status for inheritance (or other exceptions) to be thrown
7280         later (i.e. not at load time).
7281         * object.c: Throw the inheritance SecurityException when a type is to 
7282         be created with either class or method inheritance violations.
7283         * reflection.c|h: Fix when getting declsec from a class. Removed 
7284         unrequired code for class. Improved sanity in parameter naming.
7285         * security-manager.c|h: Added functions to check for class and method
7286         inheritance.
7287
7288 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7289
7290         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
7291         and has_finalize in dynamic types as well.
7292
7293 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
7294
7295         * culture-info-table.h : fixed currency format for en-GB (and so on).
7296
7297 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
7298
7299         * gc.c: ensure the GC handles never have 0 as a value.
7300
7301 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
7302
7303         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
7304         a pointer to a struct to unmanaged code. Fixes #72625.
7305
7306 2005-02-16  Martin Baulig  <martin@ximian.com>
7307
7308         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
7309
7310 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
7311
7312         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
7313
7314 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
7315
7316         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
7317
7318         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
7319         UnmanagedFunctionPointerAttribute, use it for determining calling convention
7320         etc. Fixes #71471.
7321
7322         * reflection.c (mono_custom_attrs_get_attr): New helper function.
7323
7324         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
7325
7326 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
7327
7328         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
7329         changes to make the current context a field in MonoThread.
7330
7331 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
7332
7333         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
7334         the last change.
7335         
7336         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
7337         extracted from mono_marshal_get_native_wrapper.
7338
7339         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
7340         to create wrappers around native functions.
7341
7342         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
7343         delegates for arbitrary function pointers. Fixes #71472.
7344
7345 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7346
7347         * threads.c: cleaned up the code a little.
7348
7349 2005-02-15  Martin Baulig  <martin@ximian.com>
7350
7351         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
7352         the data table.
7353
7354         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
7355         allocate larger chunks if needed.
7356
7357 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7358
7359         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
7360         in by mistake.
7361
7362 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
7363
7364         * domain.c: keep the domains in an array and ensure the domain ids
7365         are kept small, so they can be used as indexes to domain-specific data
7366         with a small memory overhead.
7367
7368 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7369
7370         * icall.c: Handle byref types in Type icalls. Fixes #72544.
7371
7372 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
7373
7374         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
7375
7376 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
7377
7378         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
7379
7380         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
7381         values.
7382
7383         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
7384         
7385 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
7386
7387         * domain-internals.h: add the hashtable here.
7388
7389         * class-internals.h: Remove `info' from MonoMethod
7390
7391         * domain.c: Add a new hashtable, jit_trampoline_hash
7392
7393 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7394
7395         * object.c: don't set the value of static fields
7396         (fixes bug#72494).
7397
7398 2005-02-11  Martin Baulig  <martin@ximian.com>
7399
7400         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
7401         (mono_debug_add_method): Silently ignore the method if it's too big.
7402         (mono_debug_add_type): Likewise.
7403
7404 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
7405
7406         * threads.c, appdomain.c: remove #ifdefs from the code.
7407
7408 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
7409
7410         * metadata-internals.h: Added flags to MonoAssembly to cache the most
7411         common security informations. This allows us to stay in unmanaged code
7412         when doing LinkDemand and it's special cases (except for the first 
7413         time for initialization). The flags a very much used with --security.
7414         * reflection.c|h: Added code to get declarative security attributes 
7415         for LinkDemand and InheritanceDemand. This required to refactor the
7416         existing code for Demand.
7417         * security-manager.c|h: Added new method fields for the special cases
7418         of LinkDemand.
7419
7420 2005-02-10  Martin Baulig  <martin@ximian.com>
7421
7422         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
7423         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
7424
7425 2005-02-10  Martin Baulig  <martin@ximian.com>
7426
7427         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
7428         debugging code; this is almost a complete rewrite.
7429
7430         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
7431
7432 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7433
7434         * domain.c, object.h: expose mono_string_equal () and 
7435         mono_string_hash ().
7436         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
7437         it's implemented in managed code.
7438
7439 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7440
7441         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
7442         lo leak objects between appdomains.
7443
7444 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7445
7446         * assembly.c: old compilers compilation fix from 
7447         robertj@gmx.net (Robert Jordan).
7448
7449 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
7450
7451         * class-internals.h: Little reminder for the future.
7452
7453         * debug-helpers.c: Fix up wrapper_type_names
7454
7455 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7456
7457         * image.c, metadata-internals.h: when loading an image from a file,
7458         mmap all of it and use the same codepaths as when using a
7459         in-memory image: the code is simpler and we use less memory
7460         (both writable and readonly).
7461
7462 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7463
7464         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
7465         API to alloc runtime data structures that need to be tracked by the
7466         GC and contain pointers.
7467         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
7468         make the code more readable and eventually use a different GC.
7469
7470 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
7471
7472         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
7473         for out arguments.
7474         
7475 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
7476
7477         * object.c: In release_type_locks(), don't release the cctor lock
7478         if it has already been released. This fixes a crash in the
7479         thread5 test.
7480
7481 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7482
7483         * gc.c, marshal.c, icall.c: register a delegate for finalization
7484         only when the native function pointer has been allocated for it.
7485
7486 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7487
7488         * object.c: cleaned up some code, allocate objects that are
7489         pointer free with the atomic malloc variant. Allocate memory
7490         for static data from the mempool if it's pointer-free.
7491         Allocate the bounds array at the end of the array data, when needed.
7492         * object-internals.h, object.h: move a private function in a private
7493         header.
7494         * class.c: handle missing case in tracking references in fields.
7495
7496 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7497
7498         * class.c, class-internals.h: keep track if a type has
7499         reference fields in either the instance or static fields.
7500
7501 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
7502
7503         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
7504         and renamed to MonoRuntimeInfo. Added fields to store the expected
7505         framework assembly version. Changed mono_get_framework_version and
7506         mono_get_runtime_version for a single mono_get_runtime_info method.
7507         
7508         * assembly.c: Added method to remap system assembly versions to the
7509         current executing runtime version. Removed old mapping code.
7510         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
7511         
7512         * icall.c, reflection.c: Track api changes.
7513
7514 2005-02-06  Miguel de Icaza  <miguel@novell.com>
7515
7516         * loader.c (method_from_memberref): Improve error reporting,
7517         produce the class name instead of the typeref/typedef index. 
7518
7519 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
7520
7521         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
7522
7523 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7524
7525         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
7526         stdcall and charset name mangling.  Reorganize the code and add
7527         some tracing stuff.
7528
7529 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
7530
7531         * monodiet.c: More iters!
7532
7533         * marshal.c: Iter usage.
7534
7535         * icall.c: Iter usage.
7536
7537         * object.c: Use iters.
7538
7539         * debug-helpers.c: More iters
7540
7541 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7542
7543         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
7544         under win32.
7545
7546 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
7547
7548         * mono-debug-debugger.c: use iters
7549
7550         * class.c, class-internals.h: mono_class_setup_events is static
7551         now
7552
7553         * All callers: use iters
7554
7555 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7556
7557         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
7558         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
7559
7560 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
7561
7562         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
7563
7564         * marshal.h: Add prototypes for ldfld/stfld_remote.
7565
7566         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
7567         this is called during startup.
7568         
7569 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
7570
7571         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
7572         MonoThreadsSync struct private in monitor.c. Changed the way
7573         MonoThreadsSync is allocated so it's faster and there is no
7574         need to keep track of it with a finalizer and it uses less memory.
7575         This also finally allows us to allocate mono objects as ptrfree when
7576         there are no reference fields.
7577
7578 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
7579
7580         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
7581         disappearing link to the GC interface and use them to simplify
7582         the gchandles code.
7583
7584 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
7585
7586         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
7587         stfld_remote which call mono_load/store_field_new. This allows methods
7588         calling ldfld/stfld wrappers to be AOTed.
7589
7590         * console-io.c: Include sys/filio.h under solaris.
7591         
7592         * console-io.c: Include curses.h if needed correctly.
7593
7594 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
7595         
7596         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
7597         method->klass as well.
7598
7599         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
7600
7601         * class.c (mono_class_init): Switch on lazy initialization of 
7602         methods.
7603
7604         * class.c (mono_class_get_finalizer): Handle the case when the 
7605         finalizer is inherited.
7606
7607 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7608
7609         * console-io.c: <curses.h> is needed by term.h on solaris.
7610
7611 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
7612
7613         * icall.c, class-internals.h, monodiet.c, class.c: Remove
7614         mono_class_setup_properties where possible. Remove this ftn from
7615         the header file, and make it static.
7616
7617 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
7618
7619         * loader.c: Add missing setup_... call.
7620
7621         * class.c: Add missing setup_... calls.
7622
7623         * class.c (mono_class_init): Switch on lazy initialization of 
7624         the generic vtable.
7625         
7626         * class.c (mono_class_init): Fix generics broken by the recent changes.
7627
7628         * monodiet.c (handle_type): Add missing setup_... calls.
7629
7630         * class.c: Back out garbage in previous patch.
7631         
7632         * class.c: Add missing setup_... calls.
7633
7634         * class.c (mono_class_get_method_from_name_flags): Avoid calling
7635         mono_class_setup_methods () if possible.
7636
7637         * class-internals.h (MonoClass): Add 'has_cctor' flag.
7638
7639         * class-internals.h (MonoCachedClassInfo): New structure.
7640
7641         * class.c: Initialize properties and events fields of MonoClass lazily.
7642
7643         * class.c: Add infrastructure for lazily initializing the methods and
7644         vtable fields of MonoClass. Not yet used.
7645
7646         * class.c (mono_class_get_finalizer): New helper function.
7647
7648         * class.c: Add infrastructure for loading some class related data from
7649         an AOT file.
7650
7651         * object.c: Add infrastructure for initializing the vtable from data
7652         in the AOT file.
7653
7654         * gc.c (run_finalize): Use mono_class_get_finalizer ().
7655
7656         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
7657         appropriate initialization function before accessing parts of the
7658         MonoClass structure.
7659
7660         * marshal.c: Fix warnings.
7661         
7662         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
7663
7664         * mono-debug-debugger.c (get_exception_message): Use 
7665         mono_class_get_method_from_name_flags ().
7666
7667 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
7668
7669         * reflection.c, appdomain.c: Replace a few manual searches that
7670         Zoltan missed. (Paolo approved this part of my initial patch).
7671
7672 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
7673
7674         * profiler.c: disable recording statistical events at report time.
7675
7676 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7677
7678         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
7679         to byteswap arrays of enum values, too (bug #72080).
7680
7681 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
7682
7683         * appdomain.c (set_domain_search_path): Allow this to be called if
7684         domain->setup is not yet set.
7685
7686         * loader.c (mono_method_get_index): New helper function.
7687
7688         * loader.c reflection.c: Use mono_method_get_index ().
7689
7690         * class.c (mono_class_get_method_from_name_flags): New helper method.
7691
7692         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
7693         this.
7694
7695         * class.c (mono_class_get_cctor): New helper method.
7696
7697         * string-icalls.c object.c class.c marshal.c reflection.c: Use
7698         mono_class_get_method () to look up methods.
7699
7700 2005-02-01  Miguel de Icaza  <miguel@novell.com>
7701
7702         * console-io.c: Fix the build, this should work on Windows.
7703
7704 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
7705
7706         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
7707         be set to null to keep things valid
7708
7709 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7710
7711         * icall.c: added Console 2.0 icalls.
7712         * Makefile.am: added console-io.[ch]
7713         * console-io.[ch]: internal calls for Console 2.0 API.
7714
7715 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7716
7717         * class.c: make sure we consider all the interfaces
7718         when calculating max_interface_id (bug found by
7719         Jeroen Frijters running ikvm).
7720
7721 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
7722
7723         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
7724         valuetype fields to null.
7725
7726         * object.c (set_value): Ditto. Fixes #71669.    
7727
7728 2005-01-31  Martin Baulig  <martin@ximian.com>
7729
7730         * metadata.c (mono_metadata_has_generic_params): New public
7731         function; checks whether something is a generic method.
7732
7733 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7734
7735         * appdomain.c: fix infinite recursion when adding assemblies.
7736
7737 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
7738
7739         * object.c: Fix small typo to return all items for Environment.
7740         GetCommandLineArgs.
7741
7742 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7743
7744         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
7745         reflection.c: more domain and assembly-unload related fixes
7746         and memory leaks plugs.
7747
7748 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
7749
7750         * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
7751
7752 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
7753
7754         * loader.c (mono_method_signature): Make this method lazy
7755         (mono_get_method_from_token): Don't computate the signature here.
7756
7757         Doing this saves quite a bit of memory. I got 90 kb on starting up
7758         monodoc. It should also save some disk reads on startup.
7759
7760         * *: MonoMethod->signature might be NULL now. You *MUST* use
7761         mono_method_signature.
7762
7763 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
7764
7765         * object.c (mono_runtime_get_main_args): Return an array from the
7766         current domain here. Fixes #71938.
7767
7768 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
7769
7770         * monitor.c: formatting changes to comply with the
7771         mono coding style and remove #ifdefs from the code.
7772
7773 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7774
7775         * metadata.c, private.h: remove some unneeded data
7776         and use a more compact representation for table schemas.
7777
7778 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
7779
7780         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
7781         to get a better distribution in hash tables.
7782         * *.c: use mono_aligned_addr_hash() where appropriate.
7783         * assembly.c: make var static.
7784
7785 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
7786
7787         * domain-internals.h: Put MonoJitInfo on a diet.
7788
7789         * domain.c: Fix a warning.
7790
7791 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7792
7793         * gc.c: rework the gc handles code to reuse handles
7794         when freed.
7795
7796 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7797
7798         * domain.c: fixed long standing bug in mono_string_equal() which
7799         was brought to light with the ldstr changes.
7800
7801 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
7802
7803         * reflection.c: Remove warning by adding missing include for marshal.h
7804
7805 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7806
7807         * domain.c, object.c: change the ldstr_table to hold
7808         MonoString* as keys: makes the runtime isinterned lookup
7809         faster and simplifies memory management.
7810
7811 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
7812  
7813         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
7814         possible to add imperative security checks before calling the icall.
7815         * reflection.c: Return security attributes on the original MonoMethod
7816         (and not the wrapped one). This fix permissions on icalls.
7817
7818 2005-01-25  Dick Porter  <dick@ximian.com>
7819
7820         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
7821         the check for mktime() support actually test the mktime() return
7822         value.  "Fixes" bug 71682, though the output is still different to
7823         MS.
7824
7825 2005-01-25  Martin Baulig  <martin@ximian.com>
7826
7827         * class.c (mono_class_is_assignable_from): Make this work for
7828         generic instances.
7829
7830 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
7831
7832         * marshal.c (mono_string_utf8_to_builder)
7833         (mono_string_builder_to_utf16): We might not have ownership of the
7834         string. In thise case, we need to create a new buffer.
7835
7836         * object-internals.h (mono_stringbuilder_capacity): sb->str might
7837         be null, in which case, use the default capacity.
7838
7839 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7840
7841         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
7842         GC events to the profiler.
7843
7844 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7845
7846         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
7847         if you don't want the GC to run.
7848
7849 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
7850
7851         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
7852         start providing a GC API and keeping different implementations in
7853         their own file.
7854         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
7855
7856 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
7857
7858         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
7859         mmap rather than allocating a huge buffer.
7860         (mono_debug_close_mono_symbol_file): Free the buffer allocated
7861         above.
7862
7863 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
7864
7865         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
7866         and CheckExecutionRights.
7867         * reflection.c|h: Keep the index of the declarative security to be 
7868         used, instead of the pointer, when AOT compiler is used. Also add 
7869         class initialization when requesting demands.
7870         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
7871         CheckExecutionRights. Both properties are now FALSE by default, and
7872         unmodifiable, unless the --security option is used.
7873
7874 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7875
7876         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
7877         reflection.c: properly refcount images and assemblies, many leaks fixed.
7878
7879 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7880
7881         * threadpool.c: increase the timeout for threads in the thread pool to
7882         10s.  Fixes bug #67159.
7883
7884 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
7885
7886         * class-internals.h: Sun's compiler insists on explicit
7887         signed on bit fields to handle then correctly.
7888
7889 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
7890
7891         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
7892         Make the size of the array fit only the number of invalid path
7893         chars that we have.
7894
7895         * class.c (_mono_class_get): Improve the error reporting when a
7896         class referenced is not found, to assist debugging. 
7897
7898 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
7899
7900         * threads.c: fix off-by-one error.
7901         * domain.c: free data allocated in the domain.
7902
7903 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
7904
7905         * reflection.c (mono_method_body_get_object): Fill out exception info
7906         as well.
7907
7908         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
7909         structure.
7910         
7911 2005-01-19  Martin Baulig  <martin@ximian.com>
7912
7913         * loader.c (mono_get_method_constrained): Make this work again.
7914
7915 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
7916
7917         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
7918         guint16 to match the managed side.
7919
7920         * reflection.c (mono_reflection_body_get_object): Fill out local
7921         variables array.
7922
7923         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
7924         as well.
7925
7926         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
7927         'local_var_sig_token'.
7928
7929 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
7930
7931         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
7932         System.Drawing.
7933
7934         * reflection.c (mono_method_body_get_object): Handle abstract and
7935         runtime methods.
7936
7937 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
7938
7939         * marshal.c, loader.c, class-internals.h, reflection.c:
7940         store the emthod data for a wrapper in an array instead of a list.
7941
7942 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
7943
7944         * marshal.c: change the code to allocate memory more
7945         conservatively for method wrappers.
7946
7947 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7948
7949         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
7950         fields from MonoClass to the marshal info structure where they belong.
7951
7952 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7953
7954         * class.c, object.c, class-internals.h, marshal.c: rearrange
7955         some fields and tweak some types to lower memory usage.
7956
7957 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
7958
7959         * threads.c (signal_thread_state_change): Handle the case when the
7960         target thread is the current thread.
7961
7962         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
7963
7964         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
7965         emit_ptr_to_object_conv. 
7966
7967         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
7968         marshalling. Fixes #71352.
7969
7970 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7971
7972         * metadata.h, blob.h: move table enum to blob.h so it can be included
7973         in any header.
7974         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
7975         cut the size of MonoImage/MonoDynamicImage.
7976
7977 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
7978
7979         * profiler.c (mono_profiler_install_simple): Fix default arguments.
7980
7981 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7982
7983         * reflection.c, reflection.h, icall.c: add a function to check
7984         if an attribute type is defined for a metadata object.
7985
7986 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
7987
7988         * object-internals.h: Added some needed fields from StringBuilder class.
7989         * marshal.c: Set the maxCapacity when creating a StringBuilder.
7990
7991 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
7992
7993         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
7994         threads before shutting down the runtime.
7995
7996         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
7997
7998 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7999
8000         * object-internal.h, threads.c: implement stacksize and 
8001         parameterized thread start functionality (requires
8002         matching corlib). Marked broken code for later removal.
8003
8004 2005-01-12  Martin Baulig  <martin@ximian.com>
8005
8006         * class-internals.h (MonoGenericClass): Moved the `initialized'
8007         flag to MonoDynamicGenericClass, removed `init_pending'.
8008         (MonoGenericInst): Added `is_reference' flag.
8009
8010 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
8011
8012         * reflection.c (mono_image_create_pefile): Only set the pe_offset
8013         inside the MSDOS header. Fixes #71201.
8014
8015         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
8016         gc thread.
8017         (mono_domain_finalize): Ditto.
8018
8019 2005-01-12  Martin Baulig  <martin@ximian.com>
8020
8021         * class.c (mono_get_shared_generic_class): Use the cache for
8022         non-dynamic generic classes.
8023
8024         * class-internals.h (mono_class_create_generic_2): Removed
8025         function prototype, this function is now static inside class.c.
8026
8027         * class.c (mono_class_create_generic_2): Made this static, only
8028         call it from mono_class_init() and mono_class_setup_parent().
8029         (collect_implemented_interfaces_aux): Call mono_class_init() on
8030         the interfaces we collect.
8031         (mono_class_setup_vtable): Call mono_class_init (class->parent).
8032
8033 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8034
8035         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
8036         it a real thread handle.
8037
8038         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
8039         MonoJitExceptionInfo, since each catch clause needs its own variable.
8040         
8041 2005-01-11  Dick Porter  <dick@ximian.com>
8042
8043         * image.c (mono_pe_file_open): New variant on mono_image_open()
8044         that does not set up the CLI metadata; used for FileVersionInfo so
8045         it can get the data for windows binaries too.
8046         
8047         * process.c (process_read_string_block): Don't read off the end of
8048         the StringTable block.
8049
8050         These both fix bug 70766.
8051
8052 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
8053
8054         * gc.c: set some fields to NULL at GC cleanup time.
8055         * threads.c: if we quit the main thread, call exit ().
8056
8057 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8058
8059         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
8060
8061 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
8062
8063         * threads.h, threads.c, object.c: added accessor and settor for
8064         main_thread. Handle it specially when exiting from it: wait
8065         for other foreground threads to exit.
8066
8067 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8068
8069         * process.c, verify.c: remove some bloat.
8070
8071 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8072
8073         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
8074         the calling convention to cdecl under win32.
8075
8076 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
8077
8078         * object.c (mono_object_get_size): New function to get the size of
8079         an object instance.
8080
8081         * profiler.c (simple_allocation): Use above.
8082
8083 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
8084
8085         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
8086         ves_icall_System_AppDomain_getRootDomain (as it's not required to
8087         get an appdomain by it's id and we can't assume the root's id is 0).
8088         * domain-internals.h: Change the function prototype to match.
8089         * icall.c: Change the icall table for AppDomain.
8090
8091 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
8092
8093         * locales.c (string_invariant_compare_char): Only compute
8094         GUnicodeTypes in the case where we need them.  Test for ordinality
8095         first and return if so.
8096
8097         From the commit:
8098
8099                 /*
8100                  * FIXME: here we must use the information from c1type and c2type
8101                  * to find out the proper collation, even on the InvariantCulture, the
8102                  * sorting is not done by computing the unicode values, but their
8103                  * actual sort order.
8104                  */
8105
8106 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8107
8108         * loader.c: for P/Invoke methods, allow the "Internal" shared
8109         library name to refer to the calling process symbol namespace.
8110
8111 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8112
8113         * Makefile.am: Add the security manager to the build.
8114         * security-manager.c|h: New. Initialization of the security manager.
8115
8116 2005-01-07  Dick Porter  <dick@ximian.com>
8117
8118         * threads.c: 
8119         * monitor.c: Update thread state during Monitor and WaitHandle
8120         waits.  Fixes bug 71031.
8121
8122 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8123
8124         * reflection.c (property_encode_signature): Correctly handle when the
8125         property has no methods.
8126
8127 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8128
8129         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
8130         
8131         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
8132         fields from mb, not rmb. Fixes #71017.
8133
8134         * marshal.c (emit_ptr_to_str_conv): Add support for 
8135         ByValTStr -> string conversion. Fixes #71015.
8136
8137         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
8138
8139         * mempool.c (mono_mempool_contains_addr): New helper function.
8140
8141 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8142
8143         * metadata.c (mono_metadata_compute_size): Fix size calculation of
8144         HasSematics encoded fields.
8145         
8146         * metadata.c (mono_type_to_unmanaged): Improve error message for 
8147         invalid string marshalling.
8148
8149         * metadata.c: Fix warnings.
8150         
8151 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8152
8153         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
8154         profiler support.
8155
8156 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8157
8158         * domain.c object.c domain-internals.h: Revert part of r38077 since the
8159         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
8160         tests.
8161
8162 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8163
8164         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
8165         so methods containing these can be AOTed.
8166
8167 2005-01-03  Martin Baulig  <martin@ximian.com>
8168
8169         * loader.c (find_method): Removed the hack for generic instances.
8170         (method_from_memberref): If our parent is a generic instance, pass
8171         its generic type definition to find_method() and then inflate the
8172         method.
8173         (mono_get_method_constrained): Pass the generic type definition to
8174         find_method() and inflate the method later.
8175
8176         * class-internals.h (MonoStats): Added `generic_class_count'.
8177
8178         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
8179         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
8180
8181         * reflection.c (mono_custom_attrs_from_params): Don't ignore
8182         generic type definitions.
8183
8184 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8185
8186         * loader.c icall.c: Fix warnings.
8187
8188 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
8189
8190         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
8191         blittable types. Fixes #70864.
8192
8193 2004-12-29  Martin Baulig  <martin@ximian.com>
8194
8195         * icall.c
8196         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
8197
8198         * reflection.c (mono_method_get_object): Create a
8199         "System.Reflection.MonoGenericMethod" for inflated methods; don't
8200         call mono_get_inflated_method().
8201
8202         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
8203
8204 2004-12-27  Martin Baulig  <martin@ximian.com>
8205
8206         * class-internals.h (MonoMethod): Added `is_inflated' flag.
8207         (MonoMethodInflated): Added `inflated' field.
8208
8209         * class.c (mono_class_inflate_generic_method): Don't really
8210         inflate the method here; just set the `is_inflated' flag in the
8211         MonoMethod.
8212         (mono_class_get_inflated_method): Actually inflate the method here
8213         if it's not already inflated; we use the MonoMethodInflated's new
8214         `inflated' field as a cache.
8215
8216 2004-12-26  Martin Baulig  <martin@ximian.com>
8217
8218         * class.c
8219         (inflate_generic_class): Moved some code out of inflate_generic_type().
8220         (mono_class_inflate_generic_method): If we're already inflated,
8221         inflate the context and use the declaring method; ie. make sure
8222         the declaring method of an inflated method is always the generic
8223         method definition.
8224         (mono_class_create_from_typedef): Create
8225         `class->generic_container->context->gclass'.
8226
8227 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8228
8229         * metadata-internals.h, marshal.c, reflection.c: More
8230         MonoGHashTable->GHashTable.
8231
8232         * domain-internals.h, class.c: Change MonoGHashTable's into
8233         GHashTables for some cases where no gc stuff is used
8234
8235         All users: update apis
8236
8237 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
8238
8239         * metadata.c (builtin_types): Make this `const'. Makes this get
8240         put into the shareable section.
8241         (mono_metadata_init): Casts to make gcc happy.
8242
8243 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
8244
8245         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
8246
8247 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
8248
8249         * icall.c: Added an internal call to retrieve the position and length
8250         of assembly-level declarative security attributes (RequestMinimum, 
8251         RequestOptional and RequestRefuse). This is used by the Assembly class
8252         to re-create the corresponding permission sets.
8253
8254 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
8255
8256         * marshal.c: fix the stelemref wrapper to be type correct
8257         (and faster).
8258
8259 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8260
8261         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
8262         to do key & 0x7fffffff. Hashtable already does this. It just
8263         results in longer code.
8264
8265 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8266
8267         * appdomain.c: Bump corlib version.
8268         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
8269         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
8270         * reflection.c|h: Add functions to get declarative security infos
8271         (blob position and length) for assemblies, classes and methods.
8272
8273 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
8274
8275         * reflection.c: sort the constant table (bug #70693).
8276
8277 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
8278
8279         * object-internals.h, threads.c, domain.c: add accessors for
8280         the MonoThread and MonoDomain tls keys.
8281
8282 2004-12-18  Martin Baulig  <martin@ximian.com>
8283
8284         * class.c (inflate_generic_type): If we're inflating a generic
8285         instance, set `ngclass->context->container = context->container';
8286         ie. the container we inflated into.
8287
8288         * metadata.c (mono_metadata_parse_generic_param): Reflect above
8289         inflate_generic_type() changes.
8290
8291 2004-12-17  Martin Baulig  <martin@ximian.com>
8292
8293         * class-internals.h
8294         (MonoGenericClass): Replaced `MonoType *generic_type' with
8295         `MonoClass *generic_class'.  Removed `dynamic_info'; if
8296         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
8297         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
8298
8299 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8300
8301         * exception.c (mono_exception_from_token): New helper function.
8302
8303 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8304
8305         * assembly.c (mono_assembly_load_with_partial_name): Call 
8306         mono_assembly_loaded before invoking the preload hooks. Fixes
8307         #70564.
8308
8309         * object-internals.h (MonoThread): Change culture_info and 
8310         ui_culture_info into an array.
8311
8312         * threads.c: Cache culture info objects from more than one appdomain.
8313
8314         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
8315         current UI culture.
8316
8317 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8318
8319         * threads.h threads.c appdomain.c: Clear the culture_info field of
8320         all threads during unloading if they point to an object in the dying
8321         appdomain.
8322
8323 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
8324
8325         * culture-info.h (TextInfoEntry): New struct
8326         * object-internals.h: sync with managed
8327         * locales.c: fill the `text_info_data' field
8328         * culture-info-tables.h: update
8329
8330 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
8331
8332         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
8333         collector.
8334
8335 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
8336
8337         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
8338         (ves_icall_ModuleBuilder_getMethodToken): Ditto
8339
8340 2004-12-12  Martin Baulig  <martin@ximian.com>
8341
8342         * mono-debug-debugger.c (write_type): If we're an enum and the
8343         builtin types have already been initialized, call mono_class_init().
8344
8345 2004-12-11  Martin Baulig  <martin@ximian.com>
8346
8347         * metadata.c (mono_metadata_load_generic_params): Added
8348         `MonoGenericContainer *parent_container' argument; automatically
8349         compute `container->is_method'; pass the correct owner to
8350         get_constraints().      
8351
8352         * reflection.c (compare_genericparam): Sort the GenericParam table
8353         according to increasing owners. 
8354
8355 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
8356
8357         * profiler.c: allow disabling the default profiler.
8358
8359 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
8360
8361         * decimal.c, icall.c: allow disabling System.Decimal support.
8362
8363 2004-12-09  Marek Safar <marek.safar@seznam.cz>
8364
8365         * reflection.c: Add support for null attribute arguments.
8366
8367 2004-12-09  Martin Baulig  <martin@ximian.com>
8368
8369         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
8370         names to get rid of compiler warnings.
8371
8372 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8373
8374         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
8375         mono_marshal_load_type_info (). Fixes #69625.
8376         (mono_marshal_get_ptr_to_struct): Likewise.
8377
8378 2004-12-08  Martin Baulig  <martin@ximian.com>
8379
8380         * mono-debug.h: Bumped version number to 47.
8381
8382         * mono-debug-debugger.c
8383         (mono_debugger_event_handler, mono_debugger_event): Take two
8384         guint64 arguments insteed of a gpointer and a guint32.  
8385
8386 2004-12-08  Martin Baulig  <martin@ximian.com>
8387
8388         * debug-mono-symfile.h
8389         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
8390         `address' to `native_offset'.
8391
8392 2004-12-08  Martin Baulig  <martin@ximian.com>
8393
8394         * class.c (mono_class_create_from_typespec): Only inflate if we
8395         either have `context->gclass' or `context->gmethod'.
8396
8397 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8398
8399         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
8400
8401         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
8402
8403         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
8404
8405         * reflection.c (mono_assembly_get_object): Remove the workaround put
8406         in for the release.
8407         
8408         * appdomain.c: Use the corlib_internal field from MonoAssembly.
8409
8410         * appdomain.c: Bump corlib version.
8411
8412         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
8413         be visible in other appdomains.
8414
8415 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
8416
8417         * threads.c: Interlocked inc and dec for longs were messed up,
8418         use a KISS based impl for this. Fixes 70234
8419
8420 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
8421
8422         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
8423
8424 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
8425
8426         * icall.c: fix to follow policy not to allow struct
8427         arguments in icalls.
8428
8429 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8430
8431         * process.c: make the patch that handles spaces in file paths work
8432         on mono/windows too.
8433
8434 2004-12-06  Martin Baulig  <martin@ximian.com>
8435
8436         * class.c (mono_class_create_generic): Call
8437         mono_class_setup_supertypes() if we're dynamic.
8438         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
8439
8440 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
8441
8442         * object-internals.h: Add new fields to MonoThread.
8443
8444         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8445
8446         * icall.c threads-types.h threads.c: Add new icalls.
8447
8448         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
8449
8450         * object-internals.h (MonoReflectionAssembly): Sync object layout with
8451         managed side.
8452
8453         * appdomain.c: Bump corlib version.
8454
8455         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
8456         internal assemblies. Fixes #69181.
8457
8458 2004-12-05  Martin Baulig  <martin@ximian.com>
8459
8460         * class.c (mono_class_inflate_generic_signature): Make this a
8461         no-op if `context' is NULL or we don't have any type parameters;
8462         also copy `sentinelpos'.        
8463
8464 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
8465
8466         * image.c: Add unbox_wrapper_cache.
8467
8468         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
8469
8470         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
8471         function generator.
8472         
8473         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
8474         Fixes #70173.
8475
8476         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
8477         
8478 2004-12-04  Martin Baulig  <martin@ximian.com>
8479
8480         * loader.c (mono_method_get_signature_full): New public function;
8481         like mono_method_get_signature(), but with an additional
8482         `MonoGenericContext *' argument.
8483
8484         * class.c (mono_class_inflate_generic_signature): Formerly known
8485         as inflate_generic_signature(); make this public.
8486
8487 2004-12-04  Martin Baulig  <martin@ximian.com>
8488
8489         * metadata.c
8490         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
8491         instead of a `MonoGenericContainer *'.  
8492         (mono_metadata_parse_array_full): Likewise.
8493         (mono_metadata_parse_signature_full): Likewise.
8494         (mono_metadata_parse_method_signature_full): Likewise.
8495         (mono_metadata_parse_generic_inst): Likewise.
8496         (mono_metadata_parse_generic_param): Likewise.
8497         (mono_metadata_parse_mh_full): Likewise.
8498         (mono_type_create_from_typespec_full): Likewise.
8499
8500 2004-12-03  Martin Baulig  <martin@ximian.com>
8501
8502         * class-internals.h (MonoGenericContainer): Replaced the
8503         `MonoGenericContext * pointer with a `MonoGenericContext'
8504         structure and made it the first element.
8505
8506 2004-12-03  Martin Baulig  <martin@ximian.com>
8507
8508         * class.c
8509         (inflate_generic_type): Set the `context->container' when creating
8510         a new MonoGenericContext.
8511         (mono_class_inflate_generic_method): Likewise.
8512         (mono_class_create_from_typespec): Just use `context->container'
8513         to get the container.
8514
8515         * loader.c (method_from_methodspec): Set `context->parent' from
8516         `context->container' - and if that's a method container, use its
8517         parent.  Also set the `context->container' when creating a new
8518         MonoGenericContext.
8519         (mono_get_method_from_token): Use just `context->container' to get
8520         the container.
8521
8522         * metadata.c (do_mono_metadata_parse_generic_class): Also set
8523         `gclass->context->container'.
8524
8525         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
8526         the `context->container' when creating a new MonoGenericContext.
8527
8528 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
8529
8530         * reflection.c (compare_genericparam): Sort params with identical
8531         owner by their number. Fixes gen-111 on sparc.
8532
8533 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
8534
8535         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
8536         around the domain changes.
8537
8538         * appdomain.c (mono_domain_unload): Handle the case when the thread
8539         calling Unload is itself being aborted during unloading. Fixes #70022.
8540
8541         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
8542
8543         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
8544         checkpoint_func as an icall so it gets a wrapper.
8545         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
8546         in the cross-appdomain wrappers too.
8547
8548         * threads.c (mono_thread_has_appdomain_ref): Make this public.
8549
8550         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
8551
8552         * reflection.c: Fix some memory leaks.
8553         
8554 2004-12-02  Martin Baulig  <martin@ximian.com>
8555
8556         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
8557
8558         * metadata.c (generic_class_cache): New static hashtable.
8559         (mono_metadata_lookup_generic_class): New public method.
8560
8561 2004-12-02  Martin Baulig  <martin@ximian.com>
8562
8563         * class.c (mono_class_create_from_typedef): Call
8564         mono_class_setup_parent() and mono_class_create_mono_type() before
8565         parsing the interfaces.
8566
8567 2004-12-02  Martin Baulig  <martin@ximian.com>
8568
8569         * metadata.c (generic_inst_cache): New static hashtable.
8570         (mono_metadata_lookup_generic_inst): New public function.
8571         (mono_metadata_inflate_generic_inst): New public function.
8572         (mono_metadata_parse_generic_inst): New public function.
8573         (do_mono_metadata_parse_generic_class): Use the new
8574         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
8575         since this'll also use the cache.
8576
8577         * reflection.c (mono_reflection_bind_generic_method_parameters):
8578         Use mono_metadata_lookup_generic_inst() to use the new cache.
8579
8580         * class.c (inflate_mono_type): Use
8581         mono_metadata_inflate_generic_inst() to inflate a generic
8582         instance; this'll also use the new cache.
8583
8584         * loader.c (method_from_methodspec): Use
8585         mono_metadata_parse_generic_inst() and
8586         mono_metadata_inflate_generic_inst() rather than parsing it
8587         manually, so we can use the new cache.
8588
8589 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
8590
8591         * threads.c (wait_for_tids): Do not incorrectly free threads when 
8592         the wait times out.
8593
8594 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8595
8596         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
8597         iter->args based on whether parameters are passed in registers (i.e.
8598         MONO_ARCH_REGPARMS is defined)
8599
8600 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
8601
8602         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
8603         the exception message. Fixes #70070.
8604         (method_from_methodspec): Fix warnings.
8605
8606 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8607
8608         * process.c: (complete_path) return the path quoted
8609
8610 2004-12-01  Martin Baulig  <martin@ximian.com>
8611
8612         * class-internals.h (MonoGenericInst): New structure.
8613         (MonoGenericClass): Replaced `type_argc', `type_argv' and
8614         `is_open' with `MonoGenericInst *inst'.
8615         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
8616         `is_open' with `MonoGenericInst *inst'.
8617
8618 2004-11-30  Martin Baulig  <martin@ximian.com>
8619
8620         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
8621
8622         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
8623         to `generic_class_cache'.
8624
8625         * metadata.c
8626         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
8627         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
8628         (mono_generic_inst_is_valuetype): Renamed to
8629         mono_generic_class_is_valuetype().
8630
8631         * class-internals.h
8632         (MonoGenericInst): Renamed to MonoGenericClass.
8633         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
8634         (MonoClass): Renamed `generic_inst' to `generic_class'.
8635         (MonoGenericContext): Renamed `ginst' to `gclass'.
8636
8637         * object-internals.h
8638         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
8639
8640         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
8641         mono_reflection_generic_class_initialize().
8642
8643         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
8644         now known as "System.Reflection.MonoGenericClass".
8645         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
8646
8647 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
8648
8649         * class-internals.h: Added a flag field to MonoClass to cache the
8650         declarative security attributes actions associated with the class.
8651         * domain-internals.h: Added booleans to MonoJitInfo to cache the
8652         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
8653         applicable to the JITted method.
8654         * reflection.c|h: Added functions to extract (as flags) which security
8655         actions are available (declaratively) for a method, class or assembly.
8656         * metadata.c|h: Added functions to search the declarative security
8657         table in the metadata.
8658         
8659 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
8660
8661         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
8662         EXPORTEDTYPES are already in the class name cache, so there is no
8663         need to add extra code here to look at them. Just removes a bit of
8664         cruft.
8665
8666         (ves_icall_System_Environment_get_TickCount): No need for #if
8667         WINDOWS. We already have the code in io-layer.
8668
8669 2004-11-28  Martin Baulig  <martin@ximian.com>
8670
8671         * loader.c
8672         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
8673         Fixes gen-112.cs.
8674
8675 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
8676
8677         * assembly.c (do_mono_assembly_open): Instead of having a
8678         conditional WITH_BUNDLE, incorporate support for bundles here, by
8679         having a global `bundles' variable holding a pointer to the actual
8680         bundles. 
8681
8682         (mono_register_bundled_assemblies): New API call used by the
8683         bundle code. 
8684
8685         See mkbundle.1 for details.
8686         
8687 2004-11-27  Martin Baulig  <martin@ximian.com>
8688
8689         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
8690         the vtable for generic methods.
8691
8692 2004-11-26  Martin Baulig  <martin@ximian.com>
8693
8694         * metadata.c
8695         (mono_metadata_generic_method_hash): New public function.
8696         (mono_metadata_generic_method_equal): Likewise.
8697
8698         * class-internals.h
8699         (MonoGenericContainer): Added `GHashTable *method_hash'.
8700
8701         * reflection.c (ReflectionMethodBuilder): Added
8702         `MonoGenericContainer *generic_container'.
8703         (reflection_methodbuilder_to_mono_method): Don't create a new
8704         MonoGenericContainer each time we're called.
8705         (mono_reflection_bind_generic_method_parameters): Use
8706         `container->method_hash' to cache the results so we don't create a
8707         different method if we're called several times with the same
8708         arguments.
8709
8710         * loader.c (method_from_methodspec): Use the new
8711         `container->method_hash' here, too.
8712
8713 2004-11-26  Martin Baulig  <martin@ximian.com>
8714
8715         * class.c (inflate_generic_signature): Correctly compute
8716         `res->has_type_parameters'.
8717         (mono_class_vtable): Use the `has_type_parameters' flag to
8718         determine whether we're a generic method.
8719
8720         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
8721
8722 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
8723
8724         * object.c (mono_runtime_run_main): Fix a small memory leak.
8725
8726 2004-11-25  Martin Baulig  <martin@ximian.com>
8727
8728         * class.c (set_generic_param_owner): Fixed the loop.
8729
8730 2004-11-25  Martin Baulig  <martin@ximian.com>
8731
8732         * object.c (mono_class_vtable): Don't create any JIT wrappers for
8733         generic methods.
8734
8735 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
8736
8737         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
8738         names. Fixes #69787.
8739
8740 2004-11-24  Martin Baulig  <martin@ximian.com>
8741
8742         * class.c (mono_class_create_generic_2): If we don't have a
8743         `ginst->parent', inflate `gklass->parent' to get our parent.
8744
8745 2004-11-24  Martin Baulig  <martin@ximian.com>
8746
8747         * reflection.c (compare_genericparam): Correctly sort the
8748         GenericParam table; fixes #69779.
8749
8750 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
8751
8752         * reflection.c: When writing a PE file, don't create a huge
8753         buffer in memory. Just write the arrays we have to the file.
8754         This reduces memory usage.
8755
8756         * metadata-internals.h: MonoDynamicStream pefile is no longer used
8757         globally.
8758
8759 2004-11-17  Martin Baulig  <martin@ximian.com>
8760
8761         * class.c (mono_class_init): Don't setup `class->parent' for
8762         dynamic instances; moved this to mono_class_generic_2().
8763         (mono_class_create_generic): Also set `klass->inited' for dynamic
8764         generic instances.
8765         (mono_class_create_generic_2): Don't do anything for dynamic
8766         generic instances.  Set `klass->parent' here and also call
8767         mono_class_setup_parent() here. 
8768
8769         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
8770         `MonoType *parent' argument; set `ginst->parent' before calling
8771         mono_class_create_generic_2(), so we set the correct parent.
8772
8773 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
8774
8775         * reflection.c: allow getting attributes from ModuleBuilder
8776         (used by ikvm).
8777
8778 2004-11-17  Martin Baulig  <martin@ximian.com>
8779
8780         * class.c (mono_class_create_from_typedef): If a type parameter is
8781         inherited from an outer class, set its owner to that class.
8782
8783 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
8784
8785         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
8786           for (int*) written size. This fixes bug #69592.
8787
8788 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
8789
8790         * icall.c: Added IsAuthenticodePresnet internal call.
8791         * image.c|h: New function that check a MonoImage for an Authenticode
8792         signature in the certificate PE data directory.
8793         * security.c|h: New internal call to ask the runtime if an 
8794         Authenticode signature seems referenced in the PE header.
8795
8796 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
8797
8798         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
8799
8800         * reflection.c (mono_image_create_pefile): Free the assembly streams
8801         after writing out the assembly file.
8802
8803         * object.c (mono_runtime_run_main): Fix small memory leak.
8804
8805         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
8806         property access modifiers. Fixes #69389.
8807
8808 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
8809
8810         * domain.c, object.c, object-internals.h, domain-internals.h,
8811         object.h, marshal.c: keep dynamic code info per domain.
8812
8813 2004-11-15  Martin Baulig  <martin@ximian.com>
8814
8815         * class.c (mono_type_get_name_recurse): Put type arguments in
8816         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
8817         see bug #68387.
8818
8819 2004-11-15  Martin Baulig  <martin@ximian.com>
8820
8821         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
8822         (mono_class_setup_vtable): When computing `the_cname' for a
8823         generic instance, don't include the namespace since we'd otherwise
8824         add it twice.
8825
8826 2004-11-15  Martin Baulig  <martin@ximian.com>
8827
8828         * class.c (mono_class_create_generic): Changed return type to void.
8829         (mono_class_create_generic_2): New public function; setup
8830         `class->method', `class->field' and `class->interfaces' here
8831         instead of in mono_class_init().
8832
8833         * class.h (mono_class_create_generic): Moved to class-internals.h.
8834
8835 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
8836
8837         * reflection.c (mono_image_create_pefile): take a file HANDLE.
8838         rather than writing to memory, write to this file. Right now,
8839         we are just writting into a buffer, and copying that. However
8840         we can avoid the buffer later.
8841
8842         (mono_dynamic_stream_reset): new function
8843
8844         * icall.c, object-internals.h: update for the above.
8845
8846 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
8847
8848         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
8849         have been using gc'd memory. First it is slower, unlikely
8850         the comment in the source code said, secondly, it increases
8851         our footprint to do it in the gc.
8852
8853         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
8854         the method so that it does not have to copy to managed code.
8855
8856 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
8857
8858         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
8859
8860 2004-11-12  Martin Baulig  <martin@localhost>
8861
8862         * reflection.c (mono_image_create_token): Allow generic method
8863         definitions here, since they may appear in an `.override'; see
8864         gen-98/gen-99 for an example.
8865
8866 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
8867
8868         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
8869         #69365.
8870
8871         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
8872         descriptive.
8873
8874 2004-11-11  Martin Baulig  <martin@ximian.com>
8875
8876         * class.c (mono_class_setup_vtable): In an explicit interface
8877         implementation, the method name now includes the arity.
8878
8879 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
8880
8881         * object.c (mono_array_full_copy): Fix warning.
8882
8883 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
8884
8885         * appdomain.c: Removed look_for_method_by_name(). Use the new method
8886         mono_class_get_method_from_name() instead.
8887         
8888         * class-internals.h: Added two new types of wrappers. 
8889         Added MonoRemotingTarget enum. Added new trampoline function type, which
8890         takes an additional MonoRemotingTarget value as parameter, so it is
8891         possible to request a trampoline for a specific target.
8892         
8893         * class.c: Added new mono_class_get_method_from_name() method.
8894         
8895         * class.h: In MonoRemoteClass, we can have now to vtables, one for
8896         general remoting sinks and one specific for cross domain calls.
8897         
8898         * debug-helpers.c: Added new wrapper names.
8899         
8900         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
8901         of a remote class.
8902         
8903         * image.c: Porperly delete value objects form the remoting invoke hashtable.
8904         
8905         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
8906         with several other methods (mono_marshal_get_xappdomain_dispatch,
8907         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
8908         and others) can generate a fast remoting wrapper for cross domain calls.
8909         More information can be found in docs/remoting.
8910         Other changes: Removed mono_find_method_by_name, and used
8911         mono_class_get_method_from_name instead.
8912         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
8913         is stored in the remoting invoke hashtable.
8914         
8915         * marshal.h: published the new method for getting the xdomain wrapper,
8916         and also added a method for getting the adequate wrapper for a given
8917         method and target.
8918         
8919         * object-internals.h, object.c: Added a couple of methods for capying and
8920         cloning arrays.
8921         Modified mono_install_remoting_trampoline, which takes the new remoting
8922         trampoline that has a remoting target as parameter.
8923         mono_class_proxy_vtable now also takes a remoting target as parameter, and
8924         will return the most suitable vtable for the target.
8925         Added mono_remote_class_vtable, which returns the vtable of a remote class
8926         (which can be the normal remoting vtable or the xdomain vtable).
8927         
8928         * threads.c: the xdomain invoke and dispatch wrappers must also be
8929         protected against interruptions.
8930
8931 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8932
8933         * icall.c: use memmove in BlockCopyInternal when the source and
8934         destination arrays are the same.
8935
8936 2004-11-09  Martin Baulig  <martin@ximian.com>
8937
8938         * class-internals.h (MonoGenericContainer): Removed `method' and
8939         `signature', replaced them with `is_method' and `is_signature'
8940         flags.  Added `context'.
8941
8942         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
8943         instead of a `MonoGenericContainer *'.
8944
8945         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
8946         for dynamic type parameters.
8947         (mono_metadata_load_generic_params): Setup `container->context'.
8948
8949         * reflection.c (mono_reflection_setup_generic_class): Setup
8950         `tb->generic_container->context'.
8951         (do_mono_reflection_bind_generic_parameters): Use
8952         mono_class_inflate_generic_type() to correctly inflate types,
8953         rather than using our own hack just for MONO_TYPE_VAR.
8954
8955 2004-11-09  Martin Baulig  <martin@ximian.com>
8956
8957         * class.c (mono_class_inflate_generic_method): Small fix; don't
8958         crash here.
8959
8960         * icall.c
8961         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
8962         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
8963         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
8964         (ves_icall_Type_BindGenericParameters): Likewise.
8965         (ves_icall_Type_get_IsGenericInstance): Likewise.
8966         (ves_icall_Type_GetGenericParameterPosition): Likewise.
8967         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
8968         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
8969         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
8970
8971 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
8972
8973         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
8974         assembly versions and public key tokens. Fixes #69113.
8975
8976 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
8977
8978         * metadata.c: fix bug introduced with the type cache changes
8979         on 2004-11-06.
8980
8981 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
8982
8983         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
8984         the MonoClass pointer instead of the token in exception clauses.
8985         * reflection.c: updates for the above and make the code not depend
8986         on the structure of MonoExceptionClause.
8987
8988 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
8989
8990         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8991         Add support for dynamic assemblies. Fixes #69114.
8992
8993         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
8994
8995 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
8996
8997         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
8998         since most only those methods use it. the code member of
8999         MonoMethodPInvoke was dead, so that can be removed too. Also,
9000         remove inline_count (again, not used), and move slot so that it
9001         can share bits with some other flags. This saves 8 bytes in the
9002         structure and gives us about 50 kb back for mcs helloworld.cs
9003
9004         * *.[ch]: Do naming changes for the above.
9005
9006         * loader.c (mono_method_get_header): Lazily init the header
9007         on first access.
9008         (mono_get_method_from_token): don't init the header here
9009         (mono_free_method): the header may never be allocated
9010
9011         Overall, this saves 150 kb of unmanaged allocations
9012         for mcs helloworld.cs. That accounts for 10% of the unmanaged
9013         memory at runtime.
9014         
9015         * loader.c, loader.h (mono_method_get_header): new accessor.
9016
9017         * *.[ch]: use the above method. Prepares us to lazily load
9018         the header.
9019
9020         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
9021         three warnings, which are actual bugs (see 69206).
9022
9023         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
9024         unused. Saves a cool 4 bytes / method.
9025
9026 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
9027
9028         * metadata.c (builtin_types): Add types for System.Object here.
9029         (mono_metadata_parse_type_full): Cache MonoType*'s that are
9030         for a class or valuetype from klass->this_arg or klass->byval_arg.
9031
9032         On mcs for a hello world, this gets us down from 21836 MonoType's
9033         to 14560.
9034
9035         (mono_metadata_free_type): Account for the above change.
9036
9037 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
9038
9039         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
9040         exception instead of asserting if name is null.
9041         (ves_icall_System_AppDomain_GetData): Ditto.
9042
9043 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9044
9045         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
9046         EnumBuilder.
9047
9048         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
9049         Return NULL when the domain does not have entry_assembly set.
9050
9051         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
9052         Add a 'resource_modules' argument.
9053         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
9054
9055         * reflection.c (mono_reflection_create_runtime_class): Move setting
9056         of wastypebuilder here, so mono_get_type_object () returns a MonoType
9057         for enums too.
9058
9059         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
9060         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
9061         Throw an ArgumentNullException if 'ptr' is null.
9062
9063         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
9064         assemblies here. Fixes #69020.
9065
9066 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9067
9068         * reflection.c (build_compressed_metadata): Fix the previous patch for
9069         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
9070         the stack.
9071
9072 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
9073
9074         * assembly.c (mono_assembly_names_equal): Allow a match if one of
9075         the cultures is false. Fixes #69090.
9076
9077         * reflection.c (build_compressed_metadata): Fix invalid memory read 
9078         detected by valgrind.
9079         
9080         * reflection.c (mono_reflection_get_type): Avoid triggering a 
9081         TypeResolve multiple times for the same type. Fixes #65577.
9082
9083 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
9084
9085         * marshal.c: Avoid using ldftn to call managed functions. It is
9086         much slower than just a call.
9087
9088         * reflection.c (mono_module_get_object): free the basename we
9089         allocate here from glib.
9090         
9091         * reflection.c (ensure_runtime_vtable): make sure to free
9092         overrides.  Also, we were allocating an array of MonoMethod not an
9093         array of MonoMethod*.
9094
9095         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
9096
9097         * image.c (mono_image_close): free image->guid here.
9098
9099 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9100
9101         * reflection.c: Fix some spec conformance issues with the PE file
9102         structures so mcs compiled apps run on the Net 2.0 beta.
9103
9104 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
9105
9106         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
9107         Implement this. Fixes #67264.
9108
9109         * debug-helpers.h debug-helpers.c marshal.c: Move 
9110         mono_find_method_by_name to debug-helpers.c.
9111
9112 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
9113
9114         * object.c (mono_release_type_locks): type_initialization_hash is
9115         a GHashTable.
9116
9117         * reflection.c object.c object-internals.h: Fix warnings.
9118
9119         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
9120         without accessors. Fixes #61561.
9121
9122         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
9123         application base from the root domain if not set. Fixes #65641.
9124         (mono_runtime_init): Fix warning.
9125
9126 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9127
9128         * appdomain.c: call mono_thread_pool_init.
9129         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
9130         of worker threads based on the number of CPUs and the environment
9131         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
9132         for non-windows (windows) systems.
9133
9134 2004-10-27  Chris Toshok  <toshok@ximian.com>
9135
9136         * mono-debug-debugger.c (write_class): don't call mono_class_init
9137         here, as even with the check for (!klass->init_pending), we get
9138         into a situation where we're hitting cycles in class
9139         initialization.  Fixes #68816.
9140
9141 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9142
9143         * image.c: Avoid overwriting values in the loaded_images_hash when an
9144         assembly is loaded multiple times. Fixes #61152.
9145
9146         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
9147         so multiple satellite assemblies for the same name can be loaded.
9148         Fixes #68259.
9149
9150         * mono_domain_assembly_preload: Actually return the loaded assembly, 
9151         not NULL.
9152
9153         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
9154         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
9155
9156         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
9157         pending finalizers are not invoked after the appdomain has been 
9158         unloaded. Fixes #67862.
9159
9160 2004-10-22  Martin Baulig  <martin@ximian.com>
9161
9162         * mono-debug-debugger.c
9163         (mono_debugger_runtime_invoke): Don't box valuetypes.
9164
9165 2004-10-22  Chris Toshok  <toshok@ximian.com>
9166
9167         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
9168         don't hide private methods.
9169
9170 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
9171
9172         * icall.c: Allows the runtime to "share" (when known) the public key
9173         token of an assembly. This avoid the need to recalculate the token 
9174         (from the public key) in managed code.
9175
9176 2004-10-21  Chris Toshok  <toshok@ximian.com>
9177
9178         * debug-helpers.c (append_class_name): argh, revert last patch.
9179         
9180 2004-10-21  Chris Toshok  <toshok@ximian.com>
9181
9182         * debug-helpers.c (append_class_name): use '+' as the delimiter,
9183         not '/', so that it matches what the debugger uses to look up
9184         methods.
9185
9186 2004-10-21  Martin Baulig  <martin@ximian.com>
9187
9188         * mono-debug-debugger.c (mono_debugger_throw_exception): New
9189         public method; this is called each time an exception is thrown and
9190         allows the debugger to use exception catch points.
9191
9192 2004-10-21  Martin Baulig  <martin@ximian.com>
9193
9194         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
9195         the stack pointer and the exception object in some struct and pass
9196         that to the debugger.
9197
9198 2004-10-21  Chris Toshok  <toshok@ximian.com>
9199
9200         * mono-debug-debugger.c (do_write_class): add instance/static
9201         event support.  We don't expose "raise" or "other" yet.
9202         (event_is_static): new method.
9203
9204 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
9205
9206         * mono-debug-debugger.c
9207         (mono_debugger_handle_exception): Remove
9208         bogus return value for fussy compilers.
9209
9210 2004-10-20  Martin Baulig  <martin@ximian.com>
9211
9212         * mono-debug-debugger.c
9213         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
9214         (mono_debugger_handled_exception): Likewise.
9215
9216 2004-10-20  Martin Baulig  <martin@ximian.com>
9217
9218         * mono-debug-debugger.h (MonoDebuggerEvent): Added
9219         MONO_DEBUGGER_EVENT_EXCEPTION.
9220
9221         * mono-debug-debugger.c (mono_debugger_handle_exception): New
9222         public function to send the debugger a notification for an
9223         exception and inform it about a catch/finally clause.
9224
9225 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
9226
9227         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
9228         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
9229         fix 2.95 build. 
9230
9231         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
9232
9233 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9234
9235         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
9236         marshalled as [In,Out]. Fixes #58325.
9237
9238 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
9239
9240         * reflection.c (mono_method_body_get_object): Implement some fields.
9241
9242 2004-10-12  Martin Baulig  <martin@ximian.com>
9243
9244         * reflection.c (mono_reflection_bind_generic_parameters): Small
9245         fix, correctly retrieve our parent from a generic instance.
9246
9247 2004-10-12  Martin Baulig  <martin@ximian.com>
9248
9249         * metadata.c (mono_metadata_generic_param_equal): We always have
9250         an owner.
9251
9252         * class.c
9253         (mono_class_from_generic_parameter): We need to have an owner.
9254         (my_mono_class_from_generic_parameter): Likewise.
9255
9256         * reflection.c (mono_reflection_setup_generic_class): Renamed to
9257         mono_reflection_create_generic_class() and added a new
9258         mono_reflection_setup_generic_class().  
9259         (mono_reflection_initialize_generic_param): If we're a nested
9260         generic type and inherited from the containing class, set our
9261         owner to the outer class.
9262
9263 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
9264
9265         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
9266
9267         * reflection.c (mono_method_body_get_object): New function to create
9268         a MethodBody object.
9269
9270         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
9271
9272 2004-10-11  Martin Baulig  <martin@ximian.com>
9273
9274         * metadata.c (_mono_metadata_type_equal): Renamed to
9275         do_mono_metadata_type_equal() and made static.
9276
9277 2004-10-11  Martin Baulig  <martin@ximian.com>
9278
9279         * appdomain.c: Bump corlib version number to 28.
9280
9281 2004-10-10  Martin Baulig  <martin@ximian.com>
9282
9283         * class-internals.h
9284         (MonoGenericInst): Added `MonoGenericContainer *container'.
9285         (MonoGenericMethod): Likewise.
9286         (MonoGenericContext): Likewise.
9287         (MonoGenericParam): Added `MonoGenericContainer *owner'.
9288
9289         * metadata.c
9290         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
9291         (do_mono_metadata_parse_generic_inst): Likewise.
9292         (mono_metadata_parse_type_full): New public method.  This is the actual
9293         mono_metadata_parse_type() implementation - with an additional
9294         `MonoGenericContainer *' argument.
9295         (mono_metadata_parse_array_full): Likewise.
9296         (mono_metadata_parse_signature_full): Likewise.
9297         (mono_metadata_parse_method_signature_full): Likewise.
9298         (mono_metadata_parse_mh_full): Likewise.
9299         (mono_type_create_from_typespec): Likewise.
9300         (mono_metadata_interfaces_from_typedef_full): New public method;
9301         this is similar to the other _full() methods, but we take a
9302         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
9303         (mono_metadata_parse_generic_param): Take an additional
9304         `MonoGenericContainer *' argument and lookup the MonoGenericParam
9305         from that container.
9306         (mono_metadata_generic_param_equal): New static method to compare
9307         two type parameters.
9308         (_mono_metadata_type_equal): New static method; takes an
9309         additional `gboolean signature_only' argument - if true, we don't
9310         compare the owners of generic parameters.
9311         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
9312         with a TRUE argument - do a signature-only comparision.
9313
9314         * loader.c: Use the new _full() methods and pass the
9315         MonoGenericContainer to them.
9316
9317         * object-internals.h (MonoReflectionTypeBuilder): Added
9318         `MonoGenericContainer *generic_container' field.
9319         (MonoReflectionMethodBuilder): Likewise.
9320
9321 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9322
9323         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
9324         case initial images of dynamic assemblies.
9325
9326         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
9327
9328         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
9329
9330         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
9331         length of event->other array.
9332         (typebuilder_setup_events): Ditto.
9333
9334         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
9335         'assembly_by_name' and add an 'assemblies' list.
9336
9337         * assembly.h assembly.c: Add a new search hook for determining whenever
9338         an assembly is already loaded. Use this instead of searching in the
9339         loaded_assemblies list.
9340
9341         * domain.c appdomain.c: Implement the new search hook so loaded 
9342         assemblies are now scoped by appdomain. Fixes #67727.
9343
9344 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
9345
9346         * threads.c (mono_thread_attach): Initialize synch_lock field so
9347         mono_thread_detach works again.
9348
9349         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
9350         'lib' too. Fixes #63130.
9351
9352 2004-10-06  Jackson Harper  <jackson@ximian.com>
9353
9354         * culture-info-tables.h: regenerated.
9355
9356 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
9359         implemented by other interfaces in the result. Fixes #65764.
9360         
9361         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9362         Handle unloadable modules without crashing.
9363
9364         * image.c (load_modules): Revert the previous patch since modules must
9365         have a fixed index inside the array.
9366         
9367         * image.c (load_modules): Don't include native modules in the modules
9368         array.
9369
9370 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9371
9372         * reflection.h: Add param_defaults field.
9373
9374         * reflection.c: Add support for parameter defaults in dynamic methods.
9375         Fixes #64595.
9376
9377         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
9378         an empty string when a type has no namespace. Fixes #64230.
9379
9380 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
9381
9382         * tabledefs.h: Added "internal" security actions to support non-CAS
9383         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
9384         Note: they do not seems to be used anymore in 2.0 (new metadata format)
9385
9386 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
9387
9388         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
9389         constructor of abstract class. Fixes #61689.
9390
9391 2004-10-04  Martin Baulig  <martin@ximian.com>
9392
9393         * class-internals.h (MonoGenericContainer): New type.
9394         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
9395         `MonoGenericContainer *generic_container'.
9396         (MonoClass): Replaced `gen_params' and `num_gen_params' with
9397         `MonoGenericContainer *generic_container'.
9398
9399         * metadata.c (mono_metadata_load_generic_params): Return a
9400         `MonoGenericContainer *' instead of a `MonoGenericParam *';
9401         removed the `num' argument.
9402
9403 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9404
9405         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
9406         for dynamic images.
9407
9408         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
9409         machine fields.
9410
9411         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
9412
9413         * reflection.c: Save pe_kind and machine values into the generated
9414         image file.
9415
9416         * appdomain.c: Bump corlib version number.
9417
9418         * object-internals.h: Reorganize layout of LocalBuilder.
9419
9420         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
9421         New helper function.
9422
9423         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
9424         created MonoType for dynamic types. Fixes #66180.
9425
9426 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
9427
9428         * threadpool.c: the ares hashtable needs a critical section around it.
9429         this prevents some nasty segfaults
9430
9431 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9432
9433         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
9434         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
9435         bug 67324).
9436         
9437 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
9438
9439         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
9440         
9441 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9442
9443         * image.c: Always canonicalize image file names, to avoid loading
9444         the same assembly twice when referenced using a relative path.
9445
9446 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
9447
9448         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
9449
9450         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
9451
9452         * marshal.c: Fix warnings.
9453
9454 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
9455
9456         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
9457         attempting to marshal the delegate_trampoline as the method_addr.
9458         This patch has a static hashtable of marshalled delegates so that 
9459         we can map delegate_trampoline addresses back to delegates.  This
9460         allows a delegate passed to managed code to be passed back into native
9461         code.  Fixes #67039
9462
9463 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9464
9465         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
9466
9467         * reflection.c (method_encode_code): Align method headers properly.
9468         Fixes #66025.
9469
9470 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9471
9472         * marshal.c: In the runtime invoke wrapper, reset the abort
9473         exception if it is cached. This avoids the automatic rethrowal of 
9474         the exception after the catch of the wrapper. Also check for pending
9475         interruptions before calling the managed method. This is done using
9476         the new method emit_thread_force_interrupt_checkpoint, since the
9477         normal checkpoint method is ignored when running the invoke wrapper.
9478         * object.c: If the abort exception is rethrown, set the abort_exc
9479         field of the thread, so it will be rethrown aftere every catch.
9480         * threadpool.c: Only run an interruption checkpoint if what has been
9481         requested is a stop of the thread (aborts will be ignored).
9482         * threads.c: By default, a thread will now never be interrumped while
9483         running the runtime invoke wrapper (this ensures that runtime_invoke
9484         will always return to the caller if an exception pointer is provided).
9485         There is a new special method mono_thread_force_interruption_checkpoint()
9486         to force an interruption checkpoint even if running a protected
9487         wrapper, which is used by the same runtime invoke wrapper to do a check
9488         at a safe point.
9489
9490 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9491
9492         * object.c, object-internals.h: Implemented mono_release_type_locks,
9493         which releases the cctor locks held by a thread.
9494         * threads.c, threads.h: In thread_cleanup, release cctor locks held
9495         by a thread. Added mono_thread_exit() method to be used to safely stop
9496         a thread.
9497
9498 2004-09-28  Raja R Harinath  <rharinath@novell.com>
9499
9500         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9501         Move null check before dereference.  Avoid indexing beyond the end
9502         of the 'modules' array.
9503
9504 2004-09-28  Raja R Harinath  <rharinath@novell.com>
9505
9506         * metadata-internals.h (MonoImage): Add module_count field.
9507         * image.c (load_modules): Set image->module_count.
9508         (mono_image_load_file_for_image): Use image->module_count.
9509         * reflection.c (mono_image_load_module): Append to image->modules array 
9510         of dynamic assembly.
9511         (mono_module_get_object): Fix loop to actually increment index.
9512         Use image->module_count.
9513         * assembly.c (mono_assembly_load_references): Use image->module_count.
9514         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9515         Likewise.
9516
9517 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9518
9519         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
9520         Avoid assert on generic types.
9521
9522 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
9523
9524         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
9525
9526         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
9527
9528         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
9529         function to convert a MarshalSpec structure to its managed counterpart.
9530
9531         * reflection.c: Fix warnings.
9532         
9533         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
9534         field.
9535
9536         * icall.c (mono_create_icall_signature): Fix build.
9537
9538 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9539
9540         * icall.c: Add MakePointType icall.
9541
9542         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
9543         warnings.
9544
9545 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9546
9547         * threadpool.c: reuse allocated slots in the queue.
9548
9549 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9550
9551         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
9552
9553         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
9554
9555         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
9556         previous change.
9557
9558         * tabledefs.h: Add constants for pinvoke attributes BestFit and
9559         ThrowOnUnmappableChar.
9560
9561         * icall.c (ves_icall_Type_GetPacking): New icall.
9562
9563 2004-09-24  Martin Baulig  <martin@ximian.com>
9564
9565         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
9566
9567 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9568
9569         * appdomain.c:
9570         (mono_domain_set): allow setting a domain that is being unloaded.
9571         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
9572         being unloaded.
9573
9574 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9575
9576         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
9577         the GetCustomAttributes icall.
9578
9579 2004-09-23  Martin Baulig  <martin@ximian.com>
9580
9581         * object-internals.h (MonoReflectionGenericParam): Replaced
9582         'has_ctor_constraint', `has_reference_type' and `has_value_type'
9583         with `guint32 attrs'.
9584
9585 2004-09-23  Martin Baulig  <martin@ximian.com>
9586
9587         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
9588
9589 2004-09-23  Martin Baulig  <martin@ximian.com>
9590
9591         * object-internals.h (GenericParameterAttributes): New enum.
9592
9593 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9594
9595         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
9596         
9597         * class.c (init_events): Fill out event->other field.
9598
9599         * class.c: Fix warnings.
9600
9601         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
9602
9603 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
9604
9605         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
9606         walk which doesn't supply the IL offset.
9607
9608 2004-09-22  Martin Baulig  <martin@ximian.com>
9609
9610         * reflection.c (mono_reflection_setup_internal_class): If we're
9611         System.ValueType, System.Object or System.Enum, set
9612         `klass->instance_size' and create the vtable.
9613         (mono_reflection_create_internal_class): If we're an enum type,
9614         get the base class from our current corlib.
9615
9616 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
9617
9618         * reflection.h (MonoResolveTokenError): New type.
9619
9620         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
9621         icall.
9622
9623         * icall.c: Add an 'error' argument to the ResolveToken icalls.
9624
9625 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
9626
9627         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
9628         Support also calling constructors, but only for already allocated objects.
9629
9630 2004-09-17  Geoff Norton <gnorton@customerdna.com>
9631
9632         * reflection.c (type_get_qualified_name): If the klass is null
9633         return the typename to avoid a NullRefEx.
9634         (encode_cattr_value): Get the qualified name of the boxed type,
9635         not the underlying enumtype.  Fixes #62984.
9636
9637 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
9638
9639         * marshal.c: Fix problems with previous checkin.
9640
9641 2004-09-21    <vargaz@freemail.hu>
9642
9643         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
9644         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
9645
9646         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
9647
9648 2004-09-21  Geoff Norton <gnorton@customerdna.com>
9649
9650         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
9651         should only return a type for pointers, arrays, and passbyref types.
9652         Fixes bug #63841.
9653
9654 2004-09-21  Martin Baulig  <martin@ximian.com>
9655
9656         * domain.c (mono_debugger_check_runtime_version): New public
9657         function.
9658
9659         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
9660
9661 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
9662
9663         * reflection.c: Added missing sort to the declarative security 
9664         attributes table. MS implementation stops seeing the attributes if the
9665         token number regress in the table (as shown by ildasm and permview).
9666
9667 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
9668
9669         * object-internals.h (MonoReflectionModule): Add 'token' field.
9670         
9671         * reflection.c (mono_reflection_get_token): Add support for Module
9672         and Assembly.
9673         (mono_module_get_object): Set 'token' field.
9674         (mono_module_file_get_object): Set 'token' field.
9675
9676         * icall.c: Add new Assembly and Module icalls.
9677
9678         * appdomain.c: Bump corlib version.
9679
9680 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
9681
9682         * loader.h loader.c class.h class.c: Add helper functions for obtaining
9683         tokens of metadata objects.
9684
9685         * reflection.h reflection.c (mono_reflection_get_token): New function
9686         to obtain the token of a metadata object.
9687
9688         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
9689
9690 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9691
9692         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
9693         
9694         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
9695
9696 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
9697
9698         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
9699         * object-internals.h: Added 3 MonoArray* members to MonoReflection
9700         AssemblyBuilder to access the permissions set in the class lib.
9701         * reflection.c: Added security attributes encoding step in 
9702         mono_image_build_metadata.
9703         * tabledefs.h: Added new security actions defined in 2.0:
9704         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
9705
9706 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
9707
9708         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
9709         macro parameter.
9710
9711 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
9712  
9713         * locales.c: nullify the ICU_collator member of CompareInfo when it is
9714           finalized. There where random SIGSEVs at program termination, when
9715           an object being finalized was trying to do a string comparison and
9716           the current culture was already finalized.
9717  
9718 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9719
9720         * threads.c: call thread_cleanup before finishing the thread if we get
9721         there.
9722
9723 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
9724
9725         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
9726         assemblies from the parent. Fixes #65665.
9727
9728 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
9731         modifiers.
9732
9733 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
9734
9735         * reflection.h: add prototype for mono_get_dbnull_object
9736         * reflection.c: add prototypes for get_default_param_value_blobs 
9737         and mono_get_object_from_blob for fussier compilers
9738
9739 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
9740  
9741         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
9742         false deadlock checks in class initialization.
9743  
9744 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9745
9746         * image.c (mono_image_addref): Fix comment.
9747
9748         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
9749         possible.
9750
9751 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
9752
9753         * reflection.c (mono_param_get_objects): Modified to return
9754         ParameterInfo.DefaultValue object.
9755
9756         (get_default_param_value_blobs):
9757         (mono_get_object_from_blob):
9758         (mono_get_dbnull_object): New helper routines. 
9759
9760         * object.c (mono_get_constant_value_from_blob): New helper routine
9761         carved out from get_default_field_value ()
9762
9763         * object-internals.h (mono_get_constant_value_from_blob): Added
9764         function declaration.
9765
9766 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9767
9768         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
9769         referenced assemblies. Fixes #62135.
9770
9771         * exception.h exception.c (mono_get_exception_file_not_found2): New
9772         helper function.
9773
9774 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9775
9776         * class.h class.c: Add mono_type_get_underlying_type ().
9777
9778 2004-09-09  Geoff Norton <gnorton@customerndna.com>
9779
9780         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
9781         Fix GetTypes() to support dynamically created assemblies.
9782
9783 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
9784
9785         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
9786         
9787         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
9788         previous patch.
9789
9790         * reflection.h reflection.c loader.c: Allow dynamic construction of
9791         pinvoke methods. Fixes #65571.
9792         
9793         * reflection.c (mono_reflection_get_type): Revert previous change since
9794         it causes regressions.
9795
9796 2004-09-08  Martin Baulig  <martin@ximian.com>
9797
9798         * class.c (class_compute_field_layout): Don't call
9799         mono_class_layout_fields() for open generic instances.
9800
9801 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
9802         * threads.c appdomain.c: fix typo in GC macro
9803
9804 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9805
9806         * threads.c: don't call mono_thread_detach() in start_wrapper(),
9807         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
9808
9809 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
9810
9811         * image.c (mono_image_close): Applied patch from 
9812         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
9813         assembly is loaded multiple times from data.
9814         
9815         * image.c (mono_image_open): Fix warning.
9816
9817 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
9820         once. Fixes #58334.
9821         
9822         * reflection.c (mono_reflection_create_runtime_class): Initialize
9823         klass->nested_classes. Fixes #61224.
9824
9825 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9826
9827         * threads.c: sched_yield() on exit, to allow threads to quit.
9828
9829 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9830
9831         * object.c (mono_unhandled_exception): Remove leftover debug code.
9832
9833 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
9834
9835         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
9836
9837 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
9838
9839         * marshal.c (emit_marshal_array): Really null terminate string arrays.
9840         
9841         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
9842
9843 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9844
9845         * marshal.c (emit_marshal_array): Null terminate string arrays.
9846         
9847         * marshal.c (raise_auto_layout_exception): Fix warning.
9848
9849         * reflection.c (mono_param_get_objects): Initialize the default value
9850         with DBNull.Value, not null. Fixes #62123.
9851
9852 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
9853
9854         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
9855         throw an exception with a cute explanation.
9856
9857 2004-09-06  Dick Porter  <dick@ximian.com>
9858
9859         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
9860         Close the new process's thread handle, as we don't use it.  The
9861         handle stays around forever otherwise.
9862
9863 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9864
9865         * object.c (arith_overflow): Fix warning.
9866
9867         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
9868         calling conventions in method refs. Fixes #65352.
9869
9870         * reflection.c: Fix warnings.
9871
9872 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
9873
9874         * icall.c: Add a new icall for Array.Clear
9875
9876 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
9877
9878         * object.c: When allocating an array, we have to throw
9879         an overflow exception if any of the lengths are < 0.
9880
9881 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9882
9883         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
9884         properly. Also move implementation of string array marshalling to 
9885         managed code. Fixes #42316.
9886
9887 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9888
9889         * assembly.c: provide more information when loading an assembly fails.
9890
9891 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9892
9893         * filewatcher.c: don't expect the development fam package to be
9894         installed.
9895
9896 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * marshal.c: Make a copy of the signature cookie since it will be
9899         freed by the caller.
9900         
9901         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
9902
9903         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
9904
9905         * metadata.c (mono_metadata_free_marshal_spec): New function to free
9906         marshal specs.
9907
9908         * marshal.c: More refactoring.
9909         
9910         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
9911         smaller functions.
9912
9913 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
9914
9915         * object.c: In mono_message_invoke, fill the output parameter array after
9916           calling the managed method (it was done before the call). This fixes
9917           bug #59299.
9918
9919 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9920
9921         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
9922         as well.
9923
9924 2004-09-02  Martin Baulig  <martin@ximian.com>
9925
9926         * class.c (mono_class_instance_size): Don't allow generic type
9927         definitions or open generic instances.
9928         (mono_class_array_element_size): If we're a value type, call
9929         mono_class_instance_size() on the original class.
9930
9931         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
9932         handle generic instances.
9933
9934         * mono-debug-debugger.c (write_type): Handle generic instances
9935         like classes.
9936
9937 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9938
9939         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
9940         the allocation request fails. Fixes #65089.
9941
9942         * object.c (mono_runtime_free_method): Do not call mono_free_method.
9943         
9944         * object.c (mono_runtime_free_method): New function to free a dynamic
9945         method.
9946
9947         * marshal.c (mono_delegate_free_ftnptr): New function to free the
9948         delegate trampoline.
9949
9950         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
9951         with hasthis as dynamic,
9952
9953         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
9954
9955         * domain.c (mono_jit_info_table_remove): New function to remove an
9956         entry from the jit info table.
9957
9958         * class-internals.h (MonoMethod): Add 'dynamic' field.
9959
9960         * loader.c: Fix warnings.
9961
9962 2004-09-01  Martin Baulig  <martin@ximian.com>
9963
9964         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
9965         instead of mono_debugger_lock() because the latter one is a no-op
9966         unless running in the debugger.
9967
9968 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
9969
9970         * class.c (class_compute_field_layout): Classes with auto-layout or
9971         reference fields are not blittable.
9972         
9973 2004-09-01  Dick Porter  <dick@ximian.com>
9974
9975         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
9976         mono_image_get_filename() to get the assembly location.
9977
9978         * icall.c:
9979         * metadata.h: Fix compile warnings
9980
9981 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
9982
9983         * class.c (class_compute_field_layout): System.Object is blittable.
9984
9985         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
9986         as in/out. Fixes #59909.
9987
9988 2004-09-01  Martin Baulig  <martin@ximian.com>
9989
9990         * metadata.h (MONO_TYPE_ISREFERENCE): Call
9991         mono_metadata_generic_inst_is_valuetype() if we're a generic
9992         instance to check whether our underlying type is a reference type.
9993
9994 2004-09-01  Martin Baulig  <martin@ximian.com>
9995
9996         * metadata.c (mono_type_size): If we're a generic instance, call
9997         mono_class_value_size() for value types.
9998
9999 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
10000
10001         * marshal.c: Implement more custom marshalling functionality. Fixes
10002         #64915.
10003
10004 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10005
10006         * mono-debug.c, debug-mono-symfile.c: add some locking love.
10007
10008 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10009
10010         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
10011
10012         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
10013
10014         * icall.c: Fix some warnings.
10015
10016         * threads.c (abort_appdomain_thread): Fix unref errors.
10017         (mono_thread_current): Fix THREAD_DEBUG define.
10018
10019 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10020
10021         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
10022
10023         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
10024
10025 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
10026
10027         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
10028         string arrays.
10029
10030 2004-08-28  Martin Baulig  <martin@ximian.com>
10031
10032         * metadata.c
10033         (mono_metadata_generic_inst_is_valuetype): New public function.
10034
10035         * metadata.h (MONO_TYPE_ISSTRUCT): Call
10036         mono_metadata_generic_inst_is_valuetype() if we're a generic
10037         instance to check whether our underlying type is a valuetype.
10038
10039 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10040
10041         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
10042         #63768.
10043
10044 2004-08-25  Martin Baulig  <martin@ximian.com>
10045
10046         * loader.c (mono_get_method_from_token): Abstract methods can also
10047         be generic and thus have type parameters.
10048
10049         * metadata-internals.h
10050         (MonoDynamicImage): Added `GPtrArray *gen_params'.
10051
10052         * reflection.c (mono_image_get_generic_param_info): Don't create a
10053         metadata row, just add an entry to the `gen_params' array.
10054         (build_compressed_metadata): Sort the `gen_params' array and then
10055         actually create the metadata.
10056
10057 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10058
10059         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
10060
10061 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10062
10063         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
10064
10065 2004-08-24  Martin Baulig  <martin@ximian.com>
10066
10067         * class.cs (mono_class_is_subclass_of): Like an interface, a
10068         generic instance also derives from System.Object.
10069
10070 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10071
10072         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
10073         custom modifiers to be in any order. Fixes #61990.
10074
10075 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10076
10077         * object.c: Register mono_object_new_fast icall.
10078         
10079         * object.c (mono_class_get_allocation_ftn): Return to calling
10080         mono_object_new_fast, since it seems faster to compute the object 
10081         size in unmanaged code than passing it as a parameter.
10082
10083         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
10084
10085         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
10086         this function with Boehm as the oom handler, so we don't have to check
10087         the result of GC_malloc.
10088
10089         * object.c: Remove checks for oom.
10090
10091         * object.h object.c (mono_class_get_allocation_ftn): New function to
10092         return the icall which can be used to allocate an instance of a given
10093         class. 
10094
10095         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
10096
10097         * class-internals.h: Add 'enabled' field.
10098
10099 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
10102
10103 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
10104         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
10105         value 0x0010.
10106
10107 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10108
10109         * appdomain.c: use the Tls function for appdomain too,
10110         at Zoltan's request. Actually return in mono_context_get
10111
10112         * appdomain.c, profiler.c, threads.c: use __thread
10113
10114 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10115
10116         * appdomain.c threads.c: Call GC_CreateThread on windows.
10117
10118         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
10119         multiple libraries since this don't work on windows.
10120
10121 2004-08-18  Martin Baulig  <martin@ximian.com>
10122
10123         * class-internals.h
10124         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
10125         MonoMethodHeader.
10126
10127         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
10128         MonoMethodNormal since we also need it for abstract and interface
10129         methods.
10130
10131         * reflection.c
10132         (build_compressed_metadata): Sort the GenericParam table.
10133         (mono_image_create_token): Added `gboolean create_methodspec'
10134         argument; this is false when generating a MethodImpl token.
10135         (reflection_methodbuilder_to_mono_method): Abstract and interface
10136         methods may also have generic parameters.
10137
10138 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10139
10140         * appdomain.c: thread local alloc
10141
10142 2004-08-17  Martin Baulig  <martin@ximian.com>
10143
10144         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
10145
10146         * icall.c
10147         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
10148         argument.
10149
10150         * class.c (mono_type_get_full_name): New public function.
10151         (mono_type_get_name): Don't include the type arguments.
10152
10153 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10154
10155         * Makefile.am: Build static versions of libmetadata and libmonoruntime
10156         for inclusion into the mono executable.
10157
10158 2004-08-16  Martin Baulig  <martin@ximian.com>
10159
10160         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
10161         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
10162
10163 2004-08-14  Martin Baulig  <martin@ximian.com>
10164
10165         * class.c (dup_type): Also copy the `byref' field.
10166
10167 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10168
10169         * reflection.c (create_dynamic_mono_image): Revert the last change 
10170         since it breaks bootstrap.
10171
10172 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10173
10174         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
10175
10176         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
10177         not free them with g_free.
10178
10179 2004-08-11  Martin Baulig  <martin@ximian.com>
10180
10181         * reflection.c (mono_reflection_setup_internal_class): Also call
10182         mono_class_setup_mono_type() if we already have a `tb->type.type'.
10183
10184 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
10185
10186         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
10187         called during default (first) AppDomain creation. Keep track of
10188         Evidence when loading assemblies.
10189
10190 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10191
10192         * opcodes.c, opcodes.h: reduce runtime relocations.
10193
10194 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10195
10196         * culture-info.h, locales.c: fixes and chages to sue the new
10197         optimized format of the locale data.
10198         * culture-info-tables.h: regenerated.
10199
10200 2004-08-06  Geoff Norton <gnorton@customerdna.com>
10201         
10202         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
10203
10204 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
10205
10206         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
10207         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
10208         * domain-internals.h: icall declaration.
10209         * icall.c: icall registration.
10210         * object-internals.h: New fields in MonoAssembly for CAS.
10211
10212 2004-08-05  Duncan Mak  <duncan@ximian.com>
10213
10214         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10215         CEE_LDELEM_ANY.
10216
10217 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10218
10219         * reflection.c: fix to deal with object[] arrays in custom ctors
10220         (bug #62550).
10221
10222 2004-08-05  Martin Baulig  <martin@ximian.com>
10223
10224         * class.c (mono_class_array_element_size): Added support for
10225         generic instances and correctly handle "recursive" types.
10226
10227 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10228
10229         * assembly.c: Fix warnings.
10230
10231 2004-08-04  Martin Baulig  <martin@ximian.com>
10232
10233         * class.c
10234         (mono_type_get_name_recurse): Added `gboolean include_arity'
10235         argument specifying whether or not we should include the generic
10236         arity in the type name.
10237         (_mono_type_get_name): New static function.
10238         (mono_class_setup_vtable): If we're a generic instance, don't
10239         include the generic arity in the names of explicit method
10240         implementations.        
10241
10242 2004-08-03  Martin Baulig  <martin@ximian.com>
10243
10244         * class.c (mono_type_get_name_recurse): Enclose the generic type
10245         arguments in `<', '>'.
10246
10247 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10248
10249         * gc.c: make GC warning messages use the trace API, they are just
10250         noise to most of the users.
10251
10252 2004-08-03  Martin Baulig  <martin@ximian.com>
10253
10254         * debug-mono-symfile.c (read_string): Correctly read the string.
10255
10256 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10257
10258         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
10259         
10260         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
10261         icalls.
10262         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
10263
10264 2004-07-30  Martin Baulig  <martin@ximian.com>
10265
10266         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
10267         Reflect latest symbol writer changes.   
10268
10269 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10270
10271         * object.c: always create an object if null is passed
10272         to Invoke() where a valuetype is expected.
10273
10274 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10275
10276         * marshal.c (mono_marshal_init): make managed
10277         signatures match native ones better for 64bits.
10278
10279 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10280
10281         * appdomain.c: hack to build correctly the private bin path on windows.
10282         Fixes bug #61991.
10283
10284 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10285
10286         * assembly.c: Load mscorlib from the correct framework directory
10287           (mono/<version>/mscorlib.dll).
10288         * appdomain.h: Added prototypes for new functions.
10289         * internals.h: Added some prototypes.
10290         * domain.c: When initializing the runtime, get from the executable and
10291           the configuration files the runtime version that the app supports.
10292           Added support methods for reading app.exe.config. Added list of versions
10293           supported by the JIT. Added two new methods: mono_init_from_assembly,
10294           which initializes the runtime and determines the required version from
10295           the provided exe file, and mono_init_version, which initializes
10296           the runtime using the provided version.
10297         * icall.c: Get machine.config from version-specific directory.
10298         * reflection.c: When generating an image, embed the version number
10299           of the current runtime.
10300
10301 2004-07-28  Dick Porter  <dick@ximian.com>
10302
10303         * socket-io.c
10304         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
10305         returned sockaddr size before creating the remote address object.
10306         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
10307         61608.
10308
10309 2004-07-28  Dick Porter  <dick@ximian.com>
10310
10311         * locales.c (string_invariant_compare_char): Fix invariant char
10312         compares between upper and lower cases.  Fixes bug 61458.
10313
10314 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
10315         
10316         * marshal.c: actually cache stelem.ref wrappers.
10317         
10318 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10319
10320         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
10321         sections and remove the mono_cli_rva_map () function.
10322
10323 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10324
10325         * debug-mono-symfile.c: fix one more endianess issue, from a patch
10326         by Geoff Norton (<gnorton@customerdna.com>).
10327
10328 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10329
10330         * class.c: fix class loads for pointer types (typeof(int) !=
10331         typeof(int*)).
10332
10333 2004-07-27  Martin Baulig  <martin@ximian.com>
10334
10335         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
10336         reading the debugging information from an external ".mdb" file.
10337
10338 2004-07-24  Martin Baulig  <martin@ximian.com>
10339
10340         * reflection.c (mono_image_get_type_info): Only write a class
10341         layout entry if we actually have a size or a packing size.
10342
10343 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
10344
10345         * reflection.c (type_get_fully_qualified_name): 
10346         insert cast to get type checking of ?: with non-gcc compilers
10347
10348 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
10349
10350         * rand.c: use g_getenv for both lookups of
10351         MONO_EGD_SOCKET
10352
10353 2004-07-17  Martin Baulig  <martin@ximian.com>
10354
10355         * reflection.c (mono_reflection_bind_generic_method_parameters):
10356         Set `gmethod->reflection_info'.
10357
10358 2004-07-17  Martin Baulig  <martin@ximian.com>
10359
10360         * class.c (mono_class_create_from_typedef): Insert the newly
10361         created class into the hash table before computing the interfaces
10362         since we could be called recursively.
10363
10364 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10365
10366         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
10367         function to implement stelem.ref in managed code
10368         * class-internals.h, debug-helpers.c: a new wrapper type
10369         for the above.
10370
10371 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10372
10373         * gc.c: allow GC handles to work even when no GC is compiled in.
10374         Fix part of bug #61134 (GetAddrOfPinnedObject).
10375
10376 2004-07-13  Peter Williams  <peter@newton.cx>
10377  
10378         * process.c (complete_path): Make sure we don't attempt to execute
10379         directories.
10380  
10381 2004-07-12  Geoff Norton <gnorton@customerdna.com>
10382
10383         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
10384           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
10385           and will add/subtract the hour if needed
10386
10387 2004-07-12  Martin Baulig  <martin@ximian.com>
10388
10389         * reflection.c (mono_field_get_object): If we have
10390         `field->generic_info', take the attributes from
10391         `field->generic_info->generic_type'.    
10392
10393 2004-07-12  Martin Baulig  <martin@ximian.com>
10394
10395         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
10396         This function must be called before initializing the runtime.
10397         (mono_debug_init_1): New function; call this after initializing
10398         the runtime, but before loading the assembly.  It tells the
10399         debugger to load corlib and the builtin types.
10400
10401         * mono-debug-debugger.c: Did some larger changes in the debugging
10402         code; support recursive class declarations, make sure we actually
10403         add all classes.
10404
10405 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10406
10407         * debug-helpers.c: undo my previous patch and fixed the real issue in
10408         ../mini/exceptions-x86.c
10409
10410 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10411
10412         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
10413         when no HOME env. variable was set and a NullRef was thrown in a .cctor
10414         called from other .cctors.
10415
10416 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
10417
10418         * loader.c: Removed the mono_loader_wine_init hack now that we are
10419         doing a managed version of Windows.Forms.
10420
10421 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10422
10423         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
10424         threadpool.c, threads.c: remove static data from rootset.
10425
10426 2004-07-09  Dick Porter  <dick@ximian.com>
10427
10428         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
10429         Don't do any more processing if the matched length was 0.  It was
10430         increasing the size of the string before.  Fixes bug 61167.
10431
10432 2004-07-09  Dick Porter  <dick@ximian.com>
10433
10434         * socket-io.h:
10435         * socket-io.c
10436         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
10437         Add support for SO_PEERCRED if its available.
10438
10439 2004-07-09  Peter Bartok <pbartok@novell.com>
10440         * loader.c: winelib.exe.so error message is now only displayed if
10441         MONO_DEBUG is set. To help us avoid questions when people are trying
10442         out the new Managed.Windows.Forms.
10443
10444 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10445
10446         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
10447         for isinst and castclass wrappers.
10448
10449         * class-internals.h icall.c: Move registration and lookup of JIT icalls
10450         to libmetadata from the JIT, so they could be used by the marshalling
10451         code and the interpreter.
10452
10453         * marshal.c: Register marshalling related JIT icalls here instead of
10454         in mini.c. Use CEE_MONO_ICALL instead of the family of 
10455         CEE_MONO_PROC<x> opcodes to call marshalling functions.
10456
10457         * metadata.h: Remove unneeded marshalling conversions.
10458
10459         * opcodes.c: Update for new opcodes.
10460         
10461 2004-07-08  Martin Baulig  <martin@ximian.com>
10462
10463         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
10464         (mono_debug_get_domain_data): Make this function static.
10465
10466 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10467
10468         * gc.c, object.h: add nice GC handle API for embedders.
10469
10470 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10471
10472         * reflection.c: more changes for the new api
10473
10474         * object.c: When we reflect on a field w/ a constant value, it
10475         will not have a memory location, so we must access metadata. Also,
10476         allow easier reading of strings so that we can read them from
10477         the constant data.
10478
10479         * class.c (mono_class_layout_fields): no need for literal fields here.
10480
10481         * class-internals.h: api changes for const fields
10482
10483         * icall.c (ves_icall_get_enum_info): use new apis for const fields
10484
10485 2004-07-06  Martin Baulig  <martin@ximian.com>
10486
10487         * mono-debug.h: Increment version number to 44.
10488
10489         * mono-debug.c (mono_debug_add_wrapper): The second argument is
10490         now a gpointer, rewrote this whole method.
10491
10492         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
10493         function.  Add information about the wrapper in a new "misc table".
10494
10495         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
10496         for the new misc table.
10497
10498 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10499
10500         * metadata-internals.h image.c: Add a cache for helper signatures.
10501
10502         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
10503
10504 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10505
10506         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
10507         delegates from a delegate. Fixes #61033.
10508         
10509         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
10510         marshalling of stringbuilder arrays. Fixes #59900.
10511
10512 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10513
10514         * icall.c: Add EnumBuilder:setup_enum_type icall.
10515
10516 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10517
10518         * icall.c: Added a new icall for the property version of
10519         OffsetOfStringData.
10520
10521 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10522
10523         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
10524         it has a constant size across platforms.
10525
10526         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
10527         stack trace.
10528
10529 2004-06-29  Martin Baulig  <martin@ximian.com>
10530
10531         * mono-debug.c (mono_debug_add_method): Protect the whole function
10532         in mono_debugger_lock(), not just parts of it.
10533
10534 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10535
10536         * reflection.c: make sure padding bytes in heaps are zeroed.
10537
10538 2004-06-24  David Waite  <mass@akuma.org>
10539
10540         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
10541         image.c, loader.c, locales.c, marshal.c, metadata.c,
10542         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
10543         string-icalls.c, threads.c: change to C90-style comments from C99 /
10544         C++ -style
10545
10546 2004-06-24  Dick Porter  <dick@ximian.com>
10547
10548         * threads.c
10549         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
10550         return createdNew.  Fixes bug 60412.
10551
10552         * threads-types.h: 
10553         * icall.c: Add createdNew parameter to CreateMutex icall
10554
10555 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10556
10557         * reflection.c, object-internals.h: save default value in params.
10558
10559 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10560
10561         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
10562         no need to build a new path combining that with the application base.
10563         Fixes bug #60442.
10564
10565 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10566
10567         * reflection.c: fixed minor standard compliance issues.
10568
10569 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10570
10571         * reflection.c: fixed issue with encoding some custom attributes
10572         (arrays in properties and fields, bug #60411).
10573
10574 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10575
10576         * reflection.c: fix start address when copying the public key token.
10577
10578 2004-06-23  Martin Baulig  <martin@ximian.com>
10579
10580         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
10581         the `exc' object in a static object to put it into the GC's root set.
10582
10583 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
10584
10585         * reflection.c: make mono_reflection_setup_internal_class ()
10586         callable a second time to setup a new parent class.
10587
10588 2004-06-23  Dick Porter  <dick@ximian.com>
10589
10590         * threads.c: Check for WAIT_IO_COMPLETION return values.
10591
10592 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
10593
10594         * appdomain.c: Removed the g_free on the public key token. Now copy 
10595         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
10596         * assembly.c: Added public key token string value when loading 
10597         assemblies. Fix bug #60439.
10598         * icall.c: Added missing informations (like public key) in 
10599         GetReferencedAssemblies. Fix #60519.
10600         * image.h: Changed definition for public key token from const char*
10601         public_tok_value to guchar public_key_token [17];
10602         * reflection.c: Updated for changes to public key token.
10603
10604 2004-06-22  Lluis Sanchez Gual
10605
10606         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
10607         for the field in base classes.
10608
10609 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
10610
10611         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
10612         mark headers as not supported, they are installed only for use by the
10613         debugger.
10614
10615 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
10616
10617         * *.c, *.h: avoid namespace pollution in public headers.
10618
10619 2004-06-21  Martin Baulig  <martin@ximian.com>
10620
10621         * exception.c (mono_get_exception_security): It's in
10622         "System.Security", not in "System".
10623
10624         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
10625         the exception classes.
10626
10627 2004-06-21  Martin Baulig  <martin@ximian.com>
10628
10629         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
10630         Protect the exception object from being finalized.
10631
10632 2004-06-21  Martin Baulig  <martin@ximian.com>
10633
10634         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
10635         public function.
10636
10637 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
10638
10639         * reflection.c: Load the assembly in mono_reflection_type_from_name,
10640         if it was not loaded before. Fix parts of #60439.
10641
10642 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
10643
10644         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
10645         code that was broken since Ben's change: wrappers are now
10646         dependent on the method signature only again.
10647
10648 2004-06-21  Martin Baulig  <martin@ximian.com>
10649
10650         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
10651         added interface support.
10652
10653 2004-06-21  Martin Baulig  <martin@ximian.com>
10654
10655         * class.c (mono_vtable_get_static_field_data): New public method.
10656
10657 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
10658
10659         * filewatcher.c : Windows build fix to be compliant with API changes.
10660
10661 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10662
10663         * class.h, class.c: more accessors.
10664         * metadata.h, metadata.c: prepare for hiding MonoType and
10665         MonoMethodSignature: people should use the accessors from now on
10666         outside of the tree.
10667
10668 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10669
10670         * *.c, *.h: more API cleanups.
10671
10672 2004-06-18  Jackson Harper  <jackson@ximian.com>
10673
10674         * assembly.c: Trace loading assemblies.
10675         * loader.c: Trace loading native libraries.
10676         * mono-config.c: Trace loading config files.
10677         
10678 2004-06-18  Dick Porter  <dick@ximian.com>
10679
10680         * locales.c: Tell ICU the lengths of strings, it can cope with
10681         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
10682
10683 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10684
10685         * image.c: swapped name/filename;
10686
10687 2004-06-18  Martin Baulig  <martin@ximian.com>
10688
10689         * mono-debug-debugger.c (write_class): Write the parent class at
10690         the end of the header.
10691
10692 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10693
10694         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
10695
10696 2004-06-17  Raja R Harinath  <rharinath@novell.com>
10697
10698         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
10699         (bundle_obj): New conditional define.
10700         (BUILT_SOURCES): Remove.
10701         ($(bundle_srcs)): Make parallel-make safe.
10702         (libmonoruntime_la_LIBADD): Make unconditional.
10703         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
10704         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
10705
10706 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
10707
10708         * culture-info-tables.h: It was inconsistent with the latest
10709           supp info files.
10710
10711 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
10712
10713         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
10714         be loaded.
10715
10716         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
10717         with gcc 2.95.
10718
10719 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10720
10721         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
10722         cleaned up public header threads.h.
10723
10724 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10725
10726         * Makefile.am, *.c, *.h: more API cleanups.
10727
10728 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10729
10730         * Makefile.am: removed monosn from compilation.
10731         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
10732         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
10733         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
10734         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
10735         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
10736         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
10737
10738 2004-06-15  Jackson Harper  <jackson@ximian.com>
10739
10740         * assembly.c: Make locales lower case when searching the GAC for
10741         assemblies. gacutil will always make locales lowercase when
10742         installing so this effectively makes them case insensitive.
10743         
10744 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
10745
10746         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
10747         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
10748           parameter which allows to choose whether the wait can be interrupted or 
10749           not. Also added the method mono_monitor_enter(), which locks the monitor
10750           using an infinite wait and without allowing interruption.
10751           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
10752           interrupted.
10753         * object.h: Added new fields in MonoThread. suspend_event holds the event
10754           used to susped/resume the thread. synch_lock is the lock object to use for
10755           modifying the thread state.
10756         * threads.c: Use the new synch_lock object for locking, instead of "this",
10757           which can generate deadlocks.
10758           Moved thread state change in Thread.Sleep and Thread.Join from managed
10759           to unmanaged code. This avoids a deadlock when the thread was suspended
10760           just after acquiring the thread lock.
10761           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
10762           Implemented Thread.Suspend using an event instead of ThreadSuspend,
10763           which is not fully implemented in the io-layer.
10764         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
10765
10766 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
10767
10768         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
10769         threads-types.h: more API cleanups.
10770
10771 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10772
10773         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
10774         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
10775         threadpool.c, threads.c: first pass at the exported API cleanup.
10776
10777 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10778
10779         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
10780
10781 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10782
10783         * icall.c: added internalGetHome.
10784
10785 2004-06-14  Dick Porter  <dick@ximian.com>
10786
10787         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
10788         possible to return successfully when '.' or '..' were the only
10789         entries in a directory, but were skipped.  The MonoIOStat was not
10790         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
10791         Fixes bug 59574.
10792
10793 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10794
10795         * reflection.c: make binaries run on .Net 1.1 by default.
10796
10797 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10798
10799         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
10800
10801 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
10802
10803         * marshal.c: keep track of struct size with explicit layout
10804         (bug #59979).
10805
10806 2004-06-12  Martin Baulig  <martin@ximian.com>
10807
10808         * mono-debug-debugger.c: Comment out a debugging g_message().
10809
10810 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
10811
10812         * reflection.c, reflection.h: do not free custom attrs that are cached.
10813         * icall.c: use braces to make code clearer.
10814
10815 2004-06-11  Martin Baulig  <martin@ximian.com>
10816
10817         * class.h (MonoInflatedField): New type.
10818         (MonoClassField): Replaced `MonoType *generic_type' with
10819         `MonoInflatedField *generic_info'.
10820
10821         * icall.c
10822         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
10823
10824 2004-06-11  Martin Baulig  <martin@ximian.com>
10825
10826         * reflection.c (mono_image_create_method_token): Correctly encode
10827         varargs methods.
10828
10829 2004-06-11  Martin Baulig  <martin@ximian.com>
10830
10831         * metadata.c (mono_metadata_parse_method_signature): When parsing
10832         a MethodDef which has VarArgs, also set sentinelpos if we don't
10833         have any parameters.
10834
10835 2004-06-11  Martin Baulig  <martin@ximian.com>
10836
10837         * verify.c (mono_method_verify): In CEE_CALL, use
10838         mono_method_get_signature() to get the method's signature, unless
10839         we're a PInvoke method.
10840
10841 2004-06-10  Jackson Harper  <jackson@ximian.com>
10842
10843         * assembly.c: Use <path>/lib/mono/gac for the extra paths
10844         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
10845         logical name as the supplied path is just a prefix to the gac not
10846         the direct path to it.
10847         
10848 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
10849
10850         * reflection.c: make the token for a created method match
10851         the token of the MethodBuilder it was created from
10852         (IKVM requires this behaviour now).
10853
10854 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
10855
10856         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
10857         reflection.c, socket-io.c: leak fixes.
10858
10859 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
10860
10861         * icall.c: handle sentinel pos in vararg methods in position different
10862         from 0.
10863
10864 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10865
10866         * culture-info-tables.h: freshly generated.
10867
10868 2004-06-09  Martin Baulig  <martin@ximian.com>
10869
10870         * loader.c (mono_get_method_constrained): Call `mono_class_init
10871         (constrained_class)'.   
10872
10873 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
10874
10875         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
10876         any methods. Fixes #59629.
10877
10878 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
10879
10880         * culture-info-tables.h: reflecting locale-builder updates.
10881
10882 2004-06-08  Dick Porter  <dick@ximian.com>
10883
10884         * object.h:
10885         * locales.c: Fixed compile warnings, including a real bug in
10886         CompareInfo_internal_compare.
10887         
10888 2004-06-08  Dick Porter  <dick@ximian.com>
10889
10890         * locales.c
10891         (ves_icall_System_Globalization_CompareInfo_internal_index):
10892         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10893         Double-check the resuls of usearches, because ICU currently
10894         ignores most of the collator settings here.  Fixes bug 59720.
10895         
10896 2004-06-08  Dick Porter  <dick@ximian.com>
10897
10898         * locales.c
10899         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10900         Fix memory leak and segfault-causing typo.  No idea how this one
10901         lasted so long without being noticed.
10902
10903 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
10904
10905         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
10906         any methods. Fixes #59629.
10907
10908 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10909
10910         * assembly.c:
10911         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
10912         own the critical section before). Removed dead code (that's done
10913         in the preload hook).
10914
10915         (mono_assembly_load_with_partial_name): call the preload hook.
10916
10917 2004-06-08  Martin Baulig  <martin@ximian.com>
10918
10919         * metadata.c (mono_metadata_signature_alloc): Default
10920         `sentinelpos' to -1.
10921
10922         * reflection.c (mono_image_get_array_token): Likewise.
10923
10924 2004-06-08  Martin Baulig  <martin@ximian.com>
10925
10926         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
10927
10928         * metadata.c (mono_metadata_parse_method_signature): When parsing
10929         a MethodDef which has VarArgs, set sentinelpos.
10930
10931         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
10932         `gint16' since we're using -1 for non-varargs methods.
10933
10934         * reflection.c
10935         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
10936         (method_encode_signature): Added varargs support.
10937         (method_builder_encode_signature): Likewise.
10938         (mono_image_get_varargs_method_token): New static method.
10939         (mono_image_create_method_token): New public method; this is
10940         called via an icall instead of mono_image_create_token() when
10941         calling a varargs method.       
10942
10943 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
10944
10945         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
10946
10947 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
10948
10949         * culture-info-tables.h : Reflecting the latest locale-builder that
10950           fixed empty array representation ({} to {0}).
10951
10952 2004-06-07  Jackson Harper  <jackson@ximian.com>
10953
10954         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
10955         looking up extra gac paths. This allows MONO_GAC_PATH to act
10956         exactly like a prefix.
10957         
10958 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
10959
10960         * reflection.c (mono_reflection_type_from_name): Make a copy of the
10961         type name before modifying it. Fixes #59405.
10962
10963 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
10964
10965         * culture-info.h: added fields for "all datetime patterns".
10966         * locales.c: (  ves_icall_System_Globalization_CultureInfo
10967           _construct_datetime_format ()): fill xxx_patterns fields.
10968         * object.h: added fields for "all datetime patterns" to
10969           MonoDateTimeFormatInfo.
10970         * culture-info-tables.h: reflecting locale-builder updates.
10971
10972 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
10973
10974         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
10975         the event has no add and remove methods. Fixes #59629.
10976
10977 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
10978
10979         * object.c: Fixed possible integer overflow when allocating large
10980         strings.
10981
10982 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
10983
10984         * culture-info-tables.h: reflecting locale-builder updates.
10985
10986 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
10987
10988         * culture-info-tables.h: reflecting locale-builder updates.
10989
10990 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
10991
10992         * culture-info-tables.h: reflecting locale-builder updates.
10993
10994 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
10995
10996         * threads.c: Made Thread.Sleep abortable.
10997
10998 2004-06-02  Martin Baulig  <martin@ximian.com>
10999
11000         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
11001
11002         * debug-mono-symfile.h: Bumped symbol file version number to 37.
11003
11004 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
11005
11006         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
11007
11008 2004-05-30  Jackson Harper  <jackson@ximian.com>
11009
11010         * reflection.c: Do not hardcode assembly versions or public key
11011         tokens anymore. All of this except the corlib section was dead
11012         code anyways.
11013         
11014 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
11015
11016         * object.c (mono_runtime_invoke_array): Automatically create boxed
11017         objects for byref valuetypes if needed. Fixes #59300.
11018         
11019         * object.c (mono_method_return_message_restore): Handle 
11020         MONO_TYPE_OBJECT as well.
11021
11022 2004-05-28  Jackson Harper  <jackson@ximian.com>
11023
11024         * reflection.c: The modified type encoding was causing build
11025         problems. Reverted for now.
11026         
11027 2004-05-28  Jackson Harper  <jackson@ximian.com>
11028
11029         * reflection.c/h: Take an assembly ref so that we dont create
11030         fully qualified names when encoding types in the same assembly as
11031         the custom attribute being emitted.
11032         * appdomain.c: Increment version number.
11033         
11034 2004-05-26  Duncan Mak  <duncan@ximian.com>
11035
11036         * icall.c
11037         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11038         Set the full version number (major, minor, build, revision).
11039
11040 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
11041
11042         * marshal.c (emit_struct_conv): increment src/dst after blit
11043         (mono_marshal_get_managed_wrapper,
11044         mono_marshal_get_native_wrapper): make sure we have marshalling
11045         info before marshalling params (info computation affects
11046         blittable)
11047
11048         * class.c (class_compute_field_layout): correctly deal with
11049         blittable
11050         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
11051         value types (as per what windows dows by default)
11052         (mono_class_setup_mono_type): System.ValueType is blittable
11053         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
11054         blittable
11055
11056         * marshal.c (mono_marshal_load_type_info): flag types  as
11057         non-blittable if the native layout doesn't match the managed
11058         layout
11059
11060 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11061
11062         * appdomain.c: don't add stuff in the private search path that is
11063         above the application base. If application base is not set, there's
11064         no private search path.
11065
11066 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
11067
11068         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
11069         byref struct arguments in native->managed marshalling.
11070
11071 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
11072
11073         * marshal.c (mono_marshal_get_runtime_invoke): correctly
11074         cache methods using signature (special case for methods
11075         that are value type or string class)
11076         
11077         * image.c (mono_image_close): clean up allocated GSList's
11078         in runtime_invoke_cache.
11079
11080 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11081
11082         * mono-config.c: set the correct path for mono_cfg_dir on windows when
11083         there's no MONO_CFG_DIR environment variable defined.
11084
11085 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11086
11087         * threads.c: windows version must be >= 0x0500 to include OpenThread.
11088
11089 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
11090
11091         * threadpool.c: Really wait for 500ms after the async call, even if the wait
11092           is interrumped.
11093         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
11094           before waiting for it, and call CloseHandle after the wait to unref it.
11095           This will make sure that handles are not disposed too early.
11096
11097 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11098
11099         * appdomain.c:
11100         * appdomain.h:
11101         * icall.c: removed
11102         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
11103         needed now.
11104
11105         * object.c: se the application_base only for the domain that runs
11106         Main. Fixes bug #59216,
11107
11108 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11109
11110         * appdomain.c:
11111         * object.c: only the domain in which Main is run have
11112         SetupInformation.ConfigurationFile set, so moved a few lines from
11113         appdomain.c to object.c.
11114
11115 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11116
11117         * appdomain.c: we tried to load [name].(dll|exe), but according
11118         to bug #57710, we must also try [culture]/[name].(dll|exe) and
11119         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
11120         There's a test case attached to bug #58922.
11121
11122 2004-05-27  Dick Porter  <dick@ximian.com>
11123
11124         * icall.c:
11125         * file-io.c: Implemented icalls for locking and unlocking regions
11126         in a file.
11127         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
11128         FALSE on error (fixes both compiler warning and real bug.)
11129
11130 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
11131
11132         * culture-info-tables.h: reflecting locale-builder updates.
11133
11134           (Added missing ChangeLog entry for 05/26)
11135
11136 2004-05-27  Jackson Harper  <jackson@ximian.com>
11137
11138         * locales.c: Fix some cut and paste errors.
11139         
11140 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11141
11142         * mono-config.c: set the correct path for config. directory on windows.
11143
11144 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
11145
11146         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
11147           on win32.
11148
11149 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11150
11151         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
11152         from pinvoke functions.
11153         
11154         * marshal.c (mono_ftnptr_to_delegate): Implement this.
11155
11156 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
11157
11158         * culture-info-tables.h: reflecting locale-builder updates.
11159
11160 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11161
11162         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
11163         #59086.
11164
11165 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
11166
11167         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
11168         * icall.c: Modified icalls for RNG.
11169         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
11170         Windows (CryptoAPI).
11171
11172 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11173
11174         * locales.c: Fix build.
11175
11176 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
11177
11178         * culture-info-tables.h: reflecting locale-builder updates.
11179
11180 2004-05-25  Jackson Harper  <jackson@ximian.com>
11181
11182         * locales.c: When creating the current culture use the $LANGs
11183         specific culture. So DateTimeFormat and NumberFormat entries are created.
11184         
11185 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11186
11187         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
11188         a char array as parameter.
11189
11190 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
11191
11192         * image.c: In mono_image_open(), always use an absolute path name to
11193           look for already loaded images.
11194
11195 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
11196
11197         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
11198         missing in the windows build (like older cygwin include files).
11199
11200 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
11201
11202         * icall.c: Fixed check for possible integer overflow in Buffer_
11203         BlockCopy icall. Replaced comments style // by /* */.
11204
11205 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
11206
11207         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
11208         
11209         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
11210         check after MONO_VTADDR. Fixes pinvoke2.exe.
11211
11212         * marshal.h marshal.c metadata.h: Add beginnings of support for
11213         ftnptr -> delegate marshalling.
11214
11215 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
11216
11217         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
11218         * threads.c: Fix warnings.
11219
11220 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
11221
11222         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
11223         * icall.c: Registered icalls for Suspend and Resume.
11224         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
11225           Thread.Abort.
11226         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
11227         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
11228         * process.c: Use WaitForSingleObjectEx.
11229         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
11230           checkpoints.
11231         * threads.c, threads.h: Make use of new Ex wait methods. Improved
11232           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
11233           for Suspend and Resume. Added new mono_thread_stop, used for stoping
11234           background threads. Added basic support for Abort in Windows.
11235           Start new threads using a managed delegate invoke wrapper. This wrapper
11236           has an interruption checkpoint that is needed since an interruption
11237           can be requested before the thread leaves the unmanaged code that starts 
11238           the thread.
11239         * marshal.c: Added interruption checkpoint after every native call, and
11240           also before managed calls for wrappers called from unmanaged code to
11241           go into managed code.
11242         * object.h: Added new field in MonoThread to keep track of interruption
11243           requests.
11244
11245 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
11246
11247         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
11248         calls.
11249
11250 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11251
11252         * appdomain.c:
11253         * assembly.c:
11254         * gc.c:
11255         * locales.c:
11256         * mono-config.c:
11257         * rand.c: getenv -> g_getenv (windows!)
11258
11259         * process.c: complete_path is also used on non-windows platforms.
11260
11261 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11262
11263         * icall.c: new signature for Process_Start.
11264
11265         * process.[ch]: new signature for Process_Start. If we're on windows
11266         and UseShellExecute is false, we have to search for the program by
11267         ourselves if we don't get a full path.
11268
11269 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11270
11271         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
11272         marshalling and call CleanUpNativeData if needed. Fixes #58646.
11273
11274 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11275
11276         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
11277         Fixes bug #58373.
11278
11279 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11280
11281         * process.c: use double quotes to quote program name and arguments on
11282         windows. Fixes bug #58575.
11283
11284 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11285
11286         * file-io.c: don't return "." and ".." when using windows Find*File.
11287
11288 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
11289
11290         * marshal.c: Don't pass wrappers to message init because method 
11291         addressed used to lookup metadata. part of remoting[2|3] fix.
11292
11293 2004-05-15  Jackson Harper  <jackson@ximian.com>
11294
11295         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
11296         path is essentially the same as MONO_PATH except that it points to
11297         GACs instead of lib directories.
11298         * loader.h: The user gac is gone so we dont need function to
11299         enable/disable it.
11300         * mono-config.c: user gac option is now gone.
11301         
11302 2004-05-15  Jackson Harper  <jackson@ximian.com>
11303
11304         * culture-info.h: Make defines more consistent, add calendar data
11305         to the culture info table.
11306         * culture-info-tables.h: Add basic calendar data. Basically
11307         everyone gets default gregorian until all the data is
11308         updated.
11309         * locales.c: Use the new consistent defines. Set calendar data for
11310         culture info objects.
11311         * object.h: add a field for calendar data to CultureInfo
11312         
11313 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11314
11315         * image.c: image->runtime_invoke_cache is keyed on signatures now.
11316         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
11317         a signature.
11318         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
11319         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
11320         an extra param that is the pointer of the method to invoke. The IL for
11321         the invoke method is no longer specific to the method, but to the
11322         signature of the method. Thus, we can share the same code for multiple
11323         methods. This reduces the number of methods that have to be compiled.
11324
11325 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11326
11327         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
11328
11329         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11330
11331         * icall.c: Optimize Buffer.BlockCopy.
11332
11333 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11334
11335         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
11336         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
11337         quote). Changed them to "MMMM yyyy".
11338
11339 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
11340
11341         * rand.c
11342         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
11343
11344 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
11345
11346         * reflection.h: Updated after changes to managed structures.
11347
11348         * appdomain.c: Bump corlib version.
11349
11350 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11351
11352         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
11353         windows.
11354
11355 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11356
11357         * Makefile.am: link to ../os/libmonoos.la on windows.
11358
11359         * assembly.c:
11360                 -If MONO_DEBUG, warn about non-existing directories in
11361                 MONO_PATH.
11362                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
11363                 compile time variable.
11364                 -Removed init_default_path and call mono_set_rootdir from
11365                 libmonoos.a instead (windows only).
11366
11367         * assembly.h: declare mono_assembly_getrootdir().
11368
11369         * domain.c:
11370         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
11371
11372         * loader.c: s/getenv/g_getenv/
11373
11374 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11375
11376         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
11377
11378         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
11379
11380         * metadata.h: Add new marshalling conversions.
11381
11382         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
11383         function.
11384
11385         * reflection.c (mono_reflection_get_type): Lookup the type in all
11386         modules of a multi-module assembly. Fixes #58291.
11387
11388 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11389
11390         * threads.c: Before aborting a background, set the StopRequested
11391         state.  This avoids throwing the Abort exception.
11392         In mono_thread_manage, don't continue with the shutdown until all
11393         aborted threads have actually stopped.
11394
11395 2004-05-10  Jackson Harper  <jackson@ximian.com>
11396
11397         * locales.c: Remove the modifier from culture names.
11398         
11399 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11400
11401         * Makefile.am: monosn is not installed any more. It has been deprecated
11402         in favor of sn.
11403
11404 2004-05-07  Jackson Harper  <jackson@ximian.com>
11405
11406         * locales.c
11407         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
11408         Fix array construction, add bailout if the length is 0.
11409
11410 2004-05-07  Dick Porter  <dick@ximian.com>
11411
11412         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
11413         machine doesn't have a DNS entry.  Patch by Urs Muff
11414         (umuff@quark.com), fixes bug 57928.
11415
11416 2004-05-06  Jackson Harper  <jackson@ximian.com>
11417
11418         * reflection.c: Handle null PublicTokens properly. alloc mem for
11419         assembly names culture so we dont crash when freeing it.
11420         
11421 2004-05-06  Jackson Harper  <jackson@ximian.com>
11422
11423         * assembly.c: Check the usergac when loading with partial names.
11424         
11425 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
11426
11427         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
11428         does nothing for now (not required for Linux/Windows) but the class
11429         library can call it (and a newer or modified runtime could need it).
11430         * icall.c: Registred icall.
11431
11432 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11433
11434         * loader.c: prints a message on module loading error we set MONO_DEBUG
11435         environment variable.
11436
11437 2004-05-05  Jackson Harper  <jackson@ximian.com>
11438
11439         * appdomain.c: Handle PublicKeyToken=null properly.
11440         
11441 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
11442
11443         * environment.c|h: Added icall ves_icall_System_Environment_
11444         GetOSVersionString to get the current OS version as a string.
11445         * icall.c: Registred icall.
11446
11447 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
11448
11449         * object.c: in mono_object_get_virtual_method(), take into account that
11450         non-virtual methods don't have a slot in the vtable. Check needed when
11451         the object is a proxy.
11452
11453 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11454
11455         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
11456         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
11457
11458         * object.c (mono_class_compute_gc_descriptor): Fix warning.
11459
11460         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
11461         passed when a valuetype is expected.
11462
11463         * object.c (mono_unhandled_exception): Only set the exit code if the
11464         exception happens in the main thread. Fixes thread5.exe.
11465
11466         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
11467         invalid names. Fixes #58047.
11468
11469 2004-05-03  Jackson Harper  <jackson@ximian.com>
11470
11471         * assembly.c: This line was committed accidently and is unneeded.
11472         
11473 2004-05-03  Jackson Harper  <jackson@ximian.com>
11474
11475         * icall.c: Add new icall for Assembly::LoadWithPartialName
11476         * assembly.c/.h: new function that probes the GAC to load partial
11477         assembly names by Paolo Molaro.
11478         
11479 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11480
11481         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
11482         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
11483         (type_get_fully_qualified_name): Added PublicKeyToken when building a
11484         full type name.
11485
11486 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11487
11488         * appdomain.c: fixed check for 'neutral' culture and removed warning.
11489         * reflection.c: fix bug when parsing a full type name and Version is not
11490         the last thing in the string.
11491
11492 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
11493
11494         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
11495         crashes when it is freed.
11496
11497 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11498
11499         * assembly.c: print the compat warning to stderr.
11500
11501 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
11502
11503         * assembly.c (mono_assembly_load_references): Add a compatibility
11504         hack to run old applications that might be still referencing the
11505         3300-based assemblies, only do this for System.xxx.
11506
11507 2004-05-01  Jackson Harper  <jackson@ximian.com>
11508
11509         * appdomain.c: If the culture is neutral we set it to "".
11510         
11511 2004-04-29  Jackson Harper  <jackson@ximian.com>
11512
11513         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
11514
11515 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
11516  
11517         * string-icalls.c: added low overhead function for copying chars
11518         * icall.c: added needed icall for the above function
11519  
11520 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11521
11522         * icall.c: fix return value of get_global_assembly_cache.  Implemented
11523         Environment.GetLogicalDrives.
11524
11525 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
11526
11527         * rand.c: try and talk to egd or prngd
11528         for random bytes if opening devices fail.
11529
11530 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11531
11532         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
11533         alignment for the type using the native alignment of its members 
11534         instead of using klass->min_align.
11535
11536         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
11537
11538 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11539
11540         * file-io.c:
11541         * socket-io.c: added check for sys/aio.h.
11542
11543 2004-04-28  Dick Porter  <dick@ximian.com>
11544
11545         * threads.c: Don't abort a thread thats already aborting, when
11546         terminating everything.
11547
11548 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11549
11550         * icall.c: added 2 new async calls for Socket.
11551
11552         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
11553         IO on *nix systems.
11554
11555         * threadpool.c: removed unused variable.
11556
11557 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
11558
11559         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
11560
11561 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11562
11563         * locales.c: put back string_invariant_tolower () and
11564         string_invariant_toupper ().
11565
11566 2004-04-26 David Waite <mass@akuma.org>
11567
11568         * file-io.h:
11569         * socket-io.h:
11570         * threads.h:
11571         * unicode.h: remove comma from end of enumeration declarations
11572
11573 2004-04-26 David Waite <mass@akuma.org>
11574
11575         * debug-mono-symfile.h:
11576         * decimal.c:
11577         * mono_debug.h:
11578         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
11579
11580
11581 2004-04-26  Jackson Harper  <jackson@ximian.com>
11582
11583         * appdomain.c: Increment version number.
11584         
11585 2004-04-26  Jackson Harper  <jackson@ximian.com>
11586
11587         * appdomain.c: Set assembly references public token value when
11588         PublicKeyToken is specified, not the hash_value. Free public token
11589         values when free assembly name data. Previously the public key
11590         token was hex decoded, however we are using hex encoded public key
11591         tokens, so this is not neccasary.
11592         * assembly.c: Lookup assemblies in the gac if their public token
11593         value is set. Add function to allow enabling user gac
11594         lookups. Specify whether or not the assembly was loaded from the
11595         GAC. Compare full assembly names when checking the cache for
11596         assemblies (Temporarily disabled see comment in code). Remove
11597         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
11598         specifies trace-loader they get extra info to stdout on the
11599         loading of assemblies.
11600         * image.h: Add a field for an assembly references public token
11601         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
11602         whether an assembly has been loaded from the GAC.
11603         * image.c: Remove a corlib -> mscorlib name mapping.
11604         * loader.h: Add function to enable/disable the user gac.
11605         * mono-config.c: Check if the usergac is enabled in the config
11606         file.
11607         * icall.c: New icall to determine whether or not an assembly has
11608         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
11609         * tabldefs.h: Add constant for assemblyref flag that specifies a
11610         full public key is used instead of a public token.
11611         * reflection.c: Remove mscorlib -> corlib mappings. Set
11612         PublicTokenValue instead of hash value. This value is a hex
11613         string so it does not need to be expanded.
11614
11615 2004-04-26  Martin Baulig  <martin@ximian.com>
11616
11617         * mono-debug-debugger.c (mono_debugger_initialize): Set
11618         `mono_debugger_initialized' before calling mono_debug_lock().
11619
11620 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
11621
11622         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
11623           InternalToUpper/InternalToLower.
11624         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
11625           removed invariant culture shortcut.  This is now done in managed code.
11626         * locales.c: (string_invariant_toupper/tolower) removed.
11627
11628 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11629
11630         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
11631         Added Poll internal call.
11632
11633         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
11634         call for Poll. Select was too heavy for polling a single socket.
11635
11636         * threadpool.[ch]: added mono_threadpool_cleanup.
11637         * threads.c: use it. Don't use Thread_Abort on windows.
11638
11639 2004-04-23  Martin Baulig  <martin@ximian.com>
11640
11641         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
11642
11643 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
11644
11645         * icall.c: Registred new icalls for key pair protection and added an
11646         icall for Environment.GetFolderPath on Windows.
11647         * security.c|h: Added new icalls for key pair protection.
11648
11649 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11650
11651         * socket-io.c: don't display the non-supported family warning for known
11652         families. Now this is not displayed on windows when checking support
11653         for IPv4/IPv6.
11654
11655 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11656
11657         * class.c: don't display the layout warning for static fields.
11658
11659 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
11660
11661         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
11662         * locales.c, locales.h: Added new icalls for culture-specific
11663         Char.ToLower and Char.ToUpper.
11664
11665 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11666
11667         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
11668         by David Waite.
11669
11670 2004-04-20  Martin Baulig  <martin@ximian.com>
11671
11672         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
11673         of the type name before passing it to mono_reflection_type_from_name().
11674
11675 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11676
11677         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
11678         encodings here. Fixes #56965.
11679
11680 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
11681
11682         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11683         fix test on strstr result not that I can see anything that
11684         relies on the result.
11685
11686 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11687
11688         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
11689         Fixes #57081.
11690
11691         * marshal.c (mono_marshal_get_string_encoding): New helper function.
11692
11693         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
11694         function to determine which marshalling to use for strings. Fixes
11695         #56965.
11696
11697         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
11698
11699         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
11700
11701 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
11702
11703         * icall.c: #include mono-config.h
11704
11705 2004-04-15  Jackson Harper  <jackson@ximian.com>
11706
11707         * culture-info-tables.h: Fix date formats for en-US culture.
11708         
11709 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
11710
11711         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
11712         ThreadPool.SetMinThreads.
11713         * threadpool.c: Implemented ThreadPool.GetMinThreads and
11714         ThreadPool.SetMinThreads.
11715
11716 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11717
11718         * mono-config.c: also load the .config file in the directory
11719         where the assembly was found.
11720
11721 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11722
11723         * assembly.c: load per-assembly config files.
11724         * icall.c: decrapified code to get the config dir and moved to
11725         mono-config.c.
11726         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
11727         per-assembly config files. When doing a dll map lookup give precedence
11728         to the per-assembly data.
11729
11730 2004-04-14  Martin Baulig  <martin@ximian.com>
11731
11732         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
11733         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
11734         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
11735
11736         * mono-debugger-debugger.c: While the debugger is locked, remember
11737         whether the symbol tables have changes and send one single
11738         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
11739
11740 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11741
11742         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
11743
11744         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
11745         function.
11746
11747         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
11748         account when marshalling string arrays. Fixes #56965.
11749
11750 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
11751
11752         * icall.c: Add new icalls mapping for security.
11753         * security.c|h: Add internal calls for WindowsIdentity,
11754         WindowsImpersonationContext and WindowsPrincipal.
11755
11756 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
11757
11758         * class.c: Added comment to ensure the System.MonoDummy class
11759         is removed when no longer necessary
11760
11761 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11762
11763         * appdomain.c: Pass arguments to the bootstraping exceptions to
11764         minimize JITed methods at boot
11765
11766         * metadata.c (mono_exception_from_name_two_strings): Allow for the
11767         second string to be null.
11768
11769         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11770         Change the protocol to minimize the JIT methods at startup.  Now
11771         it Returns the internal codepage, if the value of "int_code_page"
11772         is 1 at entry, and we can not compute a suitable code page
11773         number, returns the code page as a string.
11774
11775 2004-04-13  Jackson Harper  <jackson@ximian.com>
11776
11777         * culture-info-tables.h: Fix number of decimal digits for all
11778         english locales.
11779
11780 2004-04-13  Jackson Harper  <jackson@ximian.com>
11781
11782         * icall.c: Clairfy out of sync error message. It is not always
11783         your corlib that is out of sync.
11784
11785 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
11786
11787         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
11788         properties when only the set accessor is overriden. Fixes #55874.
11789
11790 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
11791
11792         * assembly.c (mono_assembly_load_references): Make this thread safe.
11793         Fixes #56327.
11794
11795 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11796
11797         * monosn.c: Add missing initialization calls.
11798
11799 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
11800
11801         * locales.c:
11802         ves_icall_System_Globalization_CultureInfo_construct_number_format
11803         Fix g_assert so it compiles on fussier compilers re int/ptr
11804         mismatch
11805
11806 2004-04-08  Dick Porter  <dick@ximian.com>
11807
11808         * socket-io.h:
11809         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
11810         53992.  Also rearrange the code so that the internal calls return
11811         an error value and exceptions are thrown from managed code.
11812
11813         * icall.c: Add type info to the socket icalls.
11814
11815 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11816
11817         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
11818         owes me a beer.
11819
11820 2004-04-07  Martin Baulig  <martin@ximian.com>
11821
11822         * class.c (mono_class_from_generic_parameter): Don't default
11823         `klass->parent' to `mono_defaults.object_type'.
11824
11825 2004-04-07  Martin Baulig  <martin@ximian.com>
11826
11827         * reflection.c (mono_reflection_initialize_generic_parameter): Set
11828         `param->pklass->reflection_info'.       
11829
11830 2004-04-07  Jackson Harper  <jackson@ximian.com>
11831
11832         * culture-info-tables.h: Fix date separator symbol.
11833         
11834 2004-04-07  Martin Baulig  <martin@ximian.com>
11835
11836         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
11837         from System.Type to System.MonoType.
11838
11839 2004-04-07  Martin Baulig  <martin@ximian.com>
11840
11841         * reflection.h
11842         (MonoReflectionGenericParam): Added `has_reference_type' and
11843         `has_value_type' fields.
11844
11845         * reflection.c (mono_image_get_generic_param_info): Encode the
11846         correct flags if we have the `class' or `struct' constraint.
11847
11848 2004-04-07  Martin Baulig  <martin@ximian.com>
11849
11850         * reflection.h
11851         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
11852
11853 2004-04-07  Jackson Harper  <jackson@ximian.com>
11854
11855         * appdomain.c: Revert extra patches, just wanted to bump the
11856         version number.
11857         
11858 2004-04-07  Jackson Harper  <jackson@ximian.com>
11859
11860         * Makefile.am: Add culture-info private headers.
11861         * icall.c: Add new icalls for contructing locales.
11862         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
11863         * locales.h: Declare new culture info construction methods.
11864         * object.h: Add new fields used to avoid the CultureMap to
11865         MonoCultureInfo.
11866         * culture-info.h: Definition of structs used in the culture info
11867         tables.
11868         * culture-info-tables.h: Autogenerated tables that contain culture
11869         info data. This file was generated with the locale-builder tool.
11870         * appdomain.c: Incement corlib version number.
11871         
11872 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
11873
11874         * appdomain.c: (mono_runtime_init) move mono_thread_init
11875         to before mono_object_new calls so critical sections
11876         are initialized before use.
11877
11878 2004-04-07  Martin Baulig  <martin@ximian.com>
11879
11880         * icall.c
11881         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
11882         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
11883         (ves_icall_MonoGenericParam_initialize): Removed.
11884         (monogenericparam_icalls): Removed.
11885         (generictypeparambuilder_icalls): Added new table for
11886         System.Reflection.Emit.GenericTypeParameterBuilder.
11887
11888         * reflection.c
11889         (mono_reflection_define_generic_parameter): Removed.
11890         (mono_reflection_initialize_generic_parameter): This is now called
11891         from GenericTypeParameterBuilder's .ctor.
11892
11893 2004-04-06  Martin Baulig  <martin@ximian.com>
11894
11895         * class.c (mono_class_init): Don't inflate nested classes in a
11896         generic instance.
11897         (mono_type_get_name_recurse): Include the generic arguments for
11898         generic instances and generic type declarations.
11899         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
11900         (_mono_class_get_instantiation_name): Removed.
11901         (mono_class_create_generic): Always use `gklass->name' as our name.
11902
11903         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
11904
11905         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
11906         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
11907         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
11908         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
11909         closed generic methods here.
11910
11911         * reflection.c
11912         (mono_reflection_generic_inst_get_nested_types): Removed.
11913         (inflate_mono_method): Copy the generic parameters from the
11914         MonoMethodHeader into out MonoGenericMethod.
11915
11916 2004-04-06  Martin Baulig  <martin@ximian.com>
11917
11918         * row-indexes.h
11919         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
11920
11921         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
11922
11923         * reflection.c (build_compressed_metadata): If we have any entries
11924         in the GenericParam, MethodSpec or GenericParamConstraint tables,
11925         set the header version to 1.1.
11926
11927 2004-04-06  Martin Baulig  <martin@ximian.com>
11928
11929         * class.c (mono_class_init): If we're a generic instance,
11930         initialize our nested classes, too.
11931         (_mono_class_get_instantiation_name): Deal with the new `!%d'
11932         suffix. 
11933
11934 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11935
11936         * process.c: quote the argument passed to the shell on windows.
11937
11938 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11939
11940         * threads.c (mono_alloc_special_static_data): Allow this to be
11941         called during startup.
11942
11943 2004-04-02  Martin Baulig  <martin@ximian.com>
11944
11945         * icall.c
11946         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
11947
11948 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11949
11950         * icall.c: Fix build.
11951
11952 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
11953
11954         * Makefile.am: Added security.c|h.
11955         * icall.c: Added icall for get_UserName;
11956         * security.c: New file for security related icalls. Added function
11957         get_UserName for System.Environment (fix #56144).
11958         * security.h: New. Header file for security.c
11959
11960 2004-04-02  Dick Porter  <dick@ximian.com>
11961
11962         * icall.c: Deleted the icalls that were obsoleted some time ago
11963         by the ICU string code, and which were mixed into the icall
11964         rearranging.  Fixes bug 55969.
11965
11966         * string-icalls.h: 
11967         * string-icalls.c: Deleted the code that those icalls reference.
11968
11969 2004-04-01  Martin Baulig  <martin@ximian.com>
11970
11971         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
11972
11973         * class.c (mono_class_from_generic_parameter): Don't set 
11974         TYPE_ATTRIBUTE_INTERFACE.
11975         (my_mono_class_from_generic_parameter): Likewise.
11976
11977 2004-04-01  Martin Baulig  <martin@ximian.com>
11978
11979         * loader.c (find_method): Added an optional `MonoClass *ic'
11980         argument to search in a specific interface.
11981         (mono_get_method_constrained): New public function.
11982
11983 2004-04-01  Martin Baulig  <martin@ximian.com>
11984
11985         * reflection.c (mono_image_get_generic_field_token): Use the
11986         `handleref' cache here.
11987
11988 2004-04-01  Martin Baulig  <martin@ximian.com>
11989
11990         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
11991
11992         * reflection.c (create_generic_typespec): Use the `typespec' hash
11993         here, not the `typeref' one.    
11994
11995 2004-04-01  Martin Baulig  <martin@ximian.com>
11996
11997         * class.c (mono_class_inflate_generic_type): Moved the
11998         functionality into a new static inflate_generic_type() which
11999         returns NULL if it didn't do anything.  Only increment the
12000         `mono_stats.inflated_type_count' if we actually inflated
12001         something.
12002         (mono_class_get_full): Check the classes type to see whether we
12003         need to inflate it; also inflate MONO_TYPE_(M)VAR.
12004
12005 2004-04-01  Jackson Harper  <jackson@ximian.com>
12006
12007         * reflection.c: Set culture for assembly references.
12008         
12009 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
12010
12011         * reflection.[ch], icall.[ch], Fix support for pinning variables.
12012
12013 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12014
12015         * assembly.c:
12016         (do_mono_assembly_open): the critical section also covers
12017         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
12018
12019 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12020
12021         * threads.c:
12022         (mono_manage_threads): abort the background threads when finishing.
12023         Fixes bug #47232.
12024
12025 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12026
12027         * gc.c: only close the done_event handle if there was no timeout.
12028         C-ified comments.
12029
12030 2004-03-30  Martin Baulig  <martin@ximian.com>
12031
12032         * icall.c (icall_entries): It's called "System.Activator", not
12033         "System.Activation".    
12034
12035 2004-03-30  Martin Baulig  <martin@ximian.com>
12036
12037         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
12038         (mono_class_create_from_typespec): Likewise.
12039
12040 2004-03-30  Martin Baulig  <martin@ximian.com>
12041
12042         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
12043         `has_ctor_constraint' and `initialized'.
12044
12045 2004-03-30  Martin Baulig  <martin@ximian.com>
12046
12047         * reflection.c (encode_new_constraint): New static function to add
12048         the constructor constraint attribute to a type parameter.
12049         (encode_constraints): Call encode_new_constraint() if necessary.
12050
12051         * reflection.h
12052         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
12053
12054         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
12055         
12056 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
12057
12058         * reflection.c, icall.c: add support for pinning variables. 
12059
12060 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
12061
12062         * marshal.c (mono_marshal_get_managed_wrapper):
12063         init bool local with zero rather than null.
12064
12065 2004-03-29  Martin Baulig  <martin@ximian.com>
12066
12067         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
12068         the "official" behavior here.
12069         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
12070
12071 2004-03-29  Martin Baulig  <martin@ximian.com>
12072
12073         * icall.c: Reflect latest API changes.
12074
12075 2004-03-29  Martin Baulig  <martin@ximian.com>
12076
12077         * loader.c (mono_get_method_from_token): Also call
12078         mono_metadata_load_generic_params () for abstract and interface
12079         methods; replace the type arguments in the method signature with
12080         the ones which are loaded from the metadata.
12081
12082 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
12083
12084         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
12085         of the lock is not the current thread. MS.NET don't do it, in spite of
12086         what the documentation says. See bug #56157.
12087
12088 2004-03-28  Martin Baulig  <martin@ximian.com>
12089
12090         * class.c (mono_class_init): Don't call init_properties() and
12091         init_events() for generic instances; set `prop->parent' when
12092         inflating properties.
12093
12094         * reflection.c (mono_generic_inst_get_object): Call
12095         `mono_class_init (ginst->klass)'.
12096         (mono_type_get_object): Only create a MonoGenericInst if your
12097         generic type is a TypeBuilder.
12098         (do_mono_reflection_bind_generic_parameters): Only set
12099         `ginst->is_dynamic' if our generic type is a TypeBuilder.
12100
12101 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12102
12103         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
12104         Fixes #56091.
12105
12106 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12107
12108         * icall.c: added Kill_internal icall.
12109         * process.[ch]: added Kill_internal icall.
12110
12111 2004-03-25  Martin Baulig  <martin@ximian.com>
12112
12113         * class.h (MonoStats): Added `generic_instance_count',
12114         `inflated_method_count', `inflated_type_count' and
12115         `generics_metadata_size'.       
12116
12117 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12118
12119         * reflection.c: no warnings now.
12120
12121 2004-03-25  Martin Baulig  <martin@ximian.com>
12122
12123         * class.c (mono_class_get_full): New public function; does a
12124         mono_class_get(), but also takes a `MonoGenericContext *'.
12125
12126         * loader.c (mono_field_from_memberref): Renamed to
12127         `field_from_memberref', made static and added `MonoGenericContext *'
12128         argument.
12129         (mono_field_from_token): Added `MonoGenericInst *' argument.
12130         (method_from_memberef): Likewise.
12131         (mono_get_method_from_token): Likewise.
12132         (mono_get_method_full): New public function; does a
12133         mono_get_method(), but also takes a `MonoGenericContext *'.
12134
12135         * verify.c (mono_method_verify): Get the method's generic context
12136         and pass it to mono_field_from_token(), mono_get_method_full() and
12137         mono_class_get_full().
12138
12139 2004-03-25  Martin Baulig  <martin@ximian.com>
12140
12141         * class.c (mono_class_inflate_generic_type): Take a
12142         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
12143         `MonoGenericMethod *'.
12144
12145 2004-03-25  Martin Baulig  <martin@ximian.com>
12146
12147         * loader.h (MonoMethodInflated): Store the MonoGenericContext
12148         instead of the MonoGenericMethod here.
12149
12150 2004-03-25  Martin Baulig  <martin@ximian.com>
12151
12152         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
12153         each time we create a new MonoGenericInst, we also create a new
12154         context which points back to us.
12155
12156         * class.c (inflate_method): Use `ginst->context' instead of
12157         creating a new context.
12158
12159         * loader.c (method_from_memberref): Use
12160         `klass->generic_inst->context' instead of creating a new context.
12161
12162 2004-03-25  Martin Baulig  <martin@ximian.com>
12163
12164         * class.h (MonoGenericContext): New struct.
12165         (MonoGenericMethod): Removed `generic_inst'.
12166
12167         * class.c (mono_class_inflate_generic_method): Take a
12168         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
12169
12170 2004-03-25  Martin Baulig  <martin@ximian.com>
12171
12172         * loader.h (MonoMethodInflated): New typedef.
12173
12174         * metadata.h (MonoMethodSignature): Removed `gen_method', make
12175         `generic_param_count' consume just 30 bits, added `is_inflated'
12176         and `has_type_parameters' flags (one bit each).
12177
12178         * class.c (mono_class_inflate_generic_method): Create a
12179         MonoMethodInflated instead of a MonoMethodNormal and set
12180         `is_inflated' in the method signature.
12181
12182         * class.h (MonoGenericMethod): Removed `generic_method'.
12183
12184 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
12185
12186         * image.c: Make sure the name of a MonoImage is always an absolute path.
12187           This fixes bug #54415.
12188
12189 2004-03-24  Martin Baulig  <martin@ximian.com>
12190
12191         * class.c (mono_class_setup_vtable): If we're a generic instance,
12192         use our generic type's vtable size.
12193
12194 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12195
12196         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
12197         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
12198         problems.
12199
12200 2004-03-23  Martin Baulig  <martin@ximian.com>
12201
12202         * class.h (MonoDynamicGenericInst): Added `int count_events' and
12203         `MonoEvent *events'.
12204
12205         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
12206         (typebuilder_icalls): Added "get_event_info"; calls
12207         mono_reflection_event_builder_get_event_info(). 
12208
12209         * reflection.c (mono_reflection_generic_inst_initialize): Added
12210         `MonoArray *events'.
12211         (mono_reflection_event_builder_get_event_info): New function.
12212
12213 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
12214
12215         * object.h: add mono_type_initialization_init
12216
12217         * object.c (mono_runtime_class_init): 
12218         implement class constructor synchronization rules
12219         to cope with threading issues.  
12220         add mono_type_initialization_init
12221
12222         * appdomain.c (mono_runtime_init): call 
12223         mono_type_initialization_init
12224
12225         * class.h: removing initializing field from MonoVTable
12226
12227 2004-03-23  Martin Baulig  <martin@ximian.com>
12228
12229         * class.c (my_mono_class_from_generic_parameter): Use
12230         `param->name' if it's not NULL. 
12231
12232 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
12233
12234         * class.c: do not insert non-virtual methods in the vtable.
12235         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
12236         that means the method is non-virtual. This never would have
12237         happened before.
12238
12239 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12240
12241         * profiler.c: Added lock for accessing coverage_hash.
12242
12243 2004-03-22  Martin Baulig  <martin@ximian.com>
12244
12245         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
12246         `method->method->signature->generic_param_count != 0' to make it
12247         work for interface methods.
12248
12249 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12250
12251         * process.c: quote the string passed to the shell using g_shell_quote.
12252
12253 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12254
12255         * threads.c:
12256         (mono_threads_manage): don't remove the finalizer thread and self
12257         from the threads hash table so that mono_thread_manage can be called
12258         more than once.
12259
12260 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12261
12262         * process.c: quote the arguments when UseShellExecute is true. Fixes
12263         bug #55790.
12264
12265 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12266
12267         * threads.c: set mono_thread_detach as a cleanup routine for every
12268         thread. This way it's always executed upon thread termination, either
12269         aborted or finished normally. No more xsp hangs!
12270
12271 2004-03-17  Martin Baulig  <martin@ximian.com>
12272
12273         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
12274         `int count_nested' and a `MonoType **nested'.
12275
12276         * reflection.c (mono_reflection_bind_generic_parameters): Moved
12277         most of the functionality into a new static
12278         do_mono_reflection_bind_generic_parameters() and don't take a
12279         `MonoType *nested_in' argument any more.  Don't compute nested
12280         types here.
12281         (mono_reflection_generic_inst_get_nested_types): New public method
12282         to get nested types.
12283
12284         * class.c (mono_class_create_generic): Set `klass->nested_in' if
12285         we're a nested class.
12286
12287         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
12288         mono_reflection_generic_inst_get_nested_types() to compute the
12289         nested types.
12290
12291 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12292
12293         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
12294         descriptive error message under windows.
12295         
12296 2004-03-17  Martin Baulig  <martin@ximian.com>
12297
12298         * class.c (dup_type): Added `const MonoType *original' argument;
12299         copy the attrs from the original type.
12300
12301 2004-03-17  Martin Baulig  <martin@ximian.com>
12302
12303         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
12304         `m->generic_inst_cache' here.
12305
12306 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12307
12308         * exception.h exception.c: Add stack_overflow_exception.
12309
12310 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12311
12312         * threadpool.c:
12313         (overlapped_callback): call SetEvent *after* invoking the callback.
12314         No need to call CloseHandle.
12315
12316 2004-03-16  Martin Baulig  <martin@ximian.com>
12317
12318         * reflection.c (mono_image_get_fieldref_token): Take a
12319         `MonoReflectionField *' instead of a `MonoClassField *' and a
12320         `MonoClass *'; store the `MonoReflectionField *' in the hash.
12321
12322 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12323
12324         * appdomain.c: don't add the culture to the filename we're looking for
12325         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
12326
12327 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12328
12329         * locales.c: don't ignore symbols when doing case insensitive compares.
12330         Thanks Dick! Fixes bug #54046.
12331
12332         * threads.c: surround 'threads' usage with enter/leave in
12333         mono_thread_manage.
12334
12335 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12336
12337         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
12338         implicitly marshalled as [Out]. Fixes #55450.
12339
12340         (mono_marshal_get_runtime_invoke): Zero out the result if there is
12341         an exception.
12342
12343 2004-03-16  Martin Baulig  <martin@ximian.com>
12344
12345         * class.c (mono_class_from_generic_parameter): Use the actual
12346         parameter name. 
12347
12348 2004-03-16  Martin Baulig  <martin@ximian.com>
12349
12350         * reflection.c (type_get_signature_size): New static function.
12351         Compues the size of the type in a method signature.
12352         (method_get_signature_size): New static function; calls
12353         type_get_signature_size() to compute the actual size of the
12354         method's signature.
12355         (method_encode_signature): Use method_get_signature_size() to get
12356         the signature's size rather than using `nparams * 10'.
12357
12358 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12359
12360         * file-io.h: define here WapiOverlapped on windows. I don't want the
12361         regular OVERLAPPED one.
12362
12363         * file-io.c:
12364         * threadpool.c: somehow, BindIoCompletionCallback is not found.
12365         Disabling AIO on windows.
12366
12367 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12368
12369         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
12370         bug #55385.
12371
12372 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12373
12374         * appdomain.c: upgraded corlib version.
12375
12376         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
12377         and BeginWrite. Allow opening files for asynchrnous operations.
12378
12379         * file-io.h: new struct that maps FileStreamAsyncResult.
12380         * icall.c: added new icalls.
12381         * process.[ch]: support setting child process environment variables
12382         and use the SHELL or COMSPEC when UseShellExecute is true.
12383
12384         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
12385         callback for async. IO is here and also BindHandle.
12386
12387         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
12388         from here.
12389
12390 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12391
12392         * reflection.c (create_custom_attr): Allow len == 0.
12393
12394         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
12395         computation on big-endian machines.
12396
12397 2004-03-13  Martin Baulig  <martin@ximian.com>
12398
12399         * class.h (MonoGenericInst): Added `int count_ifaces'.
12400
12401         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
12402         `ginst->count_ifaces' instead `klass->interface_count' since we
12403         may get called before the vtable is created.
12404
12405         * loader.c (mono_method_get_param_names): If we're a generic
12406         instance, return and don't initialize the class.
12407
12408         * reflection.c (mono_reflection_setup_generic_class): Don't call
12409         ensure_runtime_vtable().
12410         (mono_reflection_bind_generic_parameters): Set
12411         `ginst->count_ifaces'.
12412
12413 2004-03-11  Jackson Harper <jackson@ximian.com>
12414
12415         * icall.c:
12416         * unicode.c:
12417         * unicode.h: Remove unused System.Char icalls.
12418         
12419 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
12420
12421         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
12422         code when we P/Invoke the first library in Windows.Forms, instead
12423         of when we first open the assembly.
12424
12425         * assembly.c: Drop the lookup from here.
12426
12427 2004-03-10  Martin Baulig  <martin@ximian.com>
12428
12429         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
12430         class for properties, fields and events.  Finally fixes #54945.
12431
12432 2004-03-10  Martin Baulig  <martin@ximian.com>
12433
12434         * metadata.c (mono_metadata_class_equal): New static function;
12435         checks whether two generic instances or two generic parameters are
12436         equal.
12437         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
12438         compare classes.        
12439
12440 2004-03-10  Martin Baulig  <martin@ximian.com>
12441
12442         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
12443
12444         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
12445         argument and write it into the `reflection_info' field.
12446
12447         * icall.c
12448         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
12449         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
12450
12451 2004-03-09  Jackson Harper  <jackson@ximian.com>
12452
12453         * char-conversions.h: use 8 bits for numeric data its all we need
12454         * icall.c: numeric data is only 8 bits now.
12455
12456 2004-03-09  Martin Baulig  <martin@ximian.com>
12457
12458         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
12459
12460         * class.c (init_properties, init_events): Initialize the new
12461         `parent' field.
12462
12463         * reflection.c (typebuilder_setup_properties): Likewise.
12464         (typebuilder_setup_events): Likewise.
12465
12466         * reflection.h (MonoEventInfo): Replaced `parent with
12467         `declaring_type' and `reflected_type'.
12468
12469         * icall.c (ves_icall_get_property_info): Distinguish between
12470         declaring and reflected type.
12471         (ves_icall_get_event_info): Likewise.
12472
12473 2004-03-09  Martin Baulig  <martin@ximian.com>
12474
12475         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
12476         (ves_icall_Type_GetField): Correctly set field->klass.
12477
12478 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
12479
12480         * loader.h: Fix warning.
12481
12482 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
12483
12484         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
12485         library routine if present.  Notice that it will still continue
12486         executing even if its missing, for those working on the Gtk#
12487         edition of Windows.Forms.
12488
12489         * assembly.c (do_mono_assembly_open): If loading the
12490         System.Windows.Forms call mono_loader_wini_init.
12491
12492 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
12493
12494         * class.h: Added MonoRemoteClass struct.
12495         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
12496         function for MonoStrings.
12497         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
12498         Added internal call for getting the proxy type.
12499         * marshal.c: Get the type of transparent proxies from its remote_class.
12500         Added methods that generate the IL for type checks and casts:
12501         mono_marshal_get_isinst, mono_marshal_get_castclass, 
12502         mono_marshal_get_proxy_cancast.
12503         * marshal.h: Declaration of the previous new methods.
12504         * object.c: Added new moethods for creating and updating MonoRemoteClass
12505         instances: mono_remote_class, mono_upgrade_remote_class, 
12506         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
12507         * verify.c: FIx transparent_proxy_fields layout.
12508         * appdomain.c: Bump corlib version.
12509
12510 2004-03-04  Jackson Harper  <jackson@ximian.com>
12511
12512         * icall.c: Add icall to access char conversion tables.
12513         * char-conversions.h: Character conversion tables.
12514         * Makefile.am: Add char-conversions.h private header file.
12515         
12516 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
12517
12518         * appdomain.c (unload_thread_main): Increase unloading timeout to
12519         10 sec as a temporary workaround for Nant problems.
12520
12521 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
12522
12523         * gc.c: Add checks for GC_enable and GC_disable.
12524
12525         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
12526         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
12527         (bug #54988).
12528         
12529 2004-02-27  Martin Baulig  <martin@ximian.com>
12530
12531         * reflection.c (mono_reflection_bind_generic_parameters): Take a
12532         `MonoReflectionType *' instead of a `MonoType *'.
12533
12534 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
12535
12536         * gc.c (run_finalize): Avoid finalizing the object representing the
12537         finalizer thread.
12538         (finalizer_thread): Fix warning.
12539
12540 2004-02-25  Martin Baulig  <martin@ximian.com>
12541
12542         * class.c (_mono_class_get_instantiation_name): Added `int offset'
12543         argument for nested types.
12544         (mono_class_create_generic): Added support for nested generictypes.
12545
12546         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
12547         `GList *nested'.
12548
12549         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
12550
12551         * reflection.c (method_encode_signature): Increase the minimum
12552         value of `size' from 10 to 11.
12553         (mono_reflection_bind_generic_parameters): Take `int type_argc'
12554         and `MonoType **types' arguments instead of the `MonoArray
12555         *types'; added `MonoType *nested_in'.  Recursively instantiate
12556         nested classes. 
12557
12558 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
12559
12560         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
12561         stack_overflow_ex members which are used by exception handling.
12562
12563         * appdomain.c (mono_runtime_init): Initialize the new members.
12564
12565         * gc.c (mono_gc_enable): New helper function.
12566         * gc.c (mono_gc_disable): New helper function.
12567
12568 2004-02-23  Martin Baulig  <martin@ximian.com>
12569
12570         * icall.c: I must have been really stupid - make it actually work
12571         this time ;-)
12572
12573 2004-02-23  Martin Baulig  <martin@ximian.com>
12574
12575         * loader.c (method_from_memberref): Only inflate the method if
12576         it's in another klass.
12577
12578 2004-02-23  Martin Baulig  <martin@ximian.com>
12579
12580         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
12581         (mono_class_init): If we're a generic instance and an interface,
12582         compute `class->interface_id'; also create `class->interfaces'
12583         here and inflate them.
12584
12585         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
12586         `ginst->is_open'.
12587         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
12588
12589         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
12590
12591 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
12592
12593         * reflection.c (method_encode_code): Improved the error message
12594         generated by the exception.
12595
12596 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12597
12598         * icall.c: Martin did not do what he said in the ChangeLog for
12599         2004-02-18, but put back the changes for properties and events.
12600         Commenting those changes out again and adding comment to bug #54518.
12601         
12602         * process.c: removed warning.
12603
12604 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
12605
12606         * marshal.c (emit_struct_conv): Print an error message instead of
12607         asserting when a type does not have the StructLayout attribute.
12608
12609 2004-02-20  Martin Baulig  <martin@ximian.com>
12610
12611         * reflection.c (mono_type_get_object): Also use the cache for
12612         generic instances.
12613         (mono_reflection_bind_generic_parameters): Always compute
12614         `ginst->ifaces'.        
12615
12616 2004-02-20  Martin Baulig  <martin@ximian.com>
12617
12618         * class.h (MonoGenericMethod): Removed `klass'.
12619
12620         * class.c (mono_class_inflate_generic_method): Added `MonoClass
12621         *klass' argument.
12622
12623 2004-02-20  Martin Baulig  <martin@ximian.com>
12624
12625         * reflection.c (method_encode_methodspec): Actually use the
12626         uninflated signature for the memberref.
12627
12628 2004-02-20  Martin Baulig  <martin@ximian.com>
12629
12630         * class.h (MonoGenericMethod): Removed `declaring'.
12631
12632         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
12633         is NULL, compute it here.
12634
12635 2004-02-20  Martin Baulig  <martin@ximian.com>
12636
12637         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
12638
12639         * metadata.c (mono_metadata_generic_inst_hash): New method.
12640         (mono_metadata_generic_inst_equal): New method.
12641
12642         * reflection.c (mono_reflection_bind_generic_parameters): Use the
12643         `klass->image->generic_inst_cache' cache to avoid creating
12644         duplicate MonoGenericInst's.
12645
12646         * class.c (mono_class_inflate_generic_type): Use the cache.
12647
12648 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
12649
12650         * object.c: fixed gc descriptor calculation for embedded valuetypes.
12651
12652 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12653
12654         * icall.c: added Socket.WSAIoctl icall.
12655
12656         * socket-io.[ch]: implemented
12657         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
12658
12659 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
12660
12661         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
12662
12663 2004-02-18  Urs C Muff  <umuff@quark.com>
12664
12665         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
12666         this work on PPC and other big-endian architectures.
12667
12668         * debug-mono-symfile.h: Prepended the names of all the `guint32'
12669         fields with an underscore to make sure they're only accessed by
12670         the read32() macro.
12671
12672 2004-02-18  Martin Baulig  <martin@ximian.com>
12673
12674         * icall.c: Put the klass->refclass changes back for methods and
12675         fields, but not for properties and events.  We're currently not
12676         distinguishing between DeclaringType and ReflectedType for
12677         properties and events, that's what caused the regressions.
12678
12679 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12680
12681         * object.c:
12682         (mono_async_result_new): the handle can be NULL.
12683
12684         * threadpool.c: Use an event instead of a semaphore, don't initialize
12685         it until needed. This saves quite a few semaphores from being created
12686         when using the threadpool.
12687
12688 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
12689
12690         * object.c (mono_string_is_interned_lookup): Fix interning of long
12691         strings. Fixes #54473.
12692
12693         * domain.c (ldstr_equal): Optimize if the two strings are equal.
12694
12695         * icall.c: Revert the klass->refclass changes since they introduce
12696         regressions (bug #54518).
12697
12698 2004-02-18  Martin Baulig  <martin@ximian.com>
12699
12700         * class.c (mono_class_init): If we're a generic instance and don't
12701         come from a TypeBuilder, inflate our members here.
12702         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
12703         (mono_class_create_generic): New public method.
12704         (mono_class_initialize_generic): Removed.
12705         (get_instantiation_name): Renamed to
12706         _mono_class_get_instantiation_name() and made it public.
12707
12708 2004-02-18  Martin Baulig  <martin@ximian.com>
12709
12710         * class.c (mono_class_inflate_generic_type): Clear the new
12711         instance's `nginst->klass' when inflating a generic instance.
12712         (mono_class_is_subclass_of): Added (basic) support for generic
12713         instances.
12714
12715 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
12716
12717         * appdomain.h, domain.c: use a MonoCodeManager instead of a
12718         MonoMempool to hold compiled native code.
12719
12720 2004-02-17  Martin Baulig  <martin@ximian.com>
12721
12722         * class.h (MonoDynamicGenericInst): Added `count_properties' and
12723         `properties'.
12724
12725         * reflection.c (mono_reflection_generic_inst_initialize): Added
12726         `MonoArray *properties' argument.
12727
12728         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
12729
12730 2004-02-17  Martin Baulig  <martin@ximian.com>
12731
12732         * icall.c (ves_icall_Type_GetFields): Renamed to
12733         ves_icall_Type_GetFields_internal() and added a
12734         `MonoReflectionType *rtype' argument; pass it to
12735         mono_field_get_object() to set the field's "reflected" type.
12736         (ves_icall_Type_GetConstructors): Likewise.
12737         (ves_icall_Type_GetEvents): Likewise.
12738         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
12739         argument; pass it to mono_method_get_object() to set the method's
12740         "reflected" type.       
12741
12742 2004-02-17  Martin Baulig  <martin@ximian.com>
12743
12744         * class.h (MonoDynamicGenericInst): New type.
12745         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
12746
12747         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
12748         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
12749         (ves_icall_MonoGenericInst_GetFields): New interncall.
12750
12751         * class.c (mono_class_from_generic): Don't call
12752         mono_class_initialize_generic() if this is a dynamic instance;
12753         ie. it's being created from a TypeBuilder.
12754         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
12755         `class->byval_arg.type'.
12756
12757         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
12758         to `inflate_method' and made static.
12759         (mono_reflection_inflate_field): Removed.
12760         (mono_reflection_generic_inst_initialize): New public method.
12761
12762         * reflection.h (MonoReflectionGenericInst): Removed `methods',
12763         `ctors' and `fields'; added `initialized'.
12764
12765 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
12766
12767         * debug-helpers.c (mono_method_full_name): Fix output for empty
12768         namespaces.
12769
12770 2004-02-12  Martin Baulig  <martin@ximian.com>
12771
12772         * class.h (MonoClassField): Added `MonoType *generic_type'.
12773
12774         * reflection.c (mono_image_get_fieldref_token): Added support for
12775         instantiated generic types.
12776         (field_encode_inflated_field): Removed.
12777         (mono_image_get_inflated_field_token): Removed.
12778         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
12779
12780         * reflection.h (MonoReflectionInflatedField): Removed.
12781
12782 2004-02-12  Martin Baulig  <martin@ximian.com>
12783
12784         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
12785         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
12786
12787         * reflection.c (mono_image_get_methodspec_token): Take a
12788         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
12789         (mono_image_create_token): Check whether we have a
12790         `method->signature->gen_method' and call
12791         mono_image_get_methodspec_token() if appropriate.
12792         (inflated_method_get_object): Removed.
12793         (mono_reflection_bind_generic_method_parameters): Return a
12794         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
12795         (mono_reflection_inflate_method_or_ctor): Likewise.
12796
12797         * reflection.h (MonoReflectionInflatedMethod): Removed.
12798
12799 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
12800
12801         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
12802         for custom valuetype marshalling.
12803
12804         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
12805
12806 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12807
12808         * icall.c: fixed WSAGetLastError_internal name.
12809
12810 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
12811
12812         * threads.c (mono_thread_attach): Allow this to be called multiple
12813         times for a thread.
12814         
12815         * threads.c (build_wait_tids): Do not wait for ourselves.
12816
12817         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
12818         appdomain list is empty.
12819
12820         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
12821         memory returned by mono_string_builder_to_utf16, since it points into
12822         managed memory. Thanks to Bernie Solomon for noticing this.
12823
12824         * icall.c: Add AppDomainSetup icalls.
12825
12826         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
12827
12828         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
12829         types.
12830
12831         * reflection.c (reflection_methodbuilder_to_mono_method): Save
12832         custom attributes to the method_aux struct. Also fix array indexes etc.
12833
12834         * loader.c (mono_method_get_param_names): Make dynamic case work again.
12835         
12836 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
12837
12838         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
12839         (both static and runtime) and reduce startup time.
12840
12841 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
12842
12843         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
12844         AsAny marshalling conversion instead of crashing.
12845
12846         * marshal.c: Fix warnings.
12847
12848 2004-02-09  Martin Baulig  <martin@ximian.com>
12849
12850         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
12851
12852         * reflection.h (MonoReflectionInflatedMethod): Removed the
12853         `declaring' field, it's now in the unmanaged MonoGenericMethod.
12854
12855         * reflection.c (method_encode_methodspec): Removed the `method'
12856         argument; we get it from `gmethod->declaring'.
12857         (inflated_method_get_object): Removed the `declaring' argument.
12858
12859 2004-02-09  Martin Baulig  <martin@ximian.com>
12860
12861         * class.h (MonoGenericMethod): New type.
12862         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
12863         `generic_method'.
12864
12865         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
12866         a `MonoGenericMethod *gen_method' one.
12867
12868         * class.c (mono_class_inflate_generic_type): Take an additional
12869         `MonoGenericMethod * argument.  This is only non-NULL if we're
12870         inflating types for a generic method.   
12871         (mono_class_inflate_generic_signature): Renamed to
12872         inflate_generic_signature() and made static; take a
12873         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12874         (inflate_generic_header): Take a `MonoGenericMethod *' argument
12875         instead of a `MonoGenericInst *' one.
12876         (mono_class_inflate_generic_method): Likewise.
12877
12878         * reflection.c (encode_generic_method_sig): Take a
12879         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12880         (method_encode_methodspec): Likewise.
12881         (inflated_method_get_object): Likewise. 
12882
12883         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
12884         field with a `MonoGenericMethod *gmethod' one.  
12885
12886 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
12887
12888         * class.h (mono_class_has_parent): add parens to expansion
12889         so you can ! this.
12890
12891 2004-02-08  Martin Baulig  <martin@ximian.com>
12892
12893         * image.h (MonoImage): Removed `generics_cache'.
12894
12895         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
12896         instead of a `MonoType *' argument; removed the `inflate_methods'
12897         argument.  Don't inflate methods here.
12898
12899         * loader.c (find_method): If it's a generic instance, call
12900         mono_class_init() on the `sclass->generic_inst->generic_type'.
12901
12902         * metadata.c (mono_type_size): Make this work on uninitialized
12903         generic instances; call it on the `ginst->generic_type's class.
12904
12905         * reflection.c (mono_reflection_bind_generic_parameters): Call
12906         mono_class_from_generic() to create the `ginst->klass'.
12907
12908 2004-02-08  Martin Baulig  <martin@ximian.com>
12909
12910         * class.h (MonoClass): Changed type of `generic_inst' from
12911         `MonoType *' to `MonoGenericInst *'.
12912
12913 2004-02-08  Martin Baulig  <martin@ximian.com>
12914
12915         * icall.c (ves_icall_Type_BindGenericParameters): Just call
12916         mono_type_get_object(), this is now creating a `MonoGenericInst'
12917         for MONO_TYPE_GENERICINST.
12918         (ves_icall_MonoGenericInst_GetParentType): Likewise.
12919         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
12920
12921         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
12922         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
12923         (inflated_method_get_object): Added `MonoClass *refclass' argument.
12924         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
12925         and reflected type.
12926
12927         * reflection.h (MonoReflectionInflatedMethod): Removed
12928         `declaring_type' and `reflected_type'.
12929
12930 2004-02-08  Martin Baulig  <martin@ximian.com>
12931
12932         * class.h (MonoGenericInst): Added `MonoType *parent' and
12933         `MonoType **ifaces'.
12934
12935         * reflection.h (MonoReflectionGenericInst): Removed `klass',
12936         `parent' and `interfaces'.
12937
12938         * reflection.c (mono_reflection_bind_generic_parameters): Take a
12939         `MonoType *' argument and return a `MonoType *'.
12940
12941         * icall.c
12942         (ves_icall_MonoGenericInst_GetParentType): New interncall.
12943         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
12944
12945 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
12946
12947         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
12948         valuetype marshalling.
12949
12950 2004-02-06  Martin Baulig  <martin@ximian.com>
12951
12952         * class.c
12953         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
12954         (my_mono_class_from_generic_parameter): Likewise.
12955
12956 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
12957
12958         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
12959         contents of the symbol files lazily.
12960
12961         * object.h (MonoThread): Add 'name' and 'name_len' fields.
12962
12963         * threads.h threads.c icall.c: New icalls for getting and setting the
12964         threads name.
12965
12966 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
12967
12968         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
12969         Raise an exception when the domain is not found.
12970
12971 2004-02-03  Martin Baulig  <martin@ximian.com>
12972
12973         * reflection.c (mono_image_get_methodspec_token): Use the
12974         uninflated signature; fixes gen-33.
12975
12976 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12977
12978         * gc.c threads.c: Make the finalizer thread a normal managed thread so
12979         the finalizer code can use thread functionality.
12980
12981         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
12982         the finalizer thread.
12983
12984         * threads.c: Make some functions more robust.
12985
12986         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
12987
12988         * metadata.h: Add new marshalling conventions.
12989
12990         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
12991         stringbuilder marshalling. Fixes #53700.
12992
12993         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
12994
12995         * reflection.c (mono_image_get_type_info): Save declarative security
12996         info.
12997
12998         * reflection.c (mono_image_get_field_info): Handle uninitialized 
12999         unmanaged fields as well.
13000
13001         * appdomain.c: Bump corlib version.
13002
13003 2004-02-01  Martin Baulig  <martin@ximian.com>
13004
13005         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
13006         method type arguments.  
13007
13008 2004-01-30  Duncan Mak  <duncan@ximian.com>
13009
13010         * marshal.h: Add prototype for
13011         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
13012         and
13013         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
13014         fix the build.
13015
13016 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
13017
13018         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
13019         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
13020
13021 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
13022
13023         * marshal.c (mono_marshal_get_native_wrapper): Add support for
13024         custom marshalling of valuetypes.
13025
13026         * marshal.c: Fix some warnings.
13027
13028 2004-01-29  Martin Baulig  <martin@ximian.com>
13029
13030         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
13031         for generic method parameters.
13032
13033         * reflection.c (method_encode_methodspec): Write the uninflated
13034         signature into the methodspec table.
13035         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
13036         is always the uninflated method.
13037         (reflection_methodbuilder_to_mono_method): Copy the generic
13038         parameters from the MethodBuilder into `header->gen_params'.
13039
13040 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
13041
13042         * class.c (mono_class_from_generic_parameter): Fix warning.
13043
13044 2004-01-27  Martin Baulig  <martin@ximian.com>
13045
13046         * class.c (mono_class_from_generic_parameter): Don't create
13047         `klass->methods' here.  
13048
13049 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
13050
13051         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
13052         extension since it does not work with libraries named lib<FOO>.dll.so.
13053
13054 2004-01-25  Martin Baulig  <martin@ximian.com>
13055
13056         * class.c (mono_class_inflate_generic_type): Added support for
13057         MONO_TYPE_GENERICINST.
13058
13059         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
13060         inflate methods on open constructed types.      
13061
13062 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13063
13064         * object.c: fire ProcessExit event in the root AppDomain after running
13065         Main. Fixes bug #53299.
13066
13067 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13068
13069         * socket-io.c: include the new socket-wrappers.h header.
13070         Use the wrappers instead of the unix socket functions to make the code
13071         more clear.
13072
13073 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13074
13075         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
13076
13077         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13078         Fixes #22532.
13079
13080 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
13081
13082         * reflection.c (mono_image_create_pefile): Handle the case when the
13083         entry point is not a MethodBuilder.
13084
13085         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13086         field to ReflectionMethod since it is not allways a builder.
13087
13088         * reflection.c (type_get_fully_qualified_name): New helper function to
13089         return the fully qualified name of a type.
13090
13091         * reflection.c (encode_marshal_blob): Always emit the fully qualified
13092         type name for custom marshallers.
13093
13094         * reflection.c (mono_marshal_spec_from_builder): Ditto.
13095
13096         * class.c (mono_class_setup_vtable): If a parent class already 
13097         implements an interface, use the implementing methods from that class.
13098         Fixes #53148.
13099
13100 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13101
13102         * threadpool.c: just return instead of ExitThread to allow for thread
13103         clean up earlier.
13104
13105 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
13106
13107         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
13108         when closing resource modules.
13109
13110         * reflection.c (mono_image_create_pefile): Handle the case when the
13111         entry point is not a MethodBuilder.
13112
13113         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13114         field to ReflectionMethod since it is not allways a builder.
13115
13116 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
13117
13118         * marshal.c (mono_marshal_get_managed_wrapper): 
13119         mono_marshal_alloc takes native int so CONV_I
13120         the arg for 64bits.
13121
13122 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
13123
13124         * reflection.c (fixup_cattrs): New function to fixup the methoddef
13125         tokens in the cattr table. Fixes #53108.
13126
13127 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13128
13129         * loader.c: don't trim ".dll" before looking up in the config file.
13130         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
13131
13132 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13133
13134         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
13135         Return the module which contains the resource as well.
13136         (ves_icall_System_Reflection_Module_Close): New icall.
13137
13138         * appdomain.c: Bump corlib version number.
13139
13140         * image.c (mono_image_addref): New public function.
13141
13142         * assembly.c: Call mono_image_addref.
13143
13144         * reflection.c (mono_module_get_object): Increase reference count of 
13145         the image.
13146
13147         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13148         Fixes #22532.
13149
13150         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
13151         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
13152         proper exceptions on DllImport problems.
13153
13154 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
13155
13156         * class.c, metadata.c: eliminate CSIZE macro.
13157
13158 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
13159
13160         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
13161         * object.h: Added async_callback field in MonoAsyncResult.
13162         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
13163         * verify.c: Added async_callback in MonoAsyncResult layout.
13164
13165 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
13166
13167         * reflection.c (mono_reflection_get_custom_attrs): Add support
13168         for Modules.
13169
13170 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13171
13172         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
13173         marshalling.
13174         (mono_marshal_method_from_wrapper): Add null pointer check.
13175
13176 2004-01-16  Martin Baulig  <martin@ximian.com>
13177
13178         * debug-mono-symfile.h: Set version number to 36 and reflect
13179         latest symbol writer changes.
13180
13181 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13182
13183         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
13184         multi-dimensional arrays.
13185         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
13186         (mono_class_from_mono_type): Use bounded_array_class_get.
13187         
13188         * class.c (mono_bounded_array_class_get): New function which takes
13189         a 'bounded' bool argument to distinguish vectors from one dimensional
13190         arrays.
13191
13192         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
13193         bounded_array_class_get if the array has bounds.
13194
13195         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
13196         Search modules loaded using AssemblyBuilder:AddModule as well.
13197
13198 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13199
13200         * appdomain.c: increased corlib version.
13201         * filewatcher.c: removed g_print.
13202         * icall.c:
13203         (get_property_info): only allocate what is actually requested.
13204         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
13205
13206 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13207
13208         * Makefile.am: added filewatcher.[ch]
13209         * filewatcher.[ch]: FileSystemWatcher runtime support.
13210         * icall.c: added new FSW icalls.
13211
13212 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13213
13214         * string-icalls.c: fix stringbuilder regression as suggested by
13215         Iain McCoy <iain@mccoy.id.au>.
13216
13217 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13218
13219         * process.c (process_read_stringtable_block): Recognize '007f' as
13220         a language neutral stringtable block.
13221
13222 2004-01-12  Patrik Torstensson
13223
13224         * object.h (MonoStringBuilder) : Changed layout to support our
13225         new stringbuilder class.
13226         * marshal.c: Change marshalling to support the new layout of 
13227         string builder.
13228         * appdomain.c: increased version number because new layout of
13229         string builder.
13230
13231 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
13232
13233         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
13234         assembly name as an string instead of an AssemblyName, since it is
13235         easier to extract info from it.
13236
13237         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
13238         the culture subdirectories too. Fixes #52231.
13239
13240 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13241
13242         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
13243         It takes 2 new parameters with an optional name for the method to look
13244         for and case ignoring info.
13245
13246         * threadpool.c: removed unused variable.
13247
13248 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13249
13250         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
13251         It takes 2 new parameters with an optional name for the property to look
13252         for and case ignoring info.
13253         Fixes bug #52753.
13254
13255 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13256
13257         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
13258         Fix #52451.
13259
13260 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13261
13262         * appdomain.c:
13263         * assembly.c: escape the uri before passing it to g_filename_from_uri.
13264         Fixes bug #52630.
13265
13266 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
13267
13268         * reflection.c: Add support for more than one unmanaged resource.
13269
13270         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
13271         in field->def_value, as done in all other cases.
13272
13273         * reflection.c (mono_reflection_get_custom_attrs): Add support for
13274         TypeBuilders.
13275
13276         * reflection.c (mono_reflection_create_runtime_class): Remove 
13277         errorneous assignment to klass->element_class, since it is already
13278         done in mono_reflection_setup_internal_class.
13279
13280 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13281
13282         * gc.c: added missing LeaveCriticalSection.
13283         * icall.c: indented a couple of lines.
13284         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
13285         if we call EndInvoke inside a callback. Fixes bug #52601.
13286
13287 2004-01-07  Martin Baulig  <martin@ximian.com>
13288
13289         * mono-debug-debugger.h
13290         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
13291
13292 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
13293
13294         * appdomain.c: Use messages in NotImplementedException.
13295
13296         * exception.c (mono_get_exception_not_implemented): Now this takes
13297         a message argument.
13298
13299         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
13300         exception instead of g_asserting an aborting when something is not
13301         implemented.
13302
13303         Add some inline docs.
13304
13305 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
13306
13307         * reflection.h: Update after changes to object layout.
13308
13309         * reflection.c: Implement saving of unmanaged aka win32 resources.
13310
13311         * appdomain.c: Bump version number.
13312
13313         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
13314         Handle missing domains gracefully.
13315
13316 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
13317
13318         * file-io.c : On Windows, there are much more invalid_path_chars.
13319
13320 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13321
13322         * class.h, object.c: prepare for GetType () speedup.
13323
13324 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
13325
13326         * profiler.c: workaround for --profile null reference exception on
13327           cygwin. Patch by Patrik Torstensson.
13328
13329 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
13330
13331         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
13332         make work for unaligned access.
13333
13334 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
13335
13336         * class.c: small cleanup (class->fields [i] -> field).
13337         * image.c: check address of metadata is valid.
13338
13339 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
13340
13341         * assembly.h assembly.c (mono_assembly_loaded): New public function to
13342         search the list of loaded assemblies.
13343
13344         * reflection.c (mono_reflection_type_from_name): Use 
13345         mono_assembly_loaded instead of mono_image_loaded.
13346
13347         * reflection.c: Fix warnings.
13348
13349 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
13350
13351         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
13352         is dynamic. This is needed since an assembly can contain both dynamic and
13353         non-dynamic images.
13354
13355         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
13356         assembly->dynamic.
13357
13358         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
13359
13360         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
13361         to store modules loaded using AddModule.
13362
13363         * reflection.c (mono_image_fill_file_table): Generalize this so it works
13364         on Modules.
13365
13366         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
13367
13368         * reflection.c (mono_image_fill_export_table_from_module): New function to
13369         fill out the EXPORTEDTYPES table from a module.
13370
13371         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
13372         into a separate function. Also handle loaded non-dynamic modules.
13373
13374         * reflection.c (mono_image_basic_init): Fix memory allocation.
13375
13376         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13377
13378         * assembly.c (mono_assembly_load_references): Make this public.
13379
13380 2003-12-19  Martin Baulig  <martin@ximian.com>
13381
13382         * class.c (mono_class_initialize_generic): Made this static, take
13383         a `MonoGenericInst *' instead of a `MonoClass *'.
13384         (mono_class_from_generic): Call mono_class_initialize_generic()
13385         unless we're already initialized or being called from
13386         do_mono_metadata_parse_generic_inst().
13387
13388         * class.h (MonoGenericInst): Added `initialized' and
13389         `init_pending' flags.
13390
13391         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
13392         `mono_class_init (gklass)' or mono_class_initialize_generic()
13393         here; set `generic_inst->init_pending' while parsing the
13394         `type_argv'.
13395
13396 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
13397
13398         * locales.c: include string.h for memxxx prototypes
13399
13400 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13401
13402         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
13403         constructor when accessing literal fields.
13404
13405 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
13406
13407         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13408
13409         * reflection.c (assembly_add_resource_manifest): New function to fill
13410         the MANIFESTRESOURCE table.
13411
13412         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
13413
13414         * reflection.h: Update to changes in class layout.
13415
13416         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
13417         Reenable call to mono_runtime_is_shutting_down ().
13418
13419         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
13420         determine if the runtime is shutting down.
13421
13422 2003-12-16  Jackson Harper <jackson@ximian.com>
13423
13424         * icall.c: comment out call to mono_runtime_is_shutting_down to
13425         fix build.
13426         
13427 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
13428
13429         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
13430         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
13431
13432 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
13433
13434         * reflection.c: move definition of swap_with_size
13435         to before its first call
13436
13437 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
13438
13439         * appdomain.c (mono_runtime_is_shutting_down): New public function.
13440
13441         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
13442         icall.
13443
13444         * object.c: Fix warnings.
13445
13446         * icall.c (ves_icall_Type_Get...): Only consider inherited static
13447         members if FlattenHierarchy is set.
13448
13449         * reflection.c (mono_image_add_decl_security): New function to emit
13450         declarative security.
13451
13452         * reflection.h reflection.c: Add support for declarative security.
13453
13454         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13455         
13456 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13457
13458         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13459         
13460         * appdomain.c verify.c: Moved corlib version checking into its own
13461         function in appdomain.c since it needs to create vtables etc.
13462
13463 2003-12-13  Patrik Torstensson <p@rxc.se>
13464
13465         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
13466         instead of unwrapped server.
13467
13468 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
13469
13470         * verify.c (check_corlib): Fix field index.
13471
13472 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
13473
13474         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
13475         GetGacPath icall.
13476
13477 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
13478
13479         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
13480         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
13481         cope with sizeof(size_t) != sizeof(guint32).
13482
13483 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13484
13485         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
13486         in case of failure.
13487
13488 2003-12-10  Mark Crichton <crichton@gimp.org>
13489
13490         * icall.c: removed the GetNonZeroBytes.  We now handle this case
13491         in managed code.
13492
13493         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
13494
13495 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
13496
13497         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
13498         marked as deleted.
13499
13500 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13501
13502         * verify.c (check_corlib): Handle the case when the version field is 
13503         initialized by a static constructor.
13504
13505 2003-12-08  Patrik Torstensson  <p@rxc.se>
13506
13507     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
13508
13509 2003-12-08  Martin Baulig  <martin@ximian.com>
13510
13511         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
13512         a MonoReflectionGenericParameter, also take the parameter index
13513         and name as arguments.
13514         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
13515         (ves_icall_MonoGenericParam_initialize): New interncall.
13516         (ves_icall_Type_make_byref_type): New interncall.
13517
13518         * reflection.h (MonoReflectionGenericParam): Derive from
13519         MonoReflectionType, not just from MonoObject.  Added `refobj' and
13520         `index' fields.
13521
13522         * reflection.c (mono_reflection_define_generic_parameter): Create
13523         and return a new MonoReflectionGenericParam; don't initialize the
13524         constraints here.
13525         (mono_reflection_initialize_generic_parameter): New public method;
13526         initializes the constraints and creates the `param->pklass'.
13527
13528 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13529
13530         * reflection.h reflection.c: Use the new fields 'num_types', 
13531         'num_fields' and 'num_methods' to track the number of types etc.
13532
13533         * verify.c (check_corlib): Check corlib version number.
13534
13535 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
13536
13537         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
13538         function works on all methods.
13539
13540 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13541
13542         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
13543         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
13544         the custom_type_info flag of the transparent proxy.
13545         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
13546         objects that supports IRemotingTypeInfo.
13547         * object.h: Added custom_type_info field in transparent proxy.
13548
13549 2003-12-06  Martin Baulig  <martin@ximian.com>
13550
13551         * class.c (mono_class_create_from_generic): Removed.
13552         (mono_class_from_generic): Check `ginst->klass' before doing
13553         anything else.  This is important to fully support "recursive"
13554         generic types.
13555
13556         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
13557         empty `generic_inst->klass' before doing anything else.
13558
13559 2003-12-06  Dick Porter  <dick@ximian.com>
13560
13561         * verify.c: 
13562         * object.h:
13563         * icall.c:
13564         * locales.c: Use C structs to access class fields.  Don't do a
13565         conversion between MonoString and UChar because both are
13566         platform-endian UTF-16.  Compare now takes startindex and count
13567         parameters.  Add a char overload for IndexOf.  Speed up the
13568         invariant string IndexOf.
13569
13570 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
13571
13572         * Makefile.am (monosn_LDADD): Fix parallel build.
13573
13574 2003-12-04  Martin Baulig  <martin@ximian.com>
13575
13576         * icall.c
13577         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13578         (ves_icall_Type_make_array_type): New interncall.       
13579
13580 2003-12-04  Martin Baulig  <martin@ximian.com>
13581
13582         * locales.c: also change it in the !HAVE_ICU case.
13583
13584 2003-12-04  Dick Porter  <dick@ximian.com>
13585
13586         * icall.c:
13587         * locales.c: construct_compareinfo is now in CompareInfo, not
13588         CultureInfo.
13589
13590 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * image.c (mono_image_load_file_for_image): Cache loaded images in the
13593         image->files array.
13594
13595         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
13596         table as well.
13597
13598         * assembly.c (mono_assembly_load_references): Only load references
13599         once.
13600
13601         * class.c (mono_class_from_name): Avoid linear search of the 
13602         EXPORTEDTYPE table.
13603
13604         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
13605
13606 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13607
13608         * image.h (MonoImage): Add 'field_cache' field.
13609
13610         * loader.c (mono_field_from_token): Cache field lookups.
13611         
13612         * reflection.c (mono_module_get_object): Fix name property.
13613
13614         * icall.c (ves_icall_get_enum_info): Update after changes to 
13615         mono_metadata_get_constant_index ().
13616
13617         * icall.c: Get rid of get_type_info icall, use a separate icall for
13618         each type property to avoid needless memory allocations. Fixes #51514.
13619
13620         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
13621         to avoid needless binary searches.
13622
13623         * class.c (class_compute_field_layout): Move the initialization of
13624         field->def_value to mono_class_vtable ().
13625
13626         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
13627         non-corlib types.
13628
13629         * object.c (mono_object_allocate): Make it inline.
13630
13631         * object.c (mono_object_allocate_spec): Make it inline.
13632         
13633 2003-12-02  Dick Porter  <dick@ximian.com>
13634
13635         * locales.c (create_NumberFormat): NumberFormatInfo construction.
13636         Patch by Mohammad DAMT (mdamt@cdl2000.com).
13637
13638 2003-12-01  Dick Porter  <dick@ximian.com>
13639
13640         * threads.c: Fix signature and call in CreateMutex and
13641         CreateEvent.
13642
13643 2003-12-01  Dick Porter  <dick@ximian.com>
13644
13645         * icall.c: 
13646         * locales.c: Implement string compares and searching
13647
13648         * object.h: Add extra Thread field
13649
13650 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
13651
13652         * reflection.c (fixup_method): Add support for MonoCMethod.
13653
13654 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
13655
13656         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
13657
13658         * reflection.c (assembly_name_to_aname): Allow extra characters in
13659         assembly names. Fixes #51468.
13660
13661 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
13662
13663         * exception.c (mono_exception_from_name_domain): New helper function.
13664
13665         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
13666         exception object in the correct domain.
13667
13668         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
13669         formatting + make a copy a the input data.
13670
13671         * loader.c (mono_get_method_from_token): Methods which contain
13672         native code do not have entries in the ImplMap.
13673
13674         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
13675         Thanks to Gonzalo for spotting this.
13676         
13677         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
13678         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
13679
13680         * assembly.h (mono_assembly_load_from): Split the second part of 
13681         assembly loading into a new public function.
13682
13683         * exception.h (mono_get_exception_bad_image_format): New function.
13684
13685 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
13686
13687         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
13688         Enumerate all modules inside a dynamic assembly. Fixes #51293.
13689         
13690         * icall.c: Add new icall for creating dynamic methods.
13691
13692         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
13693
13694         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
13695
13696         * reflection.c (mono_reflection_create_dynamic_method): New icall to
13697         create a dynamic method.
13698
13699         * reflection.c (resolve_object): New helper function.
13700
13701         * reflection.c: Generalize ReflectionMethodBuilder and the functions
13702         which manipulate it so they can also work on dynamic methods.
13703
13704         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
13705         creating the MonoReflectionMethodAux structure if it is not needed.
13706         
13707         * reflection.h verify.c: Update after changes to object layout.
13708
13709         * reflection.c (method_builder_encode_signature): Fix compilation on
13710         gcc 2.95.x.
13711
13712 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
13713
13714         * appdomain.h: Added support for context static fields. Added static_data
13715           field to MonoAppContext and renamed thread_static_fields to a more
13716           generic special_static_fields in MonoAppDomain, since it can now contain
13717           context static fields.
13718         * domain.c: Updated hashtable name.
13719         * object.c: Replaced field_is_thread_static() for a more generic
13720           field_is_special_static() which also checks for context static attribute.
13721           In mono_class_vtable(), added support for static context fields.
13722         * threads.c: Changed methods that manage thread static fields to more
13723           generic methods so they can be reused both for thread and context static
13724           data.
13725         * threads.h: Declared some new methods.
13726
13727 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
13728
13729         * reflection.h: Update after changes to the managed types.
13730
13731         * reflection.c (encode_custom_modifiers): New helper function.
13732
13733         * reflection.c (method_encode_signature): Emit custom modifiers.
13734
13735         * reflection.c (field_encode_signature): Emit custom modifiers.
13736
13737 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13738
13739         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
13740
13741         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
13742         implementation.
13743
13744         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
13745         icall.
13746
13747         * object.c (mono_field_get_value_object): New function.
13748
13749         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
13750         specific.
13751
13752 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
13753
13754         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
13755         return a preallocated out-of-memory exception instance.
13756
13757         * object.c (out_of_memory): Use the new function.
13758
13759         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
13760         flag is before the custom modifiers. Fixes #49802.
13761
13762 2003-11-16  Martin Baulig  <martin@ximian.com>
13763
13764         * class.c (mono_class_is_open_constructed_type): Implemented the
13765         MONO_TYPE_GENERICINST case.
13766
13767 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
13768
13769         * assembly.c (mono_assembly_fill_assembly_name): New function to
13770         fill out the MonoAssemblyName structure.
13771         (mono_assembly_open): Use the new function.
13772
13773         * icall.c (fill_reflection_assembly_name): New helper function.
13774
13775         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
13776         new function.
13777
13778         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
13779
13780 2003-11-15  Martin Baulig  <martin@ximian.com>
13781
13782         * class.c (mono_class_is_open_constructed_type): New public
13783         function; checks whether a type is an open constructed type,
13784         ie. whether it still contains type parameters.
13785         (mono_class_inflate_generic_type): If we're a type parameter and
13786         the inflated type is also a MONO_TYPE_(M)VAR, return the original
13787         type.
13788
13789         * class.h (MonoGenericInst): Added `guint32 is_open'.
13790
13791         * loader.c (method_from_methodspec): Check whether we're an open
13792         or closed constructed type and set `ginst->is_open'.
13793
13794         * reflection.c (mono_reflection_bind_generic_parameters): Check
13795         whether we're an open or closed constructed type and set
13796         `ginst->is_open'.
13797         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
13798         from open constructed types.
13799
13800 2003-11-15  Martin Baulig  <martin@ximian.com>
13801
13802         * reflection.c (mono_reflection_bind_generic_parameters): If we're
13803         a generic instance (instead of a generic type declaration) with
13804         unbound generic parameters, bind them to our actual types.
13805
13806 2003-11-14  Martin Baulig  <martin@ximian.com>
13807
13808         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
13809
13810         * reflection.c (mono_reflection_bind_generic_parameters): If we're
13811         an interface type, populate `res->interfaces' with instantiated
13812         versions of all the interfaces we inherit.
13813
13814 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
13815
13816         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
13817         when MONO_PATH is set but doesn't contain the install dir.
13818
13819 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13820
13821         * icall.c:
13822         (ves_icall_Type_GetInterfaces): don't return an interface twice when
13823         it's also implemented in base classes. Fixes bug #50927.
13824
13825 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
13826
13827         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
13828         if this method is called from a finalizer. Fixes #50913.
13829
13830 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
13831
13832         * threads.c: Implement VolatileRead/VolatileWrite
13833
13834         * icall.c: Add new icalls for VolatileRead/VolatileWrite
13835
13836 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13837
13838         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
13839         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
13840         2.95.3.
13841
13842         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
13843         from Peter Ross (pro@missioncriticalit.com).
13844         
13845 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
13846
13847         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
13848
13849 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13850
13851         * assembly.c (mono_assembly_load_references): Disable check because it
13852         triggers on older corlibs which lots of people have.
13853
13854 2003-11-12  Jackson Harper  <jackson@ximian.com>
13855
13856         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
13857         load corlib.dll if mscorlib.dll is not found.
13858         * assembly.h: Remove corlib name define.
13859         * class.c:
13860         * domain.c:
13861         * image.c: Change corlib name to mscorlib.
13862         
13863 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13864
13865         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
13866
13867 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
13868
13869         * appdomain.h: Added loader_optimization here to sync with the C#
13870         code, and add disallow_binding_redirects field.
13871
13872 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
13873
13874         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
13875
13876         * reflection.c (mono_image_build_metadata): Fix crash on modules
13877         with no types.
13878
13879         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
13880
13881         * icall.c (ves_icall_get_method_info): Return callingConvention as
13882         well.
13883
13884         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
13885         namespaces from the EXPORTEDTYPE table as well.
13886
13887         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
13888         from all modules inside the assembly.
13889         
13890 2003-11-11  Martin Baulig  <martin@ximian.com>
13891
13892         * reflection.c (mono_reflection_bind_generic_parameters): Make
13893         this work for interfaces.
13894
13895 2003-11-11  Martin Baulig  <martin@ximian.com>
13896
13897         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
13898
13899 2003-11-11  Martin Baulig  <martin@ximian.com>
13900
13901         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
13902         "MonoInflatedMethod" and "MonoInflatedCtor".
13903
13904 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
13905
13906         * reflection.c (resolution_scope_from_image): Use the assembly table
13907         from the manifest module, since other modules don't have it.
13908
13909         * debug-helpers.c (mono_type_full_name): New helper function.
13910
13911         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
13912
13913         * image.c (mono_image_load_file_for_image): New public function which
13914         is a replacement for the load_file_for_image in class.c.
13915
13916         * assembly.c (mono_assembly_load_module): A wrapper for the function
13917         above which does assembly association and reference loading too.
13918
13919         * class.c (mono_class_from_name): Call mono_assembly_load_module.
13920
13921 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13922
13923         * appdomain.c: not all of the attributes for the full assembly name
13924         are required and the order doesn't matter. Fixes bug #50787.
13925
13926 2003-11-10  Dick Porter  <dick@ximian.com>
13927
13928         * locales.c: Use platform-endian UTF16
13929
13930 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
13931
13932         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13933         
13934 2003-11-10  Martin Baulig  <martin@ximian.com>
13935
13936         * metadata.c
13937         (mono_metadata_load_generic_params): Make this actually work.
13938
13939         * reflection.c (mono_reflection_bind_generic_parameters): If our
13940         parent is a generic instance, pass all the `types' to it, no
13941         matter whether it has the same number of type parameters or not.
13942
13943 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
13944
13945         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13946
13947         * assembly.c (mono_assembly_load_references): Move the image<->assembly
13948         assignment code to this function so it gets called recursively for all
13949         modules.
13950
13951         * image.c (load_modules): Remove the assembly assignment since it is
13952         now done by mono_assembly_load_references.
13953         
13954         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
13955         Add 'module' argument.
13956         (mono_module_get_types): New helper function.
13957         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
13958
13959 2003-11-08  Martin Baulig  <martin@ximian.com>
13960
13961         * class.c (mono_class_inflate_generic_method): Interface method
13962         don't have a header.
13963
13964         * reflection.c (mono_image_get_methodspec_token): Take an
13965         additional `MonoGenericInst *' argument instead of reading it from
13966         the header; this is necessary to support interfaces.
13967         (mono_image_create_token): Pass the `MonoGenericInst *' from the
13968         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
13969         (inflated_method_get_object): Take an additional `MonoGenericInst *'
13970         argument.
13971
13972         * reflection.h (MonoReflectionInflatedMethod): Added
13973         `MonoGenericInst *ginst'.
13974
13975 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
13976
13977         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
13978
13979 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
13980
13981         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
13982
13983 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13984
13985         * reflection.c 
13986         (reflection_methodbuilder_from_method_builder):
13987         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
13988         initialize a ReflectionMethodBuilder structure.
13989         (mono_image_get_methodbuilder_token):
13990         (mono_image_get_ctorbuilder_token): New functions to emit memberref
13991         tokens which point to types in another module inside the same assembly.
13992
13993         * reflection.c: Use the new helper functions.
13994         
13995         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
13996
13997         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
13998         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
13999
14000         * reflection.c (resolution_scope_from_image): Emit a moduleref if
14001         neccesary.
14002
14003         * reflection.c (mono_image_build_metadata): Emit metadata only for the
14004         current module. Emit the manifest only for the main module.
14005
14006         * reflection.c (mono_image_create_token): Add assertion when a 
14007         memberref needs to be created.
14008
14009         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
14010
14011         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
14012         larger buffer for the custom attribute blob. Fixes #50637.
14013         
14014 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14015
14016         * threadpool.c: notify listener on async processing handles after
14017         invoking the async callback. Thanks to Zoltan.
14018
14019 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
14020
14021         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
14022         avoid code duplication.
14023
14024         * reflection.h (MonoDynamicImage): New type which is currently unused,
14025         but will be used through the ref.emit code in place of 
14026         MonoDynamicAssembly.
14027
14028         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14029         object layout.
14030
14031         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
14032         a MonoDynamicImage instead of just a MonoImage.
14033         
14034         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
14035         icalls to ModuleBuilder but keep their semantics, so they will work
14036         with moduleb->assemblyb. This will change later.
14037         
14038 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
14039
14040         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14041         object layout.
14042
14043         * reflection.c (mono_image_build_metadata): Avoid creation of a default
14044         main module, since it is now done by the managed code.
14045
14046 2003-11-03  Martin Baulig  <martin@ximian.com>
14047
14048         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
14049         `ginst->klass' here.
14050         (method_encode_methodspec): Don't use the `ginst->generic_method's
14051         klass if it's a generic instance, use `ginst->klass' in this case.
14052
14053 2003-11-03  Martin Baulig  <martin@ximian.com>
14054
14055         * reflection.c (mono_image_get_generic_method_param_info):
14056         Removed, use mono_image_get_generic_param_info() instead.
14057         (mono_image_get_type_info): Write the GenericParam table before
14058         the Method table.  This is neccessary because in the GenericParam
14059         table, type parameters of the class (ie. '!0' etc.) must come
14060         before the ones from its generic methods (ie. '!!0' etc).
14061
14062 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
14063
14064         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
14065
14066 2003-11-02  Martin Baulig  <martin@ximian.com>
14067
14068         * reflection.c (create_generic_typespec): Take a
14069         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
14070         the generic parameters from it.
14071
14072 2003-11-02  Martin Baulig  <martin@ximian.com>
14073
14074         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
14075         instead of a `MonoClassField *' since we just need the type.
14076         (create_generic_typespec): New static function.  Creates a
14077         TypeSpec token for a generic type declaration.
14078         (mono_image_get_generic_field_token): New static function.
14079         (mono_image_create_token): If we're a FieldBuilder in a generic
14080         type declaration, call mono_image_get_generic_field_token() to get
14081         the token.
14082
14083 2003-11-02  Martin Baulig  <martin@ximian.com>
14084
14085         * reflection.h
14086         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
14087         `MonoReflectionGenericInst *declaring_type' and
14088         `MonoReflectionGenericInst *reflected_type' fields.
14089
14090         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
14091         `MonoReflectionGenericInst *declaring_type' and a
14092         `MonoReflectionGenericInst *reflected_type' argument instead of a
14093         single `MonoReflectionGenericInst *type' one.  Set
14094         `res->declaring_type' and `res->reflected_type' from them.
14095         (mono_reflection_inflate_field): Likewise.      
14096
14097 2003-11-02  Martin Baulig  <martin@ximian.com>
14098
14099         * class.c (mono_class_setup_vtable): Don't store generic methods
14100         in the vtable.  
14101
14102 2003-11-02  Martin Baulig  <martin@ximian.com>
14103
14104         * reflection.h (MonoReflectionGenericInst): Added
14105         `MonoReflectionType *declaring_type'.
14106
14107         * reflection.c (mono_reflection_bind_generic_parameters): Use
14108         `if (tb->parent)' instead of `klass->parent'.
14109
14110 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
14111
14112         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
14113         with an empty ASSEMBLY table.
14114
14115         * reflection.c (mono_image_build_metadata): Avoid using the same loop
14116         variable in the inner and outer loops.
14117
14118 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14119
14120         * metadata.h (mono_metadata_make_token): Put parentheses around macro
14121         argument.
14122
14123         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
14124         
14125         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
14126         icalls. Instead, do everything in managed code. This is needed since
14127         it is hard to restore the original domain etc. in unmanaged code in the
14128         presence of undeniable exceptions.
14129
14130         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
14131         New icalls to push and pop appdomain refs.
14132
14133 2003-10-31  Martin Baulig  <martin@ximian.com>
14134
14135         * class.c (inflate_generic_type): Renamed to
14136         mono_class_inflate_generic_type() and made it public.
14137
14138         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
14139         New interncall.
14140
14141         * loader.c (mono_field_from_memberref): Also set the retklass for
14142         typespecs.
14143
14144         * fielder.c (mono_image_get_inflated_field_token): New static
14145         method; creates a metadata token for an inflated field.
14146         (mono_image_create_token, fixup_method): Added support for
14147         "MonoInflatedField".
14148         (fieldbuilder_to_mono_class_field): New static function.
14149         (mono_reflection_inflate_field): New public function.
14150
14151         * reflection.h
14152         (MonoReflectionGenericInst): Added `MonoArray *fields'.
14153         (MonoReflectionInflatedField): New typedef.     
14154
14155 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
14156
14157         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
14158         for Solaris and other platforms without s6_addr16
14159
14160 2003-10-30  Martin Baulig  <martin@ximian.com>
14161
14162         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
14163         argument instead of two.
14164         (mono_class_inflate_generic_signature): Likewise.
14165         (inflate_generic_header): Likewise.
14166         (mono_class_inflate_generic_method): Likewise.  In addition, if
14167         `ginst->klass' is set, it becomes the new `method->klass'.
14168
14169         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
14170         field.
14171
14172         * reflection.c (encode_generic_method_sig): Write a 0xa as the
14173         first byte. [FIXME]
14174         (method_encode_methodspec): If we have generic parameters, create
14175         a MethodSpec instead of a MethodRef.
14176         (fixup_method): Added support for "MonoInflatedMethod" and
14177         "MonoInflatedCtor".
14178         (mono_image_create_token): Added support for "MonoInflatedMethod"
14179         and "MonoInflatedCtor".
14180         (inflated_method_get_object): New static function; returns a
14181         managed "System.Reflection.MonoInflatedMethod" object.
14182         (mono_reflection_bind_generic_method_parameters): Return a
14183         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
14184         (mono_reflection_inflate_method_or_ctor): Likewise.
14185         (mono_image_get_generic_method_param_info): Initialize unused
14186         fields to zero.
14187         (mono_image_get_generic_param_info): Likewise.
14188
14189         * reflection.h (MonoReflectionInflatedMethod): New public
14190         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
14191         "S.R.MonoInflatedCtor" classes.
14192
14193         * loader.c (method_from_memberref): If we're a TypeSpec and it
14194         resolves to a generic instance, inflate the method.
14195
14196 2003-10-28  Dick Porter  <dick@ximian.com>
14197
14198         * object.c (mono_runtime_run_main): Convert command-line arguments
14199         into utf8, falling back to the user's locale encoding to do so.
14200
14201 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14202
14203         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
14204         at this time.
14205
14206         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
14207
14208         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
14209         up icalls at method definition time. Partially fixes #33569.
14210
14211 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
14212
14213         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
14214         marshalling of arrays. Fixes #50116.
14215
14216         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
14217
14218         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
14219         points to a vtable in the dying appdomain.
14220
14221         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
14222         listeners into unmanaged code inside the lock.
14223
14224         * object.c (mono_class_vtable): Turn off typed allocation in non-root
14225         domains and add some comments.
14226
14227 2003-10-25  Martin Baulig  <martin@ximian.com>
14228
14229         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
14230
14231         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
14232
14233         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
14234         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
14235         currently parsing.  Create the generic class and store it in
14236         `generic_inst->klass' before parsing the type arguments.  This is
14237         required to support "recursive" definitions; see mcs/tests/gen-23.cs
14238         for an example.
14239         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
14240         to support recursive typespec entries.
14241
14242         * class.c (mono_class_setup_parent): If our parent is a generic
14243         instance, we may get called before it has its name set.
14244         (mono_class_from_generic): Splitted into
14245         mono_class_create_from_generic() and mono_class_initialize_generic().
14246
14247 2003-10-25  Martin Baulig  <martin@ximian.com>
14248
14249         * icall.c (ves_icall_Type_BindGenericParameters): Return a
14250         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
14251         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
14252         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
14253
14254         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
14255         (create_typespec): Likewise.
14256         (mono_reflection_bind_generic_parameters): Return a
14257         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
14258         (mono_reflection_inflate_method_or_ctor): New public function.
14259
14260         * reflection.h (MonoReflectionGenericInst): New typedef.        
14261
14262 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14263
14264         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
14265         inside the domain lock. Fixes #49993.
14266         
14267         * object.c (mono_class_vtable): When typed allocation is used, 
14268         allocate vtables in the GC heap instead of in the mempool, since the
14269         vtables contain GC descriptors which are used by the collector even
14270         after the domain owning the mempool is unloaded.
14271
14272         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
14273
14274         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
14275         reflect what it does. Also invalidate mempools instead of freeing
14276         them if a define is set.
14277
14278         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
14279         of the appdomain.
14280         
14281         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
14282         hold the finalizable objects in this domain.
14283
14284         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
14285         appdomain.
14286
14287         * appdomain.c (mono_domain_set): New function to set the current
14288         appdomain, but only if it is not being unloaded.
14289
14290         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
14291         appdomain which is being unloaded.
14292         
14293         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
14294         unloading of the root appdomain.
14295
14296         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
14297         icall to execute a method in another appdomain. Intended as a 
14298         replacement for InternalSetDomain, which can confuse the code 
14299         generation in the JIT.
14300
14301         * appdomain.c (mono_domain_is_unloading): New function to determine
14302         whenever an appdomain is unloading.
14303
14304         * appdomain.c (mono_domain_unload): New function to correctly unload
14305         an appdomain.
14306
14307         * assembly.c (mono_assembly_load_references): Check that an assembly
14308         does not references itself.
14309
14310         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
14311         domain manually, it asks the finalizer thread to do it, then waits for
14312         the result. Also added a timeout.
14313
14314         * icall.c: Register the new icalls.
14315
14316         * threads.h threads.c: Export the mono_gc_stop_world and 
14317         mono_gc_start_world functions.
14318         
14319         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
14320         function to fill out the mempool with 0x2a.
14321
14322 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
14323
14324         * reflection.h (MonoReflectionMethodAux): New structure to store
14325         information which is rarely used, thus is not in the MonoMethod
14326         structure.
14327
14328         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
14329         store the aux info.
14330
14331         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
14332         and marshalling info into the aux structure.
14333
14334         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
14335         from the aux structure.
14336
14337         * loader.c (mono_method_get_param_names): Retrieve the param names from
14338         the aux structure.
14339         
14340 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
14341
14342         * exception.h exception.c: Add AppDomainUnloadedException && fix 
14343         warning.
14344
14345 2003-10-21  Dick Porter  <dick@ximian.com>
14346
14347         * socket-io.c
14348         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
14349         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
14350
14351 2003-10-21  Martin Baulig  <martin@ximian.com>
14352
14353         * reflection.c (mono_reflection_bind_generic_parameters):
14354         `klass->parent' is NULL for interfaces.
14355
14356 2003-10-21  Martin Baulig  <martin@ximian.com>
14357
14358         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14359
14360 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
14361
14362         * exception.c (mono_exception_from_name_msg): New helper function for
14363         creating exceptions and initializing their message field.
14364
14365         * exception.c: Simplify functions using the new helper.
14366
14367         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
14368         New function.
14369
14370         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
14371         mono_raise_exception, since otherwise gcc doesn't generate the function
14372         epilog for raise_exception, confusing the stack unwinding in the JIT.
14373         Fixes #45043.
14374
14375         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
14376         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
14377         Fixes #49499.
14378
14379 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14380
14381         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
14382         utf8.
14383
14384 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
14385
14386         * icall.c: Removed GetUninitializedObject method because
14387           AllocateUninitializedClassInstance does the same.
14388
14389 2003-10-18  Martin Baulig  <martin@ximian.com>
14390
14391         * class.c (inflate_generic_signature): Renamed to
14392         mono_class_inflate_generic_signature() and made it public.
14393         (my_mono_class_from_generic_parameter): New static function; if we
14394         don't already have the generic parameter's MonoClass, create a
14395         very simple one which is just used internally in the runtime and
14396         not passed back to managed code.
14397
14398         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
14399
14400         * metadata.h (MonoMethodSignature): Moved the
14401         `MonoGenericParam *gen_params' to the MonoMethodHeader.
14402         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
14403
14404         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
14405         ves_icall_MonoMethod_GetGenericArguments(); this is now an
14406         interncall on the MonoMethod class, not on MethodInfo.
14407         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
14408         calling mono_reflection_bind_generic_method_parameters() directly.
14409
14410         * loader.c (mono_method_get_signature): If this is a MethodSpec;
14411         return the already computed `method->signature'.
14412         (method_from_methodspec): New static function to load a method
14413         from a MethodSpec entry.
14414         (mono_get_method_from_token): Call the new method_from_methodspec()
14415         for MethodSpec tokens.  
14416         (mono_get_method_from_token): If we're a generic method, load the
14417         type parameters.
14418
14419         * reflection.c (mono_image_get_memberref_token): Allow
14420         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
14421         table.
14422         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
14423         (mono_image_create_token): First check whether it's a generic
14424         method (so we'd need to create a MethodSpec), then do the other
14425         two alternatives.
14426         (mono_reflection_bind_generic_method_parameters): Return a
14427         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
14428         called directly from the interncall.
14429
14430 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
14431
14432         * reflection.c (load_public_key): Move loading of the public key
14433         into managed code.
14434
14435         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
14436
14437         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
14438         fields.
14439
14440         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
14441         culture, hash_alg and public_key. Fixes #49555.
14442
14443 2003-10-17  Martin Baulig  <martin@ximian.com>
14444
14445         * class.h (MonoGenericInst): Moved this declaration here and added
14446         `MonoMethod *generic_method'.
14447
14448         * icall.c
14449         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
14450         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
14451
14452         * metadata.c (mono_metadata_type_equal): Two types of
14453         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
14454         index; ie. don't compare the address of the `MonoGenericParam'
14455         structure.
14456         (mono_metadata_load_generic_params): Removed the `MonoMethod
14457         *method' argument.
14458
14459         * metadata.h (MonoGenericInst): Moved declaration to class.h.
14460         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
14461
14462         * reflection.c (method_encode_signature): Encode the number of
14463         generic parameters.
14464         (encode_generic_method_sig): New static function.
14465         (method_encode_methodspec): New static function; creates an entry
14466         in the MethodSpec table for a generic method.
14467         (mono_image_get_methodspec_token): New static function.
14468         (mono_image_create_token): Call mono_image_get_methodspec_token()
14469         for generic methods.
14470         (mono_reflection_bind_generic_method_parameters): New public
14471         function.  Instantiates a generic method.
14472
14473 2003-10-16  Martin Baulig  <martin@ximian.com>
14474
14475         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
14476         *gen_params' here from MonoMethodHeader.
14477
14478         * metadata.c (mono_metadata_parse_method_signature): If we have
14479         generic parameters, initialize `method->gen_params' and then set
14480         the correct `type->data.generic_param' in all the parameters.
14481
14482 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14483
14484         * threads.c (mono_threads_get_default_stacksize): New function to 
14485         return the default stacksize.
14486
14487         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
14488         termination of the finalizer thread, since the previous method had
14489         race conditions. Fixes #49628.
14490
14491         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
14492         as for the other managed threads.
14493
14494 2003-10-16  Martin Baulig  <martin@ximian.com>
14495
14496         * class.c (inflate_generic_signature): Copy `generic_param_count'
14497         and `gen_params'.
14498
14499         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
14500         New interncall.
14501
14502         * metadata.c (mono_metadata_parse_method_signature): Actually set
14503         the `method->generic_param_count' here.
14504         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
14505
14506 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14507
14508         * object.h: Add a new field to TypedRef to simplify the implementation
14509         of the REFANY opcodes in the JIT.
14510
14511         * icall.c: Make use of the new field.
14512
14513         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
14514         dynamically.
14515
14516 2003-10-15  Martin Baulig  <martin@ximian.com>
14517
14518         * class.c (mono_class_from_gen_param): Renamed to
14519         mono_class_from_generic_parameter() and moved most of the
14520         functionality from mono_reflection_define_generic_parameter()
14521         here; ie. we create a "real" class here.
14522         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
14523         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
14524         previously been called.
14525
14526         * class.h (MonoGenericParam): Moved the declaration of this struct
14527         here from metadata.h and added `MonoMethod *method'.
14528
14529         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
14530         interncall.
14531
14532         * loader.c (mono_get_method_from_token): If we have any generic
14533         parameters, call mono_metadata_load_generic_params() to read them
14534         from the MONO_TABLE_GENERICPAR.
14535
14536         * metadata.c (mono_metadata_load_generic_params): Added
14537         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
14538
14539         * metadata.h (MonoMethodSignature): Replaced
14540         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
14541         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
14542
14543         * reflection.c (mono_reflection_define_generic_parameter): Moved
14544         most of the functionality into the new
14545         mono_class_from_generic_parameter(); set the `method' field if
14546         we're a method parameter.       
14547
14548 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
14549
14550         * marshal.c (emit_struct_conv): if native size is 0
14551         emit no code.
14552
14553 2003-10-14  Martin Baulig  <martin@ximian.com>
14554
14555         * icall.c: The generics API has changed in the spec since it was
14556         added to System.Type; these modifications make it match the spec
14557         again.
14558         (ves_icall_Type_GetGenericParameters): Renamed to
14559         `ves_icall_Type_GetGenericArguments'.
14560         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
14561         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
14562         `ves_icall_MonoType_get_HasGenericArguments'.
14563         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
14564         `ves_icall_MonoType_get_IsGenericParameter'.
14565         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
14566         this is no interncall anymore.
14567         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
14568         `ves_icall_TypeBuilder_get_IsGenericParameter'.
14569
14570 2003-10-14  Martin Baulig  <martin@ximian.com>
14571
14572         * reflection.c (mono_reflection_bind_generic_parameters): Also
14573         inflate generic methods if we're reading the class from IL.
14574
14575 2003-10-13  Martin Baulig  <martin@ximian.com>
14576
14577         * reflection.c (mono_reflection_define_generic_parameter): This
14578         method isn't called directly from the icall anymore; take a
14579         `MonoReflectionAssemblyBuilder *' so we can use this for type and
14580         method generic parameters.
14581         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
14582         (method_builder_encode_signature): Encode generic parameters.
14583         (mono_image_get_method_info): Write generic params to the
14584         MONO_TABLE_GENERICPARAM table.
14585
14586         * reflection.h (MonoReflectionMethodBuilder): Added
14587         `MonoArray *generic_params'.
14588
14589         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
14590
14591         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
14592         wrapper for mono_reflection_define_generic_parameter().
14593         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
14594
14595 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
14596
14597         * marshal.h: Add missing function to fix build.
14598
14599         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
14600         the SetLastError pinvoke attribute.
14601
14602         * marshal.c (mono_marshal_set_last_error): New helper function called
14603         by the generated code.
14604         
14605         * marshal.c (mono_mb_emit_branch): New helper function.
14606
14607         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
14608
14609         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14610         classes as parameters and return values of delegates. Fixes #29256. 
14611
14612 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
14613
14614         * locales.c: use gint32 in non HAVE_ICU case
14615
14616 2003-10-11  Martin Baulig  <martin@ximian.com>
14617
14618         * mono-debug.c (mono_debug_add_method): Added a workaround for
14619         bug #48591.
14620
14621 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14622
14623         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
14624         delegates passed to native code must use the STDCALL calling 
14625         convention. Fixes #35987.
14626
14627 2003-10-10  Martin Baulig  <martin@ximian.com>
14628
14629         * class.c (inflate_generic_type): If we're inflating for a generic
14630         type instance (and not for a generic method), return
14631         MONO_TYPE_MVAR unchanged.
14632
14633 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14634
14635         * string-icalls.c: Join ignores null strings in the source array.
14636         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
14637         * threads.c: GetAvailableTheads is slightly more accurate.
14638
14639 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
14640
14641         * threads.h threads.c : add mono_threads_set_default_stacksize
14642         and pass default to CreateThread calls.
14643
14644 2003-10-09  Dick Porter  <dick@ximian.com>
14645
14646         * icall.c:
14647         * locales.h:
14648         * locales.c: Internal calls for constructing CultureInfo and
14649         related objects from libicu (if its available.)
14650
14651 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14652
14653         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
14654
14655 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14656
14657         * threadpool.c: added an argument to async_invoke_thread that is the
14658         item to process, pass the MonoAsyncResult to the thread start function
14659         when creating a new thread. This way we don't need to acquire any lock
14660         when we're creating a new thread. Readded a semaphore for faster
14661         response times (instead of that Sleep i added).
14662
14663 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
14664
14665         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
14666         get daylight change dates better on Windows, fix handling
14667         of platforms without tm_gmtoff.
14668
14669 2003-10-06  Martin Baulig  <martin@ximian.com>
14670
14671         * class.c (inflate_generic_method): Renamed to
14672         mono_class_inflate_generic_method() and made public.
14673         (mono_class_init): Don't inflate the generic methods here.
14674         (mono_class_from_generic): Added `gboolean inflate_methods'
14675         argument.  Inflate the methods here.
14676
14677         * loader.c (mono_method_get_param_names): Ignore instances of
14678         generic types for the moment.
14679
14680         * reflection.c (fixup_method): Added support for inflated methods.
14681         (mono_image_create_token): Use mono_image_get_methodref_token()
14682         for inflated methods.
14683         (mono_custom_attrs_from_param): Ignore instances of generic types
14684         for the moment.
14685         (mono_reflection_bind_generic_parameters): New public function.
14686         Moved all the functionality from
14687         ves_icall_Type_BindGenericParameters() here and added support for
14688         dynamic types.
14689         (mono_reflection_define_generic_parameter): Initialize
14690         `klass->methods' here.
14691
14692         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
14693         functionality into mono_reflection_define_generic_parameter().
14694         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
14695         TypeBuilder, return that TypeBuilder.
14696
14697 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14698
14699         * appdomain.c: removed mono_delegate_semaphore.
14700
14701         * threadpool.c:
14702         (mono_thread_pool_add): moved hash table creation inside and the thread 
14703         creation outside of the critical region.
14704         (mono_thread_pool_finish): removed obsolete code.
14705         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
14706         continue or exit the thread depending on the queue.
14707
14708 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
14709
14710         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
14711         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
14712         handle more bool marshalling options
14713
14714 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
14715
14716         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
14717         arrays of structs. Also add a more descriptive error message when
14718         a structure member is marshalled as LPArray.
14719
14720 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14721
14722         * marshal.c (mono_marshal_get_native_wrapper): Add support for
14723         marshalling arrays of complex types. Fixes #29098. Also remove an
14724         usused and incomplete function.
14725
14726 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14727
14728         * gc.c: report heap_size - free_bytes as total memory allocated
14729         (bug#49362).
14730
14731 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14732
14733         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
14734         fix timezone handling problems on Windows.
14735         
14736         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
14737         asserts when the year is outside the range handled by ms the functions.
14738
14739         * class.c (setup_interface_offsets): If the class is an interface,
14740         fill out its interface_offsets slot.
14741
14742 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14743
14744         * threadpool.c: mark threadpool threads as background.
14745
14746 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
14747
14748         * decimal.c - define DECINLINE to nothing if not using GCC
14749
14750 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14751
14752         * assembly.c: More refcount fixes.
14753
14754 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14755
14756         * string-icalls.c: if we're not trimming, return the same string.
14757         When not splitting, don't create a new string.
14758
14759 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14760
14761         * image.c:
14762         (mono_image_open): increment the ref_count inside the critical section.
14763
14764 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
14765
14766         * image.c (mono_image_open): Fix reference counting bug.
14767
14768 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
14769
14770         * marshal.c (mono_marshal_type_size) struct alignment changed for 
14771         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
14772         64bits. Avoid leak in mono_marshal_get_native_wrapper when
14773         mono_lookup_pinvoke_call throws.        
14774
14775 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14776
14777         * reflection.c (mono_reflection_parse_type): Fix #49114.
14778
14779         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
14780         temporary workaround for cygwin header problem.
14781
14782         * object.c (mono_object_isinst): Synchronize this with the code
14783         generated by the JIT for casts.
14784
14785 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14786
14787         * reflection.c (encode_type): Fix #38332.
14788
14789 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14790
14791         * marshal.c (mono_marshal_method_from_wrapper): New function to return
14792         the original method from the wrapper method.
14793
14794 2003-09-25  Martin Baulig  <martin@ximian.com>
14795
14796         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
14797         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
14798         (ves_icall_Type_get_IsGenericInstance): New interncall.
14799
14800 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
14801
14802         * object.c: fix cast warning in big endian code.
14803
14804 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
14805
14806         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
14807         
14808 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14809
14810         * assembly.c: don't call check_env from mono_assembly_load. It's
14811         already done once in mono_assemblies_init and may cause headaches when
14812         multiple threads are loading assemblies.
14813
14814 2003-09-19  Martin Baulig  <martin@ximian.com>
14815
14816         * reflection.c (mono_reflection_define_generic_parameter): Don't
14817         allocate `klass->methods', set `klass->flags' to
14818         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
14819
14820 2003-09-18  Martin Baulig  <martin@ximian.com>
14821
14822         * class.c (mono_class_init): Don't create `class->methods' if it's
14823         already initialized.
14824
14825         * metadata.c (mono_metadata_load_generic_params): Make this
14826         actually work.
14827
14828         * reflection.c (mono_reflection_define_generic_parameter): Set
14829         parent class and interfaces from the constraints.
14830
14831         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
14832         to keep this struct in sync with the declaration in TypeBuilder.cs.
14833
14834 2003-09-17  Martin Baulig  <martin@ximian.com>
14835
14836         * metadata.h (MonoType): Replaced the data's `int type_param'
14837         field with `MonoGenericParam *generic_param'.
14838         (MonoGenericParam): Added `MonoClass *klass'.
14839
14840         * class.c (mono_class_from_gen_param): Removed the
14841         `MonoImage *image' and `int type_num' arguments.
14842
14843         * metadata.c (mono_metadata_parse_generic_param): New static
14844         method; creates a MonoGenericParam which just contains the index.
14845         (do_mono_metadata_parse_type): Call
14846         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
14847         MONO_TYPE_MVAR.
14848
14849         * reflection.c (mono_image_typedef_or_ref): Generic type
14850         parameters may be in the same assembly, but never use a typedef
14851         for them.
14852         (mono_reflection_define_generic_parameter): We're now creating a
14853         "real" class for the type parameter; it's now safe to call
14854         mono_class_from_mono_type() on the class'es type, it'll do the
14855         right thing.
14856
14857 2003-09-16  Martin Baulig  <martin@ximian.com>
14858
14859         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
14860         `symfile->range_entry_size' and `symfile->class_entry_size' here;
14861         the `symfile' data structure must be fully initialized before it
14862         gets added to the table.
14863
14864 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14865
14866         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
14867
14868         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
14869         class init trampolines.
14870
14871 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14872
14873         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
14874         to the built-in profiler to turn off time and allocation profiling
14875         respectively.
14876
14877 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14878
14879         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
14880         g_direct_equal.
14881
14882         * debug-helpers.c (mono_method_full_name): Print the wrapper type
14883         in human readable form.
14884
14885 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14886
14887         * reflection.c icall.c: Fixed warnings.
14888
14889         * image.c (load_class_names): Use a temporary hash table to hold the
14890         namespaces in order to avoid doing many string comparisons.
14891
14892         * image.h: Fix typo.
14893
14894         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
14895         Pass NULL instead of g_direct_equal to the GHashTable constructor 
14896         since the NULL case is short-circuited inside g_hash_table_lookup, 
14897         leading to better performance.  
14898
14899         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
14900         obtain the first custom attribute for a given index. Depends on the
14901         CustomAttribute table being sorted by the parent field.
14902
14903         * reflection.c (mono_custom_attrs_from_index): Use the new function 
14904         for better performance.
14905
14906 2003-09-07  Martin Baulig  <martin@ximian.com>
14907
14908         * class.c (mono_class_init): If we're a generic instance, inflate
14909         all our methods instead of loading them from the image.
14910         (mono_class_from_generic): Set `class->methods = gklass->methods'.
14911
14912 2003-09-07  Martin Baulig  <martin@ximian.com>
14913
14914         * mono-debug-debugger.c: Added support for constructors.
14915
14916 2003-09-06  Martin Baulig  <martin@ximian.com>
14917
14918         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
14919         New interncall.
14920
14921         * reflection.c (mono_reflection_setup_generic_class): Call
14922         ensure_runtime_vtable() to create the vtable.
14923
14924 2003-09-05  Martin Baulig  <martin@ximian.com>
14925
14926         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
14927         MONO_TYPE_MVAR.
14928
14929 2003-09-04  Martin Baulig  <martin@ximian.com>
14930
14931         * reflection.c (mono_reflection_define_generic_parameter): Generic
14932         parameters start with zero.
14933
14934 2003-09-04  Martin Baulig  <martin@ximian.com>
14935
14936         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14937
14938         * reflection.h (MonoReflectionGenericParam): New typedef.
14939         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
14940         the generic parameters from the managed TypeBuilder.
14941
14942         * reflection.c (mono_reflection_define_generic_parameter): New function.
14943         (mono_reflection_create_runtime_class): Encode generic parameters.
14944         (mono_reflection_setup_generic_class): New function; this is
14945         called after adding adding all generic params to the TypeBuilder.
14946         (encode_type): Added MONO_TYPE_VAR.
14947
14948 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14949
14950         * class.h class.c (mono_class_needs_cctor_run): Moved this method
14951         here from the JIT.
14952
14953         * assembly.h assembly.c: Moved the AOT loading code into an assembly
14954         load hook.
14955
14956 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
14957
14958         * reflection.h reflection.c class.h class.c: Delete duplicate 
14959         definition of mono_type_get_name () from reflection.c and export the
14960         one in class.c.
14961
14962         * class.c: Class loading fixes from Bernie Solomon 
14963         (bernard@ugsolutions.com).
14964
14965         * reflection.c: Endianness fixes from Bernie Solomon 
14966         (bernard@ugsolutions.com).
14967         
14968 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14969
14970         * assembly.h assembly.c: Define a file format version for AOT
14971         libraries.
14972         
14973         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
14974
14975         * appdomain.h (MonoJitInfo): New field to determine whenever the
14976         code is domain neutral.
14977         
14978 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
14979
14980         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
14981
14982 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14983
14984         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
14985         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
14986         Avoid caching the result since strings must be domain specific. Fixes
14987         #48050.
14988
14989 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14990
14991         * marshal.c (mono_marshal_init): Make this callable multiple times
14992         since it is hard to find a correct place to call it.
14993
14994         * object.c (mono_runtime_class_init): Execute static constructors in
14995         the correct appdomain.
14996
14997         * image.c (build_guid_table): Handle the case when multiple images have
14998         the same GUID.
14999
15000 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15001
15002         * icall.c: added a couple of icalls for System.Web.
15003
15004 2003-08-28  Martin Baulig  <martin@ximian.com>
15005
15006         * icall.c (ves_icall_Type_BindGenericParameters): Use
15007         `klass->generic_inst' instead of `&klass->byval_arg' in the
15008         mono_type_get_object() call.  The returned type must be
15009         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
15010
15011 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15012
15013         * NOTES: New file.
15014
15015         * object.c (mono_class_proxy_vtable): Make it thread safe.
15016
15017         * pedump.c: Fix warning.
15018
15019         * object.c appdomain.h: Get rid of metadata_section. 
15020         It is no longer needed and it was causing deadlocks with domain->lock.
15021
15022         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
15023
15024 2003-08-26  Martin Baulig  <martin@ximian.com>
15025
15026         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
15027
15028 2003-08-26  Martin Baulig  <martin@ximian.com>
15029
15030         * pedump.c (main): Call mono_metadata_init(),
15031         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
15032         and mono_loader_init().
15033
15034 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
15035
15036         * loader.h: Add missing include to fix build.
15037
15038         * image.h: mono_image_load_references is no more.
15039
15040         * assembly.c: Reworked assembly loading to make it really thread safe.
15041         After these changes, the assembly returned by mono_assembly_open is
15042         fully initialized, i.e. all its references assemblies are loaded.
15043
15044         * assembly.c (mono_image_load_references): Renamed to 
15045         mono_assembly_load_references, and made private, since clients no
15046         longer need to call it.
15047
15048         * class.c: Removed calls to mono_assembly_load_references, since it was
15049         a source of deadlocks.
15050
15051         * loader.h loader.c class.h class.c: Protect data structures using a 
15052         new lock, the loader lock.
15053
15054         * class.c (mono_class_setup_vtable): Create temporary hash tables and
15055         GPtrArrays only when needed.
15056
15057         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
15058         into empty structures by mcs. Fixes pinvoke7.cs.
15059         
15060         * domain.c (mono_init): Call a new initialization function.
15061
15062         * appdomain.c (mono_runtime_init): Call the new initializer function
15063         of the marshal module.
15064
15065         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
15066         inserted into empty structures by mcs. Fixes pinvoke7.cs.
15067
15068         * marshal.h marshal.c: Added locks around the wrapper caches to make
15069         this module thread safe.
15070
15071         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
15072         this argument. Fixes pinvoke1.exe.
15073
15074 2003-08-25  Lluis Sanchez <lluis@ximian.com>
15075
15076         * object.h: Added call_type field to MonoMethodMessage and the corresponding
15077         enumeration of values. Removed fields to store remote call output values in
15078         MonoAsyncResult. Not needed any more.
15079         * object.c: Initialize call_type and async_result fields in mono_message_init.
15080         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
15081         dispatching the message.
15082         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
15083         async call to finish. To do it use a message with EndInvoke call type.
15084
15085 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15086
15087         * loader.h loader.c (mono_method_hash_marhal_info): New function which
15088         determines whenever a method has marshalling info.
15089
15090 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15091
15092         * assembly.c: fix the build on windows.
15093
15094 2003-08-22 Lluis Sanchez <lluis@ximian.com>
15095
15096         * object.cs: Fixed bug #47785.
15097
15098 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
15099
15100         * string-icalls.c (StringReplace): If their are no occurances of
15101         the old string found return a reference to the supplied
15102         string. This saves some memory and matches MS behavoir.
15103         
15104 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15105
15106         * socket-io.c: fixed compilation for systems that define AF_INET6
15107         and don't define SOL_IP/SOL_IPV6.
15108
15109 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
15110
15111         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
15112         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
15113
15114         * rawbuffer.c rawbuffer.h: Make this module thread safe.
15115
15116         * domain.c: Make this module thread safe.
15117
15118         * domain.c (mono_init): Call new initialization function.
15119
15120         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
15121         reference types too. Fixes #38812.
15122
15123         * image.c (mono_image_init): Fixed warnings.
15124
15125         * class.c (mono_class_from_typeref): Handle assembly load failure
15126         correctly.
15127
15128         * appdomain.c (add_assemblies_to_domain): Handle the case when
15129         the references of an assembly are not yet loaded.
15130
15131         * metadata.c image.c assembly.c: Moved initialization of global
15132         variables to a separate function called at startup since lazy 
15133         initialization of these variables is not thread safe.
15134         
15135         * image.c assembly.c: Made this module thread safe by adding locks in 
15136         the appropriate places.
15137
15138         * domain.c (mono_init): Call the new initialization functions of the
15139         three modules.
15140
15141 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
15142
15143         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
15144           make a direct call. It is proxy's work to make the call asynchronous.
15145           mono_delegate_end_invoke(): If the targe is a proxy, just collect
15146           the return values.
15147         * object.cs: mono_method_call_message_new(): read AsyncResult and
15148           state object from parameters list, if this info is requested.
15149         * object.h: Added fields to store remote call output values in
15150           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
15151
15152 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15153
15154         * object.h: add needed fields to MonoThread.
15155         * threads.c, threads.h: allow registering a function to cleanup data
15156         allocated per thread by the JIT.
15157
15158 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15159
15160         * loader.h: portability fix by Bernie Solomon
15161         * <bernard@ugsolutions.com>.
15162
15163 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
15164
15165         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
15166         return a MonoArray. This simplifies the code and also ensures that
15167         the cache allways contains an object reference as a value.
15168
15169         * icall.c (ves_icall_get_parameter_info): Simplified using the new
15170         function.
15171
15172 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15173
15174         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
15175         fixes a problem with byte ordering when getting the address family for
15176         a socket.
15177
15178 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
15179
15180         * .cvsignore: Added monosn.
15181
15182         * reflection.h reflection.c loader.c: Added support for parameter
15183         marshalling to dynamically created types. Fixes #47295.
15184
15185 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15186
15187         * rand.c: remove useless warnings.
15188
15189 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15190
15191         * class.c: implemented ldtoken for methods and fieldrefs.
15192
15193 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15194
15195         * threadpool.c: when mono_async_invoke was called, no one took care of
15196         monitoring the queue. So if the method invoked took some time and we
15197         got new async invoke requests after 500 ms (the thread created waited
15198         that long in WaitForSingleObject), the new async invoke was not called
15199         until the previous one finished.
15200
15201         This is fixed now. Thanks to Totte for helping with it.
15202
15203 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15204
15205         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
15206
15207 2003-08-11  Martin Baulig  <martin@ximian.com>
15208
15209         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
15210
15211 2003-08-06  Martin Baulig  <martin@ximian.com>
15212
15213         * mono-debug-debugger.c: Added support for static fields,
15214         properties and methods.
15215
15216 2003-08-06  Martin Baulig  <martin@ximian.com>
15217
15218         * mono-debug-debugger.c: Don't store the MonoString's vtable to
15219         make this work for applications with multiple application domains.
15220
15221 2003-08-04  Martin Baulig  <martin@ximian.com>
15222
15223         * mono-debug-debugger.c: Completely reworked the type support; the
15224         most important thing is that we're now just using one single
15225         `MonoType' instance per type.
15226
15227 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
15228
15229         * mono-endian.h, mono-endian.c, icall.c: Added icall
15230         ves_icall_System_Double_AssertEndianity to assert double word endianity
15231         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
15232
15233 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15234
15235         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
15236         support, icalls and fixes.
15237
15238 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
15239
15240         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
15241         classes that are a punctuation character in .NET is not the same a
15242         g_unichar_ispunct.
15243
15244 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15245
15246         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
15247
15248 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
15249
15250         * icall.c: Add new MemCopy internalcall.
15251         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
15252         Simplified code; It is not necessary to handle all the cases here,
15253         as the C# code takes care of it.  Only handle the case of the name
15254         resource embedded into the assembly.
15255
15256         Changed signature to return the data pointer and the size of the
15257         data. 
15258
15259 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
15260
15261         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
15262         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
15263
15264 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
15265
15266         * socket-io.c: ignore EINTR error in select.
15267
15268 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15269
15270         * class.h, class.c: removed unused subclasses field in MonoClass.
15271
15272 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
15273
15274         * icall.c: improve fix of get_base_definition(). If the parent class
15275           doesn't have the mehod, look at the parent of the parent.
15276         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
15277           to check if a parameter is an in or out parameter
15278           (PARAM_ATTRIBUTE_IN is not set by default).
15279           mono_method_return_message_restore(): Use mono_class_value_size to
15280           get the size of a value type. mono_type_stack_size (parameterType)
15281           does not return the correct value if parameterType is byRef.
15282           mono_load_remote_field(), mono_load_remote_field_new(),
15283           mono_store_remote_field(), mono_store_remote_field_new():
15284           raise exception if the remote call returns an exception.
15285
15286 2003-07-28  Martin Baulig  <martin@ximian.com>
15287
15288         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
15289         method.  This is a wrapper around mono_runtime_invoke() which
15290         boxes the instance object if neccessary.
15291
15292 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15293
15294         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
15295         metadata.h, row-indexes.h, verify.c: first cut of generics support.
15296
15297 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15298
15299         * icall.c: disable mcs bug workaround.
15300
15301 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15302
15303         * object.c (mono_runtime_class_init): Take the metadata_section
15304         mutex before obtaining the domain mutex.
15305
15306         * appdomain.h: Added definition of metadata_section mutex here. 
15307
15308         * object.c: define metadata_mutex here.
15309
15310 2003-07-24  Ravi Pratap  <ravi@ximian.com>
15311
15312         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
15313         fixed.
15314
15315 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
15316
15317         * reflection.c: Fix bug #46669
15318
15319 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15320
15321         * exception.c:
15322         * exception.h:
15323         * icall.c:
15324         * object.h: fill in the type name for TypeLoadException.
15325
15326 2003-07-23  Ravi Pratap  <ravi@ximian.com>
15327
15328         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
15329         relationship between TypeBuilders while compiling corlib) and bug
15330         45993 (Array types returned from the runtime while compiling
15331         corlib were from the loaded corlib).
15332
15333 2003-07-22  Martin Baulig  <martin@ximian.com>
15334
15335         * mono-debug-debugger.c: Reworked the type support a bit more;
15336         distinguish between types and classes.
15337
15338 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
15339
15340         * icall.c: add IsArrayImpl icall.
15341
15342 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
15343
15344         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
15345         initializing real_size only once. Also fix bug #46602.
15346
15347 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
15348
15349         * object.c: Renamed mono_metadata_section to metadata_section.
15350
15351 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
15352
15353         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
15354           empty array if the type is an array. Fixed.
15355           ves_icall_MonoMethod_get_base_definition: if the base method
15356           is abstract, get the MethodInfo from the list of methods of
15357           the class.
15358         * reflection.c: ParameterInfo.PositionImpl should be zero-based
15359           and it was 1-based. Fixed in mono_param_get_objects.
15360
15361 2003-07-20  Martin Baulig  <martin@ximian.com>
15362
15363         * mono-debug.h: Set version number to 31.
15364         (mono_debug_init): Added `MonoDomain *' argument.
15365
15366         * mono-debug-debugger.c: Reworked the type support; explicitly
15367         tell the debugger about builtin types; pass the `klass' address to
15368         the debugger.
15369
15370 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
15371
15372         * image.c: Allow new metadata tables to be loaded without a
15373         warning. Also update the warning message to give the new constant value.
15374                 
15375 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15376
15377         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
15378         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
15379         array type representation changes.
15380
15381 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15382
15383         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
15384         on Environment.Exit () call.
15385
15386 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15387
15388         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
15389         requires a matching corlib.
15390
15391 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
15392
15393         * Changelog: My editor decided to add a CR to each line. Sorry about that.
15394           Committed again without the CRs.
15395         
15396 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
15397
15398         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
15399           getting it from the "this" socket instance. Did not work
15400           if the socket is a subclass of Socket.
15401           Also fixed bug #35371.
15402
15403 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15404
15405         * metadata.c: fixed size for TypedByRef.
15406         * loader.c: when searching for a method, consider the vararg amrker.
15407         * unicode.c, decimal.c: constify some arrays.
15408
15409 2003-07-15  Dick Porter  <dick@ximian.com>
15410
15411         * socket-io.c: Fixed compilation for gcc < 3.2.
15412
15413         Fixed compilation for machines that don't have AF_INET6 (thanks to
15414         Bernie Solomon <bernard@ugsolutions.com> for that part.)
15415
15416         Fixed compile warnings.
15417         
15418         Fixed formatting and line endings.
15419
15420 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
15421
15422         * socket-io.h:
15423         * socket-io.c: Added IPv6 support.
15424
15425 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
15426
15427         * class.c (mono_class_is_assignable_from): New function to implement
15428         the is_assignable_from logic. Used by mono_object_isinst, 
15429         Type::IsAssignableFrom () and the interpreter.
15430
15431         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
15432         Object, even interfaces.
15433         
15434         * object.c (mono_object_isinst): Implement in terms of 
15435         is_assignable_from.
15436
15437         * icall.c (ves_icall_type_is_assignable_from): New icall.
15438
15439 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
15440
15441         * domain.c (foreach_domain): fix compiler warning.
15442
15443 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
15444
15445         * image.c (load_metadata_ptrs): use g_strndup because strndup is
15446         not available on all plattforms
15447
15448 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
15449
15450         * image.h image.c: Store the metadata version string in MonoImage.
15451         * icall.c: New icall to retrieve the image version.
15452         * reflection.c (create_dynamic_image): Fill in the image version field
15453         * reflection.c (build_compressed_metadata): Use the image version
15454         from the image structure.
15455
15456 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15457
15458         * appdomain.c: modified comment.
15459         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
15460         That will be its last iteration when mono_gc_cleanup is called from
15461         mono_runtime_cleanup and before the domain is unloaded.
15462
15463         Fixes bug #45962.
15464
15465 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
15466
15467         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
15468         attributes.
15469
15470 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15471
15472         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
15473         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
15474         Bernie Solomon <bernard@ugsolutions.com>.
15475
15476 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15477
15478         * object.c, object.h: provide mono_object_new_fast() for faster
15479         allocation in some special cases.
15480
15481 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15482
15483         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
15484         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
15485
15486 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15487
15488         * threadpool.c: fix leaks.
15489
15490 2003-07-01  Dick Porter  <dick@ximian.com>
15491
15492         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
15493         using MonoGHashTables.  Fixes threadpool bug posted to list.
15494
15495 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
15496
15497         * image.h, image.c: added support to load an assembly from a byte array.
15498         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
15499         assembly bundle support.
15500
15501 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
15502
15503         * threadpool.c (mono_thread_pool_add): keep a reference to the
15504         AsyncResult to prevent GC
15505
15506 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15507
15508         * class.c: leak fix.
15509
15510 2003-06-25  Dick Porter  <dick@ximian.com>
15511
15512         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
15513         for the async object, the WaitHandle object will close the handle.
15514         Fixes bug 45321.
15515
15516 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15517
15518         * class.c: in mono_array_class_get (), lookup from the hash with the
15519         same type we insert: this works around a bug in
15520         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
15521         lluis. The real fix will have to wait for after the release.
15522
15523 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15524
15525         * icall.c: fix memory leak when getting type members.
15526
15527 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15528
15529         * reflection.c: added more pubtoken special cases.
15530
15531 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15532
15533         * class.c: handle field offset correctly when class size
15534         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
15535
15536 2003-06-20  Martin Baulig  <martin@ximian.com>
15537
15538         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
15539         *image' field.
15540
15541 2003-06-20  Martin Baulig  <martin@ximian.com>
15542
15543         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
15544
15545 2003-06-20  Martin Baulig  <martin@ximian.com>
15546
15547         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
15548         just distinguish between variables in registers and variables at
15549         an offset relative to a register.
15550
15551 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15552
15553         * icall.c: #ifdef out latest changes until mcs is fixed.
15554
15555 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15556
15557         * icall.c: return members in metadata order.
15558
15559 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15560
15561         * icall.c: avoid infinite loop in GetTimeZoneData.
15562
15563 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15564
15565         * icall.c: added Marshal.Prelink/All icalls.
15566
15567 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15568
15569         * object.c, object.h: fix warnings and do some overflow checking
15570         when creating arrays.
15571
15572 2003-06-17  Dick Porter  <dick@ximian.com>
15573
15574         * file-io.h:
15575         * file-io.c: File attributes need to be tweaked slightly when
15576         passed from the managed to the w32 world.
15577
15578 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15579         * profiler.h profiler-private.h profiler.c: Rework last patch
15580         based on suggestion by Paolo.
15581         
15582 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15583
15584         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
15585         instruction level coverage data collection.
15586         * profiler.h profiler.c (: Added new callback function which can be
15587         used by the profiler to limit which functions should have coverage
15588         instrumentation.
15589         * profiler.c (mono_profiler_load): Call g_module_build_path to
15590         generate the file name of the profiler library.
15591
15592 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15593
15594         * profiler.c, profiler.h, profiler-private.h: added basic block 
15595         coverage profiling API.
15596
15597 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
15598
15599         * reflection.c (mono_reflection_create_runtime_class): Add support
15600         for events in dynamically generated code.
15601
15602         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
15603         not allocated.
15604
15605 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15606
15607         * icall.c: when getting timezone info, return reasonable values if we
15608         can't get the actual data.
15609
15610 2003-06-14  Dick Porter  <dick@ximian.com>
15611
15612         * threads.c (start_wrapper): Remove the reference to the thread
15613         object in the TLS data, so the thread object can be finalized.
15614         This won't be reached if the thread threw an uncaught exception,
15615         so those thread handles will stay referenced :-( (This is due to
15616         missing support for scanning thread-specific data in the Boehm GC
15617         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
15618
15619 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
15620
15621         * reflection.c: ensure streams and tables are first allocated with
15622         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
15623
15624 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15625
15626         * icall.c: fixed GetElementType for byrefs (bug# 44792).
15627
15628 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
15629
15630         * reflection.c (mono_reflection_create_runtime_class): Add support for
15631         properties to dynamically created classes.
15632         * reflection.c: Fix a few places where non-MonoObjects were inserted
15633         into the tokens hashtable.
15634
15635 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15636
15637         * object.c: some support to handle out of memory exceptions.
15638
15639 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
15640
15641         * marshal.c (mono_marshal_get_native_wrapper): support reference
15642         return types
15643
15644 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15645
15646         * object.h, object.c: more portability stuff from Bernie Solomon.
15647         Unexport mono_object_allocate(). Added mono_object_unbox ().
15648         Set exitcode when an unhandled exception is thrown.
15649
15650 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
15651
15652         * marshal.c (mono_marshal_get_native_wrapper): use custom
15653         marshaler for return types.
15654
15655 2003-06-10  Dick Porter  <dick@ximian.com>
15656
15657         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
15658         ip_mreq is available
15659
15660 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15661
15662         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
15663         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
15664         by Bernie Solomon <bernard@ugsolutions.com>.
15665
15666 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
15667
15668         * gc.c (mono_gc_init): Avoid error message on shutdown when
15669         GC_DONT_GC=1 is used.
15670
15671         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
15672         New icall to return the GUID of a module.
15673
15674 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15675
15676         * class.c: ensure instance size always includes the parent's size
15677         even whem class size is set explicitly (fixes bug#44294).
15678
15679 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15680
15681         * profiler.h, profiler.c: made the simple profiler thread-safe,
15682         get more accurate timing info. Allow the loading of an
15683         externally-developed profiler module.
15684
15685 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
15686
15687         * marshal.c (mono_marshal_get_native_wrapper): improved
15688         class/byref arguments.
15689         (mono_marshal_get_native_wrapper): better string marshaling support.
15690
15691 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15692
15693         * class.c: ensure .pack and .size are handled correctly and
15694         simplified layout of static fields.
15695
15696 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15697
15698         * appdomain.c
15699         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
15700
15701         * loader.c (mono_lookup_pinvoke_call): look for modules in the
15702         current directory (fix bug 44008)
15703
15704 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
15705
15706         * marshal.c (mono_marshal_get_native_wrapper): started support for
15707         custom marshalers.
15708         (mono_delegate_to_ftnptr): consider marshalling specifications
15709
15710 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15711
15712         * reflection.c, reflection.h: emit custom marshal info.
15713
15714 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15715
15716         * object.c: free the GError.
15717         * icall.c: added CloseEvent_internal.
15718         * threads.[ch]:
15719         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
15720         call.
15721
15722 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
15723
15724         * loader.c (mono_method_get_signature): Add support for dynamic
15725         assemblies.
15726
15727 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15728
15729         * reflection.c: fixed bug #43905.
15730
15731 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15732
15733         * class.c, domain.c, icall.c, metadata.h, object.h: support for
15734         handling TypedReference and ArgIterator.
15735         * loader.c, loader.h: added function to get signature at call site.
15736
15737 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15738
15739         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
15740         data readonly. Buglets and warning fixes. Some MethodSpec support.
15741
15742 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15743
15744         * class.h, class.c, object.c: remove relative numbering support.
15745
15746 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
15747
15748         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
15749         free the string, until we get a chance to fix Gtk#
15750
15751 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15752
15753         * marshal.c: revert last patch.
15754
15755 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15756
15757         * icall.c: updates for new mono_class_vtable() not calling
15758         the type constructor anymore.
15759
15760 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15761
15762         * object.h, object.c: separate vtable creation from type
15763         initialization. Make running the .cctor thread safe.
15764
15765 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15766
15767         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
15768
15769 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15770
15771         * loader.c (mono_get_method): consider calling convention
15772
15773 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
15774
15775         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
15776         to return the invisible global type for a module.
15777
15778         * reflection.c (mono_image_build_metadata): Emit global fields too.
15779
15780 2003-05-20  Peter Williams  <peterw@ximian.com>
15781
15782         * loader.c (mono_lookup_internal_call): Add a few newlines.
15783
15784 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
15785
15786         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
15787         literal strings.
15788
15789         * appdomain.c (set_domain_search_path): Recalculate search path when
15790         AppDomainSetup.PrivateBinPath changes.
15791
15792         * object.c (mono_class_compute_gc_descriptor): It turns out some
15793         parts of the class libs (like System.Thread) holds pointers to
15794         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
15795         to treat native int a pointer type here.
15796         
15797 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
15798
15799         * appdomain.h, domain.c: add hashtable for jump target resolution.
15800
15801 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
15802
15803         * reflection.h reflection.c icall.c: Added new icalls 
15804         GetManifestResourceInfoInternal, GetModulesInternal and support
15805         infrastructure.
15806
15807 2003-05-16  Dick Porter  <dick@ximian.com>
15808
15809         * icall.c:
15810         * file-io.h:
15811         * file-io.c: Implement System.IO.MonoIO::GetTempPath
15812
15813 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
15814
15815         * object.c: mono_store_remote_field: little fix to previous patch.
15816
15817 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15818
15819         * class.c: add constructors to array classes.
15820         * icall.c: special case array construction for InternalInvoke (),
15821
15822 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
15823
15824         * class.h class.c reflection.c object.c: Added support for field
15825         defaults in dynamically generated classes.
15826
15827 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15828
15829         * reflection.c: properly encode charset for ddlimport.
15830
15831 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15832
15833         * threads.c: allow compiling without GC.
15834
15835 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15836
15837         * appdomain.h, object.c, object.h, threads.c, threads.h: added
15838         handling of thread static data.
15839
15840 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15841
15842         * reflection.h, reflection.c: added mono_custom_attrs_free ().
15843
15844 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15845
15846         * class.c (mono_array_class_get): always set the serializable flags
15847         (mono_array_class_get): always set the SEALED attribute for array types
15848
15849 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
15850
15851         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
15852         attributes (fix for bug 42021).
15853
15854 2003-05-12  Dick Porter  <dick@ximian.com>
15855
15856         * gc.c: Don't run finalizers when the finalizer thread is
15857         finishing up, because the default domain has already been
15858         destroyed.
15859
15860 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
15861
15862         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
15863         value is null, we should throw an exception.   This is slightly
15864         different than the other conventions used for the constructor.
15865
15866 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15867
15868         * socket-io.c: fixed windows build.
15869
15870 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15871
15872         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
15873
15874 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
15875
15876         * object.c (mono_string_new_wrapper): Compatibility fix for MS
15877         compilers.
15878
15879 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
15880
15881         * class.c (mono_class_layout_fields): Add experimental GC aware
15882         auto layout facility. Requires class library changes to work correctly.
15883
15884         (mono_class_setup_vtable): Avoid overriding explicit interface
15885         method implementations. Fixes iface3.exe test.
15886
15887         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
15888         object reference.
15889         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
15890         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
15891
15892         * metadata.h: Add new type classification macro which determines
15893         whenever the type holds an object reference.
15894
15895 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15896
15897         * marshal.c (mono_marshal_get_native_wrapper): cleanups
15898
15899 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
15900
15901         * gc.c (finalizer_thread): Work around a GC bug.
15902
15903 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
15904
15905         * marshal.c (emit_struct_conv): allow unions
15906
15907         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
15908
15909 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
15910
15911         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
15912
15913 2003-05-06  Martin Baulig  <martin@ximian.com>
15914
15915         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
15916
15917 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15918
15919         * socket-io.c:
15920         (Select_internal): allow NULLs, don't create arrays if not needed.
15921         Coupled with Socket.cs changes.
15922
15923         * threadpool.c:
15924         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
15925         register a finalizer for it that will close the semaphore handle. This
15926         fixes the leak and make Lupus' test run with > 4080 loops.
15927
15928 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15929
15930         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
15931         Jerome Laban (bug #42287)
15932
15933 2003-05-02  Martin Baulig  <martin@ximian.com>
15934
15935         * debug-mono-symfile.h
15936         (MonoSymbolFile): Moved declaration into mono-debug.h.
15937         (MonoDebugMethodJitInfo): Likewise.
15938         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
15939         argument.
15940         (_mono_debug_address_from_il_offset): Take a
15941         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
15942
15943         * mono-debug.h
15944         (MonoDebugDomainData): New struct.
15945         (mono_debug_get_domain_data): New function.
15946         (mono_debug_add_method): Take an additional `MonoDomain *'
15947         argument.
15948         (mono_debug_source_location_from_address): Likewise.
15949         (mono_debug_il_offset_from_address): Likewise.
15950         (mono_debug_address_from_il_offset): Likewise.
15951
15952 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
15953
15954         * reflection.c: one more check for null type in custom attrs.
15955
15956 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15957
15958         * reflection.c: avoid warning (comparison is always false due to limited
15959         range of data type).
15960
15961 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15962
15963         * icall.c: throw an exception in Type.GetField if the argument 'name'
15964         is NULL.
15965
15966 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
15967
15968         * reflection.c: fixed handling of enums in named arguments to custom
15969         attributes (bug #42123).
15970
15971 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15972
15973         * reflection.c: use the right array element type and handle
15974         a null for a Type argument, too.
15975
15976 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
15977
15978         * reflection.c: handle arrays as arguments to custom attributes.
15979
15980 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15981
15982         * reflection.c: handle a string value in a custom attr
15983         ctor that takes an object.
15984
15985 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15986
15987         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
15988         (fix bug #42063)
15989
15990 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15991
15992         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
15993
15994 2003-04-27  Martin Baulig  <martin@ximian.com>
15995
15996         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
15997         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
15998         MONO_DEBUGGER_EVENT_BREAKPOINT.
15999         (mono_breakpoint_trampoline_code): Removed.
16000         (mono_debugger_event_handler): The last argument is now a
16001         `guint32'.
16002         (mono_debugger_insert_breakpoint_full): Removed the
16003         `use_trampoline' argument.
16004         (mono_debugger_method_has_breakpoint): Likewise.
16005         (mono_debugger_trampoline_breakpoint_callback): Renamed to
16006         mono_debugger_breakpoint_callback(); take the method and
16007         breakpoint number as arguments.
16008
16009 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16010
16011         * metadata.c: fix off by one when loading parameters attributes.
16012
16013 2003-04-24  Martin Baulig  <martin@ximian.com>
16014
16015         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
16016
16017 2003-04-24  Martin Baulig  <martin@ximian.com>
16018
16019         * mono-debug-debugger.c: Moved all code which interacts with the
16020         Mono Debugger here.
16021
16022         * debug-mono-symfile.c: This code now just deals with the symbol
16023         file itself, the debugger code is now in mono-debug-debugger.c.
16024
16025 2003-04-23  Martin Baulig  <martin@ximian.com>
16026
16027         * mono-debug.c (mono_debug_source_location_from_il_offset):
16028         New method; like mono_debug_source_location_from_address(), but
16029         takes an IL offset instead of a machine address.
16030
16031 2003-04-23  Martin Baulig  <martin@ximian.com>
16032
16033         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
16034         `line' field; this is now computed by the debugger.
16035
16036 2003-04-23  Martin Baulig  <martin@ximian.com>
16037
16038         * mono-debug.[ch]: New files.  This is the new debugging interface.
16039
16040         * mono-debug-debugger.[ch]: New files.  Moved all code which
16041         interacts with the Mono Debugger here.
16042
16043 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16044
16045         * domain.c (mono_init): initialize mono_defaults.monitor_class
16046
16047 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
16048
16049         * reflection.c (method_encode_code): Add a spicy exception to help
16050         future compiler authors.
16051
16052 2003-04-21  Martin Baulig  <martin@ximian.com>
16053
16054         * icall.c
16055         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16056         Make this work with relative pathnames; g_filename_to_uri() needs
16057         an absolute filename.
16058
16059 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
16060
16061         * icall.c: Track name changes in Object and ValueType.
16062
16063 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
16064
16065         * metadata.c (mono_type_stack_size): size should be a multiple of
16066         sizeof (gpointer)
16067
16068 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16069
16070         * gc.c:
16071         (internal_domain_finalize): moved into mono_domain_finalize. No need
16072         to create another thread because the finalizers will be run in the
16073         finalizer thread.
16074         
16075         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
16076         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
16077         to be run (MS does this too).
16078
16079 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16080
16081         * object.c (mono_class_compute_gc_descriptor): Update comment.
16082
16083         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
16084
16085         * image.h: Add synchronized wrapper cache.
16086
16087         * image.c (do_mono_image_open): Initialize cache.
16088
16089         * reflection.c (create_dynamic_mono_image): Initialize cache.
16090
16091 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16092
16093         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
16094         ves_icall_System_Buffer_ByteLengthInternal.
16095
16096 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16097
16098         * reflection.c: setup klass->nested_in earlier. Allow
16099         a dash in the assembly name.
16100
16101 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
16102
16103         * metadata.c (mono_type_to_unmanaged): dont access
16104         type->data.klass for MONO_TYPE_OBJECT
16105         (mono_type_to_unmanaged): consider System.Delegate class
16106
16107 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
16108
16109         * class.c: just setup supertypes in the proper place instead of
16110         initializing the full element class for arrays.
16111
16112 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16113
16114         * class.c: ensure the element class of arrays is initialized.
16115         Setup the supertype info for array classes, too.
16116
16117 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
16118
16119         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
16120
16121 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16122
16123         * Makefile.am: re-added -m option when running cygpath. This way,
16124         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
16125         separator.
16126         * mono-config.c: same codepath for locating mono config file for WIN32
16127         and the rest.
16128         * assembly.c: if mono_assembly_setrootdir is called, don't override
16129         the value set.
16130
16131 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16132
16133         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
16134         MONO_ASSEMBLIES variable.
16135
16136 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16137
16138         * icall.c: added Assembly::GetNamespaces() icall.
16139
16140 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16141
16142         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
16143
16144 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
16145
16146         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
16147         * object.c: fixed bug in the construction of vtable for proxies
16148
16149 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16150
16151         * object.c (mono_array_new): Mark mono_array_new as an icall.
16152
16153 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16154
16155         * class.c: fixed test for public method when overriding interfaces.
16156         Closes bug #40970.
16157
16158 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16159
16160         * appdomain.h, domain.c: added mono_domain_foreach() to
16161         be able to access the currently loaded appdomains.
16162         * object.c: make string interning work across sppdomains.
16163         Mark some functions for use as icalls.
16164
16165 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16166
16167         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
16168
16169         * reflection.h reflection.c: Allocate long living data using 
16170         GC_MALLOC_ATOMIC so the collector does not need to scan it.
16171
16172         * reflection.c: Double the allocation size in streams instead of
16173         increasing it, to prevent unneccesary copying on large assemblies.
16174         
16175         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
16176         creation if the assembly does not have the Run flag set.
16177
16178 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16179
16180         * class.h: avoid the C++ keywords in header files (Jerome Laban
16181         spotted and fixed this).
16182
16183 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16184
16185         * object.c:
16186         (mono_unhandled_exception): fill in the arguments for the
16187         UnhandledException event. Only trigger that event for the default
16188         domain (as MS does).
16189
16190 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
16191
16192         * object.c: Improve typed allocation stuff based on suggestions from
16193         Paolo. Also turn it on if the GC library supports it.
16194
16195 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
16196
16197         * object.c object.h class.h: Added experimental typed allocation
16198         facility using the interfaces in gc_gcj.h.
16199
16200         * os/gc_wrapper.h: Added new include files.
16201         
16202 2003-04-03  Martin Baulig  <martin@ximian.com>
16203
16204         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
16205         which is not yet enabled by default.
16206
16207         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
16208         functions.
16209         (mono_gc_lock, mono_gc_unlock): New static functions.
16210
16211         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
16212         functions; stop/start the world for the garbage collector.  This
16213         is using the windows API; we need to complete the SuspendThread()/
16214         ResumeThread() implementation in the io-layer to make this work on Unix.
16215         (mono_gc_push_all_stacks): New public function; tells the garbage
16216         collector about the stack pointers from all managed threads.
16217
16218 2003-04-03  Martin Baulig  <martin@ximian.com>
16219
16220         * object.h (MonoThread): Added `gpointer stack_ptr'.
16221
16222         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
16223
16224 2003-04-03  Martin Baulig  <martin@ximian.com>
16225
16226         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
16227
16228 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
16229
16230         * reflection.c (typebuilder_setup_fields): Initialize field.first and
16231         field.last.
16232
16233 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
16234
16235         * loader.c (mono_lookup_internal_call): Report the corlib that is
16236         out of sync.
16237
16238 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
16239
16240         * icall.c (ves_icall_type_GetTypeCode): fixed check for
16241         System.DBNull (it's class not valuetype).
16242
16243 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16244
16245         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
16246         if the array method was already assigned a token (fixes bug#40646).
16247
16248 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
16249
16250         * reflection.c (mono_reflection_get_type): Attempt type resolve even
16251         if no assembly is given.
16252
16253 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
16254
16255         * metadata.h: Added the new tables.
16256
16257         * row-indexes.h: Added definitions for new tables.
16258
16259         * metadata.c: Add schemas for new tables, and add support for
16260         computing the sizes of them.
16261
16262         * class.c: Update for handling the new type cases.
16263
16264 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
16265
16266         * metadata.h (MONO_TYPE_IS_VOID): new macro
16267
16268 2003-03-31  Martin Baulig  <martin@ximian.com>
16269
16270         * threads.h (MonoThreadCallbacks): Added `thread_created'.
16271
16272         * threads.c (mono_thread_new_init): Call `thread_created' in the
16273         mono_thread_callbacks.
16274
16275 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
16276
16277         * loader.h: added marshalbyrefobject_class to mono_defaults
16278         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
16279         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
16280           generation of output parameters.
16281           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
16282         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
16283           contextbound and the target object belongs to the context of the caller.
16284         * object.h: added context and unwrapped_server variables in MonoRealProxy.
16285         * object.c: Implemented support for interfaces and abstract classes
16286           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
16287           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
16288
16289 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
16290
16291         * class.h class.c (mono_class_is_subclass_of): New function.
16292         
16293         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
16294         routines for most common case (calls from ArrayList::ToArray).
16295
16296         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
16297         routine so programs which call Environment::Exit() can be profiled.
16298
16299         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
16300         Added MONO_ARCH_SAVE_REGS.
16301
16302         * icall.c (ves_icall_type_is_subtype_of): Use new function.
16303
16304 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
16305
16306         * blob.h: Add a couple of new MonoType types definitions.
16307
16308         * tabledefs.h: Add a couple of new call convs.
16309
16310 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
16311
16312         * reflection.h (MonoReflectionDynamicAssembly): track changes in
16313         the layout of the class.
16314
16315         * reflection.c (alloc_table): double the size on overflow to avoid
16316         unnecessary copying.
16317
16318         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
16319         avoid filling out metadata tables and blobs. Also set mb->ilgen to
16320         null so it can be garbage collected.
16321         
16322 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
16323
16324         * reflection.c (mono_reflection_get_type): Return the resolved type
16325         only if it is in the assembly we searched.
16326
16327         * reflection.c (ensure_runtime_vtable): Initialize method slots.
16328
16329         * class.c (mono_class_setup_vtable): Set the slot of the overriding
16330         method.
16331
16332 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16333
16334         * appdomain.c:
16335         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
16336         the right one is 'file:///blah', but MS allows it.
16337         * assembly.c:
16338         (mono_assembly_open): allow 'file://blah'
16339
16340         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
16341
16342 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
16343
16344         * socket-io.c: fixes bug #40310.
16345
16346 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
16347
16348         * reflection.c (mono_reflection_parse_type): handle deeply nested
16349         types correctly.
16350
16351         * reflection.c (mono_image_create_token): Use unique token values
16352         since they will be put into a hash table.
16353
16354         * class.c (mono_class_setup_vtable): If a method occurs in more than
16355         one place in the vtable, and it gets overriden, then change the
16356         other occurances too.
16357
16358         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
16359         object as return type.
16360
16361 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
16362
16363         * icall.c: Deleted "ToString" implementation for double and float
16364         because they are full implemented in managed code.
16365
16366 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16367
16368         * reflection.c, reflection.h: implemented and exported functions
16369         to retrieve info about custom attributes.
16370
16371 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16372
16373         * appdomain.c: moved Uri handling to assembly.c
16374         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
16375         work when using a file Uri in *nix and windows.
16376
16377         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
16378         GetReferencedAssemblies.
16379
16380 2003-03-18  Dick Porter  <dick@ximian.com>
16381
16382         * icall.c: Rename a couple of internal calls
16383
16384         * threads.c: Set the thread state to Stopped when a thread exits.
16385         Fixes bug 39377.
16386
16387 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
16388
16389         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
16390         New icall.
16391
16392         * object.c (mono_class_vtable): fix warning.
16393
16394 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
16395
16396         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
16397
16398         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
16399         memory.
16400         (method_encode_clauses): Create exception info structures in the right
16401         order.
16402         (mono_reflection_setup_internal_class): Initialize supertypes field.
16403
16404         * class.c object.c: Handle interfaces which implement other interfaces 
16405         correctly.
16406
16407         * class.h class.c: Move the supertypes array initialization code into 
16408         a separate function so it can be used for dynamic types too. Also call
16409         it earlier, in mono_class_init(), since it can be used before the
16410         type is initialized.
16411
16412 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16413
16414         * Makefile.am:
16415         * assembly.c:
16416         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
16417
16418         * appdomain.c:
16419         * appdomain.h:
16420         * marshal.c:
16421         * object.c: remove warnings.
16422
16423 2003-03-13  Martin Baulig  <martin@ximian.com>
16424
16425         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
16426         (MonoDebugLexicalBlockEntry): New types.
16427
16428         * debug-mono-symfile.c
16429         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
16430
16431 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16432
16433         * process.c: ret can be any non-zero value accroding to MS doc.
16434
16435 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
16436
16437         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
16438         fixing a warning for a miss-used prototype, would have cause
16439         random memory corruption.
16440
16441 2003-03-07  Martin Baulig  <martin@ximian.com>
16442
16443         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
16444         getting really annoying ....
16445
16446 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
16447
16448         * reflection.c (fixup_method): added support for array methods.
16449
16450 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16451
16452         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
16453         (pointed out by Michael Adams).
16454
16455 2003-03-04  Dick Porter  <dick@ximian.com>
16456
16457         * icall.c: Temporarily reverted the Double and Single ToString()
16458         change, because it broke nunit.
16459
16460 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
16461
16462         * object.h, threads.h: make include files compatible with C++
16463         (patch by Jerome Laban <jlaban@wanadoo.fr>).
16464
16465 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
16466
16467         * icall.c: Erased ToString helper functions for Double and Single.
16468         Now, that implementations ar all in managed code (Double and Single
16469         Formatters).
16470
16471 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
16472
16473         * appdomain.c: Added method for initializing the default context of
16474         a domain. Added internal call for getting the default context.
16475         * appdomain.h: Added context variable in MonoDomain struct.
16476         * domain.c: mono_domain_set also sets the default context of the domain
16477         * icall.c: Mapped internal method InternalGetDefaultContext.
16478         * object.c: mono_object_get_virtual_method returns always a remoting
16479         wrapper if the object is a transparent proxy.
16480         mono_runtime_invoke_array: when creating an object by calling the
16481         constructor, if the created object is a proxy, then the constructor should
16482         be called using the a remoting wrapper.
16483
16484 2003-03-03  Dick Porter  <dick@ximian.com>
16485
16486         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
16487         variable so it compiles on solaris.  Problem spotted by
16488         Christopher Taylor <ct@cs.clemson.edu>
16489
16490 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16491
16492         * appdomain.c:
16493         (get_info_from_assembly_name): don't leak value.
16494
16495         * icall.c:
16496         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
16497         result.
16498
16499 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16500
16501         * assembly.c: export mono_image_load_references ().
16502         * class.c: handle function pointers. mono_class_from_name() now
16503         supports nested type names directly.
16504
16505 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
16506
16507         * reflection.h reflection.c: Encode already created dynamic methods 
16508         and fields correctly as a DEF instead of a REF.
16509
16510         * reflection.c: Get rid of the force_ref argument to 
16511         mono_image_typedef_or_ref since it was wrong in the first place.
16512
16513         * string-icalls.c: add error checking to string constructors according
16514         to the MSDN docs.
16515
16516         * reflection.c: Emit types in the order their TypeBuilders were 
16517         created. Previously, a new table index was assigned to each type before
16518         the tables were emitted. This was wrong because the signature blob
16519         might already refer to a type by its original table index.
16520
16521 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
16522
16523         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
16524         change.
16525         
16526 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16527
16528         * Makefile.am: make assemblies dir have \ instead of / on windows.
16529
16530 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
16531
16532         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
16533         iterate over the NESTEDCLASS table using a linear search since the
16534         table is not guaranteed to be sorted by the secondary key.
16535
16536         * class.c (mono_class_create_from_typedef): fixed up call to
16537         mono_metadata_nesting_typedef.
16538         
16539 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
16540
16541         * marshal.c (mono_string_to_byvalstr): clear the memory as
16542         suggested by Jerome Laban <jlaban@wanadoo.fr>
16543
16544 2003-02-26  Dick Porter  <dick@ximian.com>
16545
16546         * process.c: Cope with padding in .rsrc blocks
16547
16548 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
16549
16550         * metadata.h: reverted the filter_len change, it breaks reflection
16551         
16552 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
16553
16554         * metadata.h: added a new field to store the filter_len
16555         
16556
16557 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16558
16559         * reflection.c: handle custom attributes for types and members
16560         created with Reflection.Emit (bug#38422).
16561
16562 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
16563
16564         * reflection.c: define RTSpecialName automatically for constructors for
16565         compatibility with MS.NET.
16566
16567         * reflection.c (mono_reflection_create_runtime_class): initialize
16568         nested_in field of dynamically created classes.
16569
16570 2003-02-22  Martin Baulig  <martin@ximian.com>
16571
16572         * debug-mono-symfile.h: Incremented version number.
16573
16574 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
16575
16576         * object.h icall.c process.c: fix warnings.
16577
16578 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
16579
16580         * appdomain.h appdomain.c:
16581         (mono_domain_try_type_resolve): split the 
16582         name_or_tb argument into a name and a tb argument.
16583         (mono_domain_has_type_resolve): new function to check whenever the
16584         application has registered a TypeResolve event handler.
16585         
16586         * icall.c reflection.h reflection.c: move the type resolve logic into
16587         mono_reflection_get_type () so it will be invoked when 
16588         Assembly::GetType () is called.
16589
16590         * reflection.c:
16591         (mono_reflection_get_type): renamed to get_type_internal.
16592         (mono_reflection_get_type): fixed type name generation so it works 
16593         for nested types too.
16594         (mono_reflection_get_type): call has_type_resolve () to avoid the 
16595         costly type name generation if there is no resolve event handler.
16596
16597 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16598
16599         * class.c, image.c: load exported types from file references.
16600
16601 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
16602
16603         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
16604           used to cache the managed methods used to create proxies and make 
16605           remote invocation of methods.
16606         * class.h: Added in MonoVTable a flag to indicate that a class needs 
16607           to be remotely created.
16608         * object.c: Modified the method mono_class_vtable(). It now initializes 
16609           the remote flag of the vtable. Modified mono_object_new_specific(), 
16610           so now it checks the remote flag.
16611         * icall.c: Added a couple of internal methods, one for enabling instance 
16612           creation interception for a type, and one for creating objects bypassing
16613           the remote check.
16614
16615 2003-02-18  Martin Baulig  <martin@ximian.com>
16616
16617         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
16618         New interncall to get a method's metadata token.
16619
16620         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
16621         New interncall for the debugger.
16622
16623 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
16624
16625         * class.c (mono_class_setup_vtable): allocate supertype array
16626
16627 2003-02-18  Martin Baulig  <martin@ximian.com>
16628
16629         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
16630
16631 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16632
16633         * reflection.c:
16634         (assembly_name_to_aname): jump over unknown properties (i've found
16635         something like: 'type, assembly, version=xxx, custom=null, public...',
16636         so now will ignore custom=null and still get the rest of the values).
16637
16638 2003-02-17  Dick Porter  <dick@ximian.com>
16639
16640         * threads.c: Have Thread.Start() wait for a semaphore to signal
16641         that the thread has set up all its local data.  This fixes bug
16642         34323, where Abort() raced the new thread's TLS data.
16643
16644         Also removes the handle_store() call from start_wrapper, because
16645         threads are now always created suspended and there is no longer a
16646         race between the parent and child threads to store the info.
16647
16648 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
16649
16650         * image.c: explain the #- heap issue in a message, hopefully
16651         avoiding FAQs on mono-list.
16652
16653 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16654
16655         * icall.c:
16656         (GetEntryAssembly): if the domain has not invoked
16657         AppDomain.ExecuteAssembly yet, return the assembly of the default
16658         AppDomain.
16659
16660 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
16661
16662         * class.c (mono_ldtoken): make it work in dynamic assemblies.
16663
16664 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16665
16666         * metadata.c, reflection.c: simple speedup to type hash
16667         and equals code.
16668
16669 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
16670
16671         * image.c, image.h, class.c, assembly.c: move module loading
16672         to MonoImage. When loading metadata, consider alignemnet from
16673         the start of metadata, not from the metadata address in memory.
16674
16675 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
16676
16677         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
16678         AssemblyBuilder objects. Factored out custom attribute creation into
16679         a separate function.
16680         (create_custom_attr): new function to create custom attributes.
16681
16682 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
16683
16684         * Makefile.am: Got tired of typing the full pathname to pedump.
16685         Until there is another option, am installing this.
16686
16687 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
16688
16689         * class.c (class_compute_field_layout): always set field->parent 
16690         (mono_ldtoken): use mono_defaults.fieldhandle_class;
16691
16692 2003-02-11  Dick Porter  <dick@ximian.com>
16693
16694         * threads-types.h:
16695         * monitor.c: Rewrote Monitor, making lock much faster and
16696         Pulse/Wait work as specified.  Also uses much fewer handles, and only
16697         creates them as needed.
16698
16699         * exception.c: Added SynchronizationLockException
16700
16701         * threads.c: Deleted old Monitor implementation.  The new one is
16702         in a new file.
16703
16704 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16705
16706         * class.c: handled TypedReference type code. Set the correct size for
16707         class data. Setup interface_offsets for interface classes, too.
16708
16709 2003-02-09  Martin Baulig  <martin@ximian.com>
16710
16711         * debug-mono-symfile.h: Reflect latest symbol writer changes.
16712
16713 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
16714
16715         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
16716         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
16717         * object.c: fixed mono_object_get_virtual_method () for interfaces.
16718         * verify.c: check for code that runs after the end of the method.
16719
16720 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
16721
16722         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
16723         "System.Math::Round2".
16724         * sysmath.h: Added Floor, Round and Round2 definitions.
16725         * sysmath.c: Modified certain functions that were not 100% compliant
16726         with MS.NET (math precision) and added the implementation of Floor,
16727         Round and Round2.
16728
16729 2003-02-07  Martin Baulig  <martin@ximian.com>
16730
16731         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
16732
16733 2003-02-07  Martin Baulig  <martin@ximian.com>
16734
16735         * debug-mono-symfile.c: Reflected latest symwriter changes.
16736         (mono_debug_create_mono_symbol_file): Removed.
16737         (mono_debug_open_mono_symbol_file): Take an argument which
16738         specifies whether to create a dynamic symbol file.
16739
16740 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
16741
16742         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
16743
16744 2003-02-05  Martin Baulig  <martin@ximian.com>
16745
16746         * reflection.c (mono_image_build_metadata): Make this public,
16747         protect it against being called multiple times, don't create
16748         resources and don't build the compressed metadata here.
16749         (mono_image_create_pefile): Do this here.
16750
16751         * icall.c
16752         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
16753
16754 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16755
16756         * socket-io.c: fixed bug #36322.
16757
16758 2003-02-06  Piers Haken <piersh@friskit.com>
16759
16760         * appdomain.[ch]:
16761         * class.h:
16762         * debug-mono-symfile.c:
16763         * icall.c:
16764         * loader.c:
16765         * mono-config.c:
16766         * monosn.c:
16767         * reflection.c:
16768         * socket-io.c: warning cleanups
16769
16770 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
16771
16772         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
16773         function. works like remoting invoke, but does a check for the Proxy first.
16774
16775 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
16776
16777         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
16778
16779 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
16780
16781         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
16782         array of pointers.
16783         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
16784         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
16785
16786         * object.c (mono_store_remote_field_new): used by the new jit
16787         instead of mono_store_remote_field
16788         (mono_load_remote_field_new): used by the new jit
16789         instead of mono_load_remote_field
16790
16791 2003-02-05  Patrik Torstensson
16792
16793         * appdomain.c: changed unload to take the domain id instead
16794         of domain
16795         
16796         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
16797
16798
16799 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16800
16801         * appdomain.c: don't look for assemblies in ApplicationBase if
16802         PrivateBinPathProbe is set.
16803
16804 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16805
16806         * object.c: make the first argument in main_args contain the absolute
16807         path to the assembly. Fixes bug #37511.
16808
16809 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16810
16811         * icall.c: get correct UTC offset for countries not using daylight
16812         time saving. Fixes bug #30030.
16813
16814 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16815
16816         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
16817         and 1 are the family).
16818
16819 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
16820
16821         * icall.c (ves_icall_InternalExecute): removed wrong assertion
16822
16823         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
16824
16825 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
16826
16827         * reflection.c: added support for SignatureHelper tokens, which is
16828         needed by the Calli opcode.
16829
16830         * reflection.h: track changes to SignatureHelper class.
16831
16832         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
16833
16834 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16835
16836         * appdomain.c: fixed loading assemblies from PrivateBinPath.
16837
16838 2003-02-03  Patrik Torstensson
16839         * appdomain.[c|h], domain.c : 
16840          - Added support for getting a domain via domain id
16841          - Support for setting and getting domain from System.AppDomain 
16842            (used in cross appdomain channel)
16843          - Added support for get/set for a MonoAppContext on a thread 
16844            (Context class in System.Runtime.Remoting.Contexts),
16845          - Removed hack in Get/SetData and ExecuteAssembly.
16846         
16847         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
16848         the managed world to get control when a proxy is created.
16849
16850         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
16851         
16852 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
16853
16854         * icall.c
16855         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16856         Populate the codebase field as well.
16857
16858 2003-02-02  Martin Baulig  <martin@ximian.com>
16859
16860         * debug-mono-symfile.c
16861         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
16862         (mono_debug_symfile_add_method): Allow interncalls.
16863
16864 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16865
16866         * icall.c: throw parse exception if strtod fails or the string is empty.
16867
16868 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
16869
16870         * marshal.c: handle object type separately from defined
16871         class types.
16872
16873 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
16874
16875         * marshal.c: handle NATIVE_LPSTR for strings when it's
16876         explicitly specified.
16877
16878 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
16879
16880         * reflection.c, reflection.h, icall.c: setup the reflection
16881         handle cache for ModuleBuilders and AssemblyBuilders.
16882
16883 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
16884
16885         * reflection.c (reflection_methodbuilder_to_mono_method): set
16886         pinvoke flag
16887
16888 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16889
16890         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
16891
16892 2003-01-29  Dick Porter  <dick@ximian.com>
16893
16894         * threads.c: No need for the fake_thread kludge now that Thread
16895         doesn't run a class constructor
16896         
16897 2003-01-29  Dick Porter  <dick@ximian.com>
16898
16899         * threads.c: Use g_direct_hash instead of the rather bogus
16900         g_int_hash
16901
16902 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
16903
16904         * marshal.c (mono_marshal_get_native_wrapper): add check for null
16905         (fix pinvoke12.exe)
16906         (mono_marshal_get_struct_to_ptr): generate valid IL code
16907         (mono_marshal_get_ptr_to_struct): generate valid IL code
16908         (*): correctly set sig->pinvoke, we need to memdup the signature
16909         to do that
16910
16911 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16912
16913         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
16914         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
16915
16916 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16917
16918         * profiler.c: provide more callers information.
16919
16920 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
16921
16922         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
16923
16924         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
16925
16926         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
16927
16928 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16929
16930         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
16931         exception instead of going into an infinite loop on dates which it 
16932         can't yet handle.
16933
16934         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
16935         out-of-range exception if needed.
16936
16937         * class.c (mono_class_setup_vtable): allow a virtual method to provide
16938         an implementation for an interface method and to override an inherited
16939         method at the same time. 
16940         Imagine a scenario when a virtual method is used to override a
16941         virtual abstract method in a parent class, and this same method 
16942         provides an implementation for an method inherited from an interface. 
16943         In this case, the interface resolution code will set im->slot, which 
16944         means that the virtual method override pass will skip this method 
16945         which means a pointer to the abstract method inherited from the parent
16946         will remain in the vtable of this non-abstract class.
16947
16948         * class.c: (mono_class_setup_vtable): continue search for a real 
16949         method if only an abstract method is found.     
16950
16951 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16952
16953         * reflection.c: add size to encoding for ByValStr and ByValArray
16954         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
16955
16956 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16957
16958         * class.c (mono_class_setup_vtable): pass the override info as an
16959         argument.
16960
16961         * class.c (mono_class_setup_vtable): set the slot of overriding methods
16962         correctly.
16963         
16964         * reflection.c (ensure_runtime_vtable); add support for method 
16965         overrides.
16966         
16967 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16968
16969         * reflection.c (resolution_scope_from_image): Hack to work to work with
16970         dynamic assemblies.
16971
16972         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
16973         added a 'force_ref' argument to force this function to allways return 
16974         a TypeRef. This is needed by mono_image_get_memberref_token ().
16975         
16976 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16977
16978         * reflection.c (mono_image_get_type_info): interfaces really don't have
16979         a parent.
16980
16981         * reflection.c (mono_image_basic_init): fill out missing fields of
16982         image structure.
16983
16984         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
16985         dynamic assemblies. This is required so dynamic assemblies show up in
16986         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
16987         Type::GetType() etc. This is consistent with MS behaviour.
16988
16989         * image.c image.h reflection.c: add newly created classes to the name 
16990         cache so mono_class_get () will find them.      
16991
16992 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16993
16994         First part of changes to get IKVM.NET running under mono.
16995         
16996         * appdomain.h, appdomain.c: added new function 
16997         mono_domain_try_type_resolve() which will emit TypeResolve events. 
16998         This function will call AppDomain::DoTypeResolve to do the actual work.
16999
17000         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
17001         moved existing code dealing with dynamic tokens to a new function 
17002         called mono_reflection_lookup_dynamic_token (). This function will 
17003         raise TypeResolve events when appropriate. Since reflection.c is not 
17004         part of libmetadata, a new hook function called 
17005         mono_lookup_dynamic_token() is added to class.c which will call this.
17006
17007         * assembly.h assembly.c: make the invoke_load_hook function public,
17008         so it can be called for dynamic assemblies.
17009
17010         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
17011
17012         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
17013         type isn't found.
17014
17015         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
17016         MonoGHashTable, since it contains pointers to objects which the GC 
17017         needs to track.
17018
17019         * assembly.c (search_loaded): remove unused variable.
17020         
17021 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
17022
17023         * object.c: fixed issue exposed by gcc-generated IL programs
17024         that use RVA data for pointers.
17025
17026 2003-01-25  Martin Baulig  <martin@ximian.com>
17027
17028         * threads.c (start_wrapper): Moved the initialization of
17029         `start_func' above the mono_new_thread_init() call to which we
17030         pass it as argument.
17031
17032 2003-01-24  Martin Baulig  <martin@ximian.com>
17033
17034         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
17035         the MonoThread pointer.
17036
17037 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
17038
17039         * icall.c: Rename `PowImpl' to Pow.
17040
17041 2003-01-23  Dick Porter  <dick@ximian.com>
17042
17043         * threads.c (start_wrapper): Create a Thread object if needed, so
17044         the Main() thread can do the class initialisation in a subthread
17045         that has been set up to allow managed code execution.
17046
17047         Pass the thread ID instead of the MonoThread pointer to the thread
17048         start and attach callbacks.  This change is required, because the
17049         jit thread start callback must be called _before_ the Thread
17050         object can be created.
17051         
17052         (mono_thread_init): Removed much object creation code that is no
17053         longer needed.  No managed code is called from here now.
17054
17055         * object.c (mono_runtime_exec_managed_code): Create a subthread
17056         for Main, and call back to the runtime to use it.
17057         Set the exit code when Main exits.
17058
17059         * gc.c: Make sure domain finalisation happens in a subthread.
17060         Re-enable threaded GC, fixing bug 31333 (again).
17061
17062         * environment.c: System.Environment internall calls (so far just
17063         ExitCode is here, the others are still in icall.c)
17064
17065         * appdomain.c (mono_runtime_cleanup): All threads running managed
17066         code should have finished before mono_runtime_cleanup() is
17067         reached, so no need to clean up threads.
17068
17069 2003-01-22  Martin Baulig  <martin@ximian.com>
17070
17071         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
17072         `gpointer func' arguments.      
17073         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
17074         but added `MonoThread *thread' argument.
17075         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
17076
17077         * threads.c (mono_new_thread_init): Added `gpointer func' argument
17078         and pass it to the mono_thread_start_cb callback.
17079         (mono_install_thread_callbacks): New public function to install a
17080         set of callbacks which are set by the debugger.
17081         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
17082
17083 2003-01-22  Martin Baulig  <martin@ximian.com>
17084
17085         * Makefile.am: Install debug-mono-symfile.h.
17086
17087 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
17088
17089         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
17090
17091 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
17092
17093         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
17094         * class.c (mono_ptr_class_get): correctly set access levels of pointers
17095         (mono_array_class_get): correctly set access levels of arrays
17096
17097 2003-01-20      Patrik Torstensson
17098         * image.h (MonoAssemblyName): changed major, minor, build, revision
17099         from signed to unsigned.
17100
17101 2003-01-20  sean kasun <skasun@azstarnet.com>
17102
17103         * reflection.c (load_cattr_value): Now this handles
17104         MONO_TYPE_SZARRAY.  Fixes bug #35629
17105
17106 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
17107
17108         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
17109         integer value
17110
17111 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17112
17113         * decimal.c: fixed bug #26056.
17114
17115 2003-01-17  Martin Baulig  <martin@ximian.com>
17116
17117         * gc.c: Raise an ExecutionEngineException instead of using g_error().
17118
17119 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17120
17121         * exception.[ch]:
17122         (mono_get_exception_type_initialization): new function.
17123
17124         * object.c: throw a TypeInitializationException when an exception is
17125         thrown invoking the class constructor.
17126
17127 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17128
17129         * reflection.c: fixed attribute reading.
17130
17131 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17132
17133         * icall.c:
17134         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
17135         provided, look for the type in the calling assembly and then in
17136         mscorlib; if the assembly name is provided, only try that one.
17137
17138 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17139
17140         * object.c: register the vtable before there is a chance it's
17141         queried again recursively.
17142
17143 2003-01-13  Duncan Mak  <duncan@ximian.com>
17144
17145         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
17146         gc-internal.h. 
17147         
17148 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
17149
17150         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
17151
17152 2003-01-11  Martin Baulig  <martin@ximian.com>
17153
17154         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
17155         this to 20 for the release.
17156
17157 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
17158
17159         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
17160
17161         * loader.c (mono_method_get_marshal_info): bug fix
17162
17163         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
17164         structures with explicit layout
17165
17166 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17167
17168         * profiler.c: made the output more readable (and sorted). 
17169         Added caller information for the allocation profiler.
17170
17171 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
17172
17173         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
17174
17175 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17176
17177         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
17178         to get value types.
17179         
17180 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
17181
17182         * object.c, profiler.h, profiler.c, profiler-private.h:
17183         Added object allocation profiler.
17184
17185 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
17186
17187         * reflection.h, reflection.c: handle global methods.
17188         Compress blob entries.
17189
17190 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
17191
17192         * marshal.c: fix compilation.
17193
17194 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
17195
17196         * loader.c (mono_method_get_marshal_info): impl.
17197
17198         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
17199
17200 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17201
17202         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
17203         for reference types.
17204
17205 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
17206
17207         * loader.c: fixed off by one error in loaded parameter names.
17208
17209 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
17210
17211         * marshal.c (mono_marshal_get_icall_wrapper): like
17212         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
17213         instead of a MonoMethod.
17214
17215 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17216
17217         * decimal.c: fixed bug #36537.
17218
17219 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
17220
17221         * marshal.c: throw a missing method exception if a
17222         P/Invoke method is not found.
17223
17224 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17225
17226         * icall.c: allow a null this for constructors.
17227
17228 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17229
17230         * icall.c: raise the proper exceptions if the arguments to the
17231         internal Invoke are incorrect.
17232
17233 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
17234
17235         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
17236
17237 2003-01-03  Martin Baulig  <martin@ximian.com>
17238
17239         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17240
17241 2002-12-31  Martin Baulig  <martin@ximian.com>
17242
17243         * debug-mono-symfile.c: Completely rewrote the type section.
17244         Instead of using individual malloc()ed fields, we use one big
17245         continuous memory area and offsets into this area.
17246         See the comments in the source code for details.
17247
17248 2002-12-30  Martin Baulig  <martin@ximian.com>
17249
17250         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
17251
17252 2002-12-30  Martin Baulig  <martin@ximian.com>
17253
17254         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
17255         line number table in this data blob instead of using an external
17256         pointer.
17257
17258 2002-12-28  Martin Baulig  <martin@ximian.com>
17259
17260         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17261
17262 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
17263
17264         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
17265         as a boxed return type.
17266
17267 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
17268
17269         * appdomain.c
17270         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
17271         g_build_filename to properly get separators on the filename created.
17272
17273         * object.h: Small change, introduce MonoMarshalByRefObject to
17274         track the layout of that structure in the C# universe as we make
17275         changes there.
17276
17277 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
17278
17279         * object.c: removed assert to allow static fields on interfaces.
17280         * loader.c: a TypeSpec may be used for any type, not just arrays.
17281
17282 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17283
17284         * class.c, class.h: added mono_class_array_element_size ().
17285         Ignore static methods in interfaces.
17286
17287 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17288
17289         * threads.c: fixed the build under cygwin.
17290
17291 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17292
17293         * reflection.c: handle nullref constants. Allocate keys for
17294         reflection handles with the GC.
17295
17296 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17297
17298         * threads.c, threads.h: added mono_thread_get_abort_signal()
17299         to get a suitable signal for thread abort.
17300
17301 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17302
17303         * metadata.c: fix handling of ExportedType table.
17304
17305 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17306
17307         * icall.c: added WriteWindowsDebugString internal call.
17308
17309 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17310
17311         * reflection.h: added fields to match C# implementation.
17312
17313 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17314
17315         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
17316
17317 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
17318
17319         * gc.h, gc-internal.h: Rename header for GC internal calls to
17320         gc-internal.h from gc.h as to not clash with Boehm GC having its
17321         header installed as <gc.h> in outside include paths.
17322         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
17323         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
17324
17325 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17326
17327         * icall.c: assign minor, build and revision in FillName.
17328
17329 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
17330
17331         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
17332         Added support for running code generated by Reflection.Emit.
17333
17334 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17335
17336         * appdomain.c: check for NULL argument in LoadFrom.
17337
17338 2002-12-10  Dick Porter  <dick@ximian.com>
17339
17340         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
17341
17342 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17343
17344         * appdomain.c: fix buglet when building exe file name.  Handle full
17345         assembly name (needed after latest changes to AssemblyName).
17346         * image.c:
17347         (mono_image_close): free some hashtables.
17348
17349 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
17350
17351         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
17352         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
17353         on some systems (redhat 7.3) 
17354
17355 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
17356
17357         * threads.c: delete the critical section of a sync block,
17358         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
17359
17360 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
17361
17362         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
17363
17364 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17365
17366         * appdomain.[ch]: handle the assembly preload event to try loading the
17367         assemblies using the paths we have in the current domain.
17368
17369         * assembly.[ch]: created an assembly preload hook that is called to try
17370         loading the assembly by other means that the ones provided here.
17371
17372         * domain.c: initialize the domain search path.
17373
17374         From now on, assemblies (TODO: except corlib and System) are loaded
17375         according to these rules when using mono_assembly_load ():
17376
17377                 1. It tries to load the assembly from the ApplicationBase
17378                 of the current domain appending .dll and .exe (TODO: have to
17379                 try loading from name/name.dll and name/name.exe).
17380
17381                 2. It tries the search path specified in PrivateBinPath for the
17382                 current domain (if any).
17383
17384                 3. Previous behavior.
17385
17386 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
17387
17388         * icall.c: implemented GetInterfaceMap() related icall.
17389         * domain.c, loader.h: load MethodInfo in mono_defaults.
17390
17391 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17392
17393         * gc.c: disable the finalizer thread for now, untill all the issues
17394         with it are resolved.
17395
17396 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17397
17398         * string-icalls.c: handle embedded nulls in string ctor when the
17399         length is specified.
17400
17401 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17402
17403         * class.c: look for explicit interface implementation in parent
17404         classes, too.
17405
17406 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
17407
17408         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
17409
17410 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17411
17412         * gc.c: protect handles with a critical section.
17413
17414 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17415
17416         * icall.c:
17417         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
17418         parameters. If no assembly specified, try getting the type from all
17419         the assemblies in the current domain, else, load the assembly and get
17420         the type from it.
17421
17422 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17423
17424         * marshal.c: applied patch from Aleksey Demakov that fixes
17425         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
17426
17427 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17428
17429         * icall.c: fixed get_location.
17430
17431 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
17432
17433         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
17434         declarations to make it work with older gcc. 
17435
17436         * loader.c (mono_get_method): set signature->pinvoke for native calls
17437
17438 2002-11-20  Dick Porter  <dick@ximian.com>
17439
17440         * threads.c (mono_thread_init): Set the main thread's handle
17441
17442 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17443
17444         * gc.c: allow compilation without GC support. Changed to match the
17445         mono coding style.
17446
17447 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17448
17449         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
17450
17451 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
17452
17453         * reflection.c: set a public key token on the core assemblies.
17454
17455 2002-11-18  Dick Porter  <dick@ximian.com>
17456
17457         * threads.c: Split out some thread initialisation so that other
17458         files can set the start callback function.
17459
17460         * gc.c: Run finalisers in a separate thread, to avoid stack
17461         overflow.  Fixes bug 31333.
17462
17463         * appdomain.c: Set up GC finalisation thread.
17464
17465         * reflection.c: 
17466         * object.c: 
17467         * domain.c: Use gc.h macros for GC_malloc
17468         
17469 2002-11-15  Dick Porter  <dick@ximian.com>
17470
17471         * threadpool.c: 
17472         * threads.c:
17473         * appdomain.c: Removed mono_runtime_init_with_attach(),
17474         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
17475         merging the extra parameter with the existing function.  Removed
17476         unneeded code in mono_thread_attach().
17477
17478 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
17479
17480         * image.c (mono_image_loaded_by_guid): a method to get loaded
17481         images by guid. 
17482         (load_metadata_ptrs): we store the guid as string.
17483
17484 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
17485
17486         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
17487
17488         * metadata.c (mono_guid_to_string): imported method form Zoltan
17489         Varga (slightly modified)
17490
17491         * assembly.c (mono_assembly_open): load precompiled code
17492
17493         * loader.h (MonoMethod): we store the method token for use in the
17494         aot compiler. 
17495
17496 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17497
17498         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
17499         the hook function called when an assembly is loaded.
17500         
17501         * domain.c: Modified file.
17502         (mono_domain_assembly_load): removed hash table insertion of assemblies.
17503
17504         Fixes bug #33196.
17505
17506 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
17507
17508         * reflection.c: Map PEFileKind to the value expected by the WinNT
17509         image loader. 
17510
17511 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17512
17513         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
17514         Read until the buffer is filled completely.
17515
17516 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17517
17518         * icall.c: implemented MonoType.InternalGetEvent ().
17519
17520 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17521
17522         * appdomain.c: implemented InitAppDomainSetup. Delayed
17523         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
17524         the entry_assembly.
17525
17526         * assembly.c: base_dir is now an absolute path ending with
17527         G_DIR_SEPARATOR.
17528
17529         * icall.c: modified get_location according to the above changes.
17530
17531         * object.c: init AppDomain.SetupInformation for the default domain after
17532         we have the entry assembly.
17533
17534         * domain.c: when unloading a domain, setup = NULL.
17535
17536 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
17537
17538         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
17539
17540 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
17541
17542         * object.h, object.c: introduced mono_object_get_virtual_method ()
17543         to lookup the method invoked on an object when a callvirt is done on
17544         a method.
17545         * icall.c: make MethodInfo::Invoke() always do a virtual call.
17546
17547 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17548
17549         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
17550         current domain when loaded an assembly and failed to load it.
17551
17552         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
17553
17554 2002-10-31  Dick Porter  <dick@ximian.com>
17555
17556         * icall.c: 
17557         * file-io.h: 
17558         * file-io.c: Return the error status in a parameter, as the
17559         GetLastError() value has long since been blown away if we try and
17560         look it up in a subsequent internal call invocation.  Delete the
17561         GetLastError() internal call, because it's useless.
17562
17563 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
17564
17565         * class.[ch]: added cast_class to fix bug 29517
17566
17567 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
17568
17569         * marshal.c: create valid IL code in the filter clause:
17570         the new JIT is less forgiving:-)
17571
17572 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17573
17574         * icall.c: removed get_property internal call.
17575
17576 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
17577
17578         * appdomain.h domain.c: Added an ID to appdomains.
17579         
17580         * threads.c threads.h icall.c: Implement icall
17581         Thread:GetDomainID(), and remove unused icall 
17582         CurrentThreadDomain_internal.
17583
17584 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17585
17586         * icall.c: Don't recurse through the base types in GetConstructor.
17587         Fixes bug #32063. 
17588
17589 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17590
17591         * mempool.h, mempool.c: added mono_mempool_empty() and
17592         mono_mempool_stats().
17593
17594 2002-10-23  Dick Porter  <dick@ximian.com>
17595
17596         * file-io.c: 
17597         * file-io.h: 
17598         * icall.c: Added MonoIO.GetFileType internal call
17599
17600 2002-10-17  Dick Porter  <dick@ximian.com>
17601
17602         * appdomain.c (mono_runtime_cleanup): Don't signal the async
17603         delegate semaphore before waiting for all threads to finish,
17604         because new threads can also call async delegates.  Fixes bug
17605         32004.
17606
17607         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
17608         of 3 seconds, in case another async job is queued.  (This part is
17609         needed because the bug fix reintroduced the 3s exit lag.)  This
17610         makes the mono_runtime_shutdown flag superfluous.
17611
17612 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17613
17614         * reflection.c: include ehader size in method section headers.
17615         Really check for suplicated modules entries.
17616
17617 2002-10-17  Martin Baulig  <martin@gnome.org>
17618
17619         * debug-mono-symfile.c: Added back support for locals.
17620
17621 2002-10-14  Martin Baulig  <martin@gnome.org>
17622
17623         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
17624         MONO_TYPE_VOID.
17625
17626 2002-10-14  Martin Baulig  <martin@gnome.org>
17627
17628         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
17629         mono_class_get() instead of looking in the class cache. 
17630
17631 2002-10-13  Martin Baulig  <martin@gnome.org>
17632
17633         * debug-mono-symfile.c: Set version number to 28, include the
17634         signature in method names.
17635
17636 2002-10-13  Martin Baulig  <martin@gnome.org>
17637
17638         * debug-mono-symfile.h: Set version number to 27.
17639
17640 2002-10-11  Martin Baulig  <martin@gnome.org>
17641
17642         * gc.c: Don't register/unregister NULL pointers as disappearing links.
17643
17644 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17645
17646         * metadata.c, metadata.h: added helper function to allocate signatures.
17647
17648 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17649
17650         * icall.c: added internal call to get the location of machine.config.
17651
17652 2002-10-08  Martin Baulig  <martin@gnome.org>
17653
17654         * debug-mono-symfile.c: Ignore classes with a pending init for the
17655         moment.
17656
17657 2002-10-03  Dick Porter  <dick@ximian.com>
17658
17659         * threads.c: Freebsd pthread_t is a pointer
17660
17661 2002-10-03  Dick Porter  <dick@ximian.com>
17662
17663         * socket-io.c: Implemented GetHostName_internal
17664
17665 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17666
17667         * mono-config.c:
17668         (mono_config_parse_file): don't leak the text.
17669
17670 2002-10-02  Martin Baulig  <martin@gnome.org>
17671
17672         * debug-mono-symfile.c: Added support for methods.
17673
17674 2002-10-01  Martin Baulig  <martin@gnome.org>
17675
17676         * debug-mono-symfile.c: Don't emit methods and line numbers for
17677         the dynamic symbol file, just write the type table.  We can easily
17678         have an external helper program which creates a symbol file for an
17679         IL file.        
17680
17681 2002-10-01  Dick Porter  <dick@ximian.com>
17682
17683         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
17684         Only add the handle to the cleanup array when we're about to
17685         launch the thread.  Bug 31425 deadlocked when the test was run on
17686         mono under w32.
17687
17688 2002-10-01  Martin Baulig  <martin@gnome.org>
17689
17690         * debug-mono-symfile.c: Added support for properties.
17691
17692 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17693
17694         * reflection.c: unaligned store fix from Mark Crichton
17695         <crichton@gimp.org>.
17696
17697 2002-09-27  Martin Baulig  <martin@gnome.org>
17698
17699         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
17700         New interncall.
17701
17702 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17703
17704         * assembly.h, assembly.c: use a sane API to hook into the assembly
17705         loading process instead of a useless special-purpouse hack
17706         (ngen needs a hook, too, for example).
17707
17708 2002-09-27  Dick Porter  <dick@ximian.com>
17709
17710         * threads.c (mono_thread_init): Call GetCurrentProcess() so
17711         io-layer can set up some process handle info.  Not needed on w32,
17712         but doesn't hurt either.
17713
17714         * process.c: Pass the program name in the second parameter to
17715         CreateProcess, so the path is searched.  Include the working
17716         directory. Implemented process name, process enumeration, and some
17717         process detail internal calls.
17718         
17719         * icall.c: Added internal calls for process lookup, and some
17720         process details
17721
17722 2002-09-26  Martin Baulig  <martin@gnome.org>
17723
17724         * assembly.c (mono_install_open_assembly_hook): New global
17725         function to install a function to be invoked each time a new
17726         assembly is loaded.
17727         (mono_assembly_open): Run this callback function if set.
17728
17729         * debug-mono-symfile.c: Put back line numbers for the dynamic
17730         symbol file and also record the .il file as source file.  This
17731         allows us to install the temporary symbol file as `file.dbg' just
17732         like a compiler-generated one.
17733
17734 2002-09-26  Nick Zigarovich <nick@chemlab.org>
17735
17736         * Corrected typo in gc.c (BOHEM vs BOEHM).
17737
17738 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17739
17740         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
17741         GetProperties. Also avoid calling g_slist_length in GetProperties and
17742         GetMethods.
17743
17744 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17745
17746         * reflection.c: avoid unaligned stores (bug spotted by
17747         Mark Crichton  <crichton@gimp.org>).
17748
17749 2002-09-25  Martin Baulig  <martin@gnome.org>
17750
17751         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
17752         instead of guint64 for addresses and added prologue/epilogue info.
17753
17754 2002-09-25  Martin Baulig  <martin@gnome.org>
17755
17756         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
17757         store line number info.  For the dynamic symbol file, we only need
17758         to provide the JIT generated dynamic line number info for the dynamic
17759         symbol file.
17760
17761 2002-09-25  Martin Baulig  <martin@gnome.org>
17762
17763         * debug-mono-symfile.h: Incremented version number.
17764
17765 2002-09-24  Martin Baulig  <martin@gnome.org>
17766
17767         * class.c (mono_debugger_class_init_func): New global function
17768         pointer variable.
17769         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
17770         call it.
17771
17772         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
17773         function.  This is called via the mono_debugger_class_init_func
17774         hook to add all types to the dynamic type table.
17775         (ves_icall_MonoDebugger_GetType): New interncall to get a class
17776         from its metadata token.
17777
17778         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
17779         New interncall for the debugger.
17780
17781 2002-09-24  Nick Drochak <ndrochak@gol.com>
17782
17783         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
17784         before using it in case it is null.
17785         
17786 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17787
17788         * metadata.c: allow custom modifiers in local var signatures
17789         (bug spotted by Zoltan Varga).
17790
17791 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17792
17793         * class.c: deal with the <Module> class that may have a NULL vtable.
17794         Eliminate warnings.
17795
17796 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17797
17798         * image.c, image.h: more strong name helpers.
17799         * monosn.c: more work: convert pem keys to cryptoapi format.
17800
17801 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17802
17803         * string-icalls.c: speedup IndexOf.
17804
17805 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17806
17807         * icall.c: updates from Zoltan.2.Varga@nokia.com.
17808
17809 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
17810
17811         * icall.c: cleanup: use mono_object_domain ().
17812
17813 2002-09-23  Martin Baulig  <martin@gnome.org>
17814
17815         * debug-mono-symfile.c: Improved type support.
17816
17817 2002-09-22  Martin Baulig  <martin@gnome.org>
17818
17819         * debug-mono-symfile.c: Added support for reference types and strings.
17820
17821 2002-09-22  Martin Baulig  <martin@gnome.org>
17822
17823         * debug-mono-symfile.c: Started to work on the type table.
17824
17825 2002-09-21  Martin Baulig  <martin@gnome.org>
17826
17827         * debug-mono-symfile.c: Largely reworked the symbol table format.
17828         The symbol table is now incrementally updated each time a new
17829         method is added.  We're now also using our own magic and version
17830         so that you don't need to recompile all your classes if the
17831         dynamic table changes.
17832         (mono_debug_update_mono_symbol_file): Removed.
17833         (mono_debug_symfile_add_method): New function to add a method.
17834
17835 2002-09-21  Martin Baulig  <martin@gnome.org>
17836
17837         * icall.c
17838         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
17839         New interncall.
17840
17841         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
17842         New interncall to get a method from its metadata token.
17843
17844 2002-09-21  Martin Baulig  <martin@gnome.org>
17845
17846         * debug-mono-symfile.c: Create type table.
17847
17848 2002-09-20  Martin Baulig  <martin@gnome.org>
17849
17850         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
17851
17852 2002-09-20  Martin Baulig  <martin@gnome.org>
17853
17854         * debug-mono-symfile.c: Provide information about params and locals.
17855
17856 2002-09-20  Martin Baulig  <martin@gnome.org>
17857
17858         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
17859         New interncall.
17860
17861         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
17862         interncall to get a method from its metadata token.
17863
17864 2002-09-20  Martin Baulig  <martin@gnome.org>
17865
17866         * debug-mono-symfile.c: Added a few checks for method->header
17867         being non-NULL.  This should never happen, but for the moment
17868         let's use a g_warning() rather than a g_assert().
17869
17870 2002-09-19  Mark Crichton  <crichton@gimp.org>
17871
17872         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
17873         even if support for it isn't present.  Added an #ifdef to fix this.
17874
17875         * socket-io.c: Added checks back for Solaris support.
17876
17877 2002-09-19  Martin Baulig  <martin@gnome.org>
17878
17879         * debug-mono-symfile.c (read_string, write_string): Reflect latest
17880         changes in the symbol file format.
17881
17882 2002-09-18  Martin Baulig  <martin@gnome.org>
17883
17884         * debug-mono-symfile.c: Set version number to 21.
17885
17886 2002-09-18  Dick Porter  <dick@ximian.com>
17887
17888         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
17889         on netbsd.  Fixes bug 30051.
17890
17891 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17892
17893         * reflection.c:
17894         (set_version_from_string): little fix.
17895
17896 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17897
17898         * monosn.c, Makefile.am: added strong name utility.
17899         * reflection.h, reflection.c: implemented delayed signing,
17900         locale, version and hash id assembly attributes.
17901
17902 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17903
17904         * loader.c, metadata.c: load param attributes in signatures.
17905
17906 2002-09-16  Martin Baulig  <martin@gnome.org>
17907
17908         * debug-mono-symfile.c: Added string table with all method names.
17909
17910 2002-09-14  Martin Baulig  <martin@gnome.org>
17911
17912         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
17913         fast method lookup.
17914
17915 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17916
17917         * reflection.c: record the public key token of referenced assemblies.
17918
17919 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17920
17921         * image.c, image.h: added functions to get the strong name and the
17922         public key of an assembly.
17923         * pedump.c: use them.
17924
17925 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
17926
17927         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
17928
17929 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
17930
17931         * marshal.c (mono_marshal_get_managed_wrapper): Added
17932         MONO_TYPE_BOOLEAN 
17933
17934 2002-09-11  Martin Baulig  <martin@gnome.org>
17935
17936         * gc.c: Call GC_unregister_disappearing_link() on all links when
17937         finalizing them, this is necessary to aviod a crash in boehm's
17938         finalize handler.
17939
17940 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17941
17942         * gc.c: handle GetTarget for finalized objects spotted and fixed by
17943         nick@chemlab.org.
17944
17945 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17946
17947         * icall.c: implemented MonoType::Module.
17948         * reflection.c, reflection.h: mono_module_get_object () from
17949         Tomi Pakarinen <tomi.pakarinen@welho.com>.
17950
17951 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17952
17953         * icall.c: ignore overridden methods in GetMethods ().
17954         Fix for FieldInfo::SetValue().
17955         * object.c: handle float/double in runtime invoke.
17956
17957 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17958
17959         * object.c: allow a constructor to be called again on an object.
17960
17961 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17962
17963         * class.h, class.c: move field layout code to it's own function and
17964         export it. Get an interface id earlier. Move fields in MonoClass
17965         so they are more cache friendly and align the bitfields.
17966         * loader.c: temporary handle get_param_names() for a runtime method.
17967         * reflection.c, reflection.h: more code to handle runtime creation of
17968         types.
17969
17970 2002-09-09  Martin Baulig  <martin@gnome.org>
17971
17972         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
17973         signature with the pinvoke field being set for the actual call.
17974
17975 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17976
17977         * icall.c: removed some unused icalls. Start of map of glib charsets
17978         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
17979
17980 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17981
17982         * debug-helpers.c: break infinite loop (found and fixed by
17983         Holger Arnold <harnold@gmx.de>).
17984
17985 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17986
17987         * icall.c: target may be null in create_delegate.
17988
17989 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17990
17991         * marshal.c: handle a boolean return type.
17992
17993 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17994
17995         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
17996
17997 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17998
17999         * gc.c: fix weakreferences.
18000
18001 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18002
18003         * icall.c: added icall to get default codepage.
18004
18005 2002-09-03  Dick Porter  <dick@ximian.com>
18006
18007         * threads.h: 
18008         * threads.c: Use MonoThread instead of MonoObject where
18009         apropriate.
18010
18011         Store running thread objects in a hash table, so that we have all
18012         the info to hand when waiting for them to finish
18013         (means we don't need OpenThread() any more, so mingw builds should
18014         be fully functional again.)
18015
18016         * verify.c:
18017         * object.h: Added thread ID to MonoThread
18018
18019 2002-09-03  Martin Baulig  <martin@gnome.org>
18020
18021         * icall.c (System.Reflection.Assembly::get_location): New interncall.
18022
18023 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18024
18025         * icall.c: fixed leak in get_temp_path. Thanks lupus.
18026
18027 2002-09-03  Martin Baulig  <martin@gnome.org>
18028
18029         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
18030         argument to store the end address of the disassembled instruction.
18031
18032         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
18033         here from debug-symfile.h.
18034         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
18035         JIT into this struct.
18036         (MonoSymbolFile): Added `char *image_file' field.
18037         (MonoDebugGetMethodFunc): Removed.
18038         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
18039         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
18040         (mono_debug_find_method): New method.
18041
18042         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
18043         create a full symbol file.
18044         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
18045         and static symbol files.
18046         (mono_debug_find_method): The symbol file keeps an internal method hash,
18047         call this to get a MonoDebugMethodInfo from a MonoMethod.
18048
18049         * debug-symfile.[ch]: Removed.
18050
18051 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
18052
18053         * image.c (do_mono_image_open): Remove linker version check.
18054
18055 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
18056
18057         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
18058         wrappers for instance methods.
18059         
18060 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18061
18062         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
18063
18064 2002-08-28  Dick Porter  <dick@ximian.com>
18065
18066         * Makefile.am: Export HOST_CC for w32 builds
18067
18068 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18069
18070         * file-io.c process.c: MonoString are null terminated, no
18071         need for mono_string_to_utf16() anymore.
18072
18073 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18074
18075         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
18076
18077 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
18078
18079         * icall.c, reflection.h: speedup System.MonoType.
18080
18081 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18082
18083         * reflection.c: allow null as the value of a string argument in
18084         custom attributes constructors.
18085
18086 2002-08-27  Martin Baulig  <martin@gnome.org>
18087
18088         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
18089         `trampoline_address' field.
18090
18091 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
18092
18093         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
18094         check (fixes bug #29486) 
18095
18096 2002-08-27  Martin Baulig  <martin@gnome.org>
18097
18098         * debug-mono-symfile.c: Changed the file format in a way that allows us
18099         open it read-only and to use a specially malloced area for all the
18100         dynamic data.  We can now also generate a symbol file on-the-fly if we're
18101         debugging IL code and there is no MCS generated symbol file for it.
18102
18103 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18104
18105         * object.c: added a define for a good string and array
18106         creation speedup (not enabled by default because we need to deal with
18107         the synch stuff).
18108
18109 2002-08-26  Martin Baulig  <martin@gnome.org>
18110
18111         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
18112         function to create a dynamic symbol file.  This is used by the
18113         debugger to create a symbol file for IL code on-the-fly.
18114
18115 2002-08-26  Martin Baulig  <martin@gnome.org>
18116
18117         * loader.c (mono_lookup_pinvoke_call): Include the error message
18118         from g_module_error() in the error message.
18119
18120 2002-08-24  Martin Baulig  <martin@gnome.org>
18121
18122         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
18123         function to update the symbol file.  The symbol file is mmap()ed
18124         writable, but private.  This allows us to install the symbol file
18125         together with the assembly.
18126
18127 2002-08-24  Martin Baulig  <martin@gnome.org>
18128
18129         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
18130         but they can read the new symbol file format which mcs is now creating.
18131
18132         * debug-symfile.c (mono_debug_find_source_location): Moved to
18133         debug-mono-symfile.c; this is now operating on the new symbol file.
18134
18135 2002-08-23  Martin Baulig  <martin@gnome.org>
18136
18137         * debug-helpers.c (mono_method_desc_from_method): New function to get
18138         a MonoMethodDesc from a MonoMethod.
18139
18140 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18141
18142         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
18143         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
18144
18145 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18146
18147         * string-icalls.[ch]: make helper methods static.
18148
18149 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18150
18151         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
18152         types to it and to SetValueInternal.
18153
18154         * object.c: Moved handle_enum label to its proper place. This was the
18155         f... bug! ;-)
18156
18157         This time i compiled mcs and gtk-sharp and they both work.
18158
18159 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18160
18161         * icall.c: reverted partially my previous patch until 
18162         object.c:set_value handles enums correcly.
18163
18164 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18165
18166         * icall.c:
18167         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
18168         (ves_icall_System_Environment_get_MachineName): removed warning when
18169         compiling under cygwin.
18170
18171 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18172
18173         * object.c: fixed field_get_value() for reference types.
18174
18175 2002-08-22  Dick Porter  <dick@ximian.com>
18176
18177         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
18178         Don't free a buffer while it's still needed.  Patch from Jonathan
18179         Liger <Jonathan.liger@wanadoo.fr>
18180
18181 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
18182
18183         * icall.c (ves_icall_System_Environment_get_Platform): Add new
18184         internal call.
18185
18186 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
18187
18188         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
18189         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
18190
18191         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
18192         we call unmanaged code which throws exceptions.
18193
18194 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18195
18196         * appdomain.h: added per-domain entry_assembly.
18197         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
18198         arguments.
18199         * icall.c: Assembly::GetEntryAssembly icall.
18200         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
18201         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
18202
18203 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18204
18205         * appdomain.h, gc.c: added mono_domain_finalize ().
18206
18207 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18208
18209         * object.c:
18210         (mono_print_unhandled_exception): changed g_warning by g_printerr
18211         because g_log has a 1024 characters limit (yeah, i got a big stack
18212         trace). Don't print exception name, that should be in ToString 
18213         returned string.
18214
18215 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18216
18217         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
18218         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
18219
18220 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18221
18222         * object.c:
18223         (mono_print_unhandled_exception): after previous commit, i realized
18224         that MS calls ToString on the exception. I changed this function to
18225         do that. This way we get stack_trace for free.
18226
18227 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18228
18229         * object.c:
18230         (mono_print_unhandled_exception): invoke Message property instead of
18231         getting 'message' field from Exception. Don't allocate memory for
18232         'trace' and 'message' if not needed.
18233
18234 2002-08-18  Dick Porter  <dick@ximian.com>
18235
18236         * unicode.c: Fix asserts to match Encoder.cs checks
18237
18238 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18239
18240         * marshal.c: fix unaligned store issue and a few wrong
18241         opcode argument types.
18242
18243 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18244
18245         * icall.c: added GetUninitializedObjectInternal internal call.
18246
18247 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
18248
18249         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
18250         to the right domain.
18251
18252 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
18253
18254         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
18255
18256         * class.c (class_compute_field_layout): set blittable to false for Strings
18257
18258         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
18259
18260 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18261
18262         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
18263         first chunk of code to create types at runtime. Code to
18264         handle ReflectedType/DeclaringType. Make reflection handles
18265         domain specific.
18266
18267 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
18268
18269         * class.c: set correct name in arrays.
18270
18271 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
18272
18273         * appdomain.c (mono_domain_transfer_object): make it work with
18274         valuetypes. bug fixes.
18275
18276 2002-08-12  Dick Porter  <dick@ximian.com>
18277
18278         * object.h: Rename some parameters to avoid c++ keywords (Patch
18279         from Joseph Wenninger <kde@jowenn.at>)
18280
18281 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
18282
18283         * icall.c: added icall to implement Assembly.GetFile*.
18284
18285 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18286
18287         * reflection.h, reflection.c: code to embed managed resources.
18288
18289 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18290
18291         * class.c: move all the type size stuff into
18292         class_compute_field_layout().
18293
18294 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18295
18296         * class.c: ensure enums have always the correct instance size.
18297         * unicode.c: remove wrong assert.
18298
18299 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18300
18301         * assembly.c: fix mem corruption issue.
18302         * image.h, image.c: added mono_image_get_resource () to access
18303         managed resources.
18304         * icall.c: implemented Assembly.EntryPoint property and some
18305         Managed Resources related internalcalls.
18306
18307
18308 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
18309
18310         * image.c, image.h: impemented mono_image_get_entry_point ().
18311         * appdomain.c: use mono_image_get_entry_point.
18312
18313 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18314
18315         * reflection.c: support the object type argument when loading
18316         custom attributes.
18317
18318 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
18319
18320         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
18321         String as return type.
18322
18323 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
18324
18325         * reflection.c: fix encoding of named args for custom attrs to match
18326         the ms implementation. Read them back when instantiating custom
18327         attributes.
18328
18329 2002-08-02  Radek Doulik  <rodo@ximian.com>
18330
18331         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
18332         by Dietmar as quick fix
18333         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
18334         16 as stack size, used on more places as quick fix before Dietmar
18335         will fix it properly
18336
18337 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18338
18339         * object.h, object.c: added accessors for fields and properties.
18340
18341 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18342
18343         * class.c, class.h: made mono_class_get_field_from_name ()
18344         loop on parent types.
18345         Added mono_class_get_property_from_name ().
18346
18347 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18348
18349         * class.c, class.h: move the code to setup the type vtable in its own
18350         function so that it can be reused also for types created at runtime.
18351         Eliminate the "class" identifier from the header file.
18352         * reflection.c: setup the vtable for enums so that we can create
18353         objects for use in SetConstant ().
18354
18355 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
18356
18357         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
18358         instead of the delegate itself as this pointer (bug #28383)
18359
18360 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
18361
18362         * marshal.c (mono_marshal_get_managed_wrapper): added return type
18363         conversions.
18364
18365 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18366
18367         * loader.c: don't set the pinvoke bit on icalls.
18368
18369 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
18370
18371         * debug-helpers.c (mono_method_full_name): only print a number to
18372         indicate wrapper type (so that the output is more readable in traces).
18373
18374 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
18375
18376         * class.c (mono_class_init): include method override patch from Paolo
18377
18378 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
18379
18380         * icall.c: fixed GetTypeCode().
18381
18382 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
18383
18384         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
18385         use real delegate invoke function to make it work with multicast
18386         delegates (fix bug# 28291).
18387
18388 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18389
18390         * object.c: load constant strings.
18391
18392 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18393
18394         * reflection.c: no magic numbers.
18395         * tabledefs.h: security action enum.
18396
18397 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18398
18399         * assembly.c: fix possible memory corruption.
18400
18401 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18402
18403         * reflection.h, reflection.c: added support for linking resources.
18404         * verify.c: check we have an updated corlib.
18405
18406 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
18407
18408         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
18409         string arrays.
18410         (mono_marshal_string_array): null terminate unmanaged string arrays.
18411         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
18412
18413 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18414
18415         * icall.c: Type.GetType () can now return also types from the
18416         calling assembly.
18417
18418 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18419
18420         * loader.h, loader.c: stack walking support.
18421         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
18422         GetCallingAssembly.
18423
18424 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
18425
18426         * marshal.c: added optimisations for blittable types 
18427
18428         * class.c (mono_array_class_get): do not set blittable attribute on arrays
18429         (mono_class_setup_mono_type): set blittable attribute for single
18430         and double.
18431
18432         * marshal.c (mono_string_utf8_to_builder): impl.
18433         (mono_string_builder_to_utf8): impl.
18434         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
18435
18436 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
18437
18438         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
18439         (mono_marshal_get_managed_wrapper): impl. byref types
18440
18441 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18442
18443         * icall.c:
18444         (search_method): don't display debug message. 
18445
18446 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
18447
18448         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
18449
18450 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18451
18452         * appdomain.c: set the missing filename when throwing exception.
18453
18454 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
18455
18456         * metadata.c (mono_type_size): code cleanup
18457         (mono_type_stack_size): removed some test code
18458
18459 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
18460
18461         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
18462         mono_get_exception_file_not_found now.
18463
18464         * exception.c (mono_exception_from_name_two_strings): New version
18465         that will call a constructor with two string arguments. 
18466         (mono_get_exception_file_not_found): New helper routine, used to
18467         report file-not-found errors.
18468
18469 2002-07-20  Dick Porter  <dick@ximian.com>
18470
18471         * process.h:
18472         * process.c: Pass file handles to CreateProcess
18473         
18474         * icall.c:
18475         * file-io.h:
18476         * file-io.c: Implemented CreatePipe
18477
18478 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
18479
18480         * metadata.c (mono_get_param_info): set alignment for value types
18481
18482 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18483
18484         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
18485         Constify mono_domain_assembly_open().
18486         * loader.c: handle null namespace in icalls.
18487
18488 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
18489
18490         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
18491         (emit_str_to_ptr_conv): marshal object as structs
18492
18493         * metadata.c (mono_type_to_unmanaged): marshal object as structs
18494
18495         * marshal.c (mono_marshal_get_runtime_invoke): support value types
18496
18497 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
18498
18499         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
18500         (mono_marshal_get_native_wrapper): we an now return value types
18501
18502 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18503
18504         * verify.c: more checks implemented.
18505
18506 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
18507
18508         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
18509         (fix bug #27695)
18510         (mono_marshal_get_native_wrapper): allow byref arguments
18511         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
18512         impl. PtrToStringXXX methods
18513         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
18514         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
18515         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
18516         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
18517         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
18518
18519 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18520
18521         * reflection.c: fix buglet in parsing an assembly name.
18522
18523 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
18524
18525         * marshal.c (emit_ptr_to_str_conv): first impl.
18526
18527 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18528
18529         * object.c, class.h: cache the vtable in the class as suggested by
18530         vargaz@freemail.hu (Zoltan Varga).
18531
18532 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18533
18534         * class.h, loader.c: added mono_field_from_token().
18535         * verify.c: first cut of type checking code.
18536
18537 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
18538
18539         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
18540
18541 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
18542
18543         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
18544         (fix bug #27782)
18545         (mono_marshal_get_remoting_invoke): impl.
18546         (mono_delegate_begin_invoke): impl.
18547         (mono_mb_emit_save_args): impl.
18548         (mono_delegate_end_invoke): impl.
18549         (mono_marshal_get_delegate_begin_invoke):
18550         (mono_marshal_get_delegate_end_invoke):
18551         (mono_marshal_get_delegate_invoke): generate a special name for
18552         those methods (including the signature) and associate them whith
18553         the delegate class. 
18554
18555 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
18556
18557         * reflection.[ch]: 
18558         (mono_reflection_type_from_name): now it has a MonoImage parameter
18559         which is used as the default image to search the type in. If the image
18560         is NULL or getting the type from it fails, it defaults to corlib.
18561
18562         * icall.c: changed 1 call to mono_reflection_type_from_name to match
18563         new parameter.
18564
18565 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18566
18567         * reflection.c: update the parameter table index.
18568
18569 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18570
18571         * domain.c: don't include the mark byte in the string hash.
18572
18573 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18574
18575         * icall.cs: icall for Type.GetTypeCode ().
18576         * verify: a couple of fixes and disabled local initialization checks.
18577
18578 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
18579
18580         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
18581
18582         * debug-helpers.c (mono_method_full_name): print the type of the
18583         runtime wrapper
18584
18585         * metadata.c (mono_signature_hash): a hash function for signatures
18586         (mono_signature_hash): better hash algorithm
18587
18588         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
18589
18590         * debug-helpers.c (mono_method_full_name): this can now generate
18591         method names with signatures
18592
18593         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
18594         method dont have this pointers.
18595
18596 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18597
18598         * reflection.c: fixup typebuilder tokens.
18599         * image.c: fix buglet.
18600         * marshal.h: remove whitespace.
18601         * metadata.h, metadata.c: reinstate code that was removed.
18602         * verify.c: handle catch directives and fix another couple of bugs.
18603
18604 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
18605
18606         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
18607         (mono_marshal_get_native_wrapper): make it comp. with the old code
18608         (mono_marshal_get_native_wrapper): support boolean
18609         (mono_marshal_get_managed_wrapper): support more types
18610
18611 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
18612
18613         * class.c (class_compute_field_layout): compute class->blittable attribute.
18614
18615 2002-07-09  Dick Porter  <dick@ximian.com>
18616
18617         * threads.c: Make the thread cleaning up cope with threads that
18618         call ExitThread()
18619
18620 2002-07-08  Radek Doulik  <rodo@ximian.com>
18621
18622         * reflection.c (method_encode_code): use non-translated values to
18623         compute finally_start, this fixes exception handling on ppc, yay!
18624
18625         * decimal.h (struct signscale): fix endianess
18626
18627 2002-07-07  Radek Doulik  <rodo@ximian.com>
18628
18629         * reflection.c: swap box_val and not val
18630
18631 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
18632
18633         * reflection.c, reflection.h: handle full assembly info in type name.
18634         Handle Type arguments when loading custom attributes.
18635         * icall.c: updated to use new mono_reflection_type_from_name () method.
18636
18637 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18638
18639         * loader.c:
18640         (method_from_memberref): also print assembly name when method not found.
18641
18642 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18643
18644         * icall.c:
18645         (ves_icall_TypeGetProperties): fixed bug #27473. 
18646
18647 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18648
18649         * reflection.c: display image name and token when cannot find the
18650         .ctor for an attribute.
18651
18652 2002-07-05  Martin Baulig  <martin@gnome.org>
18653
18654         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18655
18656 2002-07-04  Dick Porter  <dick@ximian.com>
18657
18658         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
18659         compile on mingw.  This will cause mingw builds to not wait for
18660         subthreads to terminate after the main thread does.  I've lodged a
18661         bug with the mingw developers for them to wrap OpenThread().
18662
18663 2002-07-03  Dick Porter  <dick@ximian.com>
18664
18665         * threads.c: Store thread IDs instead of handles, because
18666         GetCurrentThread() returns a pseudohandle and therefore stores
18667         useless values.  mono_thread_cleanup() continues checking the
18668         array of threads until it is empty, to cope with subthreads
18669         spawning new threads after the main thread has finished.
18670
18671         * profiler.h:
18672         * profiler.c:
18673         * profiler-private.h: Pass the thread ID to thread profiler
18674         functions, instead of a handle
18675
18676 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18677
18678         * verify.c: fixes to make it more usable.
18679         * pedump.c: added --verify code to verify IL code in an assembly.
18680
18681 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18682
18683         * reflection.c: turn errors into warnings to allow compiling corlib.
18684
18685 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
18686
18687         * reflection.c: add special cases to compile corlib.
18688
18689 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18690
18691         * reflection.c: handle properties with only a set method.
18692
18693 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18694
18695         * opcodes.h: add enum with opcodes in opval order.
18696
18697 2002-07-01  Dick Porter  <dick@ximian.com>
18698         
18699         * object.h:
18700         * object.c (mono_runtime_run_main): Removed unneeded argument
18701
18702 2002-06-28  Martin Baulig  <martin@gnome.org>
18703
18704         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18705
18706 2002-06-27  Dick Porter  <dick@ximian.com>
18707
18708         * threads.c: Store the handle in both the parent thread and in the
18709         subthread, to minimise the time between starting a new thread and
18710         storing its ID.
18711
18712 2002-06-26  Dick Porter  <dick@ximian.com>
18713
18714         * appdomain.c (mono_runtime_cleanup): Close the socket library
18715         after all the threads have finished, not before
18716
18717 2002-06-26  Martin Baulig  <martin@gnome.org>
18718
18719         * debug-symfile.c (mono_debug_find_source_location): Added
18720         `guint32 *line_number' argument.  If it's not NULL, store the line number
18721         there and return the file name without the line number.
18722
18723 2002-06-25  Dick Porter  <dick@ximian.com>
18724
18725         * icall.c:
18726         * process.h:
18727         * process.c: Process forking and other support functions
18728
18729 2002-06-25  Dick Porter  <dick@ximian.com>
18730
18731         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
18732         things dont happen when the image is closed.
18733         (mono_image_lookup_resource): Walk the resource section looking
18734         for a particular entry
18735
18736         * cil-coff.h: PE resource section decoding
18737
18738 2002-06-25  Dick Porter  <dick@ximian.com>
18739         
18740         * assembly.h:
18741         * assembly.c: 
18742         (mono_assembly_foreach): Accessor functions to walk the list of
18743         loaded assemblies
18744         (mono_assembly_set_main):
18745         (mono_assembly_get_main): Process methods need to know which
18746         assembly is the "main" one
18747
18748         * object.c (mono_runtime_run_main): Record the main assembly
18749
18750         * debug-helpers.c: Fix typo
18751
18752 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
18753
18754         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
18755         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
18756
18757 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18758
18759         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
18760
18761 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
18762
18763         * image.c (do_mono_image_open): Initialize reference count,
18764         otherwise we leak the MonoImage.
18765
18766 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18767
18768         * reflection.c: small tweak to handle self-hosting.
18769
18770 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18771
18772         * reflection.c: fix type name parse code.
18773
18774 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18775
18776         * reflection.c: break out of the loop.
18777         * image.c: special case corlib.
18778
18779 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18780
18781         * reflection.c: add all the custom attrs at the end to ensure the
18782         ctors have been properly initialized when the attributes are defined
18783         in the current assembly.
18784
18785 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18786
18787         * reflection.c: handle correctly multiple-nested types.
18788
18789 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
18790
18791         * row-indexes.h: fix typos.
18792         * reflection.c: adjust for typos and fix method_def_or_ref
18793         encoding in MethodImpl table.
18794
18795 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18796
18797         * reflection.c: fix entry point patching (thanks Serge!).
18798
18799 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
18800
18801         * verify.c: add check for System.Exception
18802
18803 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18804
18805         * image.c, class.c: minifix for code just c&p'ed.
18806         * reflection.c: warning fix.
18807         * object.h, loader.h, domain.c: load also StringBuilder.
18808
18809 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18810
18811         * marshal.h, marshal.c: some support code to handle complex marshaling.
18812
18813 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18814
18815         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
18816         Better signatures with vtable error dump.
18817
18818 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
18819
18820         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
18821
18822 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
18823
18824         * icall.c (ves_icall_Type_GetField): impl.
18825
18826 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18827
18828         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
18829         to retrieve a marshal description blob for a field or param.
18830
18831 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
18832
18833         * reflection.h, reflection.c: change order of nested type emission
18834         to avoid table corruption. The NestedTypes table is sorted.
18835         * icall.c: change order of GetConstructor results to workaround mcs bug.
18836
18837 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18838
18839         * reflection.h, reflection.c: handle field and param marshal
18840         information.
18841
18842 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18843
18844         * icall.c, marshal.c marshal.h: more Marshal class implementation.
18845
18846 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18847
18848         * reflection.c: fix call convention.
18849
18850 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18851
18852         * reflection.h, reflection.c: mono_image_get_memberref_token()
18853         takes a type instead of a class, now. Added
18854         mono_image_get_array_token() to create tokens for the special
18855         multi-dim array methods.
18856
18857 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18858
18859         * assembly.c: handle modules (no assembly table). Split
18860         loading references in its own function.
18861         * class.c: handle moduleref resolution scope.
18862         * image.c, image.h: cache module name in image.
18863
18864 2002-06-07  Martin Baulig  <martin@gnome.org>
18865
18866         * reflection.c (mono_image_get_type_info): Only add a class layout entry
18867         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
18868
18869 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18870
18871         * icall.c: more signature fixes that used uint instead of int.
18872
18873 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18874
18875         * reflection.c: fixed signature of field refs.
18876
18877 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18878
18879         * class.c, reflection.c: handle typerefs of nested types
18880         (both on read and when writing files).
18881
18882 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18883
18884         * icall.c: fix method signatures that tried to workaround the previous
18885         typo, d'oh!
18886
18887 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18888
18889         * debug-helpers.c: fix typo.
18890
18891 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18892
18893         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
18894         rewrote the PE/COFF writing code (our programs are understood by the
18895         ms runtime, now).
18896
18897 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18898
18899         * gc.c, gc.h, icall.c: weakreference support.
18900
18901 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18902
18903         * Makefile.am, mono-config.c: use $(sysconfdir).
18904
18905 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18906
18907         * icall.c: changed default precision of Double.ToString() to 15.
18908         Fixed memory leak. Unified with Single.ToString.
18909
18910 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18911
18912         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
18913
18914 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18915
18916         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
18917         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
18918         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
18919         and myself.
18920
18921 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18922
18923         * debug-symfile.c, sysmath.c: yet more compilation fixes.
18924
18925 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18926
18927         * reflection.c, socket-io.c: more compilation fixes.
18928
18929 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18930
18931         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
18932         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
18933         unicode.c: warning and compiler compatibility fixes.
18934
18935 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18936
18937         * class.h, metadata.c: fixed warnings/compilation errors.
18938
18939 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18940
18941         * Makefile.am, mono-config.c, mono-config.h: configuration file
18942         support routines.
18943         * loader.c, loader.h: make Dll mapping configurable at runtime in the
18944         config file. Export methods to insert and lookup mappings.
18945
18946 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18947
18948         * reflection.c: handle types and boxed objects in custom attr
18949         constructors.
18950
18951 2002-05-30  Martin Baulig  <martin@gnome.org>
18952
18953         * debug-symfile.c
18954         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
18955
18956 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
18957
18958         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
18959         to lookup the implmap row for a P/Invoke method.
18960         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
18961         P/Invoke method from the runtime on an as needed basis.
18962
18963 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
18964
18965         * metadata.c (mono_metadata_parse_signature): impl.
18966
18967 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18968
18969         * class.c: handle .pack directive.
18970
18971 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18972
18973         * object.c: initialize static fields with RVA data.
18974
18975 2002-05-25  Martin Baulig  <martin@gnome.org>
18976
18977         * debug-symfile.c
18978         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
18979
18980 2002-05-24  Martin Baulig  <martin@gnome.org>
18981
18982         * debug-symfile.c
18983         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
18984         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
18985         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
18986
18987 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18988
18989         * object.c: special case string ctros in invoke.
18990         * gc.c: silly whitespace changes.
18991
18992 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
18993
18994         * threadpool.[ch]: impl. a threadpool that can
18995         be used by mint and mono.
18996
18997 2002-05-22  Martin Baulig  <martin@gnome.org>
18998
18999         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
19000         The first argument is now a `MonoReflectionModuleBuilder *', the return
19001         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
19002         `methods' field to get the method builder.  The `token' argument is the
19003         unfixed token.
19004
19005         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
19006         invalid characters instead of g_assert_not_reached()ing.  This seems
19007         to be the behaviour of mscorlib.
19008
19009 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
19010
19011         * object.c (mono_runtime_invoke_array): applied patch from Rachel
19012         Hestilow to fix bug #25104
19013
19014 2002-05-21  Martin Baulig  <martin@gnome.org>
19015
19016         * debug-symfile.c (mono_debug_find_source_location): New function.
19017         Looks up an IL offset in the line number table and returns the source
19018         location as a string.
19019
19020 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19021
19022         * icall.c:
19023         (mono_double_ToStringImpl): changed %f by %g until we have something
19024         better.
19025
19026 2002-05-21  Nick Drochak  <ndrochak@gol.com>
19027
19028         * icall.c : Use different name for Math.Pow's icall.  Needed to check
19029         parameters first in C#.
19030
19031 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19032
19033         * icall.c, reflection.h: added icall to get info about an event.
19034
19035 2002-05-20  Radek Doulik  <rodo@ximian.com>
19036
19037         * object.c (mono_value_box): don't use memcpy for boxing on BIG
19038         endian
19039         (mono_value_box): don't use memcpy for small sizes on
19040         architectures with unaligned access
19041
19042 2002-05-20  Martin Baulig  <martin@gnome.org>
19043
19044         * reflection.c (mono_reflection_setup_internal_class): Don't crash
19045         if `tb->parent == NULL'.
19046         (mono_reflection_create_internal_class): New function.  This is
19047         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
19048         for enum types.
19049
19050         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
19051         New interncall.
19052
19053 2002-05-19  Martin Baulig  <martin@gnome.org>
19054
19055         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
19056         argument to get the length, don't default to the array length.
19057
19058 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
19059
19060         * assembly.c (mono_assembly_setrootdir): New function used to
19061         override the MONO_ASSEMBLIES directory.
19062
19063 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19064
19065         * icall.c: ValueType_GetHashCode() initialize local var.
19066
19067 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19068
19069         * reflection.c: sort custom attributes table.
19070
19071 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19072
19073         * reflection.c: support named args in custom attributes (write support).
19074
19075 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
19076
19077         * reflection.c: fix finally position calculation.
19078
19079 2002-05-15  Radek Doulik  <rodo@ximian.com>
19080
19081         * reflection.c: fixed endianess at many places
19082
19083         * icall.c (ves_icall_InitializeArray): comment out debug msg
19084
19085 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
19086
19087         * object.c (mono_unhandled_exception): new function to handle
19088         unhandled exceptions.
19089         (mono_unhandled_exception): call the UnhandledException event.
19090         (mono_runtime_delegate_invoke): impl.
19091
19092 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
19093
19094         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
19095         returns the RVA, not the direct pointer to the data. Handle the case
19096         when the class size is fixed.
19097
19098 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19099
19100         * reflection.c: fix some endianess issues.
19101
19102 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
19103
19104         * object.c (mono_runtime_invoke): is now able to catch exceptions.
19105
19106         * threads.c (mono_thread_init): added a callback which is invoked
19107         at thread start.
19108
19109 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
19110         
19111         * icall.c: make GetHashCode return non-negative values.
19112
19113 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
19114
19115         * object.c, icall.c, gc.c: revert to address-based hashcode.
19116
19117 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
19118
19119         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
19120
19121 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19122
19123         * icall.c, class.c: special case <Module>.
19124
19125 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
19126
19127         * icall.c: fix bug in GetNow().
19128
19129 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
19130
19131         * object.c (mono_runtime_class_init): make sure that we call all
19132         static class constructors.
19133
19134 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19135
19136         * reflection.c: sort methodsemantics table.
19137
19138 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19139
19140         * reflection.h, reflection.c: honour init locals setting.
19141
19142 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
19143
19144         * icall.c: copied Double ToStringImpl for Single ToStringImpl
19145
19146 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19147
19148         * reflection.c: support ContructorBuilders in attribute blob creation.
19149
19150 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19151
19152         * reflection.c: some changes to build a binary that can be run
19153         directly in windows.
19154
19155 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19156
19157         * loader.c: print a big message when an icall can't be found.
19158
19159 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19160
19161         * string-icalls.c: fix bug 24248.
19162
19163 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
19164
19165         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
19166         icall.c, reflection.h: separate assembly loading by pathname and by
19167         assembly name. Use the MONO_PATH env var to search for assemblies.
19168
19169 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19170
19171         * assembly.c, image.h: add some support for assemblies
19172         with multiple modules.
19173         * class.c, class.h: export mono_class_from_typeref().
19174         * loader.c: remove duplicated code and use mono_class_from_typeref(),
19175         instead.
19176
19177 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19178
19179         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
19180         documentation says (the ECMA one is correct).
19181
19182 2002-05-02  Dick Porter  <dick@ximian.com>
19183
19184         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
19185         Don't name the synchronisation mutex.
19186
19187 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
19188
19189         * rand.c
19190         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
19191         Make the prototypes match.
19192         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
19193         Same.
19194
19195         * icall.c
19196         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
19197         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
19198         all systems have tm.tm_zone, so use strftime() with %Z to print
19199         the timezone abreviation into a temp string.
19200
19201         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
19202         rather than mono_array_addr() on a MonoString on Big Endian
19203         machines.
19204
19205 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
19206
19207         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
19208         fix bug 24041
19209
19210 2002-04-30  Dick Porter  <dick@ximian.com>
19211
19212         * socket-io.c: Cope with SOCKET being an integer rather than a
19213         pointer now.
19214
19215         * threads.c: Added Thread_free_internal, to deal with thread
19216         handle cleanup.  Moved calls to handle_store() and handle_remove()
19217         to start_wrapper(), so each can only be called once.  Allocate
19218         synchronisation blocks with GC_malloc(), and use GC finalisation
19219         to close the handles.
19220
19221         * icall.c: added System.Threading.Thread::Thread_free_internal
19222
19223 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19224
19225         * icall.c: support Environment.Exit, CommandLineArgs().
19226
19227 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19228
19229         * object.c, object.h: added mono_runtime_run_main () and
19230         mono_runtime_get_main_args () for use in System.Environment.
19231
19232 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19233
19234         * gc.c: fix thinko, enable actual finalization since the jit is now
19235         fixed.
19236
19237 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19238
19239         * gc.c, object.c: take into account that an object may be offset wrt the address
19240         returned by GC_malloc().
19241
19242 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
19243
19244         * image.c: handle files without entries in the assembly table (modules).
19245
19246 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
19247
19248         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
19249         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
19250         allowed to be null when it's System.Object class setup.
19251
19252 2002-04-27  Martin Baulig  <martin@gnome.org>
19253
19254         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
19255         if `tb->parent == NULL' rather than crashing.
19256
19257 2002-04-28  Nick Drochak  <ndrochak@gol.com>
19258
19259         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
19260         calling acos() where asin() should have been called.
19261
19262 2002-04-26  Martin Baulig  <martin@gnome.org>
19263
19264         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
19265         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
19266         there's a subdirectory called `System', but we don't want to read that
19267         subdirectory as an assembly.
19268
19269 2002-04-25  Martin Baulig  <martin@gnome.org>
19270
19271         * debug-symfile.c: Reflect latest MonoString changes.
19272
19273 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19274
19275         * rand.c, rand.h: instance method icalls need to have an explicit
19276         this pointer as first argument in the C implementation.
19277
19278 2002-04-25  Nick Drochak <ndrochak@gol.com>
19279
19280         * icall.c: Fix typo in map for GetNonZeroBytes
19281
19282 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
19283
19284         * string-icalls.c : String does now passes unit tests without any 
19285         errors, the following changes has been made:
19286         
19287         Implemented replace methods.
19288         Renaming of methods to (try) follow the standard.
19289         Fixed compare ordinal
19290         Made all memory allocated directly to function instead of via icall function.
19291         Small performance fix in is_in_array function
19292                         
19293  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
19294
19295         c (mono_string_Internal_ctor_charp_int_int):
19296         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
19297         sindex < 0, throw ArgumentOutOfRangeException instead of
19298         ArgumentNullException.
19299
19300         Added new check for length == 0, however
19301         I need to make it return String.Empty from the C code.
19302         
19303         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
19304         that calculate the length for us here.
19305         
19306         (mono_string_Internal_ctor_sbytep_int_int): Replaced
19307         mono_string_new_utf16 with mono_string_new, since value is utf8.
19308
19309 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19310
19311         * object.c: register the object for finalization if needed.
19312         Allocate one more char in the string for the terminating 0 char.
19313
19314 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19315
19316         * class.c, class.h, image.c: check if a type implemenst a destructor.
19317         Use the proper key for array class lookups.
19318         * icall.c: register the icalls in the System.GC class.
19319         * gc.c, gc.h: GC-related functions and icalls.
19320
19321 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19322
19323         * icall.c:
19324         * socket-io.c:
19325         * unicode.c: free some strings gotten from mono_string_to_utf8 and
19326         changed a couple of free () by g_free ().
19327
19328         * decimal.c: one-liner in the comments for decimal2string ().
19329
19330 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
19331
19332         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
19333
19334 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
19335
19336         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
19337         * object.c (mono_runtime_invoke_array) : handle null in params
19338
19339 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
19340
19341         * string-icalls.c: fixed bug in split (one off bug)
19342
19343 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
19344
19345         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
19346         * icalls.c: added String::Equals as internal method
19347
19348 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
19349
19350         * threads.c: fixed bug in the double interlocked functions
19351
19352 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
19353
19354         * threads.c: implemented all of the new interlocked icalls.
19355         * string-icalls.c: fix a bug in insert.
19356         * icalls.c: added the icalls for interlocked, removed old string functions.
19357         
19358 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19359
19360         * loader.c: fix off-by-one error when reading argument names.
19361
19362 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19363
19364         * profiler.c: win32 counter implementation (untested).
19365         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
19366         (the latter needs testing and more complete impl. from win32 folks).
19367
19368 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
19369
19370         * object.c: mono_array_new_full workaround mono_array_class_get
19371         problem.
19372
19373 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19374
19375         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
19376         * object.h (mono_string_chars): Changed casting type.
19377
19378 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19379
19380         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
19381                            method signatures to use gunichar2 instead of gint16.
19382
19383 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
19384
19385         * object.h, object.c: domain-specific versions of mono_object_new and
19386         mono_array_new.
19387
19388 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
19389
19390         * object.c: changed String layout
19391
19392         * string-icalls.c (mono_string_Internal_ctor_chara): added
19393         internal string constructors.
19394
19395 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
19396
19397         * threads.c: pass 'this' to the thread start routine.
19398
19399 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19400
19401         * string-icalls.c: fix IndexOf and LastIndexOf. Now
19402         InternalCompareStr don't call twice mono_string_cmp_char for the last
19403         character. Improved performance in mono_string_cmp_char.
19404
19405 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19406
19407         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
19408         code into its own library: libmonoruntime.
19409
19410 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
19411
19412         * object.h, object.c: changed array format so that szarrays do not
19413         require a bounds structure.
19414         * icall.c, appdomain.c: support for new szarray format.
19415
19416 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19417
19418         * metadata.c: compare also the retuns type when comparing signatures:
19419         we didn't do this as an optimization since really overloaded methods
19420         must differ also in the arguments, but this doesn't work with
19421         low-level IL code (or when using explicit conversion operators: see
19422         bug#23498 for an example).
19423
19424 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19425
19426         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
19427
19428 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19429
19430         * icall.c: make MonoType::GetElementType its own icall.
19431
19432 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19433
19434         * icall.c: remove MonoMethod_get_Name().
19435         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
19436         object.
19437
19438 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19439
19440         * string-icalls.c: optimized a few methods.
19441
19442 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19443
19444         * icall.c: added all new string internal calls
19445         * string-icalls.c: added, new string internal call implementation.
19446         * object.c: added mono_string_new_size for allocating a string a size
19447
19448 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
19449
19450         * object.c (mono_object_isinst): use the same code as in the
19451         optimized x86 version.
19452
19453 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19454
19455         * profiler.c: TSC-based timer code (faster and more accurate).
19456         Not hooked up in configure, yet (set USE_X86TSC to 1).
19457
19458 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
19459
19460         * profiler.c, profiler.h: track time spent compiling methods.
19461         * threads.c: track thread creation/destruction.
19462
19463 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
19464
19465         * profiler.c, profiler.h, profiler-private.h: profiling interface
19466         and sample implementation. Moved here so that it can be used also by
19467         the jit.
19468
19469 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
19470
19471         * reflection.c, reflection.h: keep types and other handles separate in
19472         the hash tables for referred tokens. Add guid for modules.
19473
19474 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19475
19476         * assembly.c: fix bugs found with valgrind.
19477         * metadata.h, metadata.c: added mono_metadata_guid_heap().
19478
19479 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
19480
19481         * threads: added icall support for getting current domain for
19482                    the thread.
19483  
19484 2002-04-13  Martin Baulig  <martin@gnome.org>
19485
19486         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
19487         (MonoDebugVarInfo): Added `index' field for register based addresses.
19488         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
19489         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
19490         `MonoDebugVarInfo *params' and `guint32 this_offset' with
19491         `MonoDebugVarInfo *this_var'.
19492
19493         * debug-symfile.c (relocate_variable): New static function to write
19494         a location description for a local variable or method parameter.
19495
19496 2002-04-12  Martin Baulig  <martin@gnome.org>
19497
19498         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
19499         stack offset and begin/end scope address of a local variable.
19500         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
19501         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
19502         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
19503
19504         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
19505         Added new relocation types for start/end scope of a local variable.
19506
19507 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19508
19509         * object.h: add mono_object_domain() macro.
19510         * reflection.c: handle typespecs.
19511         * icall.c: MonoMethod::get_Name() implementation.
19512
19513 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19514
19515         * icall.c: String::GetHashCode() icall implementation.
19516
19517 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19518
19519         * icall.c: String::IndexOfAny icall.
19520         * object.c, object.h: make array->max_length more useful.
19521         Intrduced mono_object_class() and mono_string_length() macros.
19522
19523 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19524
19525         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
19526         instead of g_unichar_isdigit.
19527
19528 2002-04-11  Nick Drochak  <ndrochak@gol.com>
19529
19530         * icall.c: Implement a simple Double.ToString().
19531
19532 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19533
19534         * appdomain.h: only io-layer.h is supposed to be included.
19535         * icall.c: explicitly import environ. Fix warning.
19536
19537 2002-04-10  Nick Drochak  <ndrochak@gol.com>
19538
19539         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
19540                 return true even if it's not Daylight Savings time.
19541                 Only return false for the case where the function isn't
19542                 implemented for a plaform (read Windows).
19543
19544 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19545
19546         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
19547         data with a mutex.
19548
19549 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
19550
19551         * mempool.c (mono_mempool_alloc): only use g_malloc when
19552         absolutely necessary.
19553
19554 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
19555
19556         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
19557
19558         * class.c (mono_class_vtable): use domain mempool to allocate vtable
19559         (mono_class_proxy_vtable): use domain mempool
19560
19561 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19562
19563         * appdomain.h, appdomain.c: split initialization that requires the
19564         execution engine support into mono_runtime_init().
19565
19566 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
19567
19568         * class.c (mono_class_init): don't include vtable inside MonoClass
19569         to save some memory, gather some statistics.
19570         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
19571
19572 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19573
19574         * icall.c: internalcall implementation for ValueType.Equals().
19575
19576 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
19577
19578         * object.c (mono_message_init): moved 
19579         (mono_runtime_exec_main): new arch. independent impl.
19580         (mono_runtime_invoke_array): new method - like
19581         mono_runtime_invoke, but you can pass an array of objects.
19582         (mono_remoting_invoke): new arch. independent impl.
19583         (mono_message_invoke): new arch. independent impl.
19584         (mono_runtime_class_init): new arch. independent impl.
19585         (mono_runtime_object_init): new arch. independent impl.
19586
19587 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19588
19589         * metadata.c, object.c, reflection.c: documented the exported
19590         functions.
19591
19592 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
19593
19594         * icall.c: simpler code to pass the assembly builder data to corlib.
19595         Implement GetNestedTypes() internalcall.
19596
19597 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19598
19599         * class.c: warn if a type can't be loaded.
19600
19601 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
19602
19603         * image.h: typedef MonoImageOpenStatus
19604         * types.h: removed unused file
19605         
19606 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
19607
19608         * icall.c: Enum_ToObject accepts enum value arguments.
19609
19610 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19611
19612         * class.c: move initialization of properties, events and nested
19613         classes, so that they happen for interfaces, too.
19614
19615 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19616
19617         * icall.c: cleanup some ugly casts in Array_SetValue*.
19618
19619 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19620
19621         * icall.c: the values array fro enums is of the correct type, now.
19622         Implement (correctly) getFullName instead of assQualifiedName for
19623         MonoType.
19624         * reflection.h, reflection.c: added mono_type_get_name ().
19625
19626 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19627
19628         * assembly.c, image.h: for each MonoImage, record from wich assembly
19629         it was loaded.
19630         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
19631         Make Type.Assembly work.
19632
19633 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
19634
19635         * debug-symfile.h: use char* instead of gpointer to avoid
19636         unnecessary casts.
19637
19638         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
19639
19640         * icall.c (ves_icall_InternalExecute): impl. FielSetter
19641         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
19642
19643 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
19644
19645         * icall.c (mono_message_init): impl. (code cleanup)
19646         (ves_icall_InternalExecute): impl. FieldGetter
19647
19648         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
19649         defined we call all (non-static)methods through the vtable. 
19650
19651 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
19652
19653         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
19654         finalizer even though the memory is still referenced (and the chunk of
19655         memory is not freed).
19656
19657 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19658
19659         * assembly.c: fix brokeness.
19660
19661 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
19662
19663         * class.c: kill some warnings. Check explicit interface method
19664         implementation also without considering the namespace.
19665         Load also literal strings in static class data.
19666
19667 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
19668
19669         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
19670         (default_assembly_name_resolver): Make the resolver take the
19671         "base" directory where the assembly was originally defined, so we
19672         can load DLLs that are in the same directory as the assembly that
19673         is being referenced.
19674
19675 2002-03-28  Dick Porter  <dick@ximian.com>
19676
19677         * file-io.h: 
19678         * file-io.c:
19679         * socket-io.c: 
19680         * unicode.h: 
19681         * unicode.c: Warning cleanups
19682
19683 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
19684
19685         * object.h, reflection.h: use the correct type instead of MonoObject.
19686
19687 2002-03-28  Martin Baulig  <martin@gnome.org>
19688
19689         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
19690         (mono_debug_update_symbol_file): Initialize classes if necessary.
19691
19692 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19693
19694         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
19695         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
19696
19697 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
19698
19699         * assembly.h: fix function prototype.
19700         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
19701         * mono-endian.h: use const cast.
19702
19703 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
19704
19705         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
19706
19707 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
19708
19709         * loader.c: don't assert when a typeref can't be loaded, give
19710         a chance to the runtime to trow an exception instead.
19711         * loader.h: fix warning.
19712
19713 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
19714
19715         * class.c (mono_class_proxy_vtable): added proxy support
19716
19717 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
19718
19719         * icall.c: removed last of PAL calls, added System.Environment
19720         * file-io.h, file-io.c: MonoIO implementation
19721         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
19722
19723 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
19724
19725         * appdomain.c: do not use the byte marker in ldstr table lookup.
19726         * debug-helpers.c: allow two ':' to separate class and method name.
19727         * object.c: allocate arrays bounds with the GC, too.
19728         * verify: add a few more checks.
19729
19730 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
19731
19732         * reflection.c: output also literal strings. Allocate parameter data
19733         with GC_malloc() (thanks, Martin, for catching this!).
19734
19735 2002-03-26  Martin Baulig  <martin@gnome.org>
19736
19737         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
19738         include the `this' offset in the `param_offsets'.
19739
19740 2002-03-25  Martin Baulig  <martin@gnome.org>
19741
19742         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
19743         mono_debug_get_class() function to get the classes. Added new
19744         relocation types for arrays and strings.
19745         (mono_debug_get_class): New static function to search in all
19746         referenced assemblies for a metadata token.
19747
19748         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
19749
19750 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
19751
19752         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
19753         hold gc-allocated objects. Make the string heap a stream like the
19754         others. Removed duplicated code when writing stream info.
19755         Added asserts to catch possible buffer overflows. Set the sorted map
19756         for tables that need sorting. Added some documentation.
19757
19758 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
19759
19760         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
19761         for interned strings and vtables.
19762
19763 2002-03-24  Martin Baulig  <martin@gnome.org>
19764
19765         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
19766         it in the array since it was created with g_slist_prepend().
19767
19768 2002-03-24  Martin Baulig  <martin@gnome.org>
19769
19770         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
19771         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
19772         (mono_debug_method_from_token): Renamed to
19773         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
19774         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
19775
19776         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
19777         relocation types.
19778
19779         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
19780
19781 2002-03-24  Martin Baulig  <martin@gnome.org>
19782
19783         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
19784         (mono_debug_method_from_token): New func.
19785
19786         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
19787         New interncall, calls mono_debug_local_type_from_signature().
19788         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
19789         calls mono_debug_method_from_token().
19790
19791 2002-03-23  Martin Baulig  <martin@gnome.org>
19792
19793         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
19794         specifies the number of bytes to be converted, not the array size.
19795         Return the number of chars, not the number of bytes.
19796         (ves_icall_iconv_get_chars): The `byteCount' argument
19797         specifies the number of bytes to be converted, not the array size.
19798
19799 2002-03-23  Martin Baulig  <martin@gnome.org>
19800
19801         * reflection.h (MonoReflectionSigHelper): New type.
19802
19803         * reflection.c (mono_reflection_sighelper_get_signature_local),
19804         (mono_reflection_sighelper_get_signature_local): New functions.
19805
19806         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
19807         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
19808         interncalls.
19809
19810 2002-03-23  Martin Baulig  <martin@gnome.org>
19811
19812         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
19813         is_writeable is set.
19814         (mono_raw_buffer_update): New function to write the modified map
19815         back to disk.
19816
19817         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
19818
19819         * debug-symfile.c (mono_debug_update_symbol_file): Call
19820         mono_raw_buffer_update() when done writing.
19821
19822 2002-03-23  Martin Baulig  <martin@gnome.org>
19823
19824         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
19825
19826         * debug-symfile.c: Added support for arguments and local variables.
19827
19828 2002-03-23  Dick Porter  <dick@ximian.com>
19829
19830         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
19831         protected by ifdefs, hence breaking the w32 build.
19832
19833 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19834
19835         * object.c: implement is_interned() the right way.
19836
19837 2002-03-21  Martin Baulig  <martin@gnome.org>
19838
19839         * debug-symfile.[ch]: New files to handle debugging information
19840         files. There's also support to dynamically update these symbol
19841         files to include machine dependent information.
19842
19843 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
19844
19845         * threads.c (mono_thread_create): new function to create thread
19846         from C
19847
19848 2002-03-20  Martin Baulig  <martin@gnome.org>
19849
19850         * icall.c (ves_icall_InternalInvoke): Create a new object if the
19851         method is a constructor.
19852         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
19853         points to ves_icall_InternalInvoke().
19854
19855 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
19856
19857         * file-io.c: Flush shouldn't throw exceptions.
19858
19859 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
19860
19861         * file-io.c: FileStream flush support; FileSetLength now
19862         restores file pointer.
19863
19864 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
19865
19866         * class.c: set image for pointer classes.
19867
19868 2002/03/19  Nick Drochak <ndrochak@gol.com>
19869
19870         * sysmath.c: Forgot one.
19871
19872 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
19873
19874         * sysmath.c: Avoid redefining existing names.
19875
19876 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
19877
19878         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
19879         handled by runtime as icall rather than dllimport from libm.so
19880         * file-io.c, file-io.h: fixed handle argument type.
19881
19882 2002-03-18  Dick Porter  <dick@ximian.com>
19883
19884         * reflection.c (mono_image_get_type_info): rename interface to
19885         iface, because of "#define interface struct" on windows.
19886
19887 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
19888
19889         * class.c, class.h: rename and export mono_ptr_class_get().
19890         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
19891         * reflection.c, reflection.h, icall.c: better/saner type name
19892         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
19893         method signatures.
19894
19895 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
19896
19897         * class.c (mono_class_init): removed hardcoded GHC_SLOT
19898
19899         * icall.c (ves_icall_InternalInvoke): impl.
19900
19901 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
19902
19903         * reflection.c: output the interface map table, too.
19904
19905 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
19906
19907         * class.c (class_compute_field_layout): separate computation of 
19908         static field layout
19909
19910 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
19911
19912         * icall.c: added System.Buffer support.
19913         * file-io.c: moved file icalls from PAL to FileStream.
19914
19915 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
19916
19917         * icall.c (ves_icall_System_Object_GetHashCode): impl.
19918
19919 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
19920
19921         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
19922
19923 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19924
19925         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
19926
19927 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19928
19929         * debug-helpers.{c,h}: moved here from monograph some useful functions
19930         to locate a method by name/signature in a class or image. Included
19931         also a small and flexible IL disassembler.
19932
19933 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19934
19935         * reflection.c: fixup tokens in methods with small header size, too.
19936
19937 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
19938
19939         * object.c (mono_string_to_utf8): remove assert(!error), instead
19940         print a warning. 
19941
19942 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
19943
19944         * icall.c: update to the new mono_Array_class_get interface.
19945
19946 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
19947
19948         * appdomain.c, object.c: Boehm-GC enable.
19949         * icall.c: make get_data_chunk() support split data requests.
19950         Ensure a class is initialized in more cases. Return only the first
19951         property found in GetProperties() or the compiler gets confused. 
19952         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
19953         * reflection.h, reflection.c: add fixup mechanism for field and method
19954         tokens. Initialize assembly->typeref in a single place. Output
19955         properties after events. Support custom attributes for events, too.
19956         Typo fix for paramter custom attrs.
19957
19958 2002-03-07  Martin Baulig  <martin@gnome.org>
19959
19960         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
19961
19962 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
19963
19964         * class.c (mono_array_class_get): fix. for multi. dim. arrays
19965
19966 2002-03-06  Martin Baulig  <martin@gnome.org>
19967
19968         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
19969         non-zero lower bounds. See testcases #F10-#F13.
19970
19971 2002-03-05  Martin Baulig  <martin@gnome.org>
19972
19973         * exception.c (mono_get_exception_argument_out_of_range): New exception.
19974
19975         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
19976         ves_icall_System_Array_GetValue(), only calculate the absolute array position
19977         here.
19978         (ves_icall_System_Array_SetValue): Likewise.
19979         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
19980         as argument and does the actual work. This function is used when copying a
19981         multi-dimensional array.
19982         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
19983         now do all the widening conversions of value types.
19984         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
19985
19986 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19987
19988         * class.c: remove some magic numbers and use the smbolic names,
19989         instead. Added init_events() to load event info at class init time.
19990         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
19991         and mono_metadata_methods_from_event().
19992         * reflection.h, reflection.c: added support for writing out the evnets
19993         related information.
19994
19995 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19996
19997         * reflection.h, icall.c: use a different method (GetInterfaces)
19998         to gather interface info and add isbyref, isprimitive and
19999         ispointer to the ves_icall_get_type_info() return value.
20000
20001 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
20002
20003         * class.h: stared adding support for events.
20004         * icall.c: split find_members implementation. Added debug icall to get
20005         the address of an object.
20006         * reflection.c: handle TypeBuilders in mono_type_get_object().
20007
20008 2002-03-01  Martin Baulig  <martin@gnome.org>
20009
20010         * icall.c (ves_icall_System_Array_GetLength): This must throw an
20011         ArgumentOutOfRangeException(), not an ArgumentException().
20012         (ves_icall_System_Array_GetLowerBound): Likewise.
20013         (ves_icall_System_Array_GetValue): Improved argument checking.
20014         (ves_icall_System_Array_SetValue): Improved argument checking.
20015
20016 2002-03-01  Martin Baulig  <martin@gnome.org>
20017
20018         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
20019         called with invalid arguments rather than just dying with g_assert().
20020         (ves_icall_System_Array_SetValue): Likewise.
20021         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
20022         raise a NotImplementedException instead.
20023         (ves_icall_System_Array_GetLength): Added argument checking.
20024         (ves_icall_System_Array_GetLowerBound): Added argument checking.
20025
20026 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
20027
20028         * object.h (mono_assert): new macros mono_assert and
20029         mono_assert_not_reached
20030
20031 2002-02-28  Martin Baulig  <martin@gnome.org>
20032
20033         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
20034         and "System::String::IsInterned" to "System::String::_IsInterned".
20035
20036 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
20037
20038         * icall.c: remove hacks for typebuilder. Added icall to create a
20039         modified type from a tybebuilder.
20040         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
20041         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
20042         to create a backing MonoClass for a TypeBuilder.
20043
20044 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20045
20046         * class.c, class.h: more refactoring of class init.
20047         Export mono_class_setup_mono_type() and mono_class_setup_parent().
20048
20049 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
20050
20051         * marshal.c, marshal.h: start of marshaling interface.
20052
20053 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20054
20055         * icall.c: fix order in assembly qualified name icall.
20056
20057 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20058
20059         * class.c: do not free str, since we store it in the hash table.
20060         * reflection.h: add label field to MonoILExceptionInfo.
20061         * reflection.c: handle references to more than one assembly. Handle
20062         case when there isn't a module created in the assembly.
20063
20064 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
20065
20066         * class.c: Fix typo. Start refactoring of class init code.
20067
20068 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
20069
20070         * appdomain.c: exit with 1 on error.
20071         * class.c: we already have the name in MonoClassField.
20072         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
20073         MonoStreamHeader instead of an offset of image->raw_metadata.
20074
20075 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
20076
20077         * appdomain.c (mono_init): Be even more descriptive about the error.
20078
20079 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
20080
20081         * appdomain.c: give the user an informative message when corlib can't
20082         be loaded.
20083
20084 2002-02-26  Martin Baulig  <martin@gnome.org>
20085
20086         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
20087         New icall to get the time zone data.
20088
20089 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20090
20091         * reflection.c: set virtual and raw size of section correctly.
20092         * threads.c: transfer domain information to newly created threads.
20093
20094 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20095
20096         * class.c: when instancing a class in a domain, load the default
20097         vaules for static fields from the constant table. Fix System.Enum to
20098         not be an enum.
20099         * icall.c: implement Object::GetType() internalcall. Implemented
20100         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
20101         Fixed checking of binding flags in find_members().
20102         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
20103         * reflection.c: handle enumerations when writing to the constant
20104         table. Use a different object cache for types.
20105
20106
20107 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
20108
20109         * object.c (mono_object_isinst): fix for arrays
20110
20111         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
20112
20113 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20114
20115         * object.c: don't use mprotect ()  and fix intern pool hash table
20116         lookup for big endian systems.
20117
20118 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20119
20120         * icall.c: change type_is_subtype_of () signature.
20121
20122 2002-02-21  Mark Crichton  <crichton@gimp.org>
20123
20124         * rand.c, rand.h: Added random number generator for
20125         System.Security.Cryptography classes.
20126
20127         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
20128
20129         * icall.c: Added System.Security.Cryptography calls.
20130
20131 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20132
20133         * class.c, icall.c, metadata.c: better support for pointer types.
20134         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
20135         * reflection.c: Add support for getting custom attrs for properties
20136         and simplify some code.
20137
20138 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20139
20140         * icall.c: change getToken () and add custom attribute GetBlob()helper
20141         method.
20142         * reflection.h: add custom attrs array to the reflection builder structures.
20143         * reflection.c: encode and emit custom attributes for all the relevant
20144         reflection objects. Cache fieldref and methodref tokens. Change
20145         mono_image_create_token() interface to take a MonoDynamicAssembly.
20146         More complete custom attributes decoder. Load custom attributes for
20147         Assembly, Field, Method and Constructor objects, too. Make the
20148         returned array an Attribute[] one, not object[]. Added
20149         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
20150         custom attribute constructor.
20151
20152 2002-02-20  Dick Porter  <dick@ximian.com>
20153
20154         * icall.c:
20155         * rawbuffer.c:
20156         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
20157         problem code out for now).
20158
20159 2002-02-19  Radek Doulik  <rodo@ximian.com>
20160
20161         * object.c (mono_ldstr): use hash table to avoid multiple swapping
20162
20163 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
20164
20165         * icall.c: register the GetCustomAttributes method.
20166         * object.c, object.h: add mono_string_new_len ().
20167         * reflection.h, reflection.c: added mono_runtime_invoke(),
20168         mono_install_runtime_invoke(). Added
20169         mono_reflection_get_custom_attrs () to load custom attributes and
20170         create the attribute objects.
20171
20172 2002-02-19  Dick Porter  <dick@ximian.com>
20173         * threads-dummy-types.c:
20174         * threads-dummy-types.h:
20175         * threads-dummy.c:
20176         * threads-dummy.h:
20177         * threads-pthread-types.c:
20178         * threads-pthread-types.h:
20179         * threads-pthread.c:
20180         * threads-pthread.h:  Deleted obsolete files
20181
20182 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
20183
20184         * class.c (mono_class_vtable): runtime init the class when we
20185         allocate static class data.
20186
20187         * icall.c (ves_icall_System_Array_SetValue): check for null values.
20188
20189         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
20190         and String - but we will need generic marshalling support in the
20191         future. 
20192         (mono_init): set the domain name in a ms compatible way
20193
20194         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
20195         String[].
20196
20197 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
20198
20199         * object.c (mono_array_clone): use alloca() instead of g_malloc  
20200         for sizes
20201
20202         * appdomain.c (mono_domain_unload): impl.
20203
20204 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20205
20206         * appdomain.c, object.c: fix intern pool implementation.
20207         * class.c: fix alignment code.
20208
20209 2002-02-16  Radek Doulik  <rodo@ximian.com>
20210
20211         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
20212         and s2 > s1, just copy lower bytes to be compatible with little
20213         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
20214         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
20215
20216         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
20217         force big_endian to be 1 for big endian machines 
20218         (ves_icall_iconv_new_decoder): ditto
20219
20220 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
20221
20222         * socket-io.c (convert_sockopt_level_and_name): If the system
20223         doesn't define SOL_IP or SOL_TCP, get them by hand using
20224         getprotobyname() and caching the values (because this could be a
20225         slow operation).
20226         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
20227         Use the appropriate struct when the system does support it. Ie,
20228         not all systems have struct ip_mreqn so use struct ip_mreq when
20229         appropriate.
20230
20231 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
20232
20233         * reflection.c: handle finally clauses.
20234
20235 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
20236
20237         * socket-io.c: use g_snprintf() instead of snprintf.
20238
20239 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
20240
20241         * reflection.c (mono_param_get_objects): Cast second argument to
20242         mono_method_get_param_names to a const char** to silence the
20243         compiler warning.
20244
20245         * appdomain.c (mono_domain_assembly_open): Put parens around the
20246         truth statement in the for-loop.
20247
20248         * unicode.c (iconv_convert): Got rid of a compiler warning about
20249         int i being unused when the system has a new iconv.
20250         (iconv_get_length): Same.
20251
20252         * image.c (load_class_names): Cast the second argument to
20253         g_hash_table_insert() to char* to hush compiler warnings about the
20254         arg being a const.
20255         (mono_image_open): Same here.
20256
20257         * socket-io.c: Don't conditionally include sys/filio.h or
20258         sys/sockio.h here anymore since we now get them from
20259         io-layer/io-layer.h
20260         (inet_pton): If the system doesn't support inet_aton, implement
20261         using inet_addr and also #define INADDR_NONE if it isn't defined
20262         by the system.
20263
20264 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20265
20266         * metadata.c, metadata.h: added function to get packing and size info
20267         of a typedef.
20268         * reflection.h, reflection.c: handle field RVA data. Save info about
20269         the table layout if needed. Assign typedef indexes to all the types
20270         before dumping the info about them to avoid forward reference problems.
20271
20272 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
20273
20274         * socket-io.c (convert_sockopt_level_and_name): ifdef
20275         SO_ACCEPTCONN because it is not defined on my system (old debian)
20276
20277 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20278
20279         * opcode.c: use stddef.h to get NULL.
20280
20281 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
20282
20283         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
20284         for FIONBIO, FIONREAD and SIOCATMARK.
20285         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
20286         define INADDR_NONE and besides, inet_addr() is deprecated and
20287         should not be used. Use inet_pton() instead - it also has the
20288         added bonus that it can easily handle IPv6 addresses as well.
20289         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
20290
20291 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
20292
20293         * decimal.c: remove _MSC_VER conditional.
20294
20295 2002-02-13  Dick Porter  <dick@ximian.com>
20296
20297         * socket-io.c: 
20298         * icall.c: Internal calls for Blocking, Select, Shutdown,
20299         GetSocketOption and SetSocketOption
20300
20301 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20302
20303         * assembly.cs: better resolver: use it instead of some kludgy
20304         code.
20305
20306 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
20307
20308         * reflection.c: the best way to speed-up the compiler is to avoid
20309         infinite loops.
20310
20311 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
20312
20313         * class.c (mono_class_vtable): changed the object layout
20314         (obj->vtable->class). 
20315         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
20316
20317 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20318
20319         * assembly.c: look for assemblies in the assembly dir, too.
20320
20321 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20322
20323         * class.c: fix thinko in mono_class_from_type().
20324
20325 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20326
20327         * exception.h, exception.c: added TypeLoadException.
20328         * object.h, object.c: added mono_array_clone ().
20329         * icall.c: handle throwOnError in AssemblyGetType().
20330         Added Array.Clone().
20331         * opcode.h, opcode.c: use a single value for the opcode val.
20332         Compile fix for non-gcc compilers.
20333
20334 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
20335
20336         * opcodes.c, opcodes.h: export interesting info about opcodes.
20337
20338 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
20339
20340         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
20341         icalls. 
20342
20343         * class.c (class_compute_field_layout): set element_class for enums
20344         (mono_class_create_from_typedef): set element_class for normal classes
20345
20346         * icall.c (ves_icall_System_Enum_get_value): impl.
20347
20348         * class.c (mono_class_create_from_typedef): do not set valuetype
20349         flag for System.ValueType and System.Enum
20350
20351 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
20352
20353         * unicode.c (iconv_convert): fix big endian problem.
20354
20355 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20356
20357         * class.c: add asserts if we are ever going to scribble over memory.
20358         * socket-io.c: not all systems have AF_IRDA defined.
20359
20360 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
20361
20362         * class.c (class_compute_field_layout): do not consider static
20363         fields to compute alignment
20364
20365 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
20366
20367         * appdomain.c (mono_appdomain_get): impl.
20368         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
20369
20370 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
20371
20372         * icall.c: ignore "file://" prefix when loading an assembly.
20373
20374 2002-01-23  Dick Porter  <dick@ximian.com>
20375
20376         * socket-io.c:
20377         * icall.c:
20378         * Makefile.am: Added socket support
20379
20380 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
20381
20382         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
20383         code back.  This should return the assemblies that are loaded by
20384         the runtime on behalf of an application domain. 
20385
20386         The current implementation is still broken, it just returns every
20387         assembly loaded, but until we get real applications domain this
20388         will do.
20389
20390 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
20391
20392         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
20393         AppDomain object.
20394
20395 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
20396
20397         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
20398         the mono_class_from_name lookup.
20399         (ves_icall_get_parameter_info): ditto.
20400         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
20401         method.
20402         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
20403
20404 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20405
20406         * class.c: load also nested classes on class init.
20407         System.ValueType instance methods gets passed boxed
20408         values, unless methods in derived classed that get a pointer to the
20409         data.
20410         * icall.c: use better name parsing code in GetType().
20411         * image.c, image.h: add mono_image_loaded ().
20412         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
20413         * reflection.c, reflection.h: added mono_reflection_parse_type().
20414
20415 2002-01-22  Veronica De Santis <veron78@interfree.it>
20416
20417         * icall.c : Added mapping of internal calls for Manual and Auto reset events
20418         * threads.c : Added the implementation of internal calls for events
20419         * threads.h : Added prototypes of internal calls for events
20420         
20421 2002-01-21  Radek Doulik  <rodo@ximian.com>
20422
20423         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
20424
20425 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
20426
20427         * class.c (mono_class_init): set min_align to 1 (instead of 0)
20428         (mono_class_value_size): use min_align
20429
20430 2002-01-20  Dick Porter  <dick@ximian.com>
20431
20432         * threads.h:
20433         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
20434         so it compiles on w32.
20435
20436 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
20437
20438         * metadata.c (mono_type_stack_size): impl.
20439
20440         * class.c (mono_class_get_field): impl. memberref token
20441
20442 2002-01-16 Veronica De Santis <veron78@@interfree.it>
20443
20444         * icall.h : Added the internal calls mapping for CreateMutex_internal
20445                     and ReleaseMutex_internal.
20446         * threads.h : Added the prototype of mutexes internal calls.
20447         * threads.c : Added the implementations of mutexes internal calls.
20448
20449 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20450
20451         * metaparse.h: removed unused file.
20452         * reflection.c, reflection.h: added stream_data_align () function 
20453         to align data in streams and keep stream aligned. Add support for
20454         exception support in method headers.
20455
20456 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
20457
20458         * unicode.c: make iconv_convert () return the number of bytess written
20459         in the output buffer.
20460
20461 2002-01-15  Dick Porter  <dick@ximian.com>
20462         * threads.c: Make the runtime's idea of infinite timeouts coincide
20463         with the class library's
20464
20465         Fix a particularly egregious bug in mono_thread_cleanup(). That
20466         code was so utterly bogus it must have been written on a Monday.
20467
20468 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20469
20470         * reflection.h: add subtypes field to TypeBuilder.
20471         * reflection.c: encode constants for literal fields.
20472         Handle subtypes. Fix user string token (and add a zero byte)
20473         at the end.
20474         
20475 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
20476
20477         * class.c (mono_class_init): bug fix: assign slot numbers for
20478         abstract methods.
20479
20480 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20481
20482         * reflection.c: don't try to output a code RVA for abstract methods.
20483         Small fixes for method header format. Output parameter info to the
20484         ParamDef table. Save method overriding info to MethodImpl table.
20485         Fix property support. Allow typedef.extends to be a type in the
20486         building assembly.
20487         * verify.c: fix off-by-one error.
20488
20489 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
20490
20491         * class.c: fix mono_class_from_mono_type () for szarray types.
20492         Remove unused cache check in mono_class_from_type_spec().
20493         * icall.c: *type_from_name () functions handle simple arrays and byref.
20494         * reflection.c: handle byref and szarray types. Handle methods without
20495         body (gets P/Invoke compilation working). Handle types and fields in
20496         get_token ().
20497         * reflection.h: add rank to MonoTypeInfo.
20498
20499 2002-01-10  Dick Porter  <dick@ximian.com>
20500
20501         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
20502         internal calls
20503
20504 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20505
20506         * icall.c: initialize class in type_from_handle ().
20507         Loop also in parent classes for get_method ().
20508         * reflection.c: properly encode class and valuetype types.
20509         Start on encoding TypeBuilder types. Handle fieldrefs.
20510         Use correct length when registering a user string.
20511         Handle ConstructorBuilder and MonoMethod in get_token ().
20512         Make mono_type_get_object () aware of cached types.
20513         * object.c: back out change to mono_string_new ().
20514
20515 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
20516         * object.c: mono_string_new should return a NULL when the string 
20517         passed in is NULL -- not try to deference it.
20518         
20519 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
20520
20521         * icall.c: hack to make IsSubType work for TypeBuilders.
20522         * reflection.c: emit constructors before methods.
20523         Retrieve param names in mono_param_get_objects().
20524
20525 2002/01/05  Nick Drochak  <ndrochak@gol.com>
20526
20527         * Makefile.am: fix list of headers and sources so automake 1.5
20528         doesn't complain. Removed \# at end of list.
20529
20530 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20531
20532         * reflection.c: get token for a method ref. Set return type of
20533         constructor to void.
20534         * loader.c: debug message.
20535         * class.c: typo fix.
20536
20537 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
20538
20539         * icall.c: fix array init with rank > 1. FindMembers
20540         loops in parent class as well.
20541         * image.c: do not insert nested types in name cache.
20542         * reflection.c: warning fix.
20543         * reflection.h: add override method (for interface impl).
20544
20545 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
20546
20547         * metadata.c: fix customattr decoding.
20548
20549 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
20550
20551         * rawbuffer.cs: Added native Win32 implementation, avoids using
20552         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
20553
20554 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
20555
20556         * class.c: make the low-level routines handle the cache.
20557
20558 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
20559
20560         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
20561
20562 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
20563
20564         * class.c: fix mono_array_element_size() for objects.
20565         * class.h, class.c: add properties to MonoClass and load them
20566         at init time.
20567         * icall.c: check with isinst() when assigning a value to an array
20568         instead of requiring the classes to match exactly.
20569         Implemented icall for System.Type::GetType().
20570         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
20571         enums. Handle bindingflags when looking for methods and fields.
20572         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
20573         and mono_metadata_methods_from_property().
20574         * reflection.h, reflection.c: added structures for propreties,
20575         parameters and enums. Implemented mono_property_get_object() and
20576         mono_param_get_objects().
20577
20578 2001-12-18  Dick Porter  <dick@ximian.com>
20579
20580         * file-io.c: Use mono_string_to_utf16() instead of
20581         mono_string_chars()
20582
20583         * object.c: Added mono_string_to_utf16(), which copies the non
20584         NULL-terminated MonoString into a new double-null-terminated
20585         buffer.
20586
20587 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
20588
20589         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
20590
20591 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
20592
20593         * file-io.c: raise exceptions if handle is invalid.
20594
20595 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
20596
20597         * assembly.c: yet another check for mscorlib.
20598         * class.c, class.h: load nesting info for classes.
20599         * icall.c: many new functions to support the Reflection classes.
20600         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
20601         * reflection.h, reflection.c: mono_image_create_token(),
20602         mono_assembly_get_object(), mono_type_get_object(),
20603         mono_method_get_object(), mono_field_get_object(): methods to return
20604         objects that parallel the C representation of assemblies, types,
20605         methods, fields.
20606
20607 2001-12-11  Dick Porter  <dick@ximian.com>
20608
20609         * icall.c:
20610         * file-io.c: Internal calls for file IO.
20611
20612 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
20613
20614         * tabledefs.h: missing FileAttributes.
20615         * verify.h, verify.c: use is_valid_string () to simplify and check for
20616         valid strings more correctly. Fix warnings and speeling.
20617         Check more tables: Filed, File, ModuleRef, StandAloneSig.
20618         Check code: branches, maxstack, method calls.
20619
20620 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
20621
20622         * object.c (mono_object_allocate): removed static, so that the jit
20623         can allocate value types.
20624
20625         * icall.c (ves_icall_System_DateTime_GetNow): impl.
20626
20627 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20628
20629         * class.c: init enum types right away and register the
20630         token->MonoClass map in mono_class_create_from_typedef ().
20631         * verify.h, verify.c: first cut of the verifier.
20632         * pedump.c: add --verify switch to verify metadata tables.
20633         * tabledefs.h: add some missing enums.
20634
20635 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
20636
20637         * class.c (mono_install_runtime_class_init): impl.
20638         (mono_class_init): renamed mono_class_metadata_init to
20639         mono_class_init, also removed the metadata_inited flag
20640
20641         * object.c (mono_object_isinst): use faster algorithm
20642
20643 2001-11-30  Radek Doulik  <rodo@ximian.com>
20644
20645         * mono-endian.h: reverted last change
20646         added function prototypes
20647
20648         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
20649         add mono-endian.c back
20650
20651         * mono-endian.c: returned back, as Paolo pointed out, it's needed
20652         for unaligned access, I've mistaked it with endianess. I am
20653         sorry.
20654         (mono_read16): fix reverted endianess
20655         (mono_read64): ditto
20656         (mono_read32): ditto
20657
20658 2001-11-30  Dick Porter  <dick@ximian.com>
20659
20660         * exception.c: Implement mono_exception_from_name()
20661
20662 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20663
20664         * metadata.h, metadata.c: remove params_size and locals_size and their
20665         calculation from the metadata code: they are only usefult to the
20666         interp.
20667
20668 2001-11-29  Radek Doulik  <rodo@ximian.com>
20669
20670         * object.c (mono_ldstr): swap bytes here, it's probably not the
20671         best place, but works for me now, I'll redo it once I know mono
20672         better, also note that I add PROT_WRITE and don't reset back, also
20673         note that it's only affects big endians, so x86 should be OK
20674
20675         * mono-endian.h (read16): use just glib macros for both endians
20676
20677         * mono-endian.c: removed as glib macros are used in in
20678         mono-endian.h so we don't need to care about endianess for read
20679         macros as glib does that for us already
20680
20681 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
20682
20683         * class.h, class.h: take minimum alignment into consideration so
20684         that the fields of a class remain aligned also when in an array.
20685
20686 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20687
20688         * loader.h, loader.c: add mono_method_get_param_names().
20689         * class.c: 0-init class fields.
20690
20691 2001-11-26  Dick Porter  <dick@ximian.com>
20692
20693         * icall.c:
20694         * threads-types.h:
20695         * threads.c: New file that handles System.Threading on all platforms
20696
20697         * object.c: 
20698         * object.h: Remove the synchronisation struct from MonoObject,
20699         replace it with a pointer that gets initialised on demand
20700
20701         * Makefile.am: Replace all the system-specific threading code with
20702         a single file that uses the new wrapper library
20703
20704 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
20705
20706         * class.c, class.h: add mono_install_trampoline() so that the runtime
20707         can register a function to create a trampoline: removes the ugly
20708         requirement that a runtime needed to export arch_create_jit_trampoline.
20709         * object.h, object.c: added mono_install_handler() so that the runtime
20710         can install an handler for exceptions generated in C code (with
20711         mono_raise_exception()). Added C struct for System.Delegate.
20712         * pedump.c: removed arch_create_jit_trampoline.
20713         * reflection.c: some cleanups to allow registering user strings and
20714         later getting a token for methodrefs and fieldrefs before the assembly
20715         is built.
20716         * row-indexes.h: updates and fixes from the new ECMA specs.
20717
20718 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
20719
20720         * class.h, class.c: add enum_basetype field to MonoClass.
20721         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
20722         to get index in the constant table reated to a field, param or
20723         property.
20724         * reflection.h, reflection.c: handle constructors. Set public-key and
20725         version number of the built assembly to 0.
20726         * row-indexes.h: update from new ECMA spec.
20727
20728 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
20729
20730         * class.h, class.c: add a max_interface_id to MonoClass.
20731         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
20732         since it's used to do that. Added mono_type_type_from_obj().
20733         Make GetType() return NULL instead of segfaulting if the type was not
20734         found. Handle simple arrays in assQualifiedName.
20735         * object.h: add a struct to represent an Exception.
20736         * reflection.c: output call convention in method signature.
20737         Add code to support P/Invoke methods and fixed offsets for fields.
20738
20739 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
20740
20741         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
20742         the value.
20743         * icall.c: use mono_array_addr instead of array->vector: fixes the
20744         reflection image writing.
20745         * reflection.c: init call convention byte to 0 in method signature.
20746         Encode the property signature. Don't output property-related methods
20747         twice. Really process the properties for a type (don't cast a field to
20748         a property, my mom always told me that).
20749         Fix 64 bit issues in pointer alignment in a different and more
20750         readable way.
20751
20752 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
20753
20754         * loader.h: Removed type class from MonoDefaults, added monotype
20755
20756         * loader.c: Loaded MonoType, removed loading of Type
20757
20758         * icall.c (my_mono_new_object): Now returns a System.MonoType,
20759         and fills in System.Type._impl with a RuntimeTypeHandle rather
20760         than the actual MonoClass *
20761
20762         (ves_icall_type_from_handle): change from type_class to
20763         monotype_class
20764
20765         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
20766         implemented
20767
20768         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
20769         implemented
20770
20771         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
20772
20773         (ves_icall_System_Reflection_Assembly_GetType): implemented
20774
20775         (ves_icall_System_MonoType_assQualifiedName): implemented
20776
20777         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
20778
20779 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
20780
20781         * assembly.c (mono_assembly_open): Implement a cache for the
20782         assemblies. 
20783
20784         (mono_assembly_close): only destroy the assembly when the last
20785         reference is gone.
20786         
20787 2001-11-09  Dick Porter  <dick@ximian.com>
20788
20789         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
20790
20791 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
20792
20793         * class.c (mono_class_metadata_init): bug fix: compute the right slot
20794
20795 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20796
20797         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
20798         from Martin Weindel.
20799         * object.h: add mono_string_chars ().
20800
20801 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
20802
20803         * reflection.c (build_compressed_metadata): Eliminates warnings
20804         and uses 64-bit clean code.
20805
20806         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
20807         (mono_type_equal): Change signature to eliminate warnings.
20808
20809 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20810
20811         * icall.c, loader.c: remove the internalcall array constructors.
20812         Changes to match the new MonoArray structure.
20813         * object.h, object.c: an array object doesn't allocate an extra
20814         vector. Add mono_array_new_full () to create jagged arrays easily.
20815
20816 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
20817
20818         * metadata.h, metadata.c: add mono_metadata_field_info () to
20819         retreive all the info about a field from vairous tables.
20820         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
20821         * class.h, class.c: augment MonoClassField with more info.
20822         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
20823         policy and load a field's RVA if needed.
20824
20825 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
20826
20827         * class.c (mono_class_metadata_init): create a trampoline for all
20828         virtual functions instead of actually compiling them.
20829
20830 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
20831
20832         * class.h, class.c: include name in MonoClassField.
20833         * class.c: fix fundamental type of System.Object and System.String.
20834         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
20835         tokens in ldtoken.
20836         * icall.c: remove internalcalls for the Reflection stuff that is now
20837         done in C# code.
20838         * loader.c: mono_field_from_memberref () implementation.
20839         * mono-endian.c: thinko (s/struct/union/g).
20840         * object.c, object.h: make the mono_string_* prototypes actually use
20841         MonoString instead of MonoObject.
20842         * reflection.c, reflection.h: updates for changes in the reflection
20843         code in corlib: we use C structures that map to the actual C# classes.
20844         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
20845         fat method header if needed and use the info from the ILGenerator for
20846         methods. Handle fields in types. Misc fixes.
20847
20848 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
20849
20850         * class.c (mono_class_metadata_init): bug fix: always allocate
20851         space for static class data
20852
20853 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
20854
20855         * class.c (mono_compute_relative_numbering): use relative
20856         numbering to support fast runtime type checks.
20857
20858 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
20859
20860         * class.c (mono_class_create_from_typeref): added debugging output
20861         to print class name when MonoDummy is returned instead of real class
20862
20863 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
20864
20865         * class.c (mono_class_metadata_init): interface offset table now
20866         contains pointers into the vtable - this is more efficient for the jit
20867
20868 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
20869
20870         * class.c (mono_class_metadata_init): use a temporary vtable (the
20871         old algorithm only worked for the interpreter, but not for the jit)
20872
20873 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
20874
20875         * loader.c (method_from_memberref): use mono_class_get to get the
20876         class of an array instead of using System.Array directly.
20877         (mono_get_method): also add MEMBERREF methods to the method cache
20878         which usefull for arrays.
20879
20880 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
20881
20882         * pedump.c (arch_compile_method): added to compute vtable entry
20883
20884         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
20885         number of interfaces.
20886         
20887         * class.h: merged MonoArrayClass into MonoClass
20888
20889         * class.c (mono_class_create_from_typedef): compute the vtable size and
20890         allocate space to include the vtable inside MonoClass
20891         (mono_class_metadata_init): initialize the vtable
20892
20893 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
20894
20895         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
20896         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
20897         * image.c: endian fixes by Laurent Rioux.
20898         * object.h, object.c: rename MonoStringObject to MonoString and
20899         MonoArrayObject to MonoArray. Change some function names to conform to
20900         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
20901         guint16* as first argument, so don't use char*.
20902         Provide macros to do the interesting things on arrays in a portable way.
20903         * threads-pthread.c: updates for the API changes and #include <sched.h>
20904         (required for sched_yield()).
20905         * icall.c: updates for the API changes above.
20906         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
20907         platforms that need them.
20908
20909 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
20910
20911         * class.c: set the correct type for all the fundamental
20912         type when loading the class.
20913
20914 2001-10-05  Dick Porter  <dick@ximian.com>
20915
20916         * threads-pthread.c (pthread_mutex_timedlock): Simple
20917         compatibility version for C libraries that lack this call.
20918
20919 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20920
20921         * class.c: MonoTypes stored in MonoClass are stored as
20922         fundamental MonoTypes when the class represents a
20923         fundamental type (System.Int32, ...).
20924         The TypeHandle return by ldtoken is a MonoType*.
20925         * icall.c: ves_icall_get_data_chunk () write out all the
20926         PE/COFF stuff. Implement ves_icall_define_method (),
20927         ves_icall_set_method_body (), ves_icall_type_from_handle ().
20928         * image.c: properly skip unknown streams.
20929         * loader.h, loader.c: add type_class to mono_defaults.
20930         * metadata.c, metadata.h: export compute_size () as
20931         mono_metadata_compute_size () with a better interface.
20932         Typo and C&P fixes.
20933         * pedump.c: don't try to print the entry point RVA if there is no entry point.
20934         * reflection.c, reflection.h: many cleanups, fixes, output method
20935         signatures and headers, typedef and typeref info, compress the metadata
20936         tables, output all the heap streams, cli header etc.
20937         * row-indexes.h: typo fixes.
20938
20939 2001-10-04  Dick Porter  <dick@ximian.com>
20940
20941         * object.h: Add a synchronisation mutex struct to MonoObject
20942
20943         * object.c (mono_new_object): Initialise the object
20944         synchronisation mutexes
20945
20946         * icall.c: System.Threading.Monitor internal calls
20947         
20948         * threads-pthread.h:
20949         * threads-pthread.c: System.Threading.Monitor internal calls
20950
20951         * threads-types.h: New file, includes the system-specific thread
20952         structures
20953         
20954         * threads-pthread-types.h:
20955         * threads-pthread-types.c: New files, handle pthread-specific
20956         synchronisation types
20957
20958         * threads-dummy-types.h: 
20959         * threads-dummy-types.c: New files of dummy support for
20960         thread-specific types
20961
20962         * metadata.c:
20963         * image.c:
20964         * pedump.c: include mono-endian.h not endian.h
20965         
20966         * Makefile.am: More threads files.
20967         Name mono-endian.h not endian.h
20968
20969 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
20970
20971         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
20972         stuff and implement a few more bits.
20973         * icall.c: a field needs to be dereferenced twice. Do not use the same
20974         name for two variables in the same scope.
20975         * image.c, image.h: cleanups.
20976
20977 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
20978
20979         * class.c (mono_class_metadata_init): bug fix: compute the right size
20980
20981 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
20982
20983         * icall.c: implemented some of the Reflection internalcalls.
20984         * image.c, image.h: start writing out the PE/COFF image.
20985         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
20986         that does the reverse than decode_blob_size ().
20987         * object.c: use mono_metadata_encode_value (). Move here
20988         temporary implementation of mono_string_to_utf8 ().
20989         * rawbuffer.c: make malloc_map static.
20990
20991 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20992
20993         * metadata.c: fix type comparison for arrays.
20994         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
20995         Added a couple of new classes to monodefaults.
20996         * icall.c: added a couple of Reflection-related internalcalls.
20997         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
20998         Added a byval_arg MonoType to MonoClass.
20999
21000 2001-09-28  Dick Porter  <dick@ximian.com>
21001
21002         * icall.c:
21003         * threads-pthread.h: 
21004         * threads-pthread.c: Implemented internal calls for
21005         LocalDataStoreSlot operations.  Applied mutexes around all shared
21006         data.  Reworked the thread creation and Start() operations to
21007         avoid a race condition.
21008         
21009         * threads-dummy.h:
21010         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
21011
21012 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
21013
21014         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
21015
21016 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
21017
21018         * class.c, loader.c: warn and return NULL instead of erroring out.
21019         * icall.c: added System.AppDomain::getCurDomain().
21020         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
21021
21022 2001-09-25  Dick Porter  <dick@ximian.com>
21023
21024         * threads-pthread.h:
21025         * threads-pthread.c: Implemented timed thread joining and added
21026         System.Threading.Thread::Join_internal internal call
21027
21028         * icall.c: Added System.Threading.Thread::Join_internal internal call
21029
21030         * threads-dummy.h:
21031         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
21032
21033 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
21034
21035         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
21036         mono_string_intern () to implement the semantics of the ldstr opcode
21037         and the interning of System.Strings.
21038         * icall.c: provide hooks to make String::IsIntern and String::Intern
21039         internalcalls.
21040
21041 2001-09-23  Dick Porter  <dick@ximian.com>
21042
21043         * threads-dummy.c: 
21044         * threads-dummy.h: New files of dummy threading routines
21045
21046         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
21047         support code based on system specifics
21048
21049         Rename PTHREAD_LIBS to THREAD_LIBS
21050         
21051 2001-09-23  Dick Porter  <dick@ximian.com>
21052
21053         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
21054         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
21055         internal calls.
21056         (mono_thread_init): Set up a Thread object instance to return when
21057         the main thread calls Thread.CurrentThread
21058         (mono_thread_cleanup): Wait for all subthreads to exit
21059
21060         * icall.c: New internal calls for System.Threading.Thread::Sleep
21061         (including Schedule) and CurrentThread
21062
21063         * threads.h: New file, to insulate thread-specific stuff from the
21064         rest of the code
21065
21066 2001-09-21  Dick Porter  <dick@ximian.com>
21067
21068         * threads-pthread.h: 
21069         * threads-pthread.c: New file, for handling pthreads-style
21070         threading support.  Start() now starts a new thread and executes
21071         the ThreadStart delegate instance.
21072
21073         * icall.c: Added the internalcall for
21074         System.Threading.Thread::Start_internal
21075
21076         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
21077
21078 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
21079
21080         * loader.c: work around the different signatures for delegates
21081         constructors csc generates in compiled code vs the ones compiled in mscorlib.
21082
21083 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21084
21085         * class.h, class.c: add mono_class_get_field_from_name ().
21086         * *: Fix C comments and other ANSI C issues.
21087
21088 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
21089
21090         * endian.h, assembly.c: fix some endianness issues.
21091
21092 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
21093
21094         * loader.h, load.c: add delegate_class to mono_defaults.
21095         Handle runtime provided methods in mono_get_method ().
21096
21097 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
21098
21099         * loader.c (mono_get_method): use pinvoke for internal call
21100
21101         * icall.c: use pinvoke for internal call
21102
21103         * loader.c (method_from_memberref): set the method name
21104
21105 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
21106
21107         * metadata.c: help the compiler generate better code for
21108         mono_class_from_mono_type ().
21109
21110 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
21111
21112         * class.c (mono_class_metadata_init): delayed computing of the
21113         class size to mono_class_metadata_init ()
21114
21115 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
21116
21117         * class.c, class.h: add an interfaces member to MonoClass.
21118         * image.c, image.h: add assembly_name field to MonoImage
21119         from the assembly table.
21120         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
21121
21122 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21123
21124         * class.c: Handle Array in mono_class_from_mono_type ().
21125         * metadata.c, pedump.c: some endian fixes.
21126
21127 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
21128
21129         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
21130         * metadata.c: fix small problem introduced with the latest commit.
21131
21132 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
21133
21134         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
21135         We don't need a MonoMetadata pointer anymore to compare signatures in
21136         mono_metadata_signature_equal (), update callers.
21137         Reduced memory usage an number of allocations for MonoMethodHeader and
21138         MonoMethodSignature.
21139
21140 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
21141
21142         * metadata.c: added compare for szarray.
21143
21144 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
21145
21146         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
21147         and add a couple more types to it and mono_defaults. Give an hint on
21148         classes that need implementing in our corlib and are referenced
21149         in mscorlib.
21150
21151 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
21152
21153         * class.h, class.c: keep track if a class is also an Enum.
21154         * loader.c: Implement a couple more types for use in libffi
21155         marshalling. Gives better diagnostics when failing to dlopen
21156         a library. Set method->klass for P/Invoke methods, too.
21157
21158 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
21159
21160         * class.c, class.h: add a MonoType this_arg to MonoClass that
21161         represents a pointer to an object of the class' type that
21162         can be used by the interpreter and later the type cache.
21163         Add best guess alignment info for valuetype objects.
21164
21165 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
21166
21167         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
21168         into MonoType: one less level of indirection and allocation and
21169         simplifies quite a bit of code. Added cache for MonoTypes that are
21170         used frequently, so that we don't need to allocate them all the time.
21171
21172 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
21173
21174         * class.c (mono_class_create_from_typedef): System.Enum is also a
21175         value type, although it does not derive from System.ValueType
21176         (maybe a bug in the ms compiler?)
21177
21178         * metadata.c (mono_type_size): return the right size for value types
21179
21180         * loader.c (mono_get_method): only initialize method header if not abstract
21181
21182         * class.c (mono_class_from_mono_type): use mono_default values. 
21183
21184 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
21185
21186         * *: use MonoClass pointers instead of <type_tokens>
21187         
21188         * class.h: new flag: metadata_inited.
21189
21190         * class.c (mono_class_metadata_init): impl.
21191         (mono_class_instance_size): impl.
21192         (mono_class_data_size): impl.
21193
21194 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21195
21196         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
21197         MonoClass now has the name and name_space fields. 
21198         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
21199         mono_get_method () takes and optional MonoClass as argument.
21200         Removed mono_typedef_from_name() and added mono_class_token_from_name()
21201         instead that takes advantage of a map from class names to typedef
21202         tokens in MonoImage.
21203
21204 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
21205
21206         * metadata.c: zero is not a valid alignment boundary.
21207         Merge MONO_TYPE_VOID in default decoding code.
21208
21209 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
21210
21211         * image.h: merged MonoMetadata into MonoImage
21212
21213         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
21214         identify the type of elements.
21215
21216 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
21217
21218         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
21219         * cil-coff.h: split MonoMSDOSHeader and add size info.
21220         * image.c: add some consistency checks.
21221         * metadata.c: fix row size computation: one programmer
21222         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
21223         add explanation for the locator routine.
21224         Fix decoding of size in method header.
21225         
21226 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
21227
21228         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
21229         (g_concat_dir_and_file): Bring g_concat_dir_and_file
21230         function from gnome-libs.  This uses the right path separator
21231         based on the OS, and also works around a bug in some systems where
21232         a double slash is not allowed. 
21233         (default_assembly_name_resolver): Use g_concat_dir_and_file
21234         (mono_assembly_open): ditto.
21235
21236 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
21237
21238         * metadata.c (mono_metadata_signature_equal): impl.
21239
21240         * *: void is now a realy MonoType (instead of using NULL)
21241         
21242         * metadata.c (do_mono_metadata_parse_type): use
21243         mono_metadata_parse_type to parse void value.
21244
21245 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
21246
21247         * metadata.c, metadata.h: in the signature and method header store
21248         only the space required for holding the loca vars and incoming arguments.
21249
21250 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
21251
21252         * metadata.c (do_mono_metadata_parse_type): treat void like any
21253         other type (instead of assigning NULL);
21254
21255 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
21256
21257         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
21258
21259 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
21260
21261         * image.c (do_mono_image_open): added a cache for arrays.
21262
21263 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21264
21265         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
21266         decode a single column from a row in a metadata table and changes
21267         to take advantage of it in the typedef locator (gives a nice speed up).
21268         Store offset info for function params.
21269
21270 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
21271
21272         * image.h (MONO_IMAGE_IS_CORLIB): removed 
21273
21274 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
21275
21276         * assembly.c: how could mono_assembly_close () had ever worked?
21277         * metadata.c, metadata.h: provide offset info for local vars.
21278         Implement mono_type_size () to take care of alignment as well
21279         as size (it was mono_field_type_size in cli/class.c before).
21280
21281 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
21282
21283         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
21284
21285         * assembly.h (CORLIB_NAME): set to corlib.dll
21286
21287         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
21288
21289 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21290
21291         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
21292         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
21293         tokentype.h: massive namespace cleanup.
21294
21295 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21296
21297         * metadata.h, metadata.c: decode exception clauses when parsing method header.
21298
21299 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
21300
21301         * metadata.c (mono_metadata_free_type): added check for type !=
21302         NULL (void) before calling mono_metadata_free_type()
21303
21304 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
21305
21306         * metadata.h, row_indexes.h: added header with enumerations to use
21307         to index in the columns from tables in metadata and to decode coded
21308         tokens: we should start using this instead of embedding magic numbers
21309         all over the code.
21310
21311 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
21312
21313         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
21314         Move metadata_t info from cli_image_info_t to MonoImage, where
21315         it's easily accessible. Changed all the uses accordingly.
21316         Added the method and class caches to MonoImage.
21317         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
21318         and mono_metadata_decode_value () signature to be more consistent
21319         with the other parse functions (and simplify code). Taken advantage
21320         of zero-length array allocation with GCC. Removed reduntant (and
21321         wrong) MonoFieldType struct and use MonoParam instead. Changed
21322         mono_metadata_parse_field_type () to use common code for parsing.
21323         Added mono_metadata_typedef_from_field () and
21324         mono_metadata_typedef_from_method () to lookup a typedef index from a
21325         field or method token.
21326         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
21327
21328 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
21329
21330         * metadata.c (mono_metadata_parse_field_type): Implement. 
21331         (do_mono_metadata_parse_type): Split engine from
21332         mono_metadata_parse_type, so that we can create smaller structures
21333         for things that just have one pointer to the MonoType (look at
21334         the MonoFieldType)
21335
21336 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
21337
21338         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
21339         as Jan Gray found out, it is incorrect. 
21340
21341 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
21342
21343         * assembly.c: Implement asssembly loading.  This loads an image
21344         and loads all the referenced assemblies.  Come to think of it, we
21345         could always do lazy loading of the assemblies. 
21346
21347         * image.c (mono_image_open): Keep loaded images in a hashtable.
21348
21349         * image.h (MonoImage): Add reference count.
21350
21351 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
21352
21353         * assembly.c (mono_assembly_open): Keep track of the file name in
21354         case the assembly has no ASSEMBLY table.
21355
21356         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
21357         from get.c here.
21358
21359 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
21360
21361         * metadata.c, metadata.h: decode local vars in method header
21362         parse function. Change callers accordingly.
21363
21364 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
21365
21366         * metadata.h, cil-coff.h: protect against multiple inclusion.
21367         Added some new structures to hold information decoded from metadata:
21368         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
21369         and relevant decoding/free functions.
21370         * metadata.c: implement decoding functions. Add warning for out of bounds
21371         index in mono_metadata_locate(). Implement mono_get_method () to retreive
21372         all the info about a method signature and invocation. Remove check on
21373         uninitialized local var in parse_mh() and fix memory leak.
21374
21375 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
21376
21377         * metadata.h: More macros.
21378
21379         * tokentype.h: New file.
21380
21381 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
21382
21383         * assembly.c: added a consistency check and initialize
21384         some structures with g_new0().
21385         * metadata.c: fixed a couple more bugs in table size computation
21386         and add other checks for out-of bound access to metadata.
21387
21388 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
21389
21390         * metatada.c: fix bugs computing table sizes. Spew a
21391         warning when index in string heap is out of bounds.
21392
21393 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
21394
21395         * metadata.h: Add a couple of macros to manipulate tokens. 
21396
21397 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21398
21399         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
21400         cli_section_tables).
21401
21402 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
21403
21404         * metadata.c (mono_metadata_user_string): New function, provides
21405         access to the UserString heap. 
21406
21407 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
21408
21409         * metadata.c: Add inline documentation.
21410
21411 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
21412
21413         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
21414         files. 
21415
21416 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
21417
21418         * typeattr.h: New file, TypeAttribute flags. 
21419
21420 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
21421
21422         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
21423         mono_assembly_ensure_section): Section loading code.
21424         (load_section_tables): Load the sections.
21425
21426         * mono/metadata/metadata.c (mono_metadata_locate_token,
21427         mono_metadata_locate): Functions to locate the information
21428         definition given a token or a table and an index.
21429         (mono_metadata_compute_table_bases): New.
21430         (compute_size): New function to compute the sizes of the various
21431         tables.
21432
21433         * mono/metadata/metadata.h: Finish listing the different index
21434         types. 
21435
21436         * mono/metadata/pedump.c: Improve to dump new information.
21437
21438 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
21439
21440         * mono/metadata/metadata.c: Entered all the tables matching
21441         Beta2. 
21442
21443         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
21444
21445
21446