2007-06-22 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
2
3         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
4         to avoid crashes during assembly unloading.
5
6 2007-06-22  Raja R Harinath  <rharinath@novell.com>
7
8         Fix MethodInfo.IsGenericMethodDefinition
9         * reflection.c (mono_reflection_bind_generic_method_parameters):
10         Rearrange code to ensure we always uses a generic method definition.
11         * class.c (mono_class_inflate_generic_method_full): Set
12         'generic_container' field only for generic method definitions.
13         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
14         Use presense of 'generic_container' field as indication of being a
15         generic method definition.
16
17 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
18
19         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20
21         * object-internals.h: Reflect changes in the layout of the managed Delegate
22         class.
23         
24         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
25         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
26         runtime memory used by the dynamic method. Fixes #77146.
27
28 2007-06-21  Dick Porter  <dick@ximian.com>
29
30         * file-io.h: 
31         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
32         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
33         81767.
34
35 2007-06-21  Raja R Harinath  <rharinath@novell.com>
36
37         * reflection.c (method_encode_methodspec): Add a tripwire.
38         * class.c (inflate_generic_type): The fully open generic type is
39         not the same as the generic type definition.
40
41 2007-06-21  Martin Baulig  <martin@ximian.com>
42
43         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
44
45         * mono-debug-debugger.h
46         (MonoDebuggerBreakpointInfo): Removed.
47         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
48         (mono_debugger_remove_breakpoint): Likewise.
49         (mono_debugger_breakpoint_callback): Likewise.
50         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
51
52 2007-06-21  Raja R Harinath  <rharinath@novell.com>
53
54         * metadata.c (mono_metadata_lookup_generic_class): The fully open
55         generic type is not the same as the generic type definition.
56         * class.c (mono_generic_class_get_class): Likewise.
57
58 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
59
60         * icall.c: The second argument to 
61         System.Reflection.MethodBase.GetMethodFromHandleInternalType
62         is a MonoType not a MonoClass.
63
64 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
65
66         * verify.c: support for function pointers in the verifier
67
68 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
69
70         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
71
72 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
73
74         * assembly.c: removed Mono.Data.SqliteClient from the list of
75         forward-compatible assemblies as it breaks the ABI (bug #81899).
76
77 2007-06-19  Raja R Harinath  <rharinath@novell.com>
78
79         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
80         lookup/update with the loader lock.
81         * reflection.c (mono_class_bind_generic_parameters): No need to
82         protect mono_metadata_lookup_* with the loader lock.
83         * class.c (inflate_generic_type): Likewise.
84         
85         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
86         on a generic instantiated type.
87
88 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
89
90         *verify.c: produce meanfull error messages on verification error
91         *verify.c: fixed some cases of verification errors reported as validation errors
92         *pedump.c: fixed the error name array, now it shows validation errors properly
93         *verify.h: fixed the contant that should be used for verification errors
94
95 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
96
97         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
98         for bug #77596, 81858 and 80743 (generics data structures on domain
99         unload).
100
101 2007-06-15  Raja R Harinath  <rharinath@novell.com>
102
103         Avoid allocating 'MonoGenericContext' on the heap.
104         * class-internals (_MonoMethodInflated::context): Make field
105         inline, not a pointer.
106         * loader.c (method_from_methodspec): Allocate 'new_context' on the
107         stack.  Use the context embedded within the inflated method as the
108         hash key, rather than 'new_context'.
109         * class.c (inflate_generic_context): Simplify.  Return a struct
110         rather than allocating on the heap.
111         (mono_class_inflate_generic_method_full): Update to changes.  Now,
112         doesn't salt away a copy of the context -- simplifying the
113         lifetime rules of a 'MonoGenericContext *'.
114         (mono_method_get_context): Return pointer to embedded context.
115         (setup_generic_array_ifaces): Allocate temporary context on stack.
116         * reflection.c (inflate_mono_method): Likewise.
117         (mono_reflection_bind_generic_method_parameters): Likewise.
118         Use the context embedded within the inflated method as the hash key.
119
120         Avoid a source of allocation of 'MonoGenericContext'.
121         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
122         and 'cached_context' fields into embedded 'MonoGenericContext' field.
123         * class.c: Update to changes.
124         (mono_generic_class_get_context): Simplify drastically.  Now just
125         returns a pointer to the field.
126         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
127         argument as a const pointer.
128         (mono_metadata_generic_context_equal): Likewise.
129         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
130         Update to changes.
131
132 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
133
134         * verify.c improved the handling of brtrue/brfalse, factored out common code
135
136 2007-06-14  Raja R Harinath  <rharinath@novell.com>
137
138         Kill MonoGenericMethod.
139         * class-internals.h (MonoGenericContext::method_inst): Rename from
140         'gmethod' and convert to a MonoGenericInst.
141         (MonoGenericMethod): Remove.
142         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
143         * loader.c (method_from_methodspec): Update to changes.  Use a
144         MonoGenericContext as the key to the hashtable.
145         * metadata.c (mono_metadata_generic_context_equal): Rename from 
146         'mono_metadata_generic_method_equal' and take MonoGenericContext.
147         (mono_metadata_generic_context_hash): Likewise from
148         'mono_metadata_generic_method_hash'.  Change hash function.
149         (mono_metadata_load_generic_params): Update to changes.
150         (mono_get_shared_generic_method): Remove.
151         * metadata-internals.h (mono_get_shared_generic_method): Remove.
152         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
153         (inflate_generic_context): Likewise.
154         (mono_class_inflate_generic_method_full): Likewise.
155         (setup_generic_array_ifaces): Likewise.
156         (mono_class_create_from_typespec): Likewise.
157         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
158         (method_encode_methodspec): Update callsite.
159         (reflection_methodbuilder_to_mono_method): Update to changes.
160         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
161         MonoGenericContext as the key to the hashtable.
162         (inflate_mono_method): Update to changes.
163
164         * class-internals.h (MonoGenericMethod::container): Remove.
165         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
166
167 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
168
169         * profiler-private.h, profiler.c, profiler.h: added API to profile
170         exception events.
171
172 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
173
174         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
175
176 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
177
178         * verify.c: method invocation is now validated, now we verify parameter types on stack.
179         Fixed overflow and underflow not aborting the verification process.
180
181 2007-06-13  Mark Probst  <mark.probst@gmail.com>
182
183         * class-internals.h (MonoStats): Added stats entries for dynamic
184         code allocations.
185
186 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
187
188         * loader.c (mono_free_method): Free header->locals and header->clauses.
189
190         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
191         dynamic case.
192
193         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
194
195         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
196
197 2007-06-12  Raja R Harinath  <rharinath@novell.com>
198
199         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
200         the tables.
201
202 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
203
204         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
205
206 2007-06-11  Raja R Harinath  <harinath@gmail.com>
207
208         MonoGenericMethod on a diet
209         * class-internals.h (_MonoMethodInflated::reflection_info): Move
210         here ...
211         (_MonoGenericMethod::reflection_info): ... from here.
212         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
213         Update to changes.
214         * reflection.c (inflate_mono_method): Likewise.
215         (mono_reflection_bind_generic_method_parameters): Likewise.
216
217 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
218
219         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
220         *verify.c: factored long ldarg forms to share code with short forms
221
222 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
223
224         *verify.c: fixed code formating factored some duplicate code
225         into a new function
226
227         *verify.h: fixed binary incompatibility introduced earlier
228
229         *pedump.c: fixed formating
230
231 2007-06-11  Raja R Harinath  <harinath@gmail.com>
232
233         Fix assertion when disassembling Mono.C5.dll
234         * loader.c (method_from_methodspec): Avoid inflating a method
235         twice with the same context.  If the methodref is inflated, use
236         the declaring method instead.
237
238         * class.c (mono_class_from_generic_parameter): Fix case similar to
239         bug #81830 handled below, but for method containers.
240
241 2007-06-10  Raja R Harinath  <harinath@gmail.com>
242
243         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
244         get_shared_generic_class.  Directly inflate the instance.
245         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
246         (inflate_generic_class): Delete.
247         (get_shared_generic_class): Delete.  Move setting of
248         'cached_class' and 'cached_context' ...
249         * metadata.c (mono_metadata_lookup_generic_class): ... here.
250
251         * metadata.c (mono_metadata_lookup_generic_class): Change
252         signature to take the components of a MonoGenericClass rather than
253         an allocated MonoGenericClass.  Change semantics to be intern-like.
254         * reflection.c (mono_class_bind_generic_parameters): Update to
255         changes.  Make locking region tighter.
256         * class.c (inflate_generic_class): Update to changes.
257         (get_shared_generic_class): Likewise.
258         * metadata-internals.h: Likewise.
259
260         * reflection.c (mono_class_bind_generic_parameters): Take and
261         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
262         (mono_reflection_bind_generic_parameters): Use
263         'mono_class_bind_generic_parameters' rather than duplicate the code.
264         * class.c (mono_bounded_array_class_get): Update to changes.
265         * object-internals.h: Likewise.
266
267         * reflection.c (mono_class_bind_generic_parameters): Only support
268         parameterizing generic type definitions.  Remove support for other
269         open types.
270
271 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
272
273         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
274
275         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
276         in the dynamic case.
277
278 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
279
280         * threads.c: When cleaning up thread, reset the Background bit.
281         Fixes bug #81720.
282
283 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
284
285        * metadata.c: Move variable declarations to top of scope.
286        * verify.c: Move variable declarations to top of scope.
287
288        Code is contributed under MIT/X11 license.
289
290 2007-06-08  Raja R Harinath  <rharinath@novell.com>
291
292         * reflection.c (mono_class_bind_generic_parameters): Replace
293         open-coded loop with mono_metadata_inflate_generic_inst.
294
295         * class.c (get_shared_generic_class): Don't call
296         mono_get_shared_generic_inst.  Use the container's own
297         'class_inst'.
298
299         * metadata.c (mono_metadata_load_generic_params): Move
300         initialization of 'context' field here from ...
301         * class.c (mono_class_create_from_typedef): ... here, and ...
302         * loader.c (mono_get_method_from_token): ... here.
303
304         * class.c (get_shared_generic_class): Rename from
305         mono_get_shared_generic_class and make static.
306         (mono_get_shared_generic_inst): Move to metadata.c.
307         * loader.c (mono_get_shared_generic_method): Likewise.
308         * class-internals.h, metadata-internals.h: Update to changes.
309
310         Fix #81830
311         * class.c (mono_class_from_generic_parameter): Don't assume a
312         generic container owner exists.  Generic containers from monodis
313         don't have any.
314
315 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
316
317         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
318         * verify.h: new typedefs to returns the non-verifiable status
319         * verify.c: initial implementation of generics, stack merging and object compatibility check
320
321 2007-06-06  Mark Probst  <mark.probst@gmail.com>
322
323         * class.c, image.c, class-internals.h (MonoImage): class_cache is
324         a MonoInternalHashTable again (fixed bug in internal hash table
325         code).
326
327 2007-06-06  Mark Probst  <mark.probst@gmail.com>
328
329         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
330         MonoInternalHashTable again (fixed bug in internal hash table
331         code).
332
333 2007-06-06  Mark Probst  <mark.probst@gmail.com>
334
335         * class.c, image.c, class-internals.h, domain.c,
336         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
337         changes.  Have to figure out what makes them break the SWF
338         regression.
339
340 2007-06-04  Mark Probst  <mark.probst@gmail.com>
341
342         * class.c, image.c, class-internals.h (MonoImage): class_cache is
343         a MonoInternalHashTable now.
344
345 2007-06-04  Mark Probst  <mark.probst@gmail.com>
346
347         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
348         MonoInternalHashTable now.
349
350 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
351
352         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
353         invoke_impl code.
354
355         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
356
357         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
358         dependent trampoline.
359
360         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
361
362         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
363
364 2007-05-29  Robert Jordan  <robertj@gmx.net>
365
366         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
367
368 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
369
370         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
371
372 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
373
374        * marshal.c: Fix interface lookup loops for
375        cominterop_get_com_slot_for_method and 
376        cominterop_get_method_interface. Only need to lookup
377        if type is a class, else use interface type method is on.
378
379        Code is contributed under MIT/X11 license.
380
381 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
382
383         * reflection.c: HasSecurity can be present even if no specially 
384         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
385         SecurityAttribute). Fix CAS regression tests on buildbot.
386
387 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
388
389        * appdomain.c: Add configure checks for header files.
390        * image.c: Add configure checks for header files.
391        * file-io.c: Add configure checks for header files.
392        * debug-mono-symfile.c: Add configure checks for header files.
393        * threadpool.c: Add configure checks for header files.
394        * console-io.c: Add configure checks for header files.
395        * profiler.c: Add configure checks for header files.
396        * rawbuffer.c: Add configure checks for header files.
397        * icall.c: Add configure checks for header files.
398        * rand.c: Add configure checks for header files.
399        * socket-io.c: Add configure checks for header files.
400
401        Code is contributed under MIT/X11 license.
402
403 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
404
405         * reflection.c (mono_custom_attrs_from_builders): Remove the 
406         assertion as it breaks the build.
407         
408         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
409
410         * reflection.c (lookup_custom_attr): Make a copy here too.
411
412         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
413         dynamic images.
414
415         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
416         images.
417
418         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
419         info.
420
421 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
422
423         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
424         (load_cattr_value): Ditto.
425
426 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
427
428         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
429
430 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
431
432         * threads.c: In "start_wrapper", set apartment_state to MTA if
433         apartment_state is Unknown and we're running on 2.0 profile or
434         higher.
435         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
436         to main method, then set apartment_state to Unknown on 1.0 profile,
437         and MTA on 2.0 profile.
438
439 2007-05-16  Jb Evain  <jb@nurv.fr>
440
441         * class-internals.h (MonoDefaults): Add an attribute_class and
442           customattribute_data_class.
443         * domain.c (mono_init_internal): Populate them.
444         * reflection.c: Use them to remove duplicates. Make a vew
445         MonoClass variables `static'.
446
447 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
448
449         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
450         step in implementing IMT, so that all isinst checks now can go
451         through the bitmap.
452         This was needed because vtables for TransparentProxy need to look
453         like the vtable of the "target" class, so they need to point to
454         its interface bitmap directly.
455
456         * object.c: inside "mono_class_create_runtime_vtable" and
457         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
458
459 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
460
461         * object-internals.h
462           culture-info.h : added territory field in MonoCulture and
463           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
464         * locales.c : fill territory field above too.
465         * culture-info-table.h : regenerated.
466
467 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
468
469         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
470         Fixes #81599.
471
472 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
473
474         * object.c: Always initialize apartment, even if 
475         there is no custom attributes on entry point.
476         
477         Code is contributed under MIT/X11 license.
478
479 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
480
481         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
482         * metadata.c: If no encoding is set, check for unicode
483         on class.
484         
485         Code is contributed under MIT/X11 license.
486
487 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
488
489         * threads.c: Handle if mono_thread_current returns NULL 
490         
491         Code is contributed under MIT/X11 license.
492
493 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
494
495         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
496         in start_wrapper. Added mono_thread_init_apartment_state and
497         mono_thread_cleanup_apartment_state.
498         * object.c: Initialize thread apartment state on main thread
499         by checking for STAThreadAttribute on entry point.
500         * object-internals.h: Add apartment_state field to MonoThread.
501         * threads-types.h: Add unmanaged definition of 
502         System.Threading.ApartmentState, MonoThreadApartmentState.
503         
504         Code is contributed under MIT/X11 license.
505         
506 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
507
508         * class.c: Fix windows build.
509         * class-internals.h: Fix windows build.
510         
511         Code is contributed under MIT/X11 license.
512
513 2007-05-08  Robert Jordan  <robertj@gmx.net>
514
515         * process.c (CreateProcess_internal):
516         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
517         .CreateNoWindow was specified. Fixes #81496.
518
519 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
520
521         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
522         step in implementing IMT, replaced it with two compact arrays
523         (interfaces_packed and interface_offsets_packed) and a bitmap that
524         is used for isinst checks (interface_bitmap).
525
526         * class.c: (compare_interface_ids): compare function to pass to
527         bsearch when looking for an interface with a given id.
528         (mono_class_interface_offset): reimplemented using bsearch on
529         interfaces_packed, getting the offset from interface_offsets_packed.
530         (print_implemented_interfaces): utility debugging function.
531         (setup_interface_offsets): reworked to initialize interfaces_packed,
532         interface_offsets_packed and interface_bitmap.
533
534         * object.c: replaced all accesses to "MonoClass.interface_offsets"
535         with uses of interfaces_packed and interface_offsets_packed.
536
537 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
538
539         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
540         mono_class_interface_offset prototype to wrap all accesses to
541         "MonoClass.interface_offsets".
542
543         * class.c: Implemented mono_class_interface_offset, and wrapped all
544         accesses to "MonoClass.interface_offsets".
545
546         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
547         "MonoClass.interface_offsets".
548
549 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
550
551         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
552         GetMethodFromHandle overloads (bug #78637).
553
554 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
555
556         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
557         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
558
559 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
560
561         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
562         #81498.
563
564         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
565         gracefully.
566         (mono_custom_attrs_from_index): Ditto.
567
568         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
569         Fixes #81501.
570
571 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
572
573         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
574         is now allocated from a mempool.
575
576 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
577
578         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
579         caller holds threads_lock, leading to deadlocks. Fixes #81476.
580
581 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
582
583         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
584         mono_loader_clear_error () too late. Fixes #81463.
585
586 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
587
588         * culture-info-table.h : regenerated.
589
590 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
591
592         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
593         is missing.
594
595 2007-04-25  Dick Porter  <dick@ximian.com>
596
597         * Makefile.am: Put the mingw enforced-optimisation back into the
598         PLATFORM_WIN32 section.
599
600 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
601
602         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
603         patch.
604
605         * image.c (mono_image_load_module): New API function to load a module reference.
606
607         * image.c (load_modules): Load modules lazily. Fixes #80812.
608
609         * class.c (mono_class_from_typeref): Use mono_image_load_module.
610         
611         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
612
613         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
614         to mono_image_load_module_dynamic.
615
616 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
617
618         * marshal.c: Fix calling convention for CCW on non-windows
619         platforms. STDCALL on windows, CDECL everywhere else to work 
620         with XPCOM and MainWin COM.
621         
622         Code is contributed under MIT/X11 license.
623
624 2007-04-23  Martin Baulig  <martin@ximian.com>
625
626         Fix #80969.
627
628         * loader.c
629         (method_from_memberref): Added `gboolean *used_context' argument.
630         (mono_get_method_from_token): Likewise.
631         (mono_get_method_full): Don't insert the method in the cache when
632         `used_context' is true.
633
634 2007-04-23  Raja R Harinath  <rharinath@novell.com>
635
636         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
637
638         * reflection.c (mono_reflection_bind_generic_parameters): Don't
639         create new MonoTypes for returned types.
640         * class.c (mono_generic_class_get_class): Export mono-internal.
641         * class-internals.h: Update to changes.
642
643 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
644
645         * threadpool.c, threadpool.h, icall-def.h: patch from
646         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
647
648 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
649
650         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
651         
652         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
653
654         * threads.c (mono_thread_get_stack_bounds): New helper function.
655
656         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
657         Correctly compute stack bounds when attaching. Fixes #81394.
658
659 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
660
661         * reflection.c: fix handling of doubles in custom attributes
662         for the arm-fpa format (bug #81368).
663
664 2007-04-18  Raja R Harinath  <rharinath@novell.com>
665
666         * reflection.c (assembly_add_win32_resources): Mildly relax an
667         bounds check to let the end pointer point just past the end of the
668         allocated buffer.  (may fix #81384)
669
670 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
671
672         * culture-info-table.h : regenerated.
673
674 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
675
676         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
677         the thread is aborted early.
678
679 2007-04-05  Dick Porter  <dick@ximian.com>
680
681         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
682         FindFirstFile()/FindNextFile() to find entries.  This lets the
683         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
684         81038.
685
686         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
687         the parameters of
688         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
689
690 2007-04-04  Martin Baulig  <martin@ximian.com>
691
692         * debug-helpers.c
693         (mono_method_desc_full_match): Add support for nested classes.
694
695 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
696
697         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
698
699 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
700
701         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
702         waiting for too many threads.
703
704 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
705
706         * environment.c: Fix return value check on uname so we can get the 
707         executing version on Solaris operating systems.
708
709 2007-03-28  Jb Evain  <jbevain@gmail.com>
710
711         * class.c (mono_type_get_name_recurse): Complete the
712         fix for the creation of assembly qualified names for
713         pointer types. Fixes #81208.
714
715 2007-03-27  Dick Porter  <dick@ximian.com>
716
717         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
718         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
719         changed.
720
721         * threads.c
722         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
723         the value of ReleaseMutex().
724
725 2007-03-27  Dick Porter  <dick@ximian.com>
726
727         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
728         in little-endian order, not network endian, so must be converted
729         to host endian here.  Fixes bug 80593.
730
731 2007-03-22  Jb Evain  <jbevain@gmail.com>
732
733         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
734         qualified names for pointer types. Fixes #81208.
735
736 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
737
738         * marshal.c: Add support for PreserveSigAttribute. 
739         
740         Code is contributed under MIT/X11 license.
741
742 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
743
744         * process.c: Fix endianness issues. Fixes #81126.
745
746         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
747         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
748
749         * image.c (mono_image_lookup_resource): Make this work on big-endian
750         machines.Change API contract so the caller needs to free the return value.
751         
752         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
753         API change.
754         
755 2007-03-14  Martin Baulig  <martin@ximian.com>
756
757         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
758         mono_type_get_desc() as well.
759
760 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
761
762         * icall.c:  Fix environ access in VS.  
763         
764 2007-03-13  Alp Toker  <alp@atoker.com>
765
766         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
767         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
768         #63841.
769
770 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
771
772         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
773         circular references among dynamic methods. Fixes #81091.
774
775         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
776
777 2007-03-09  Martin Baulig  <martin@ximian.com>
778
779         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
780
781 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
782
783         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
784         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
785         
786         Code is contributed under MIT/X11 license.
787         
788 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
789
790         * loader.c: Reapply patch for bug #79424.
791
792 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
793
794         * metadata.c (mono_type_to_unmanaged): Only convert object to
795         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
796
797 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
798
799         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
800         (and incorrectly set) is_reference field from MonoGenericInst.
801
802 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
803
804         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
805         a little earlier.
806
807         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
808
809         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
810
811 2007-03-05  Miguel de Icaza  <miguel@novell.com>
812
813         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
814         FileOptions.1 value to mean "temporary", map that to
815         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
816
817         Fixes 80688
818
819 2007-03-03  Marek Habersack  <mhabersack@novell.com>
820
821         * appdomain.c: implement MS .Net style shadow copying. Copies of
822         the assemblies are made in a subdirectory of the dynamic base
823         directory, the assembly names are preserved.
824         Copy .mdb and .config files along with the assemblies being shadowed.
825
826 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
827
828         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
829         (emit_marshal_handleref): Ditto.
830
831         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
832         on Visual C++. Fixes #80671.
833
834 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
835
836         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
837         for clone operations.
838
839 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
840
841         * marshal.c: Fix warnings.
842
843 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
844
845         * loader.c: allow case-insensitive matching of the dll name
846         in dllmap handling when prefixed with "i:".
847
848 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
849
850         * threads.c: Fix #ifdef for dummy_apc function for VS.
851
852 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
853
854         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
855
856 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
857         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
858         giving precedence to the methods with a fully qualified name
859         (InterfaceName.MethodName) when building the interface sections
860         of the vtable.
861
862 2007-02-16  Dick Porter  <dick@ximian.com>
863
864         * threadpool.c (append_job): Fix fast-path array handling, so it's
865         less likely the array will grow exponentially when the load is
866         heavy.
867
868 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
869
870         * metadata-internals.h, loader.c: fix dllmap lookup order
871         for non-function maps, too, and prepare for fallback code.
872
873 2007-02-12  Robert Jordan  <robertj@gmx.net>
874
875         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
876         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
877         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
878         GlobalFree. Fixes a part of bug #77075.
879
880 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
881
882         * loader.c: implemented typedef parent in field memberref.
883
884 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
885
886         * marshal.c: Fix warnings and remember to call Release on
887         IUnknown of RCW.
888         
889         Code is contributed under MIT/X11 license.
890
891 2007-02-10  Miguel de Icaza  <miguel@novell.com>
892
893         * class-internals.h: Add MonoHandleRef definition, and
894         handleref_class to mono_defaults. 
895
896         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
897         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
898
899         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
900         (do nothing on this stage)
901         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
902         (emit_marshal_handleref): New method, used for argument handling
903         of HandleRefs. 
904
905 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
906
907         * class.c (mono_class_setup_parent): Lazily init com types.
908         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
909         init com types.
910         * object.c (mono_remote_class_vtable): Lazily init com types.
911         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
912         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
913         * domain-internals.h: Expose mono_init_com_types.
914         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
915         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
916         Add support for COM Callable Wrapper marshalling.
917         * marshal.h: Add icall definitions.
918         * gc.c: Handle freeing of CCWs in finalizer code.
919         
920         Code is contributed under MIT/X11 license.
921
922 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
923
924         * reflection.c: changed all the signature encoding code to use
925         a variable-sized buffer.
926
927 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
928
929         * marshal.c: locking fixes: never take the loader lock
930         or other runtime locks when holding the marshal lock
931         (fixes bug#80664).
932
933 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
934
935         * marshal.c: make the delegate function pointer mapping
936         work for the moving GC.
937
938 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
939
940         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
941         for bug #80618.
942
943 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
944
945         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
946         gmodule.
947
948 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
949
950         * threadpool.c: made the code moving-GC safe.
951
952 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
953
954         * assembly.c, boehm-gc.c, class-internals.h, class.c,
955         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
956         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
957         warning cleanup.
958         * reflection.c: warning cleanup, some threading and moving GC fixes.
959
960 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
961
962         * class.c, loader.c: create the needed Set/Get/Address array methods
963         as well as the .ctors in mono_class_init (), fixes bug #80567.
964
965 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
966
967         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
968         we doesn't decrease its alignment. Should fix the sparc build.
969
970 2007-01-24  Dick Porter  <dick@ximian.com>
971
972         * socket-io.c
973         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
974         Create the returned object if we need to ignore an unsupported
975         socket option.  Fixes a segfault reported by Atsushi.
976
977 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
978
979         * class.c, object.c: restrict GC-tracked fields to
980         UIntPtr fields used inside corlib, so we provide better
981         type info to the GC and also allow broken packing as in
982         bug #80580.
983
984 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
985
986         * sgen-gc.c: removed duplicated function.
987
988 2007-01-19  Miguel de Icaza  <miguel@novell.com>
989
990         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
991         value that means that the value is not supported, but that we
992         should not return a failure, but instead report this as a
993         successful operation.
994
995 2007-01-19  Raja R Harinath  <rharinath@novell.com>
996
997         Fix tests/bug79956.2.il
998         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
999         (mono_generic_class_get_class): If the generic definition in an
1000         enum, copy over other fields related to it.
1001
1002 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1003
1004         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
1005         genericinst enums (bug #79215).
1006
1007 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
1008         * class.c: Fix bug 80307.
1009
1010 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
1011
1012         * image.c: if the file table is not present, try to load
1013         all the modules, since we don't have info about them
1014         having or not metadata (bug #80517).
1015         * assembly.c: allow mono_assembly_load_references () to
1016         work for netmodules.
1017
1018 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
1019
1020         * image.c, metadata-internals.h, object.c: execute module
1021         cctors when running on the 2 runtime if present (bug #80487).
1022
1023 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
1024
1025         * icall.c: optimized InitializeArray() on bigendian.
1026
1027 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
1028
1029         * icall.c: fix for the broken ARM FPA double format.
1030
1031 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
1032
1033         * icall.c: handle endian issues for r4 and r8 types, too, in
1034         the InitializeArray() icall.
1035
1036 2007-01-15  Miguel de Icaza  <miguel@novell.com>
1037
1038         * loader.c (mono_loader_error_prepare_exception): Clear the error
1039         once we have extracted the information from it, do this before we
1040         call into the JIT's class loading mechanisms.
1041
1042         * object.c (mono_class_create_runtime_vtable): Do not clear the
1043         loader error before calling mono_class_get_exception_for_failure
1044         as the loader error is needed inside
1045         mono_class_get_exception_for_failure to throw the error (thinko).
1046
1047         Fixes #80521
1048         
1049 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
1050
1051         * reflection.c: align fields rva data so it's faster to load at
1052         runtime.
1053
1054 2007-01-12  Raja R Harinath  <rharinath@novell.com>
1055
1056         Prepare to simplify GenericMethod handling.
1057         * class-internals.h (mono_method_get_context): New accessor function.
1058         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
1059         rather than directly accessing '->context' field.
1060
1061         * class-internals.h (_MonoGenericParam.method): Move ...
1062         (_MonoGenericContainer): ... here.  Add into union with klass field.
1063         * class.c, icall.c, loader.c, metadata.c, reflection.c:
1064         Update to changes.
1065
1066 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
1067
1068         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
1069         the wrapper type enum and reduce relocations.
1070
1071 2007-01-12  Raja R Harinath  <rharinath@novell.com>
1072
1073         * reflection.c (inflate_mono_method): Reuse method instantiation
1074         from the generic method, if available.
1075
1076 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
1077
1078         * marshal.c (emit_marshal_variant): Fix conv_arg
1079         type in last commit, based on whether parameter is byref.
1080         
1081 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
1082
1083         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
1084         marshalling.
1085         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
1086         MONO_TYPE_OBJECT back for VARIANT support.
1087
1088 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
1089
1090         * marshal.c, marshal.h, icall-def.h: Implement 
1091         Marshal.ReAllocCoTaskMem.
1092
1093 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
1094
1095         * marshal.c: memory retention fixes: use the proper
1096         image cache for runtime_invoke method lookups.
1097
1098 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
1099
1100         * mempool.c: added code to help debug mempool allocations.
1101
1102 2007-01-11  Dick Porter  <dick@ximian.com>
1103
1104         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
1105         support (experimenting with faking it with IP_MTU_DISCOVER for
1106         systems that don't have IP_DONTFRAGMENT.)
1107         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
1108         icall.
1109
1110         * icall-def.h: new System.Net.Sockets.Disconnect icall.
1111
1112         * socket-io.h: Add new fields to MonoSocketAsyncResult
1113         corresponding to the new ones in Socket.cs.
1114
1115 2007-01-11  Raja R Harinath  <rharinath@novell.com>
1116
1117         Fix IronPython regression mentioned in #80249
1118         * metadata.c (do_mono_metadata_parse_generic_class): Clear
1119         'cached_context' field, since it may have been initialized as a
1120         side-effect of metadata parsing.
1121
1122         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
1123         (_MonoGenericClass.cached_class): Move here and rename from lone
1124         remaining field of ...
1125         (_MonoInflatedGenericClass): ... this.  Remove.
1126         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
1127         to changes.
1128
1129         Fix mcs/tests/test-128.cs regression.
1130         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
1131         2007-01-10 change below.
1132         [MONO_TYPE_OBJECT]: Recurse into array case.
1133
1134 2007-01-11  Raja R Harinath  <harinath@gmail.com>
1135
1136         * class-internals.h (mono_get_inflated_generic_class): Remove.
1137         * class.c (mono_get_inflated_generic_class): Remove.
1138         (mono_generic_class_get_class): Rename from
1139         mono_class_create_generic.
1140         (mono_class_from_mono_type) [GENERICINST]: Use it.
1141         * reflection.c, metadata.c: Update to changes.  Use
1142         'mono_class_from_mono_type'.
1143
1144 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
1145
1146         * reflection.c: use passed type when encoding an array element
1147         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
1148
1149 2007-01-09  Robert Jordan  <robertj@gmx.net>
1150
1151         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
1152         result arguments (someDelegate.EndInvoke (unrelatedAres)).
1153         Fixes bug #80392.
1154
1155 2007-01-09  Raja R Harinath  <rharinath@novell.com>
1156
1157         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
1158
1159         * object.c (set_value): Avoid aliasing between type->data.klass
1160         and type->data.generic_class.
1161
1162         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
1163
1164 2007-01-08  Raja R Harinath  <rharinath@novell.com>
1165
1166         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
1167         between type->data.klass and type->data.generic_class.
1168
1169 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
1170
1171         * marshal.c: In MS.NET, StringBuilder objects are not copied by
1172         value in out parameters.
1173
1174 2007-01-08  Raja R Harinath  <rharinath@novell.com>
1175
1176         Simplify invariant for MonoGenericClass::klass field.
1177         * class.c (mono_class_create_generic): Verify 'klass' is null.
1178         * metadata.c (do_mono_metadata_parse_generic_class): Don't
1179         initialize 'klass' field.
1180
1181 2007-01-05  Raja R Harinath  <rharinath@novell.com>
1182
1183         Ongoing work to avoid redundant data and simplify invariants.
1184         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
1185         'generic_class', and change type to a GenericInst.
1186         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
1187         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
1188
1189 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
1190
1191         * class.c : skip io-layer under PLATFORM_WIN32.
1192
1193 2007-01-03  Tor Lillqvist  <tml@novell.com>
1194
1195         Fix #80305: In a bundled executable, look in the bundled exe
1196         assembly to determine the runtime version. Add the possibility to
1197         bundle also the machine.config file.
1198         
1199         * assembly.c (mono_assembly_open_from_bundle): Make
1200         non-static. Allow being called even if we have no bundled
1201         assemblies, and return NULL right away in that case.
1202
1203         * domain-internals.h: Declare mono_assembly_open_from_bundle()
1204         here.
1205
1206         * domain.c (app_config_parse): Take an assembly exe file name as
1207         parameter instead of a config file name. Check for a bundled
1208         config file for that assembly by calling
1209         mono_config_string_for_assembly_file() (see below) before looking
1210         for one in the file system.
1211         (get_runtimes_from_exe): Corrsponding change to call of
1212         app_config_parse().
1213         (get_runtimes_from_exe): Check for bundled assembly exe file first
1214         by calling mono_assembly_open_from_bundle(). If no bundled
1215         assembly exe file is found, call mono_image_open() as before to
1216         look it up in the file system.
1217
1218         * mono-config.c: Add variable bundled_machinec_onfig.
1219         (mono_config_string_for_assembly_file): New function.
1220         (mono_config_for_assembly): Move code snippet that looks for a
1221         bundled assembly .config file into the above new function. Call
1222         it.
1223         (mono_register_machine_config, mono_get_machine_config): New
1224         functions to set and retrieve
1225
1226         * assembly.h: Declare mono_register_machine_config().
1227
1228         * mono-config.h: Declare mono_get_machine_config() and
1229         mono_config_string_for_assembly_file().
1230
1231         * icall.c: No declaration of environ necessary on Win32. It is
1232         declared (as a macro expanding to a function call) in stdlib.h.
1233         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
1234         New internal mono function. Returns the value of
1235         mono_get_machine_config() as a Mono string.
1236
1237         * icall-def.h: Add get_bundled_machine_config().
1238
1239 2007-01-04  Raja R Harinath  <rharinath@novell.com>
1240
1241         Remove redundant field
1242         * class-internals.h (_MonoGenericContext.container): Remove field.
1243         * loader.c (mono_method_get_signature_full): Don't parse a
1244         "container" for a signature parse when the signature is inflated
1245         immediately.
1246         (method_from_methodspec): Likewise, for a generic_inst.
1247         * class.c, metadata.c, reflection.c: Update to changes.
1248
1249 2006-01-04  Raja R Harinath  <rharinath@novell.com>
1250
1251         * class-internals.h (_MonoGenericClass): Rename 'context' field to
1252         'cached_context', and change semantics -- it starts off NULL, and
1253         is initialized on demand.
1254         * class.c (mono_generic_class_get_context): New accessor to
1255         replace 'context' field accesses.
1256         (mono_class_get_context): New helper.
1257         (*): Update to changes.
1258         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
1259
1260 2007-01-03  Miguel de Icaza  <miguel@novell.com>
1261
1262         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
1263         before the memcpy.   Fixes Marshal2 regression.
1264
1265 2007-01-02  Jb Evain  <jbevain@gmail.com>
1266
1267         * blob.h: add a MONO_TYPE_ENUM definition
1268         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
1269         fix the encoding of arrays of enums in custom attributes.
1270
1271         Fixes #79666.
1272
1273 2007-01-01  Miguel de Icaza  <miguel@novell.com>
1274
1275         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
1276         string is null terminated, but only cut the string short if it
1277         overflows the buffer.   
1278         
1279         (mono_string_to_byvalstr): Also fix this routine.   The code here
1280         was not properly terminating a string (it was only terminated
1281         because of the previous catch-all memset). 
1282
1283         I left the memset, because I do not know if applications expect
1284         the runtime to clear this region. 
1285
1286         Fixes #79944.
1287
1288         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1289         Clear the error before returning to unmanaged code to prevent the
1290         runtime from being confused later on (fixes  80420).
1291         (ves_icall_type_from_name): Always call mono_loader_clear_error
1292         after parsing a type that could have failed.
1293         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
1294
1295         * loader.c (mono_loader_clear_error): Fix indentation.
1296
1297 2006-12-28  Martin Baulig  <martin@ximian.com>
1298
1299         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
1300
1301 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
1302
1303         * reflection.c: patch from Rolf Bjarne Kvinge to fix
1304         getting a token for an EnumBuilder.
1305
1306 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1307
1308         * reflection.c: be more careful in case resource generation
1309         fails to create the data array.
1310
1311 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
1312
1313         * sgen-gc.c: write barrier for clone and fix unregister handles.
1314
1315 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
1316
1317         * reflection.c: some fixes needed in the generics code for the moving GC.
1318
1319 2006-12-22  Robert Jordan  <robertj@gmx.net>
1320
1321         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
1322         account. Fixes bug #80299.
1323
1324 2006-12-21  Raja R Harinath  <rharinath@novell.com>
1325
1326         Fix WaitHandle usage in delegates.
1327         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
1328         * object.c (mono_wait_handle_new): Use the property set method to
1329         initialize the handle.
1330         (mono_wait_handle_get_handle): New.
1331         * threadpool.c (mono_async_invoke): Use it.
1332         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
1333         Likewise.
1334         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
1335
1336 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
1337
1338         * marshal.c (emit_marshal): Call emit_marshal_variant and
1339         emit_marshal_com_interface when applicable.
1340         (emit_marshal_variant, emit_marshal_com_interface): Add
1341         methods for this case and remove if's from emit_marshal_object.
1342         
1343 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
1344
1345         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
1346
1347 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
1348
1349         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
1350         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
1351         and GlobalFree on Windows. Remove FIXME.
1352
1353 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1354
1355         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
1356         implementation for managed objects.
1357
1358 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
1359
1360         * object.c: implemented code to be used for checking
1361         that no reference field overlaps with non-references.
1362
1363 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1364
1365         * threadpool.c: fix queue code to be compatible with the
1366         moving GC.
1367
1368 2006-12-18  Miguel de Icaza  <miguel@novell.com>
1369
1370         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
1371         in structures by throwing ArgumentNullException.
1372
1373         (emit_marshal_safehandle): Also when they are null parameters.
1374
1375         (emit_marshal_safehandle): Add support for ref
1376         SafeHandles parameters
1377
1378 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1379
1380         * profiler.c: updated to use the mono-dl API instead of
1381         gmodule.
1382
1383 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1384
1385         * profiler.c: updated to use the mono-dl dynamic loading
1386         API instead of gmodule.
1387
1388 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
1389
1390         * profiler.c: use readlink, older versions of glib don't have
1391         g_file_read_link ().
1392
1393 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1394
1395         * profiler.c: try to detect the path to mono if libc fails to provide
1396         a useful name (bug #80286).
1397
1398 2006-12-16  Raja R Harinath  <rharinath@novell.com>
1399
1400         Fix #80242
1401         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
1402         instance, use the generic type definition instead.
1403         (ves_icall_Type_GetNestedTypes): Likewise.
1404         * class.c (mono_class_create_generic): Always set the
1405         nested_classes of a generic instance to NULL, even if the generic
1406         type definition has nested types.
1407
1408 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
1409
1410         * marshal.c (mono_string_from_bstr): Revert previous Windows change
1411         and fix on Linux.
1412         
1413 2006-12-15  Miguel de Icaza  <miguel@novell.com>
1414
1415         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
1416         my arguments were in the wrong order.   I also fixed the Windows
1417         version which seems to have had the same issue.
1418
1419         (mono_free_bstr): On Unix, this is g_free.
1420         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
1421         conversions (for the tests in corlib to pass).
1422
1423 2006-12-14  Miguel de Icaza  <miguel@novell.com>
1424
1425         * marshal.c (emit_ptr_to_object_conv): For now, ignore
1426         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
1427         exception if a ref SafeHandle in a struct has changed).
1428         
1429         (emit_struct_conv): Do not perform layout checks for classes
1430         derived from SafeHandle, as those are specially handled. 
1431
1432         (emit_object_to_ptr_conv): Add support for
1433         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
1434
1435         (emit_marshal_safehandle): Implement conversion of return values
1436         of safehandles (MARSHAL_ACTION_CONV_RESULT).
1437         
1438         * threads.c: WaitHandle now is compiled with two different handles
1439         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
1440         for 2.0.
1441         
1442         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
1443         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
1444         these routines to cope with both kinds of fields.
1445
1446 2006-12-12  Miguel de Icaza  <miguel@novell.com>
1447
1448         * metadata.c (mono_type_to_unmanaged): Handle the case where
1449         type->data.klass is a SafeHandle, and in that case, return the
1450         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
1451         MONO_MARSHAL_CONV_SAFEHANDLE. 
1452
1453 2006-12-11  Miguel de Icaza  <miguel@novell.com>
1454
1455         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
1456         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
1457         calling emit_marshal_object.
1458
1459         (emit_marshal_safehandle): Implement marshalling of
1460         SafeHandle parameters (no ref support yet).
1461
1462         (MarshalAction): Document the defines as I implement
1463         them for SafeHandle.
1464
1465         (emit_marshal_object): indentation police.
1466
1467         * class-internals.h: Define MonoSafeHandle.
1468         Add safehandle_class to MonoDefaults type.
1469
1470         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
1471         list of classes to check for fields. 
1472
1473         * domain.c (mono_init_internal): Add SafeHandle to the list of
1474         mono_defaults loaded.
1475
1476 2006-12-15  Raja R Harinath  <rharinath@novell.com>
1477
1478         Fix #80253
1479         * reflection.c (mono_reflection_bind_generic_parameters): If the
1480         generic type definition is a type builder, ensure that it is fully
1481         initialized before instantiating it.  Kill some dead code.
1482
1483 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
1484
1485         * object.c: clear the loader_error () before loading
1486         more metadata stuff (bug #80258).
1487
1488 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
1489
1490         * icall.c, icall-defs.h: type modifiers icalls for
1491         parameters and properties.
1492
1493 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
1494
1495         * object.c, icall.c: fixed warnings.
1496
1497 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1498
1499         * marshal.c: fixed a couple of leaks and coding style in a few places.
1500
1501 2006-12-08  Dick Porter  <dick@ximian.com>
1502
1503         * process.c: Cope with NULL ProcessStartInfo arguments on windows
1504         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
1505         80173.
1506
1507 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1508
1509         * process.c: ProcessStartInfo may have only filename set and
1510         arguments can be NULL.
1511
1512 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1513
1514         * icall.c: fix leak found by Robert Jordan.
1515
1516 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
1517
1518         * marshal.c, marshal.h: generate managed method to access an element
1519         of a multi-dimensional array.
1520
1521 2006-11-30  Paolo Molaro (lupus@ximian.com)
1522
1523         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
1524
1525 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1526
1527         * icall.c: back out GetFields () fix until the serialization code is
1528         fixed to not depend on the incorrect behaviour.
1529
1530 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
1531
1532         * profiler.c: provide defaults if none are set.
1533
1534 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
1535
1536         * Makefile.am, attrdefs.h: new public header file with
1537         constants for attributes for use by embedders.
1538
1539 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
1540
1541         * icall.c: GetFields () fix for bug #80064.
1542
1543 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
1544
1545         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
1546         removed long unused icalls.
1547
1548 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
1549   
1550         * marshal.c: 
1551                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
1552                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
1553                 can be generated without a delegate class.
1554                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
1555         
1556         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1557
1558 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1559
1560         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
1561         #80069.
1562
1563 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1564
1565         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
1566         icall-def.h: added icalls needed by System.GC.
1567
1568 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
1569
1570         * loader.c: ensure the class in catch clauses is handled
1571         correctly for generics methods (fixes bug#79980).
1572
1573 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
1574
1575         * monitor.h, monitor.c: added mono_locks_dump () function
1576         to help debug deadlocks involving managed locks.
1577
1578 2006-11-13  Dick Porter  <dick@ximian.com>
1579
1580         * file-io.c (get_file_attributes): If the file is a symlink try
1581         and get the stat data for the target, but also add the
1582         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
1583         the specs for the windows symlink support, but will probably have
1584         to be reworked when I have test data from a vista machine.  Fixes
1585         bug 79887.
1586
1587 2006-11-13  Dick Porter  <dick@ximian.com>
1588
1589         * gc.c (mono_domain_finalize): 
1590         * marshal.c (mono_delegate_begin_invoke): 
1591         * threadpool.c (socket_io_init, mono_thread_pool_init)
1592         (mono_thread_pool_finish): 
1593         * monitor.c (mono_monitor_try_enter_internal): 
1594         * threads.c (mono_thread_resume, mono_thread_init)
1595         (mono_thread_suspend_all_other_threads)
1596         (mono_thread_execute_interruption): 
1597         * appdomain.c (mono_domain_unload): Check for NULL error returns
1598         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
1599         75733.
1600
1601 2006-11-11  Miguel de Icaza  <miguel@novell.com>
1602
1603         * process.c
1604         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
1605         Only close the handle if the value of the handle is not
1606         INVALID_HANDLE_VALUE.  This just makes the process a bit more
1607         robust.
1608
1609         Improvement for #75733, so that we do not run into this problem. 
1610
1611         
1612         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
1613         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
1614         internal variables.  Fixes #79462 
1615         
1616
1617 2006-11-09  Dick Porter  <dick@ximian.com>
1618
1619         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1620         Use poll() not select().  Fixes bug 79397.
1621
1622 2006-11-09  Raja R Harinath  <rharinath@novell.com>
1623
1624         Fix #79872
1625         * assembly.c (mono_assembly_load_from_full): Check that the given
1626         image has an assembly manifest.
1627
1628 2006-11-09  Ankit Jain  <jankit@novell.com>
1629
1630         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
1631         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
1632         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
1633
1634 2006-11-07  Dick Porter  <dick@ximian.com>
1635
1636         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1637         Put the old resolver behaviour back for pre-2.0 profiles.
1638
1639 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1640
1641         * threadpool.c: precise GC and locking fixes.
1642
1643 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
1644
1645         * class.c: don't load types that have an explicit unaligned
1646         managed reference. Provide better info in the TypeLoad exception.
1647         Part of the fix for bug #79744.
1648         * object.c: use the correct check for class type load issues.
1649
1650 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1651
1652         * class.c: enforce alignment of fields with managed references
1653         even when Pack=1 is forced by the user (bug #77788).
1654
1655 2006-11-03  Dick Porter  <dick@ximian.com>
1656
1657         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
1658         If the address reverse lookup fails, return it as the hostname
1659         anyway.  Fixes bug 79721.
1660
1661 2006-11-03  Dick Porter  <dick@ximian.com>
1662
1663         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
1664         Fix build on Windows.
1665
1666 2006-11-02  Dick Porter  <dick@ximian.com>
1667
1668         * icall-def.h: 
1669         * object-internals.h: 
1670         * exception.c (mono_get_exception_thread_interrupted): 
1671         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
1672         Fixes bug 74525.
1673
1674         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
1675         Check for pending Thread.Interrupt.
1676
1677 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
1678         * loader.c: Fixed bug 79684.
1679
1680 2006-10-27  Dick Porter  <dick@ximian.com>
1681
1682         * file-io.c (get_file_attributes): Force symlinks to directories
1683         to be returned as a regular file.  Fixes bug 79733.
1684 2006-10-26  Dick Porter  <dick@ximian.com>
1685
1686         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
1687         CreateFile to open a directory then we need to set the
1688         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
1689
1690 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
1691
1692         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
1693         friends.
1694
1695 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1696
1697         * sgengc.c: small cleanup of timer code.
1698
1699 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1700
1701         * sgen-gc.c: fix some warnings and start adding support for
1702         complete object removal on domain unload.
1703
1704 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
1705
1706         * assembly.c: build_assembly_name should not consider a version
1707         number without build or revision number invalid. Fixes bug #79715.
1708
1709 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
1710
1711         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
1712         call kernel32 function OutputDebugString directly.
1713         
1714         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
1715         
1716 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
1717
1718         * reflection.c: small cleanup, using a function to insert a MonoString
1719         in the string heap.
1720
1721 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
1722
1723         * reflection.c: moving GC fixes.
1724
1725 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
1726
1727         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
1728         all the objects with finalizers belonging to an unloading appdomain.
1729
1730 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
1731
1732         * sgen-gc.c: added ability to allocate even when the nursery is fully
1733         pinned and fixed a couple of bugs.
1734
1735 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
1736
1737         * threads.h: Revert the last change for now.
1738
1739         * threads.h (mono_thread_get_pending_exception): Rename this to
1740         mono_thread_get_undeniable_exception ().
1741
1742 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
1743
1744         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
1745         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
1746         when fname does not refer to valid assembly. This result in a more
1747         meaningful error message.
1748         * exception.c: added mono_get_exception_bad_image_format2 which 
1749         constructs a BadImageFormatException using the ctor taking a custom
1750         message and the file name. Passing in a NULL msg results in a default
1751         message.
1752         * exception.h: define mono_get_exception_bad_image_format2 function.
1753         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
1754         when file name pointed to an invalid IL image. Use 
1755         mono_get_exception_file_not_found2 to construct FileNotFoundException,
1756         as this results in a more meaningful error message.
1757
1758 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
1759
1760         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
1761         #79465.
1762
1763 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
1764
1765         * metadata.c (mono_type_size): Change the align parameter to guint32 for
1766         consistency with the other _size functions.
1767         (mono_type_stack_size): Ditto.
1768
1769         * class.c object.c icall.c: Fix warnings caused by the above change.
1770
1771         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
1772
1773         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
1774
1775         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
1776
1777 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1778
1779         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
1780         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
1781         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
1782         threadpool.h, threads-types.h: mark more internal functions.
1783
1784 2006-10-11  Dick Porter  <dick@ximian.com>
1785
1786         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
1787         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
1788         reproduce the bug even before applying the fix.)
1789
1790 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
1791
1792         * reflection.c: allow retrieving attributes for arguments in generic
1793         methods (bug #79241).
1794
1795 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
1796
1797         * debug-mono-symfile.c: properly check fopen () result (found by
1798         coverity).
1799
1800 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
1801
1802         * reflection.c: make error message clearer and fixed two
1803         issuelets found by Coverity.
1804
1805 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
1806
1807         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
1808
1809 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1810
1811         * object-internals.h, gc-internal.h, profiler-private.h:
1812         mark internal functions.
1813
1814 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1815
1816         * reflection.c: put data in the text section.
1817         * icall.c: recognize more types in type_from_typename ().
1818         * process.c, marshal.c: added some GC FIXMEs.
1819
1820 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1821
1822         * loader.c: check for NULL before initializing.
1823
1824 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
1825
1826         * gc.c (finalizer_thread): Use a non-alertable wait here.
1827
1828         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
1829         until the correct solution is found.
1830
1831 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
1832
1833         * reflection.c (mono_module_get_object): Avoid an assert when operating on
1834         modules with no metadata. Fixes #79596.
1835
1836         * image.c (load_metadata_ptrs): Put back the error message when
1837         the #- heap is encountered since the support is not complete yet.
1838
1839 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
1840
1841         * gc.c: do not allow the user to SuppressFinalize () a
1842         delegate because it would leak the trampoline if present.
1843
1844 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
1845
1846         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
1847         PropertyPtr table.
1848
1849 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
1850
1851         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
1852
1853         * metadata.c (mono_metadata_get_param_attrs): Ditto.
1854
1855         * row-indexes.h: Add definitions for *Ptr tables.
1856
1857         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
1858
1859         * metadata.c (mono_metadata_translate_token_index): New helper function to
1860         translate table indexes used in uncompressed metadata.
1861         (mono_metadata_decode_table_row): Ditto.
1862         (mono_metadata_decode_table_row_col): Ditto.
1863
1864         * metadata.c: Add table schema for *Ptr tables.
1865
1866         * class.c loader.c: Use the new helper function to access the affected metadata
1867         tables.
1868         
1869         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
1870         #38532.
1871         
1872 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
1875         sequences which can be unbounded in size. Fixes #79583.
1876
1877 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
1878
1879         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
1880         static initialization.
1881
1882         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
1883
1884         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
1885
1886         * domain.c (mono_domain_free): Free up type_init_exception_hash.
1887
1888         * object.c (mono_runtime_class_init): Implement correct semantics when a static
1889         ctor fails, i.e. throw the same exception on subsequent accesses.
1890         
1891 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
1892
1893         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
1894         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
1895         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
1896         Handle marshalling of interfaces and VARIANTs contained in structs.
1897         
1898         Code is contributed under MIT/X11 license.
1899         
1900 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
1903         
1904         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
1905         mempool.
1906
1907 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1908
1909         * console-io.c: ignore previous SIGINT handler.
1910
1911 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
1914         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
1915         #79460, #79461, #79485.
1916
1917         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
1918
1919         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
1920         #79217.
1921
1922 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
1923
1924         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
1925         could be generated from it.
1926
1927 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
1928
1929         * rand.c: fix read loop to correctly handle EINTR.
1930
1931 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1932
1933         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
1934         internal calls are defined to keep methods closer to the declaring
1935         type and allow a significant reduction in runtime relocations and
1936         memory usage.
1937
1938 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
1939
1940         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
1941         exception message to have FileNotFoundException use the default
1942         assembly load error message. Fixes bug #79426.
1943         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
1944
1945 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1946
1947         * threadpool.c: (start_thread_or_queue) use the root domain when
1948         creating the thread instead of the async object one.
1949
1950 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
1951
1952         * class.c, object.c, class-internals.h, reflection.c:
1953         for arrays, store element_size inside MonoClass (speedup
1954         for array object creation).
1955
1956 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
1957
1958         * icall.c: fixed CodeBase to use the file name and not the module
1959         name (bug #79365).
1960
1961 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
1962
1963         * mono-debug.c, mono-debug.h: export find_method as
1964         mono_debug_find_method ().
1965
1966 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
1967
1968         * debug-helpers.c, class-internals.h: added a few functions useful
1969         when debugging under gdb.
1970
1971 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1972
1973         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
1974         characters that need special handling.
1975
1976 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
1977
1978         * mono-config.c: make the os/cpu specification more flexible,
1979         allowing lists and negation.
1980
1981 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
1982
1983         * marshal.c: COM Interop fixes. Handle case where method->klass.
1984         is interface. Handle BSTR/MonoString when null. Use CDECL as 
1985         calling convention on non-windows platforms. This is for
1986         compatibility with XPCOM and MainWin COM.
1987         
1988         Code is contributed under MIT/X11 license.
1989         
1990
1991 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
1992
1993         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
1994         correctly. Fixes #79217.
1995
1996         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
1997
1998 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
1999
2000         * mono-config.c: allow both an os and cpu attribute for dllmap
2001         and dllentry elemnets to enable a single config file to be used
2002         for multiple architectures.
2003
2004 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
2005
2006         * loader.c: MonoLoaderError was cleared too soon on load failure.
2007         Fixes bug #79424.
2008
2009 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
2010
2011         * icall.c: use the defining class vtable when accessing a
2012         static field, not a pobblibly derived class.
2013
2014 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
2015
2016         * icall.c string-icalls.c: Remove references to unicode.h.
2017
2018         * unicode.h unicode.c Makefile.am: Remove these unused source files.
2019
2020         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
2021
2022         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
2023         indicating the image where custom marshaller types should be looked up.
2024         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
2025         custom marshallers, instead of corlib. Fixes #79425.
2026
2027 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
2028
2029         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
2030
2031 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
2032
2033         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
2034         Implement Environment.ProcessorCount.
2035         
2036         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
2037         Implement Environment.ProcessorCount.
2038         
2039         * icall.c: 
2040         Add Environment.ProcessorCount icall.
2041         
2042         Patch by Jason McFall.
2043
2044 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2045
2046         * assembly.c: don't append .exe/.dll when the filename already contains
2047         one of those extensions.
2048
2049 2006-09-12  Martin Baulig  <martin@ximian.com>
2050
2051         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
2052         to array interfaces.
2053
2054 2006-09-11  Martin Baulig  <martin@ximian.com>
2055
2056         * reflection.c (mono_image_build_metadata): Create the
2057         MethodImpl's after emitting all types and methods, so we don't
2058         need another fixup pass for them.
2059
2060 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
2061
2062         * class.c (mono_class_from_name_case): Fix regression introduced by the last
2063         change.
2064
2065 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
2066
2067         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
2068         unload.
2069
2070 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
2071
2072         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
2073         args is not set. Fixes #78926.
2074
2075 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
2076
2077         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
2078
2079         * image.c (load_class_names): Move this to class.c, and rename it to 
2080         'mono_image_init_name_cache'.
2081         (load_modules): Fix a warning.
2082
2083         * class.c icall.c image.c: Initialize image->name_cache lazily.
2084
2085         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
2086         on its name using information in the AOT file.
2087
2088         * class.c (mono_class_from_name): Use the new hook function.
2089
2090 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
2091
2092         * reflection.c (mono_param_get_objects): Handle enum default parameter values
2093         correctly.
2094
2095         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
2096         Fixes #79289.
2097         
2098 2006-09-06  Martin Baulig  <martin@ximian.com>
2099
2100         * icall.c (mono_lookup_internal_call): Small fix.
2101
2102 2006-09-05  Raja R Harinath  <rharinath@novell.com>
2103
2104         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
2105         double g_free.
2106
2107 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
2108
2109         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
2110         when --debug is specified.
2111
2112 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
2113
2114         * class.c (setup_generic_array_ifaces): Fix a warning.
2115
2116 2006-09-04  Miguel de Icaza  <miguel@novell.com>
2117
2118         * Temporarily remove the patch to assemly.c that checks the
2119         assembly versions as it breaks our gacutil.
2120
2121 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
2122
2123         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
2124
2125         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
2126         a net 1.0 runtime.
2127
2128         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
2129         created using the default ctor. Fixes #79152.
2130         (mono_string_builder_to_utf16): Ditto.
2131
2132 2006-09-01  Martin Baulig  <martin@ximian.com>
2133
2134         Fix handling of the generic array interfaces.
2135
2136         * class-internals.h
2137         (MonoDefaults): Removed `generic_array_class' and added
2138         `generic_ilist' class.
2139
2140         * class.c
2141         (mono_bounded_array_class_get): Add the new generic array interfaces.
2142         (setup_generic_array_ifaces): New static method; create vtable
2143         entries for each method in the generic array interfaces.
2144
2145         * metadata.c
2146         (select_container): Allow "parent-less" generic methods.
2147
2148         * marshal.c
2149         (mono_marshal_get_generic_array_helper): New public method.
2150
2151         * icall.c
2152         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
2153         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
2154         moved the interncall into System.Array.
2155
2156 2006-09-01  Raja R Harinath  <rharinath@novell.com>
2157
2158         A few more cases of avoiding work on types with ->byref set.
2159         Has the real fix for #79238
2160         * icall.c (is_generic_parameter): New helper.
2161         (ves_icall_Type_GetGenericParameterPosition): Use it.
2162         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
2163         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
2164         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2165         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
2166         reference types.
2167         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
2168         reference types.
2169         (ves_icall_Type_get_IsGenericInstance): Likewise.
2170         (ves_icall_Type_get_IsGenericType): Likewise.
2171
2172 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
2173
2174         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
2175         class if possible.
2176
2177         * mempool.h (mono_mempool_get_allocated): New helper function.
2178
2179         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
2180         change.
2181
2182         * mempool.c: Fix warnings and the calculation of stats.
2183
2184         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
2185
2186         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
2187
2188         * loader.c (mono_get_method_from_token): Update method_count stat.
2189
2190         * class-internals.h (MonoStats): Add some stats.
2191
2192 2006-08-31 Robert Jordan  <robertj@gmx.net>
2193
2194         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
2195         with managed variants.
2196         All code is contributed under the MIT/X11 license.
2197         
2198 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
2199
2200         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
2201         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
2202
2203         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
2204
2205         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
2206         with cycles in classes.
2207
2208         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
2209
2210         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
2211         missing a [MarshalAs] directive. Fixes #79203.
2212
2213         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
2214         klass->marshal_info. Fixes #79217.
2215
2216 2006-08-30  Martin Baulig  <martin@ximian.com>
2217
2218         Committing a patch from Joachim Ante <joe@otee.dk>:
2219         Add support for binary data symbol stores.
2220
2221         * debug-mono-symfile.c
2222         (mono_debug_open_mono_symbol_file): Renamed into
2223         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
2224         arguments.
2225
2226         * mono-debug.c
2227         (mono_debug_open_image): Added `raw_contents' and `size' args.
2228         (mono_debug_init_2_memory): New public function.
2229
2230 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
2231
2232         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
2233
2234 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2235
2236         * appdomain.c: implement support for ShadowCopyFiles.
2237
2238 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
2239
2240         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
2241         when value is NULL (and should remove CID #51).
2242
2243 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2244
2245         * image.c: moved 2 functions to ../utils.
2246
2247 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
2248
2249         * gc.c: cope with the target object of a GC handle being NULL
2250         (bug #78877).
2251
2252 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
2253
2254         * class.c: recursively check parent's explicit implementations
2255         of interface methods (fixes bug #79125).
2256
2257 2006-08-19  Miguel de Icaza  <miguel@novell.com>
2258
2259         * filewatcher.c: Avoid warnings when building, do not redefine
2260         constants that are defined.
2261
2262         Remove warnings.
2263
2264 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2265
2266         * image.c: don't fail when the link points to an absolute path.
2267
2268 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
2269
2270         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
2271         Fix CID #3.
2272
2273 2006-08-17  Miguel de Icaza  <miguel@novell.com>
2274
2275         * image.c (full_path): A new method used to obtain the actual path
2276         of an assembly even in the presence of symbolic links.  
2277
2278         This is necessary for the case where we are running a binary that
2279         has been GACed, but we are using the "published" path name
2280         ($prefix/mono/1.0/blah.exe) which happens to point to the real
2281         file in the GAC.
2282
2283         This was the source of the failure for the `xsp' command with the
2284         recent AppDomain changes, as far as the runtime was concerned,
2285         there were two different assemblies: $prefix/mono/1.0/blah.exe and
2286         $prefix/mono/gac/blah/version/blah.exe.
2287
2288         (do_mono_image_open): use full path
2289
2290 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2291
2292         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
2293
2294 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
2295
2296         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
2297         domain_id is supplied. Fix CID #241 and corlib's unit tests.
2298
2299 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2300
2301         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
2302         small structures. Fixes #78990.
2303
2304 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2305
2306         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
2307
2308         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
2309
2310 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2311
2312         * appdomain.c:
2313         * marshal.c: don't load all the assemblies from a domain into newly
2314         created ones. The new domains might have different rules and load
2315         assemblies from different locations. Fixes bug #76757.
2316
2317         Patch by Lluis. Conflicts resolved by Brian Crowell.
2318
2319 2006-08-16  Alp Toker  <alp@atoker.com>
2320
2321         * socket-io.c: First half of the fix for #79084.
2322         Set sa_size to the length of the content, not that of the struct.
2323         Don't add NULL suffix to the content, this should be done in
2324         managed code if needed.
2325
2326 2006-08-14  Raja R Harinath  <rharinath@novell.com>
2327
2328         Fix part of #79012
2329         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
2330         mono_metadata_parse_type returns NULL.
2331
2332 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
2333
2334         * normalization-tables.h : new file for string normalization data.
2335         * locales.c, locales.h, icall.c :
2336           added load_normalization_resource() for string normalization,
2337           and icall as well.
2338         * Makefile.am : added normalization-tables.h to the sources.
2339
2340 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
2341
2342         * marshal.c: Add more helper functions to reduce code duplication and use them
2343         everywhere.
2344
2345 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
2346
2347         * marshal.c: Fix non-x86 stdcall warnings.
2348         
2349         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
2350         them everywhere.
2351
2352 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
2353
2354         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
2355         type check on multi-dimensional arrays. Fixes #79000.
2356
2357 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
2358
2359         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
2360         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
2361         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
2362         * class-internals.h: add is_com_object to class structure.
2363         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
2364         null checks to COM object marshalling. Fix .ctor call on RCW.
2365         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
2366         
2367         All code is contributed under the MIT/X11 license.
2368
2369 2006-08-09  Dick Porter  <dick@ximian.com>
2370
2371         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
2372         racing mono_monitor_allocator_lock() somewhere, so don't delete
2373         the critical section for now.  Found by running and exiting
2374         monodevelop.
2375
2376 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
2377
2378         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
2379         (ves_icall_System_ComObject_FindInterface): Ditto.
2380         (ves_icall_System_ComObject_CacheInterface): Ditto.
2381
2382         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
2383         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
2384
2385 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2386
2387         * threadpool.c: treat pipes from process asynchronous reads as sockets
2388         when reading from them, so we get select/poll or epoll to wait for
2389         data.
2390
2391 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
2392
2393         * loader.c: Fix a typo (CID #233) in the null check.
2394
2395 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
2396
2397         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
2398         Hopefully fixes #78949.
2399         
2400         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
2401         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
2402         bytes. Fixes #78972.
2403
2404 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2405
2406         * filewatcher.c: we need to set errno here.
2407
2408 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2409
2410         * filewatcher.c: let Win32Exception get the error value.
2411
2412 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2413
2414         * filewatcher.c: translate errno into win32 errors for Win32Exception
2415         to know what happened.
2416
2417 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
2418
2419         * threadpool.c: Fix more warnings.
2420
2421         * assembly.c (search_loaded): Fix warnings.
2422
2423         * threadpool.c (mono_thread_pool_finish): Fix warnings.
2424         (mono_async_invoke): Ditto.
2425
2426 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
2427
2428         * object.c (mono_remote_class_vtable): Need to create proxy vtable
2429         entries for __ComObject type in addition to ComImport types.
2430         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
2431         about hash table.
2432         
2433         All code is contributed under the MIT/X11 license.
2434
2435 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
2436
2437         * image.c: avoid tentative loading of modulerefs that contain
2438         no metadata (P/Invoke library names).
2439
2440 2006-07-28  Dick Porter  <dick@ximian.com>
2441
2442         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
2443         mono_loader_lock() somewhere, so don't delete the critical section
2444         for now.  Found by running and exiting monodevelop.
2445
2446 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2447
2448         * filewatcher.c: define the inotify syscalls when we're building on
2449         linux and have sys/syscall.h. The build system might not have support
2450         for inotify but the target system might have it.
2451
2452 2006-07-26  Miguel de Icaza  <miguel@novell.com>
2453
2454         * domain.c: Documentation updates.
2455
2456         * loader.c (mono_free_method): Do not release the method
2457         information if we are being profiled, as profilers will use this
2458         information at shut down to present some data to the user.
2459
2460         This is needed so that the profiler does not crash, as the
2461         profiler tends to keep MonoMethods around, and they might become
2462         invalid if we free these.
2463
2464         (mono_get_method_constrained): Return the original CIL stream
2465         method as well, so verification can be performed against it.
2466
2467 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2468
2469         * filewatcher.[ch]: support for inotify file system watcher.
2470         * icall.c: add new internal calls for the inotify file system watcher.
2471
2472 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2473
2474         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
2475         #78888.
2476
2477 2006-07-20  Dick Porter  <dick@ximian.com>
2478
2479         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
2480         warning.
2481
2482 2006-07-20  Dick Porter  <dick@ximian.com>
2483
2484         * threads.c (start_wrapper): Do the thread cleanup while we still
2485         hold a reference to its object.  Fixes bug 78123.
2486
2487 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
2488
2489         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
2490         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
2491           "managed-to-managed".
2492         * icall.c: Redirect string constructors that take sbyte* to
2493           ves_icall_System_String_ctor_RedirectToCreateString.
2494         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
2495           to CreateString () methods with matching signature.
2496         * reflection.c: Use original security informations for
2497           MONO_WRAPPER_MANAGED_TO_MANAGED.
2498         * security-manager.c: Use original security informations for
2499           MONO_WRAPPER_MANAGED_TO_MANAGED.
2500         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
2501           that is a placeholder and only its address should be used.
2502         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
2503           that is a placeholder and only its address should be used.
2504
2505 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
2506
2507         Begin implementing COM Interop.
2508         * appdomain.c: Increment corlib version.
2509         * class.c: Set ComImport classes' parent to __ComObject.
2510         * loader.c: Mark cominterop methods as such.
2511         * domain.c: Add __ComObject class to MonoDefaults structure.
2512         * image.c: Add 2 hashtables to the image for COM Interop related methods
2513         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
2514         using the mempool allocator
2515         
2516         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
2517         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
2518         declaration for mono_metadata_type_dup_mp.
2519         
2520         * debug-helpers.c: Added strings for two additional wrapper types
2521         * object.c: Create proxy objects for ComImport classes
2522         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
2523         and added __ComObject class to MonoDefaults structure.
2524         
2525         * object-internals.h: Finish MonoRealProxy definition, and add definition of
2526         MonoComInteropProxy and MonoComObject.
2527         
2528         * marshal.c: Added support for COM Interop
2529         (signature_cominterop): Converts managed signature to corresponding
2530         unmanaged COM signature.
2531         (cominterop_get_function_pointer): gets unmanaged function pointer via
2532         COM object vtable
2533         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
2534         (cominterop_get_method_interface): returns interface type that method is defined on
2535         (mono_mb_emit_cominterop_call): emits native call to function pointer
2536         gotten from vtable
2537         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
2538         that matches signature of unmanaged function.
2539         (cominterop_get_native_wrapper): wrapper around adjusted method call.
2540         (cominterop_get_invoke): forwards call from proxy to __ComObject
2541         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
2542         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
2543         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
2544         
2545         * marshal.h: Added Marshal icall declarations.
2546         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
2547         so we can access them in finalizer
2548         
2549 2006-07-14  Dick Porter  <dick@ximian.com>
2550
2551         * object.c (mono_type_initialization_cleanup): Fix a race
2552         condition by temporarily commenting out the critical section
2553         deletion.
2554
2555 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
2556
2557         * reflection.c (create_custom_attr): Fix some warnings.
2558         (create_custom_attr_data): Ditto.
2559         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
2560         types. Fixes #78855.
2561
2562 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
2563
2564         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
2565
2566         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
2567
2568 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * reflection.c (resolve_object): Add support for DynamicMethod.
2571
2572         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
2573         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
2574
2575 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
2576
2577         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
2578         don't leak GPtrArray's pdata has we have no use (nor free) for it.
2579
2580 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
2581
2582         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
2583         Fixes #77888.
2584
2585 2006-06-30  Raja R Harinath  <rharinath@novell.com>
2586
2587         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
2588         slightly: remove a shadow local variable.
2589
2590 2006-06-29  Raja R Harinath  <rharinath@novell.com>
2591
2592         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
2593         definition that introduces the virtual function slot.
2594         Also fix Coverity #105.
2595
2596 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
2597
2598         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
2599         for dynamic assemblies. Fixes #78724.
2600
2601 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
2602
2603         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
2604         Fixes #78722.
2605
2606 2006-06-21  Martin Baulig  <martin@ximian.com>
2607
2608         * reflection.c
2609         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
2610         fixes #76484.
2611
2612 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
2613
2614         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
2615
2616 2006-06-20  Raja R Harinath  <rharinath@novell.com>
2617
2618         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
2619         nor TYPEREFs.
2620         * class.c (mono_class_create_from_typespec): Add 'context' argument.
2621         Inflate result if necessary.
2622         (mono_class_get_full): Remove old version.  Rename from
2623         'mono_class_get' and add 'context' argument.  Pass it to
2624         ..._create_from_typespec.
2625         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
2626         (mono_ldtoken): Revert change below.
2627
2628 2006-06-20  Martin Baulig  <martin@ximian.com>
2629
2630         * class.c (mono_ldtoken): Don't pass the generic context to
2631         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
2632
2633 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
2634
2635         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
2636         and later freeing it. Fixes #78638.
2637
2638 2006-06-15  Miguel de Icaza  <miguel@novell.com>
2639
2640         * icall.c (mono_class_get_throw): Revert over-zealous error
2641         throwing, the caller for mono_class_get_throw will cope with
2642         errors when classes are not properly initialized already.
2643
2644         The code still copes with loader exceptions though.
2645
2646         Fixes the regression in reftype1 and reftype3 from the CAS tests.
2647         
2648 2006-06-14  Miguel de Icaza  <miguel@novell.com>
2649
2650         Fixes the `make run1' version of RuntimeAbort (to be commited,
2651         source is in Bugzilla).
2652         
2653         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
2654         FALSE on class loading failure instead of returning true.
2655
2656         * class.c (mono_class_create_from_typedef): It is possible for
2657         mono_metadata_interfaces_from_typedef_full to fail if a class is
2658         not found, cope with this.
2659         
2660
2661 2006-06-14  Dick Porter  <dick@ximian.com>
2662
2663         * socket-io.c: 
2664         * process.c: Fix a bunch of signed/unsigned warnings from gcc
2665         4.1.1
2666
2667 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
2668
2669         * culture-info-table.h : oops, forgot to make it nsync with r61548.
2670
2671 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
2672
2673         * icall.c: Another fix for building mono in Visual Studio.
2674
2675 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
2676
2677         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
2678         
2679 2006-06-09  Martin Baulig  <martin@ximian.com>
2680
2681         * debug-mono-symfile.c: Put this back and really fix it this
2682         time. Sorry for all the trouble.
2683
2684 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
2685
2686         * icall.c (mono_class_get_throw): Fix a warning.
2687         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
2688         ReflectionTypeLoadException if needed. Fixes #78606.
2689
2690         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
2691         (mono_class_init): Ditto.
2692
2693         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
2694         ref_only exceptions.
2695         (mono_loader_clear_error): Make this work even if there is no error.
2696
2697 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
2698
2699         * object-internals.h marshal.c marshal.h icall.c: Implement method 
2700         Marshal.GetComSlotForMethodInfo using internal call.
2701
2702 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
2703
2704         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
2705         a function for signalling it.
2706
2707         * class.c (mono_class_from_typeref): Use the new kind of loader error when
2708         a referenced assembly is not found.
2709
2710         * loader.c (mono_loader_error_prepare_exception): Add support for 
2711         LOADER_ERROR_ASSEMBLY. Fix formatting.
2712
2713 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
2714
2715         * domain.c appdomain.c class-internals.h marshal.c: Add support 
2716         for VARIANT marshalling on windows and increment corlib version
2717         since Variant struct was added.
2718
2719 2006-06-03  Miguel de Icaza  <miguel@novell.com>
2720
2721         * debug-mono-symfile.c: Revert Martin's previous patch which broke
2722         stack trace line information:
2723
2724         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
2725         (Martin) when looking up B which is between A and C, return A not C.
2726
2727         Bug is #78573.
2728
2729         Thanks to Alexander Olk for tracking this down.
2730
2731 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
2732
2733         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
2734         
2735         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
2736         avoid clobbering its value.
2737         (mono_string_to_lpstr): Fix a warning on windows.
2738
2739 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
2740
2741         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
2742
2743         * reflection.c loader.c: Removed references to 'dummy' flag.
2744
2745         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
2746
2747         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
2748         it gets GC tracking.
2749
2750         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
2751         GC tracking.
2752         
2753         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
2754
2755         * marshal.c threadpool.c: Update callers of mono_async_result_new.
2756
2757         * appdomain.c: Bump corlib version.
2758
2759 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
2760
2761         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2762         CEE_STIND_REF when working with object references.
2763
2764 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
2765
2766         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
2767         Fixes #78539.
2768
2769 2006-05-30  Miguel de Icaza  <miguel@novell.com>
2770
2771         * loader.c (method_from_memberref): Fix argument value for
2772         mono_loader_set_error_method_load (I was passing the MonoClass
2773         instead of the class name char *).
2774
2775 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
2776
2777         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
2778         CEE_STIND_REF when working with object references.
2779
2780 2006-05-30  Martin Baulig  <martin@ximian.com>
2781
2782         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
2783         mono_method_full_name() change and replace the ':' with a '.'
2784         here.
2785
2786 2006-05-30  Martin Baulig  <martin@ximian.com>
2787
2788         * debug-mono-symfile.c
2789         (mono_debug_symfile_lookup_location): Fix the algorithm:
2790         when looking up B which is between A and C, return A not C.
2791
2792 2006-05-29  Martin Baulig  <martin@ximian.com>
2793
2794         * mono-debug.h
2795         (MonoDebugMethodInfo): Make the typedef public.
2796         (MonoDebugSourceLocation): New public struct.
2797
2798         * mono-debug.c
2799         (mono_debug_source_location_from_address): Removed.
2800         (mono_debug_source_location_from_il_offset): Removed.
2801         (mono_debug_il_offset_from_address): Removed.
2802         (mono_debug_address_from_il_offset): Removed.
2803         (mono_debug_lookup_method): New public function.
2804         (mono_debug_lookup_source_location): New public function; replaces
2805         the old mono_debug_source_location_from_*() functions; see the
2806         inline documentation.
2807         (mono_debug_free_source_location): New public function.
2808         (mono_debug_print_stack_frame): New public function; see the
2809         inline documentation.
2810
2811         * debug-mono-symfile.c
2812         (mono_debug_find_source_location): Renamed into
2813         mono_debug_symfile_lookup_location(); only take a
2814         `MonoDebugMethodInfo *' and an `offset' argument; added inline
2815         documentation.
2816         (mono_debug_find_method): Renamed into
2817         mono_debug_symfile_lookup_method().
2818
2819 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
2820
2821         * assembly.c (mono_assembly_open_full): Dont overwrite the status
2822         returned by mono_image_open_full ().
2823
2824         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
2825         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
2826         #78517.
2827
2828         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
2829         #78518.
2830
2831 2006-05-27  Miguel de Icaza  <miguel@novell.com>
2832
2833         * class.c (mono_class_from_typeref): handle missing images
2834         earlier, deals with bug #78418.   Refactor code; 
2835
2836         Fix a warning introduced in my previous commit (some stale code
2837         from before I revisited my patch).
2838
2839         * class.c (mono_class_create_from_typedef): On failure, remove the
2840         class from the MonoImage->class_cache as the class is not
2841         initialized;   Fixes the leak pointed out by Paolo.
2842
2843 2006-05-25  Dick Porter  <dick@ximian.com>
2844
2845         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
2846         DeleteCriticalSections until I figure out which one may still be
2847         sometimes locked when mono_thread_cleanup is called.
2848
2849 2006-05-24  Dick Porter  <dick@ximian.com>
2850
2851         * threads.c (mono_thread_cleanup): Move the threading cleanup out
2852         of mono_thread_manage and back into its own function, so it can be
2853         called after the finalizer thread has finished.
2854
2855         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
2856
2857 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
2858
2859         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
2860         Fixes #78495.
2861
2862         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
2863         with non-blittable elements.
2864         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
2865
2866 2006-05-24  Martin Baulig  <martin@ximian.com>
2867
2868         * mono-debug-debugger.h (MonoDebuggerEvent): Added
2869         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
2870
2871         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
2872         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
2873         `mono_debugger_event_handler' to NULL.
2874
2875 2006-05-24  Martin Baulig  <martin@ximian.com>
2876
2877         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
2878
2879 2006-05-24  Martin Baulig  <martin@ximian.com>
2880
2881         * mono-debug-debugger.h
2882         (mono_debugger_create_notification_function): Added
2883         `MonoCodeManager *' argument.
2884
2885 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
2886
2887         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
2888
2889 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
2890
2891         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
2892         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
2893         implementation.
2894
2895 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
2896
2897         * icall.c: precise GC support: objects can't be stored in unmanaged
2898         memory anymore, even if they are kept alive by other references: since
2899         they can move the GC needs to be able to always find them.
2900
2901 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2902
2903         * object.c: precise GC support for static fields. Support
2904         for moving GCs: write barriers and pinned allocation for interned
2905         strings.
2906
2907 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
2908
2909         * domain.c, domain-internals.h: precise GC support for the MonoDomain
2910         structure.
2911
2912 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2913
2914         * class.c, gc.c: sgen and precise GC updates.
2915
2916 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
2917
2918         * marshal.h, marshal.c: added write barrier wrapper and precise type
2919         fixes.
2920
2921 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
2922
2923         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
2924         support.
2925
2926 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
2927
2928         * reflection.c: precise and sgen GC updates.
2929
2930 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
2931
2932         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
2933
2934 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
2935
2936         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
2937
2938 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
2939
2940         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
2941         MONO_TYPE_OBJECT. Fixes #78462.
2942
2943 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
2944
2945         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
2946         and blittable types.
2947
2948 2006-05-17  Miguel de Icaza  <miguel@novell.com>
2949
2950         * class.c (mono_class_get_exception_for_failure): Implement parts
2951         of a TODO: if the loader error is set (instead of the class
2952         error), we return a Loader exception that can be properly thrown
2953         elsewhere.
2954
2955         This was exposed by some Winforms 2.0 code that I tried to run
2956         (Atsushi pointed me to it).
2957
2958 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
2959
2960         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
2961         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
2962         
2963         * marshal.c (emit_marshal_vtype): Add limited support for 
2964         UnmanagedType.LPStruct. Fixes #78427.
2965
2966         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
2967         Applied a patch from kangaroo to fix #77523.
2968
2969 2006-05-17  Martin Baulig  <martin@ximian.com>
2970
2971         * threads.c
2972         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
2973         (debugger_thread_created): Removed.
2974         (debugger_thread_exited): Removed.
2975
2976 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
2977
2978         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2979
2980         * object-internals.h (MonoReflectionResource): Sync with managed version.
2981
2982 2006-05-12  Wade Berrier <wberrier@novell.com>
2983
2984         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
2985
2986 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
2987
2988         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
2989         functions try to allocate from the image mempool.
2990
2991 2006-05-12  Dick Porter  <dick@ximian.com>
2992
2993         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
2994
2995 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
2996
2997         * object.c: The FieldGetter and FieldSetter methods require the full
2998         name of the class, not only the name. Fixes bug #78277.
2999
3000 2006-05-11  Miguel de Icaza  <miguel@novell.com>
3001
3002         * loader.c (method_from_memberref): Do not pass the NULL klass to
3003         mono_loader_set_error_() methods.  Pass the non-NULL value
3004         (class). 
3005
3006 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
3007
3008         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
3009         (mono_assembly_close): Null out assembly->image->references after freeing it.
3010
3011         * image.c (mono_image_close): Free image->references.
3012         
3013         * reflection.c (mono_image_basic_init): Fix a small memory leak.
3014
3015 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
3016
3017         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
3018         before checking if it's NULL (g_assert).
3019
3020 2006-05-10  Martin Baulig  <martin@ximian.com>
3021
3022         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
3023         I thought I already killed that two months ago, but now it somehow reappeared.
3024
3025 2006-05-10  Martin Baulig  <martin@ximian.com>
3026
3027         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
3028
3029 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
3030
3031         * reflection.c: Allocate memory for dynamically created methods in the image
3032         mempools.
3033
3034 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
3035
3036         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
3037         don't use the ad pointer before checking if it's NULL (g_assert).
3038
3039 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
3040
3041         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
3042         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
3043
3044         * marshal.c: Allocate all signatures from mempools.
3045
3046         * marshal.c: Allocate some more signatures from mempools.
3047
3048 2006-05-09  Miguel de Icaza  <miguel@novell.com>
3049
3050         * object.c (mono_load_remote_field): The code used to provide a
3051         temporary variable for returning results if the user did not
3052         provide a result pointer.  But our temporary variable was allocted
3053         on the satck.
3054
3055         Fix calling code to always pass a result area.   Coverity ID 103.
3056
3057 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
3058
3059         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
3060         value, not the old. Fixes #78312.
3061         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
3062
3063         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
3064         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
3065         per-image cache.
3066
3067         * assembly.c (mono_assembly_close): Free image->references.
3068
3069         * assembly.c (mono_assembly_names_equal): Fix a warning.
3070         (mono_assemblies_cleanup): Cleanup more global data.
3071
3072         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
3073
3074         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
3075         ptr_cache and image->modules.
3076
3077         * image.c (mono_image_init): Allocate array_cache lazily.
3078         
3079 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3080
3081         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
3082         behavior was changed recently and has bad side effects.
3083
3084 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
3085
3086         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
3087         
3088         * assembly.c (mono_assembly_close): Remove a debug printf.
3089
3090         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
3091
3092         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
3093         to also allow for temporary references between mono_image_open ()/close ().
3094
3095         * domain.c (get_runtimes_from_exe): Add a FIXME.        
3096
3097 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
3098
3099         * marshal.c: Fix support for dynamic methods.
3100
3101         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
3102
3103         * marshal.c (mono_marshal_cleanup): New cleanup function.
3104
3105         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
3106         image mempools.
3107
3108         * class.c (mono_class_init): Fix leaking class->nested_classes.
3109
3110         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
3111
3112         * image.c (mono_image_init): Initialize the new cashes.
3113
3114         * image.c (mono_image_close): Destroy the new cashes.
3115
3116         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
3117
3118         * mempool.c (mono_mempool_strdup): New helper function.
3119
3120         * class-internals.h: Add prototype for mono_loader_unlock ().
3121
3122         * domain.c (mono_jit_info_table_find): Fix a warning.
3123         (mono_debugger_check_runtime_version): Ditto.
3124
3125         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
3126         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
3127         functions to these modules.
3128
3129         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
3130         metadata modules.
3131         
3132         * marshal.c (mono_free_bstr): Fix a warning.
3133
3134         * assembly.c (mono_assembly_open_full): Fix another small leak.
3135
3136         * object.c: Fix some unload leaks in the remoting code.
3137
3138         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
3139         function.
3140
3141         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
3142
3143         * reflection.c: Fix some unload leaks in dynamic assemblies.
3144
3145 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
3146
3147         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
3148         * marshal.h: Add BSTR support on Win32
3149         * icall.c: Add BSTR icalls
3150         * metadata.h: Add BSTR enums
3151
3152 2006-04-28  Miguel de Icaza  <miguel@novell.com>
3153
3154         Work to catch the crash from #76795 and turn it into an
3155         exception.   As I stubbed out pieces of the VisualBasic support,
3156         I found a number of places where the code was failing and I added
3157         checks to those places. 
3158         
3159         * metadata.c (do_mono_metadata_parse_generic_class): Make this
3160         function return a status code.  If we fail to parse the signature
3161         from mono_metadata_parse_generic_inst, return FALSE.
3162
3163         * loader.c (mono_get_method_from_token): If we fail to load the
3164         method (mono_class_get) return NULL.   
3165
3166         * (method_from_memberref): Return NULL if we are unable to parse
3167         the method signature
3168
3169         (mono_loader_error_prepare_exception): Since we now use the
3170         loader_error flag internally to stop processing, and obtaining
3171         exceptions that might be thrown will walk this code path the
3172         proper way of going from a MonoLoaderError into a
3173         MonoException was convoluted.   This new routine encapsulates the
3174         process of turning the error into an exception and *clearing* the
3175         error afterwards.
3176         
3177 2006-04-27  Miguel de Icaza  <miguel@novell.com>
3178
3179         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
3180         with missing assemblies), and to cope with:
3181
3182                 * Missing fieldref from a non-existing assembly.
3183                 * Missing methodref from a non-existing assembly.
3184
3185         The first batch of work to address *some* of the issues from 76661.
3186         
3187         * object.c (mono_class_create_runtime_vtable): If we fail to
3188         initialize the class raise the exception here. 
3189
3190         * metadata.c (mono_class_get_overrides_full): If any methods fail
3191         to load return the failure to the caller.
3192
3193         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
3194         flagging assemblies that failed to load.   
3195
3196         Do not crash if we are unable to load the assembly.
3197
3198         (mono_assembly_close): Do nothing with REFERENCE_MISSING
3199         assemblies. 
3200
3201         * loader.c (mono_loader_set_error_type_load): Change the
3202         convention to always pass unallocated strings, so we make our own
3203         copies (I know our own code had duplicated strings before, but
3204         this keeps the normal conventions).
3205         (method_from_memberref): Call mono_loader_set_error_method_load
3206         for all possible failures of loading the class. 
3207         Remove assert, turn into a loader error.
3208
3209         (mono_loader_error_to_exception): Move this routine from mini
3210         (mini_loader_error_to_exception) there was no need to have that in
3211         mini. 
3212
3213         * class.c (mono_class_from_typeref): If we were not able to load
3214         the assembly with mono_assembly_load_reference, call the
3215         mono_loader_set_error_type_load to register the problem.
3216
3217         (mono_class_setup_fields): If we fail to load the type from
3218         mono_metadata_parse_type_full, call mono_class_set_failure and
3219         break from the loop.
3220
3221         If class->exception_type is set, we do not layout the fields as
3222         that might crash the runtime, and instead return (from breaking
3223         from the previous loop).
3224
3225         (mono_class_setup_vtable): This now returns a boolean indicating
3226         whether the table was properly setup.   The decision is driven by
3227         mono_class_get_overrides_full which might run into non-existing
3228         methods. 
3229         
3230         (mono_class_init): Returns TRUE on success or FALSE if there was a
3231         problem in loading the type (incorrect assemblies, missing
3232         assemblies, methods, etc).
3233
3234         When we call mono_class_setup_fields we also check for a potential
3235         error inside this call (either a class exception or a general
3236         loader exception).
3237
3238         (mono_class_create_from_typedef): If the parent fails to load
3239         (calling mono_class_get_full) return NULL.
3240         
3241         ** Important **
3242
3243         calls to mono_metadata_parse_type_full should be checked
3244         everywhere and set the mono_class_set_failure
3245         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
3246
3247         The current patch checks the places where my manually constructed
3248         tests show the errors are showing up, but we should do it
3249         everywhere. 
3250
3251         ** Important2 **
3252
3253         mono_class_init return values should be tested everywhere, like
3254         the previous case this is something that we should audit
3255         everywhere and not only on the cases exposed by the tests I
3256         created. 
3257
3258 2006-04-26  Miguel de Icaza  <miguel@novell.com>
3259
3260         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
3261         boolean parameter and instead pass the information on `options'
3262         parameter (FileOptions).
3263
3264         * icall.c: Register the new signature for MonoIO.Open.
3265
3266         * debug-helpers.c (dis_one): Trying to understand how coverity
3267         works.  Fix Run 5, item 78.
3268
3269 2006-04-26  Dick Porter  <dick@ximian.com>
3270
3271         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
3272         dereference.
3273
3274 2006-04-25  Martin Baulig  <martin@ximian.com>
3275
3276         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
3277
3278         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
3279         debugger_thread_created().
3280         (debugger_gc_push_all_stacks): Don't handle the main thread in any
3281         special way.
3282         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
3283         (mono_debugger_finalize_threads): New function; undo the effects
3284         of mono_debugger_init_threads().
3285         (mono_debugger_create_all_threads): Removed.
3286
3287 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
3288
3289         * image.c (mono_image_close): Tidy up trace messages.
3290
3291         * assembly.c (mono_assembly_close): Ditto.
3292
3293         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
3294         no longer references an already freed assembly. Fixes #78168.
3295
3296 2006-04-21  Dick Porter  <dick@ximian.com>
3297
3298         * threads.c (mono_thread_detach): Fix reference counting when
3299         detaching threads.
3300
3301 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
3302
3303         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
3304         #78155.
3305
3306 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
3307
3308         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
3309         (mono_type_to_stind): Ditto.
3310
3311         * marshal.c: Use the new helper functions to simplify code.
3312
3313         * image.c (mono_image_close): Add some code for help debug assembly unloading
3314         problems.
3315
3316         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
3317         image mempool.
3318
3319         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
3320         assembly was already loaded in another appdomain. Fixes #78083.
3321
3322 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
3325         referenced assemblies.
3326         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
3327
3328         * domain.c (mono_domain_free): Add a trace message.
3329
3330         * appdomain.c (add_assemblies_to_domain): Ditto.        
3331
3332         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
3333         field.  
3334
3335 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
3336
3337         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
3338
3339 2006-04-12  Martin Baulig  <martin@ximian.com>
3340
3341         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
3342         `USE_INCLUDED_LIBGC'.   
3343
3344 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
3345
3346         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
3347         the patch contains ../ and a small directory name later. Hopefully fixes
3348         #78035.
3349
3350 2006-04-10  Martin Baulig  <martin@ximian.com>
3351
3352         Clean up the debugger's thread-handling code.
3353
3354         The debugger's thread-handling code has been moved from
3355         ../mini/debug-debugger.c to threads.c.  We now iterate directly
3356         over the `threads' hash, keep track of exiting threads and also
3357         use proper locking.
3358
3359         We can now debug XSP and XSP based applications with the debugger.
3360
3361         * object-internals.h (MonoThread): Added `gpointer end_stack'.
3362
3363         * threads.h
3364         (MonoThreadCallbacks): Removed; this was only used by the debugger.
3365         (mono_install_thread_callbacks): Likewise.      
3366
3367         * threads.c (mono_thread_callbacks): Removed.
3368         (debugger_thread_created, debugger_thread_exited): New static functions.
3369         (start_wrapper): Call debugger_thread_created().
3370         (thread_cleanup): Call debugger_thread_exited().
3371         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
3372         (mono_debugger_init_threads): New public function.
3373         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
3374         iterate directly over the `threads' hash and also use proper locking.
3375
3376         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
3377
3378         * mono-debug-debugger.h
3379         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
3380
3381 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
3382
3383         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
3384         argument type=array. Fixes #78057.
3385
3386 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
3387
3388         * culture-info-table.h : regenerated. Fixed bug #69652.
3389
3390 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
3391
3392         * loader.c metadata.c: Reapply a variant r59116.
3393         
3394         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
3395
3396         * class.c (mono_class_setup_interface_offsets): New internal function.
3397
3398         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
3399         interfaces too. Fixes #77398.
3400
3401         * reflection.c (encode_cattr_value): Add support for 
3402         parameter type=object, argument type=array.
3403         (load_cattr_value): Ditto. Fixes #77916.
3404
3405         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
3406         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
3407
3408         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
3409         a byval char array and CharSet is Ansi.
3410
3411         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
3412
3413 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
3414
3415         * metadata.c: Add some locking comments.
3416         
3417         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
3418         mempool.
3419         (mono_metadata_free_method_signature): Don't free the signature itself.
3420
3421         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
3422
3423         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
3424         reference the same MonoImage.
3425         (mono_assembly_load_from_full): Add an assert.
3426
3427 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
3428
3429         * image.c (mono_image_close): Don't put the image we are about to free into the
3430         loaded_images_guid_hash.
3431
3432         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
3433         to reduce code duplication.
3434
3435         * marshal.c: Register the native functions called by this module as icalls, to
3436         somewhat centralize the creation of MonoMethodSignature's.
3437
3438         * loader.c (mono_method_signature): Add a cache for method signatures.
3439
3440         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
3441         the parameter attributes of a method.
3442         (mono_metadata_parse_method_signature_full): Refactored the computation of
3443         parameter attributes into a separate function. Also avoid one allocation in
3444         most cases.
3445
3446         * assembly.c (mono_assembly_close): Ditto.
3447
3448         * image.c (mono_image_close): Log trace messages with INFO level.
3449
3450         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
3451
3452         * image.c reflection.c: Correct reference counting of image modules.
3453         
3454         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
3455         of this function from the image mempool.
3456         
3457         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
3458         to allow more cached types to be used.
3459
3460         * mono-debug.c (mono_debug_add_method): Appled patch from
3461         David S. Miller  <davem@sunset.davemloft.net>: Access 
3462         minfo->lexical_blocks[] entry elements using read32().
3463
3464 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
3465
3466         * loader.c (mono_free_method): No longer free the method header for non-dynamic
3467         methods as it is allocated from the mempool.
3468
3469         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
3470         image mempool.
3471
3472         * metadata-internals.h: Add comments describing the reference counting scheme
3473         used for MonoImage and MonoAssembly.
3474
3475         * image.c assembly.c reflection.c: Rework reference counting of images and 
3476         assemblies so they are freed when the runtime is shut down. Free some 
3477         additional memory structures when an image is unloaded.
3478         
3479 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
3480
3481         * class.c loader.c reflection.c: Allocate more data structures in
3482         the image mempool.
3483
3484 2006-03-31  Miguel de Icaza  <miguel@novell.com>
3485
3486         * icall.c
3487         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
3488         build on pre glib 2.4 systems.
3489
3490 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
3491
3492         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
3493
3494         * icall.c: Fix some warnings.
3495
3496 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
3497
3498         * culture-info-table.h : regenerated.
3499
3500 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
3501
3502         * threads.c, object-internals.h, verify.c: changed the culture caching
3503         code to use a normal MonoArray for storage so the GC can keep track of
3504         them easily. Fixed bits of the cache logic, too and simplified the
3505         code.
3506
3507 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
3508
3509         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
3510         thread for non-Boehm GCs.
3511
3512 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
3513
3514         * domain.c, object.c, domain-internals.h: reduce the amount of memory
3515         needed to keep track of the data for static fields.
3516
3517 2006-03-29  Raja R Harinath  <rharinath@novell.com>
3518
3519         Fix #75172
3520         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
3521         for interface classes.  Use 'num_methods' instead.
3522         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
3523         before using '->vtable_size' field.
3524
3525 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3526
3527         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
3528         doesn't contain managed pointers, so use a normal hashtable.
3529
3530 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
3531
3532         * reflection.c, class-internals.h, domain.c: fixed handling of types
3533         used as values for objects in custom attributes (bug #77915):
3534
3535 2006-03-24  Martin Baulig  <martin@ximian.com>
3536
3537         * class.c (mono_class_setup_fields): Added support for generic
3538         instances; fixes #77580.
3539
3540 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3541
3542         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
3543
3544 2006-03-24  Dick Porter  <dick@ximian.com>
3545
3546         * file-io.c (get_file_attributes): More stat macro breakage.
3547         Fixes bug 77759.
3548
3549 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
3550
3551         * profiler.c: added the file=filename option in the default profiler
3552         to output the profile data to filename.
3553
3554 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3555
3556         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
3557         bug #77877.
3558
3559 2006-03-22  Martin Baulig  <martin@ximian.com>
3560
3561         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
3562         allocated `MonoClassField *' in `fb->handle'.
3563
3564 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3565
3566         * class.c, image.c, metadata-internals.h: implemented new mechanism to
3567         allocate interface ID to save memory and allow better ID reuse on
3568         appdomain unload. setup_generic_vtable () removal from Martin.
3569
3570 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3571
3572         * object.h, appdomain.c, domain.c, exception.c, icall.c,
3573         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
3574         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
3575         write barriers for reference stores with managed objects accessed with
3576         C structures in the runtime and in embedding programs.
3577
3578 2006-03-20  Raja R Harinath  <rharinath@novell.com>
3579
3580         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
3581         'interface_id' and 'max_interface_id' fields of MonoClasses
3582         representing open generic types.
3583
3584 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
3585
3586         * object.h, object.c, icall.c: added functions to deal with
3587         storing valuetypes that contain references in managed objects.
3588         * reflection.c, string-icalls.c, threads.c, marshal.c: small
3589         fixes and comments around uses of mono_array_addr ().
3590
3591 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
3592
3593         * object.h, icall.c, monitor.c: object.GetHashCode ()
3594         implementation that supports the moving garbage collector.
3595
3596 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3597
3598         * icall.c, threads-types.h, threads.c: implemented finalizer for
3599         LocalDataStoreSlot.
3600
3601 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
3602
3603         * metadata.c (mono_type_size): Add a fixme.
3604         (mono_type_stack_size): Ditto.
3605
3606         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
3607         'type_forwarders' field.
3608
3609         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
3610         attribute from net 2.0.
3611
3612         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
3613         from class.c.
3614
3615         * class.c (mono_class_setup_fields): Fix a warning.
3616         
3617         * class.c (mono_class_from_name): Add support for assemblyref entries
3618         in the EXPORTEDTYPE table.
3619
3620         * reflection.c: Add support for handling type forwarders under net 2.0.
3621
3622         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
3623         
3624 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
3625
3626         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
3627         overwriting entries in ModuleBuild->types, also clean up the code
3628         a little. Fixes #77774.
3629
3630 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3631
3632         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
3633         load friend assembly info when present.
3634
3635 2006-03-14  Raja R Harinath  <rharinath@novell.com>
3636
3637         Fix crasher on gtest-158.cs.
3638         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
3639         the return value if the MonoClass we want is yet in an
3640         inconsistent state.
3641         * class.c (mono_class_create_from_typedef): Add an comment
3642         explaining an order dependency between mono_class_setup_parent and
3643         mono_class_setup_mono_type.
3644
3645 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
3646
3647         * class.c: documentation updates and events bug fix.
3648
3649 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
3650
3651         * class.c: some cleanup, locking fixes.
3652
3653 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3654
3655         * class.c: fix the generics code to setup nested
3656         type info to the instantiated type (bug #77770).
3657
3658 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
3659
3660         * marshal.c: fixed a few type correctness issues.
3661
3662 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3663
3664         * loader.c: the Set/Get/Addrtess array methods should be public.
3665
3666 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
3667
3668         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
3669         
3670         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
3671         info->wrapper.
3672
3673 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
3674
3675         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
3676
3677         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
3678
3679         * mempool.c (mono_mempool_alloc): Speed this up a bit.
3680         (mono_mempool_alloc0): Ditto.
3681
3682 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3683
3684         * socket-io.c:
3685         (create_object_from_sockaddr): it was allocating 4 extra bytes
3686         for the AF_UNIX data. Fixes bug #77747.
3687
3688 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
3689
3690         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
3691
3692 2006-03-09  Dick Porter  <dick@ximian.com>
3693
3694         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
3695         Fixes bug 76966 again.
3696
3697 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
3698
3699         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
3700         names from r57532
3701         * appdomain.c: Bumped corlib version to 48 (due to r57532)
3702
3703 2006-03-07  Martin Baulig  <martin@ximian.com>
3704
3705         * object.c
3706         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
3707
3708 2006-03-07  Martin Baulig  <martin@ximian.com>
3709
3710         * class.c
3711         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
3712         regression introduced in r56970; see gtest-252.cs.
3713
3714         * loader.c (mono_get_method_constrained): Correctly handle generic
3715         methods; see gtest-253.cs.
3716
3717 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
3718
3719         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
3720
3721 2006-03-04  Martin Baulig  <martin@ximian.com>
3722
3723         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
3724         compute the parent type at runtime, just like we're already doing
3725         it for interfaces.
3726
3727         * reflection.c
3728         (mono_reflection_bind_generic_parameters): Don't compute the
3729         parent type anymore.
3730
3731         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
3732
3733 2006-03-04  Martin Baulig  <martin@ximian.com>
3734
3735         * mono-debug-debugger.h
3736         (mono_debugger_create_notification_function): Allocate memory at
3737         runtime and return a pointer to it.
3738
3739 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
3740
3741         * assembly.c: Fix windows build.
3742         
3743         * assembly.c: Fix build.
3744
3745         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
3746
3747         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
3748         
3749 2006-03-03  Dick Porter  <dick@ximian.com>
3750
3751         * process.c
3752         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3753         Check parameters before dereferencing them.  Fixes Aaron's part of
3754         bug 77393.
3755
3756 2006-03-03  Raja R Harinath  <rharinath@novell.com>
3757
3758         Fix performance regression.
3759         * loader.c (find_method_in_class): Add 'from_class' argument.
3760         Rename 'klass' argument to 'in_class'.  The signature is compared
3761         against the method in 'in_class', and the corresponding method is
3762         returned from 'from_class'.
3763         (find_method): Walk both 'in_class' and 'from_class' in parallel.
3764         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
3765         type definition and generic instantiation in parallel.
3766         (mono_get_method_constrained): Update to changes.
3767
3768 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3769
3770         * threads.c: make sure the domain is correct, too when doing
3771         mono_thread_attach ().
3772
3773 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
3774
3775         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
3776         windows. Fixes #77683.
3777
3778 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3779
3780         * object.h, *: introduced specific way to set elements of an array
3781         of references to be used as write barrier. Still need to audit the
3782         uses of mono_array_addr.
3783
3784 2006-03-01  Miguel de Icaza  <miguel@novell.com>
3785
3786         * object-internals.h: New field to cache the assmebly name, patch
3787         from Tambet Ingo (tambet@ximian.com)
3788
3789 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
3790
3791         * decimal.h, class-internals.h, metadata-internals.h,
3792         file-io.h: mark a few function declarations as internal, to
3793         reduce the number of PLT entries.
3794
3795 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3796
3797         * file-io.c: fix typo in warning message.
3798
3799 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
3800
3801         * loader.c: on unix, lookup the "*A" version of a function
3802         if charset is auto as a second option before failing.
3803
3804 2006-02-28  Raja R Harinath  <rharinath@novell.com>
3805
3806         * class.h (mono_class_inflate_generic_method): Revert to two
3807         argument version.
3808         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
3809         (mono_class_inflate_generic_method_full): Add.
3810         * class.c (mono_class_inflate_generic_method_full): Rename from
3811         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
3812         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
3813         * loader.c, reflection.c: Update to changes.
3814
3815 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
3816
3817         * icall.c: const fixes and small improvements.
3818
3819 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3820
3821         * threadpool.c: for asynchronous connect(), enable the same workaround
3822         for BSD 6 as for the Mac. Fixes bug #77637.
3823
3824 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
3825
3826         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
3827         formatted classes. Fixes #77524.
3828
3829 2006-02-24  Raja R Harinath  <rharinath@novell.com>
3830
3831         * class.c (inflate_generic_type): Add a couple more
3832         micro-optimizations.
3833         (inflate_generic_context): Don't use the 'gmethod' from
3834         'inflate_with'.
3835         (mono_class_inflate_generic_method): If the method has generic
3836         parameters, but the passed-in context doesn't have a 'gmethod',
3837         create one.  Use the possibly simplified generic instantiation
3838         from the declaring class instead of the one passed in.
3839
3840 2006-02-24  Raja R Harinath  <harinath@gmail.com>
3841
3842         Make generic method signature and method header handling lazy.
3843         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
3844         (inflate_generic_header): Likewise.
3845         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
3846         parameter to avoid inflating types.
3847         (mono_get_inflated_method): Empty out.
3848         * class.h (mono_class_inflate_generic_method): Update to changes.
3849         * loader.c (mono_get_method_from_token): Don't parse signature for
3850         generic methods, nor methods of generic classes.
3851         (mono_method_signature): Rename from 'mono_method_signature'.
3852         Inflate signature on demand.
3853         (mono_method_get_header): Inflate method header on demand.
3854         * reflection.c: Update to changes.
3855
3856 2006-02-23  Raja R Harinath  <rharinath@novell.com>
3857
3858         * metadata.c (mono_metadata_inflate_generic_inst): If the
3859         instantiation is closed, don't bother expanding it in the new
3860         context.
3861         * class.c (inflate_generic_class): If the generic instantiation
3862         doesn't change after inflation, return the argument itself.
3863         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
3864         Add bounds checks.
3865         (inflate_generic_context): If neither the generic class nor the
3866         generic method instantiations change, return the original context.
3867         * reflection.c (mono_method_get_object): Do
3868         'mono_get_inflated_method' before accessing the ->klass field.
3869         (inflate_mono_method): Don't create a MonoGenericMethod unless
3870         necessary.
3871         (inflate_method): Don't pass a constructed type as the declaring
3872         type of a methodbuilder.
3873
3874 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
3875
3876         * object.c: fix memory overwrite.
3877
3878 2006-02-22  Dick Porter  <dick@ximian.com>
3879
3880         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
3881         it doesn't work any more.
3882         (mono_threads_request_thread_dump): Fix unused variable warnings.
3883
3884 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3885
3886         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
3887         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
3888         the public header file.
3889
3890 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
3891
3892         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
3893
3894 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3895
3896         * class-internals.h, object.c: reduce the size of MonoVTable
3897         and store the interface_offsets array at negative offsets.
3898
3899 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
3900
3901         * metadata.c: tweak table descriptors data structures to reduce
3902         size and runtime relocations.
3903
3904 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3905
3906         * marshal.c: fix some types and opcodes to be type-safe
3907         in marshaling wrappers.
3908
3909 2006-02-21  Ankit Jain  <jankit@novell.com>
3910
3911         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
3912
3913 2006-02-21  Raja R Harinath  <rharinath@novell.com>
3914
3915         * metadata.c (get_constraints): Relax debugging checks for monodis.
3916
3917 2006-02-21  Ankit Jain  <jankit@novell.com>
3918
3919         * metadata.c (mono_metadata_load_generic_params): Move the code
3920         checking for ambiguous generic params from here to mono/dis/get.c
3921         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
3922
3923 2006-02-21  Raja R Harinath  <harinath@gmail.com>
3924
3925         Fix assertion triggered when compiling nemerle.
3926         * class.c (mono_get_shared_generic_inst): Rename from
3927         get_shared_inst and make non-static.
3928         * loader.c (mono_get_shared_generic_method): New.  Used to create
3929         the MonoGenericContext-equivalent of a MonoGenericContainer.
3930         (mono_get_method_from_token): Initialize the 'context' field of
3931         the created MonoGenericContainer.
3932         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
3933         * metadata.c (get_constraints): Add sanity check.
3934         * class-internals.h: Add new internal methods.
3935
3936         * reflection.c (verify_safe_for_managed_space): New sanity check.
3937         Currently checks that owner-less generic parameters aren't allowed
3938         in managed space.
3939         (mono_type_get_object): Use it.
3940         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
3941         that are now in mono_type_get_object.
3942         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
3943
3944 2006-02-19  Raja R Harinath  <harinath@gmail.com>
3945
3946         * metadata.c (mono_type_create_from_typespec): Rename from
3947         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
3948         argument and caching of types in the generic container.
3949         (unwrap_arrays, find_generic_param): Remove.
3950         * metadata-internals.h: Update.
3951         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
3952
3953 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
3954
3955         * class.c (mono_class_get_exception_for_failure): Fix a warning.
3956
3957         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
3958         return values. Fixes #77581.
3959
3960         * class.c (mono_fnptr_class_get): Switch name and name_space.
3961
3962         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
3963         classes and add support for [In, Out] attributes.
3964         (mono_marshal_free_asany): Ditto. Fixes #77524.
3965
3966 2006-02-18  Raja R Harinath  <harinath@gmail.com>
3967
3968         * class.c (mono_class_from_generic_parameter): Make more robust to
3969         incomplete MonoGenericContainers from monodis.
3970
3971 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3972
3973         * class-internals.h: added some more exception types.
3974         * class.c, metadata.c: added a few checks to handle missing
3975         types.
3976
3977 2006-02-17  Raja R Harinath  <rharinath@novell.com>
3978
3979         Use owner-less generic-params some more.
3980         * class.c (my_mono_class_from_generic_parameter): Remove.
3981         (mono_class_from_generic_parameter): Handle null image,
3982         param->name and param->owner.
3983         (mono_class_from_mono_type): Update.
3984         (mono_class_create_from_typespec): Remove 'container' parameter.
3985         If that parameter is non-null, the result is always inflated by
3986         'mono_class_get_full' anyway.
3987         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
3988         parameter.
3989         (mono_class_get_full): Update.
3990
3991         * class.c (inflate_generic_type) [GENERICINST]: If the generic
3992         instance is not open, don't bother inflating.
3993         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
3994         parse metadata for inflated classes.
3995         (_mono_class_get): Change GenericContext* parameter to
3996         GenericContainer*.
3997         (mono_class_create_from_typespec): Likewise.  Simplify, and
3998         implement trivially.  All the cases are handled in
3999         mono_class_from_mono_type.  Don't inflate returned class.
4000         (mono_class_get_full): Delegate GENERICINST optimization to
4001         inflate_generic_type.
4002         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
4003
4004 2006-02-16  Dick Porter  <dick@ximian.com>
4005
4006         * socket-io.c (create_object_from_sockaddr): Fix typo.
4007         (create_sockaddr_from_object): Check array lengths before
4008         potentially accessing items off the end.
4009         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
4010         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
4011         (ves_icall_System_Net_Sockets_Socket_Send_internal)
4012         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
4013         length checks to avoid wraparound overflows.
4014         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
4015         contents of the array of sockets
4016         (hostent_to_IPHostEntry2)
4017         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
4018         Check return value of inet_ntop ().
4019         (addrinfo_to_IPHostEntry): Fix typo
4020
4021 2006-02-16  Raja R Harinath  <rharinath@novell.com>
4022
4023         Type metadata parsing doesn't use generic-instantiation information.
4024         * metadata.c (mono_metadata_parse_array_full): Change
4025         MonoGenericContext* parameter to MonoGenericContainer*.
4026         (mono_metadata_parse_type_full): Likewise.
4027         (mono_type_create_from_typespec_full): Likewise.
4028         (mono_metadata_parse_mh_full): Likewise.
4029         (mono_metadata_parse_generic_inst): Likewise.
4030         (do_mono_metadata_parse_generic_class): Likewise.
4031         (do_mono_metadata_parse_type): Likewise.
4032         * metadata-internals.h: Update to changes.
4033         * class.c (mono_class_find_enum_basetype): Likewise.
4034         (mono_class_setup_fields): Likewise.
4035         (mono_class_create_from_typespec): Likewise.
4036         * loader.c (method_from_methodspec): Likewise.
4037         (mono_get_method_from_token): Likewise.
4038         (mono_method_get_header): Likewise.
4039
4040 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4041
4042         * marshal.c: handle additional GENERICINST case (patch from
4043         Thong Nguyen <tum@veridicus.com>).
4044         Fix a few cases where LDIND_I/STIND_I was used for references.
4045
4046 2006-02-16  Raja R Harinath  <rharinath@novell.com>
4047
4048         * reflection.c (mono_reflection_get_token): Remove unused variable.
4049
4050 2006-02-16  Martin Baulig  <martin@ximian.com>
4051
4052         * reflection.c (mono_reflection_get_token): Add support for fields
4053         in instantiated generic types.
4054
4055         * icall.c
4056         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
4057
4058 2006-02-15  Martin Baulig  <martin@ximian.com>
4059
4060         * icall.c
4061         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
4062         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
4063         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
4064         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
4065
4066 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4067
4068         * class.c, metadata.c, metadata.h, object.c, icall.c,
4069         marshal.c: changed mono_type_get_underlying_type () to do
4070         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
4071         Fixed handling of instantiated generic valuetypes (bug #75479).
4072
4073 2006-02-15  Raja R Harinath  <rharinath@novell.com>
4074
4075         * metadata.c (mono_metadata_decode_signed_value): Simplify.
4076         Delegate to mono_metadata_decode_value, and work on the returned value.
4077
4078         * icall.c (ves_icall_MonoType_GetGenericArguments):
4079         Add consistency check here too.
4080         
4081 2006-02-15  Ankit Jain  <jankit@novell.com>
4082
4083         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
4084         char/short etc.
4085
4086 2006-02-15  Ankit Jain  <jankit@novell.com>
4087
4088         * metadata.c (mono_metadata_decode_signed_value): New function to decode
4089         signed values, used only for representing lower bounds of arrays.
4090         (mono_metadata_parse_array_full): Use new
4091         mono_metadata_decode_signed_value to decode lower bounds.
4092
4093 2006-02-14  Martin Baulig  <martin@ximian.com>
4094
4095         * reflection.c
4096         (mono_reflection_get_token): Support "MonoGenericMethod" and
4097         "MonoGenericCMethod" and allow generic instances / methods.
4098
4099 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
4100
4101         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
4102         to obtain the terminal size using an ioctl.
4103
4104         * object.c (mono_nullable_init): Revert this as nullable reference
4105         types are not valid.
4106         (mono_nullable_box): Ditto.
4107
4108 2006-02-09  Dick Porter  <dick@ximian.com>
4109
4110         * threads.c (mono_thread_detach): Drop a reference to the thread
4111         we're detaching.
4112
4113 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
4114
4115         * object.c (mono_nullable_init): Handle nullable reference types.
4116         (mono_nullable_box): Ditto. Fixes #77446.
4117
4118 2006-02-07  Martin Baulig  <martin@ximian.com>
4119
4120         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
4121
4122 2006-02-07  Ankit Jain  <jankit@novell.com>
4123
4124         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
4125         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
4126         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
4127         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
4128         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
4129         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
4130
4131 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
4132
4133         * class.c (mono_class_create_generic): Set type_token as well.
4134
4135         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
4136         compatible with MS.
4137
4138 2006-02-02  Martin Baulig  <martin@ximian.com>
4139
4140         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
4141         has never been used so far.
4142
4143 2006-02-02  Martin Baulig  <martin@ximian.com>
4144
4145         * mono-debug-debugger.h: Changed comment at the top of this file;
4146         the header is not installed, but it's safe to #include it from
4147         within the JIT.
4148
4149         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
4150         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
4151
4152 2006-02-02  Martin Baulig  <martin@ximian.com>
4153
4154         * mono-debug.h
4155         (MonoSymbolTable): Removed the `metadata_info' field.
4156
4157         * mono-debug.c
4158         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
4159
4160         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
4161         (mono_debugger_add_builtin_types): Removed.
4162         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
4163         (mono_debugger_create_notification_function): We now operate on a
4164         pre-allocated area; take a `gpointer' and return `void'.
4165
4166         * mono-debug-debugger.c
4167         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
4168         (mono_debugger_add_builtin_types): Removed.
4169
4170 2006-02-02  Martin Baulig  <martin@ximian.com>
4171
4172         * threads.c (mono_debugger_create_all_threads): New public method.
4173
4174 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4175
4176         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
4177         breaks on several platforms.
4178
4179 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
4180
4181         * assembly.c: the VS.NET build doesn't supply default values for
4182         MONO_ASSEMBLIES and MONO_CFG_DIR.
4183
4184 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
4185
4186         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
4187         helper function.
4188
4189         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
4190
4191         * loader.c (method_from_memberref): Fix a warning.
4192
4193         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
4194
4195         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
4196         with explicit layout. Fixes #77433.
4197
4198 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
4199
4200         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
4201         max_interface_id is initialized before using it. Fixes #77398.
4202         (ves_icall_Type_GetInterfaces): Ditto.
4203
4204 2006-01-30  Raja R Harinath  <rharinath@novell.com>
4205
4206         * metadata.c (mono_metadata_parse_method_signature_full): Don't
4207         allocate memory for parameter attributes when parsing memberref
4208         signatures.
4209         * loader.c (mono_loader_set_error_method_load): Don't warn.
4210         (method_from_memberref): Ensure MissingMethodException gets thrown
4211         if method is not found.  Make warning more informative.
4212
4213 2006-01-29  Raja R Harinath  <harinath@gmail.com>
4214
4215         Fix #77397
4216         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
4217         return true if is byref.
4218         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4219         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
4220         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4221
4222 2006-01-27  Raja R Harinath  <rharinath@novell.com>
4223
4224         Fix tests/find-method.2.il
4225         * loader.c (find_method, find_method_in_class): Remove is_inflated
4226         argument.  Revert 2006-01-18 change.
4227         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
4228         is generic, search for method in its generic definition.
4229         * class.c (mono_class_setup_vtable_general): Print generic
4230         arguments of generic types in debugging printf.
4231
4232 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
4233
4234         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
4235
4236         * threads.c (mono_threads_request_thread_dump): New helper function.
4237
4238 2006-01-25  Raja R Harinath  <rharinath@novell.com>
4239
4240         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
4241
4242 2006-01-25  Ankit Jain  <jankit@novell.com>
4243
4244         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
4245         move definition to ..
4246         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
4247         
4248 2006-01-25  Ankit Jain  <jankit@novell.com>
4249             Raja R Harinath  <rharinath@novell.com>
4250
4251         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
4252         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
4253         as necessary.
4254
4255 2006-01-25  Martin Baulig  <martin@ximian.com>
4256
4257         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
4258         `MonoDebuggerThread' into debug-debugger.c.
4259
4260 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4261
4262         * profiler.c: fix printing of data.
4263
4264 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
4265
4266         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
4267           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
4268
4269 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4270
4271         * object.c: fix deadlock related to string interning.
4272
4273 2006-01-23  Martin Baulig  <martin@ximian.com>
4274
4275         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
4276
4277         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
4278
4279 2006-01-23  Martin Baulig  <martin@ximian.com>
4280
4281         * mono-debug.h: Moved the prototypes of some functions which are
4282         used by the JIT here from mono-debug-debugger.h.
4283
4284 2006-01-21  Martin Baulig  <martin@ximian.com>
4285
4286         * Makefile.am: Don't install mono-debug-debugger.h.
4287
4288 2006-01-21  Martin Baulig  <martin@ximian.com>
4289
4290         * mono-debug-debugger.h: Enforce the private status of this header
4291         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
4292         Moved some stuff from mono-debugger-jit-wrapper.h here.
4293
4294 2006-01-20  Raja R Harinath  <rharinath@novell.com>
4295
4296         * class.c (mono_class_from_typeref): Add a sanity test to help
4297         catch lack of assembly load/search hooks.
4298
4299 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
4300
4301         * marshal.c (emit_struct_conv): Relax the fields with same offset
4302         check even more. Fixes #77230.
4303
4304 2006-01-18  Martin Baulig  <martin@ximian.com>
4305
4306         * loader.c (find_method_in_class): Added `gboolean is_inflated'
4307         argument; if false, we compare the uninstantiated signatures.
4308         (method_from_memberref): Compare the uninstantiated signatures;
4309         fixes #76417.
4310
4311 2006-01-18  Robert Jordan  <robertj@gmx.net>
4312
4313         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
4314         Clear the weak link. Fixes bug #77170.
4315
4316         * gc.c (mono_gchandle_free):
4317         Reflect *-gc.c changes (tiny optimization).
4318
4319 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
4320
4321         * metadata.c (mono_metadata_signature_dup): Applied patch from
4322         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
4323         Fixes #77288.
4324
4325 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
4326
4327         * marshal.c (emit_struct_conv): Allow fields with the same offset when
4328         marshalling from native to managed code. Fixes #77230.
4329
4330 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4331
4332         * threadpool.c: fix problem (Mac only) when more than one asynchronous
4333         connect. Fixes bug #77020.
4334
4335 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4336
4337         * class.c: fixed id assignement for nested interfaces (bug #77275).
4338         Added also better info for --print-vtable debugging.
4339
4340 2006-01-12  Martin Baulig  <martin@ximian.com>
4341
4342         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
4343         interfaces on-the-fly; fixes #76625.
4344
4345         * class-internals.h
4346         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
4347         don't need that anymore.
4348
4349 2006-01-12  Miguel de Icaza  <miguel@novell.com>
4350
4351         * socket-io.c
4352         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
4353         To avoid initing the nested_classes when not needed I turned the
4354         PeerCredData as a toplevel internal class, as it has to be shared
4355         anyways. 
4356
4357         Fixes the CASA issue.
4358
4359 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
4360
4361         * domain.c: Accessors for MonoJitInfo
4362
4363         * profiler-private.h: Add jitinfo to the end jit hook
4364
4365         * profiler.[ch]: Define new hooks, called after jitting which give
4366         the MonoJitInfo that was compiled
4367
4368 2006-01-10  Martin Baulig  <martin@ximian.com>
4369
4370         * class.c (mono_class_setup_events): Add support for generic
4371         classes; fixes #76440.
4372
4373 2006-01-06  Raja R Harinath  <rharinath@novell.com>
4374
4375         Fix #77160.
4376         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
4377         on passed-in method.
4378
4379 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
4380
4381         * object.c (mono_runtime_invoke_array): Add Nullable support.
4382
4383         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
4384
4385 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
4386
4387         * file-io.c: Don't consider sockets as directory and avoid an endless
4388         loop. Fix bug #76966.
4389
4390 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * object.c (mono_nullable_init): New helper function.
4393         (mono_nullable_box): Ditto.
4394
4395         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
4396
4397         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
4398
4399         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
4400         
4401 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
4402
4403         * class.c (mono_class_is_assignable_from): Make T assignable to 
4404         Nullable<T>.
4405
4406 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
4407
4408         * appdomain.c: Bump corlib version to 46.
4409         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
4410         serialization purpose) and changed ves_icall_System_Reflection_
4411         Assembly_get_code_base signature to accept a boolean (to escape, or 
4412         not, the assembly code base).
4413
4414 2005-12-23  Dick Porter  <dick@ximian.com>
4415
4416         * icall.c: 
4417         * threads-types.h: 
4418         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
4419         CreateEvent icall now returns "created" boolean parameter.
4420
4421 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
4422
4423         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
4424         #76967.
4425
4426         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
4427         when attr_klass is an interface. Fixes #77045.
4428
4429 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
4430
4431         * marshal.c (emit_struct_conv): Fix previous patch.
4432         
4433         * marshal.c (emit_struct_conv): Add a check for fields with the same
4434         offset.
4435
4436 2005-12-20  Raja R Harinath  <rharinath@novell.com>
4437
4438         Fix regression in Mono.C5.
4439         * class.c (mono_class_create_generic): If 'klass' is an interface
4440         set up the interface offsets.
4441         (mono_class_is_assignable_from): Don't throw away generic arguments.
4442
4443 2005-12-19  Raja R Harinath  <rharinath@novell.com>
4444
4445         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
4446         type parameters.
4447
4448 2005-12-15  Raja R Harinath  <rharinath@novell.com>
4449
4450         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
4451         dead store.
4452         (do_mono_metadata_parse_generic_class): Don't pass the current
4453         generic context when parsing the type being instantiated: it
4454         cannot use it, anyway.
4455
4456         * loader.c (method_from_memberref): Don't inflate a signature if
4457         it doesn't contain any type parameters.
4458
4459 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
4460
4461         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
4462
4463 2005-12-14  Martin Baulig  <martin@ximian.com>
4464
4465         * class.c
4466         (mono_type_get_name_recurse): Don't return null for type
4467         parameters and open generic classes.
4468         (mono_class_setup_methods): Don't exclude generic instances.
4469         (mono_get_unique_iid): Use different IDs for different
4470         instantiations of the same generic type.
4471         (mono_class_setup_vtable): Only use setup_generic_vtable() for
4472         open generic instances; create a normal vtable for closed generic
4473         instances.
4474         (mono_class_setup_vtable_general): We're now also called for
4475         closed generic instances.
4476
4477         * reflection.c
4478         (mono_reflection_bind_generic_parameters): Correctly use
4479         mono_metadata_lookup_generic_inst() everywhere.
4480
4481 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
4482
4483         * object.c (mono_class_create_runtime_vtable): Call 
4484         mono_class_setup_vtable ().
4485
4486         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
4487         function.
4488         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
4489         #76959.
4490
4491         * loader.c (mono_loader_set_error_type_load): Print the type load
4492         warnings to the console so they are more visible to the user.
4493         (mono_loader_set_error_method_load): Ditto.
4494
4495         * reflection.c (ensure_runtime_vtable): Revert the last change as it
4496         is still broken.
4497         
4498         * reflection.c (ensure_runtime_vtable): Fix build.
4499
4500         * reflection.c (ensure_runtime_vtable): Disable an optimization which
4501         doesn't work in all cases.
4502
4503 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
4504
4505         * object.c (mono_array_new_full): Treat a single dimensional array
4506         with 0 lower bounds as an szarray. Fixes #76973.
4507
4508         * reflection.c (custom_attr_visible): Really fix this.
4509
4510 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
4511
4512         * reflection.c (custom_attr_visible): Allow nested public attributes
4513         as well.
4514
4515         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
4516         interface check.
4517
4518 2005-12-12  Raja R Harinath  <harinath@gmail.com>
4519
4520         * class.c (set_generic_param_owner): Delete.
4521         (mono_class_create_from_typedef): Don't set ->owner field of
4522         generic parameters to "param containers" of enclosing classes.
4523         * reflection.c (mono_reflection_initialize_generic_parameter):
4524         Likewise.
4525
4526 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
4527
4528         * reflection.c (custom_attr_visible): Fix build.
4529
4530 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
4531
4532         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
4533         private attributes.
4534         
4535         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
4536         handling of null parameter defaults.
4537
4538 2005-12-09  Raja R Harinath  <rharinath@novell.com>
4539
4540         * class.c (mono_class_from_generic_parameter): Don't set
4541         klass->generic_container.
4542         (my_mono_class_from_generic_parameter): Likewise.
4543
4544 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * reflection.c (load_public_key): Fix a warning.
4547         (method_encode_code): Fix unaligned accesses.
4548
4549 2005-12-07  Martin Baulig  <martin@ximian.com>
4550
4551         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
4552
4553         * reflection.c
4554         (write_generic_param_entry): Encode our custom attrs.
4555
4556         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
4557
4558 2005-12-07  Martin Baulig  <martin@ximian.com>
4559
4560         * reflection.c (encode_new_constraint): Removed; we don't use the
4561         `NewConstraintAttribute' anymore.
4562
4563 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
4564
4565         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
4566         not fire a TypeResolve event when Assembly.GetType () is called.
4567
4568 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
4569
4570         Beginning of support for nullable types in the runtime. Parts of
4571         this patch are from Martin.
4572
4573         * appdomain.c (MONO_CORLIB_VERSION): Bump
4574
4575         * domain.c (mono_init_internal): get the nullable type
4576
4577         * class.c (mono_class_is_nullable): New method
4578         (mono_class_get_nullable_param): New mehod
4579         (mono_class_create_generic): In types T? set cast_class to T
4580
4581         * class-internals.h (MonoDefaults): new nullable default class
4582         (mono_class_get_nullable_param, mono_class_get_nullable_param):
4583         new methods.
4584
4585 2005-12-05  Raja R Harinath  <rharinath@novell.com>
4586
4587         * metadata.c (select_container): New.  Refactor code to select the
4588         appropriate GenericContainer given the type of generic parameter
4589         we are looking for.
4590         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
4591         not a MonoGenericContext.  Use select_container.  Update parameters.
4592         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
4593         and MONO_TYPE_MVAR.
4594         (unwrap_arrays): Remove duplicate tests.
4595         (find_generic_param): Rename from 'has_same_context'.  Now walks a
4596         generic instantiated class to find any arguments that are generic
4597         parameters.
4598         (mono_type_create_from_typespec_full): Use find_generic_param to
4599         avoid evicting some generic instantiations from the typespec
4600         cache.
4601
4602 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
4603
4604         * reflection.c: fixed writing of doubles on ARM FPA.
4605
4606 2005-12-02  Robert Jordan  <robertj@gmx.net>
4607
4608         * icall.c: Fixed EventInfo.ReflectedType (#76829).
4609
4610 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4611
4612         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
4613         least on SUSE 10 they are not the same (on debian, they are just the
4614         same thing).
4615
4616 2005-12-01  Raja R Harinath  <rharinath@novell.com>
4617
4618         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
4619         DeclaringType for VARs and MVARs.
4620         * class.c (set_generic_param_owner): Fix initialization of owner
4621         fields.
4622
4623 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
4624
4625         * icall.c: fixed Enum.ToObject() to correctly convert the values.
4626
4627 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4628
4629         * threadpool.c: workaround for a bug that shows up on the Mac:
4630         select()+connect() on a blocking socket is not like it should
4631         be, so we proceed to connect() in that case, wasting the I/O
4632         threadpool thread until connect succeedes. Fixes bug #75436.
4633
4634 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4635
4636         * threadpool.c: fix typo when setting file descriptor states.
4637
4638 2005-11-28  Raja R Harinath  <rharinath@novell.com>
4639
4640         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
4641         * metadata.c (mono_metadata_parse_method_signature_full): Don't
4642         create a temporary signature container.
4643         (mono_metadata_parse_generic_param): Update to changes.
4644         (mono_type_create_from_typespec_full): Update to changes.
4645         * loader.c (method_from_memberref): Don't use a
4646         MonoGenericContainer while parsing a memberref signature.
4647         (method_from_methodspec): Remove dead-store of the 'container'
4648         variable.  It's overwritten before use.
4649
4650         * metadata.c (mono_type_create_from_typespec_full): Make debugging
4651         checks tighter.
4652         (mono_metadata_parse_generic_param): Likewise.
4653         * loader.c (find_method_in_class): Does not need a
4654         MonoGenericContainer.  Use 'mono_method_signature' rather than
4655         'mono_method_signature_full'.
4656         (find_method, mono_get_method_constrained, method_from_memberref):
4657         Update to changes.
4658
4659         * metadata.c (mono_type_create_from_typespec_full): Ensure that
4660         owner-less generic-parameters are never evicted from the typespec
4661         cache.
4662
4663         * loader.c (method_from_memberref): Don't use the current context
4664         when parsing signatures.
4665         (method_from_methodspec, mono_get_method_from_token): Update to changes.
4666
4667         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
4668         side-effects in g_assert.
4669         * loader.c (mono_get_method_from_token): Resolve klass earlier so
4670         that we don't potentially lose information.
4671
4672 2005-11-26  Dick Porter  <dick@ximian.com>
4673
4674         * icall.c:
4675         * threads.c: icalls to implement basic (ie, not named)
4676         System.Threading.Semaphore.
4677
4678 2005-11-24  Dick Porter  <dick@ximian.com>
4679
4680         * process.c
4681         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
4682         Use GetProcessId() if it's available.
4683
4684 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
4685
4686         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
4687
4688 2005-11-23  Raja R Harinath  <rharinath@novell.com>
4689             Ankit Jain  <jankit@novell.com>
4690
4691         * loader.c (mono_get_method_from_token): Initialize 'method' field
4692         of all generic parameters before parsing the signature.  Remove
4693         code that "fixed"-up MVAR references.
4694
4695 2005-11-23  Ankit Jain  <jankit@novell.com>
4696
4697         * metadata.c (mono_metadata_has_generic_params):
4698         (mono_metadata_load_generic_param_constraints):
4699         (mono_metadata_load_generic_params): Move duplicate code ...
4700         (mono_metadata_get_generic_param_row): ... here. Returns the
4701         first row-id in GenericParam table for a given owner (token).
4702         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
4703         prototype.
4704
4705 2005-11-23  Raja R Harinath  <rharinath@novell.com>
4706             Ankit Jain  <jankit@novell.com>
4707
4708         * metadata.c (mono_metadata_class_equal): Pass signature_only when
4709         comparing VARs too.
4710         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
4711         type->data.generic_param only if the type is an MVAR.
4712         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
4713         leak owner-less VARs and MVARs into managed space.
4714
4715 2005-11-21  Martin Baulig  <martin@ximian.com>
4716
4717         * class-internals.h
4718         (MonoMethod): Moved the `generic_container' here from
4719         `MonoMethodNormal' since we now also need it for
4720         `MonoMethodPInvoke';
4721         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
4722         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
4723         an union containing both `MonoMethodNormal' and
4724         `MonoMethodPInvoke'.
4725
4726         * loader.c
4727         (mono_get_method_from_token): Allow implementing generic methods
4728         as interncalls.
4729
4730         * threads.c
4731         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
4732         icall.
4733
4734 2005-11-17  Dick Porter  <dick@ximian.com>
4735
4736         * icall.c: 
4737         * process.h: 
4738         * process.c: Split the Process Start_internal icall into
4739         ShellExecuteEx_internal and CreateProcess_internal, which are
4740         called depending on whether UseShellExecute is true.  Fixes bug
4741         76670.
4742
4743         * appdomain.c (MONO_CORLIB_VERSION): Incremented
4744
4745 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
4748         'msize' parameters, use the information in 'mspec' instead.
4749         (emit_object_to_ptr_conv): Ditto.
4750
4751         * marshal.c (emit_struct_conv): Handle explicit layout structs with
4752         fields out of order. Fixes #76733.
4753
4754 2005-11-17  Ankit Jain  <jankit@novell.com>
4755
4756         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
4757
4758 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
4759
4760         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
4761           bug #76575.
4762
4763 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
4764
4765         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
4766         for types with non-auto layout. Fixes #76717.
4767
4768 2005-11-16  Ankit Jain  <jankit@novell.com>
4769
4770         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
4771         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
4772         if generic_context is null.
4773           (mono_metadata_generic_param_equal): param->owner can be null.
4774           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
4775         null.
4776
4777 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
4778
4779         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
4780         the correct value.
4781
4782 2005-11-15  Martin Baulig  <martin@ximian.com>
4783
4784         * object.c (set_value): Use mono_class_from_mono_type() instead of
4785         the hack for generic instances; fixes #76136.
4786
4787 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
4788
4789         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
4790         fields.
4791
4792         * image.c (load_metadata_ptrs): Initialize the new fields.
4793
4794         * reflection.c (create_dynamic_mono_image): Ditto.
4795
4796         * reflection.c (build_compressed_metadata): Use the new fields.
4797
4798         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
4799         icall.
4800
4801         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
4802         icall.
4803         
4804 2005-11-15  Ankit Jain  <jankit@novell.com>
4805             Raja R Harinath  <harinath@gmail.com>
4806
4807         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
4808         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
4809         new per-generic_container cache if the cached MonoType's context matches
4810         the current context.
4811           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
4812         to the expected context.
4813           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
4814
4815 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4816
4817         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
4818         we changed the signature of an icall.
4819         * icall.c: Modify to mono_double_ParseImpl return true/false 
4820         depending on the success, instead of throwing the exception. This will
4821         help us in Double.TryParse methods.
4822         
4823 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
4824
4825         * marshal.c (emit_marshal_object): Throw an exception when
4826         marshalling 'object' instead of crashing. Fixes #76696.
4827
4828 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
4829
4830         * class-internals.h: Add prototype for mono_type_get_full_name ().
4831
4832 2005-11-11  Dick Porter  <dick@ximian.com>
4833
4834         * threads.c (mono_thread_manage): Make sure the main thread has
4835         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
4836
4837 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
4838
4839         * loader.c (mono_loader_set_error_type_load): Log a warning to the
4840         console about the missing type.
4841         (mono_loader_set_error_method_load): Ditto.
4842
4843 2005-11-09  Miguel de Icaza  <miguel@novell.com>
4844
4845         * mono-config.c (mono_get_config_dir): Set the system defaults if
4846         none is specified.
4847
4848         * assembly.c (mono_set_dirs): New API entry point to set the
4849         assembly and the config directory in one call
4850
4851 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
4852
4853         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
4854         the ftnptr was created from a delegate in a domain other than the
4855         current domain. Fixes #75377.
4856
4857         * exception.h exception.c: Add mono_get_exception_not_supported ().
4858
4859 2005-11-08  Martin Baulig  <martin@ximian.com>
4860
4861         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
4862
4863 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
4864
4865         * security-manager.h: Added definitions to deal with strongname key 
4866         pairs bigger (and smaller) than 1024 bits.
4867         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
4868         adjust wrt the public key length being used.
4869
4870 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
4871
4872         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
4873           Windows build (r51396-51397).
4874
4875 2005-11-03  Martin Baulig  <martin@ximian.com>
4876
4877         * class.c (mono_class_setup_vtable_general): Also add generic
4878         methods to the vtable; fixes #76581.
4879
4880 2005-11-01  Miguel de Icaza  <miguel@novell.com>
4881
4882         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
4883         sure that we lookup GetString method from the System.Text.Encoding
4884         class, not the derived class or we get an empty method.
4885
4886         Fixed class #76612.
4887
4888 2005-10-25  Miguel de Icaza  <miguel@novell.com>
4889
4890         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
4891         if it has been previously set (embedders). 
4892
4893         Make mono_set_rootdir available also on Unix.
4894
4895 005-10-24  Robert Jordan  <robertj@gmx.net>
4896
4897         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
4898
4899 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
4900
4901         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
4902         only calls which are made to native code use this flag.
4903
4904         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
4905
4906 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
4907
4908         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
4909         Add support for FieldBuilders.
4910
4911 2005-10-29  Martin Baulig  <martin@ximian.com>
4912
4913         * mono-debug.c
4914         (mono_debug_using_mono_debugger): New public method; returns
4915         whether we're running inside the debugger.
4916
4917 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
4918
4919         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
4920         for Method/Constructor/FieldBuilders.
4921
4922 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * reflection.c (module_add_cattrs): Save custom attributes for global methods
4925         and fields as well.
4926
4927 2005-10-26  Martin Baulig  <martin@ximian.com>
4928
4929         * mono-debug-debugger.c
4930         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
4931
4932 2005-10-24  Raja R Harinath  <harinath@gmail.com>
4933
4934         * icall.c (base64_to_byte_array): Don't pass an out-of-range
4935         integer to isspace.
4936
4937 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
4938
4939         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
4940         when passing valuetypes byref. Fixes #76502.
4941
4942 2005-10-19  Jackson Harper  <jackson@ximian.com>
4943
4944         * profiler.c: Don't put a . in front of types that are not in a
4945         namespace.
4946
4947 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
4948
4949         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
4950
4951 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
4952
4953         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
4954         #76436.
4955         (mono_marshal_get_ldflda_wrapper): Fix a warning.
4956
4957 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4958
4959         * assembly.c metadata-internals.h icall.c: Define an additional
4960         parameter for mono_assembly_name_parse_full, so we can avoid creating
4961         S.R.AssemblyName.Version when no version info wasn't passed.
4962         
4963 2005-10-09  Miguel de Icaza  <miguel@novell.com>
4964
4965         * class.c (mono_type_get_full_name): Reimplement method that was
4966         removed. 
4967
4968         * image.c: Some docs
4969
4970 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
4971
4972         * profiler.c (output_newobj_profile): Fix printing of Total memory
4973         on x86.
4974
4975 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
4976
4977         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
4978
4979 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
4980
4981         * threads.c: remove debug output.
4982
4983 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
4984
4985         * threads.c (mono_thread_manage): Fix crashes if more than 64
4986         threads need to be aborted. Hopefully fixes #75899.
4987
4988         * assembly.c (mono_stringify_assembly_name): New helper function.
4989
4990         * class.c: Use mono_stringify_assembly_name instead of the similar
4991         static function.
4992
4993         * assembly.h assembly.c: Add support for calling a postload search 
4994         hook if an assembly cannot be loaded.
4995
4996         * appdomain.c: Register new search hooks which call the AssemblyResolve
4997         events in AppDomain. Fixes #75231
4998
4999 2005-10-07  Martin Baulig  <martin@ximian.com>
5000
5001         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
5002         methods without debug info.
5003
5004 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
5005
5006         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
5007         wrappers.
5008
5009 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5010
5011         * file-io.c: now that we return symlinks, use lstat and, when the file
5012         is a symbolic link, stat, to get the file attributes. Also avoid the
5013         conversion to/from utf16/external.
5014
5015 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
5016
5017         * class.c (mono_class_layout_fields): Compute klass->has_references
5018         correctly if an embedded valuetype is not yet initialized. Fixes
5019         #76331.
5020
5021 2005-10-04  Martin Baulig  <martin@ximian.com>
5022
5023         * metadata.c
5024         (mono_metadata_load_generic_param_constraints): New public
5025         function; splitted the constraints loading out from
5026         mono_metadata_load_generic_params().
5027
5028         * class.c (mono_class_create_from_typedef): Call
5029         mono_metadata_load_generic_param_constraints() after setting up
5030         the type and creating our parent; fixes #75329.
5031
5032 2005-10-04  Martin Baulig  <martin@ximian.com>
5033
5034         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
5035         non-dynamic parent classes.
5036
5037 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
5038
5039         * file-io.c : win32 build fix (ETXTBSY seems not found).
5040
5041 2005-10-04  Martin Baulig  <martin@ximian.com>
5042
5043         * reflection.c
5044         (mono_image_get_methodspec_token): Make the cache actually work;
5045         fixes #75974.
5046
5047 2005-10-04  Martin Baulig  <martin@ximian.com>
5048
5049         * class.c (mono_class_name_from_token): Removed the unneccessary
5050         `MonoGenericContext *' argument.
5051
5052 2005-10-04  Martin Baulig  <martin@ximian.com>
5053
5054         * loader.c
5055         (method_from_methodspec): Make the caching work again; fixes the
5056         performance regression from #76262.
5057
5058 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5059
5060         * file-io.c:
5061         * file-io.h:
5062         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
5063         GetFileSystemEntries that performs the same work but without going
5064         into io-layer, locking, etc.
5065
5066 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
5067
5068         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
5069         ThreadState_Stopped as well. Fixes #76047.
5070
5071 2005-09-29  Martin Baulig  <martin@ximian.com>
5072
5073         * class.c
5074         (inflate_generic_context): If the new context has a `gmethod', set
5075         its `container' that that gmethod's `container'.
5076
5077         * metadata.c
5078         (mono_metadata_parse_generic_param): Simplify things;
5079         `generic_container = generic_context->container;' is just fine.
5080
5081         * loader.c (method_from_methodspec): Code cleanups.
5082
5083 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
5084
5085         * decimal.c: fix warning (and let gcc generate correct
5086         code on ARM with optimizations).
5087
5088 2005-09-28  Martin Baulig  <martin@ximian.com>
5089
5090         * loader.c
5091         (method_from_memberref): Added `MonoGenericContext *class_context'
5092         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
5093         (method_from_methodspec): If we're a memberref, use the enclosing
5094         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
5095
5096 2005-09-28  Martin Baulig  <martin@ximian.com>
5097
5098         * object.c (mono_runtime_invoke_array): Added support for
5099         MONO_TYPE_GENERICINST; fixes #75917.
5100
5101 2005-09-27  Martin Baulig  <martin@ximian.com>
5102
5103         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
5104         `k->byval_arg.type' to determine the actual type.
5105
5106         * loader.c (method_from_methodspec): Removed some hacks.
5107
5108 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
5109
5110         * class-internals.h (mono_field_is_deleted): Do the test for
5111         rtspecialname before we check the actual name of the field. This
5112         prevents us from dereferencing a pointer into the string table,
5113         saving us from accessing a few pages
5114
5115         * *.c: Replace the use of {Enter,Leave}CriticalSection with
5116         macros. This will allow a deadlock debugger to easily be plugged
5117         in.
5118
5119 2005-09-27  Martin Baulig  <martin@ximian.com>
5120
5121         * loader.c (method_from_methodspec): Create a "signature"
5122         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
5123
5124 2005-09-27  Martin Baulig  <martin@ximian.com>
5125
5126         * class.c
5127         (inflate_generic_class): Correctly set the new context's
5128         container.
5129
5130         * loader.c
5131         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
5132         instead of a `MonoGenericContext *'.
5133         (mono_method_signature_full): Take a `MonoGenericContainer *'
5134         instead of a `MonoGenericContext *'.
5135
5136         * metadata.c
5137         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
5138         instead of a `MonoGenericContext *'.
5139         (mono_metadata_parse_method_signature_full): Likewise.
5140
5141 2005-09-26  Martin Baulig  <martin@ximian.com>
5142
5143         * class.c
5144         (mono_class_from_generic_parameter): Set `klass->generic_container'
5145         (mono_class_from_generic_parameter): Likewise.
5146         (mono_bounded_array_class_get): We inherit the generic container
5147         from the element class.
5148
5149         * loader.c
5150         (find_method, find_method_in_class): Take a `MonoGenericContext *'
5151         argument rather than computing it here.
5152         (method_from_memberref): Correctly set the generic context before
5153         parsing the signature.  Fixes #75681.
5154
5155 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
5156
5157         * object.c (mono_class_has_special_static_fields): Fix warnings.
5158
5159 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5160
5161         * assembly.c: Add parse_public_key function, to
5162         par the public keys. Also added mono_assembly_name_parse_full,
5163         to define it the parsed key should be freed or not.
5164         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
5165         to parse a long format assembly name.
5166         * metadata-internals.h: Keep mono_assembly_name_parse_full as
5167         private, since calling it to preserve the key requires
5168         freeing it manually.
5169         
5170 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
5171
5172         * locales.c : removed HAVE_ICU part.
5173
5174 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
5175
5176         * object.c (mono_class_create_runtime_vtable): Avoid calling 
5177         field_is_special_static if the klass has no special static fields.
5178
5179         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
5180         (MonoCachedClassInfo): Likewise.
5181
5182         * object.c (mono_class_has_special_static_fields): New helper function.
5183
5184 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5185
5186         * class.c (mono_class_create_from_typedef): Don't call 
5187         interfaces_from_typedef_full for enums.
5188         (mono_class_create_from_typedef): Compute the base types of enums directly
5189         without calling mono_class_setup_fields ().
5190         (mono_class_find_enum_basetype): New helper function.
5191
5192         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
5193         one place inside the string heap.
5194         
5195 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
5196
5197         * class.c: locking fixes, code cleanups, some docs added.
5198         Allocate some data structures in the image mempool.
5199
5200 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5201
5202         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5203         the example code.
5204         
5205 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
5206
5207         * class-internals.h, class.c, reflection.c: reduce memory taken by
5208         MonoClass.
5209
5210 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
5211
5212         * metadata.c, metadata.h, loader.h: documentation updates, code and
5213         API cleanups.
5214
5215 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5216
5217         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
5218         the example code.
5219
5220         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
5221         page faults caused by the runtime while reading metadata.
5222
5223 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5224
5225         * socket-io.c: the field names were changed 3 months ago and no one
5226         realized until bug #76077 got filed!
5227
5228 2005-09-20  Martin Baulig  <martin@ximian.com>
5229
5230         * icall.c (assembly_icalls): Removed some unused debugger icalls.
5231
5232 2005-09-20  Martin Baulig  <martin@ximian.com>
5233
5234         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
5235         write the rank into the class entry.
5236
5237 2005-09-20  Martin Baulig  <martin@ximian.com>
5238
5239         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
5240
5241 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
5242
5243         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5244
5245         * icall.c (custom_attrs_defined_internal): New icall.
5246
5247         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
5248         function.
5249         (mono_custom_attrs_construct_by_type): New helper function.
5250
5251 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
5252
5253         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
5254         terminate the resulting string. Fixes #76123.
5255
5256 2005-09-16  Martin Baulig  <martin@ximian.com>
5257
5258         * mono-debug.c
5259         (mono_debug_add_method): Ignore inflated methods for the moment.
5260
5261 2005-09-14  Martin Baulig  <martin@ximian.com>
5262
5263         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
5264
5265 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
5266
5267         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
5268         return a success/failure indication.
5269         (mono_metadata_interfaces_from_typedef_full): Ditto.
5270         (get_constraints): Ditto.
5271
5272 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
5273
5274         * marshal.c (emit_marshal_array): Fix handling of null arrays.
5275         
5276         * marshal.c (emit_marshal_array): Add support for returning string
5277         arrays from delegates. Fixes #76063.
5278
5279         * marshal.c: Use the emit_ldloc/stloc macros where possible.
5280
5281 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
5282
5283         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
5284         icall.
5285
5286 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
5287
5288         * reflection.c icall.c: Fix after mono_get_exception_type_load
5289         signature change.
5290
5291         * assembly.c (mono_assembly_get_assemblyref): New helper function.
5292         (mono_assembly_load_reference): Use the new helper.
5293
5294         * class-internals.h (MonoLoaderError): New structure containing 
5295         information about type loading errors.
5296
5297         * class-internals.h loader.c: Add APIs to store per-thread loader
5298         error information.
5299
5300         * loader.c class.c: Set the loader error if needed.
5301
5302         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
5303
5304 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
5305
5306         * decimal.c: fixed to handle the broken ARM fp format.
5307
5308 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
5309
5310         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
5311         broken.
5312
5313 2005-09-06  Martin Baulig  <martin@ximian.com>
5314
5315         * domain.c (supported_runtimes): Added v2.0.50727.
5316
5317 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
5318
5319         * culture-info.h: reduce the size of some structures.
5320
5321 2005-09-05  Martin Baulig  <martin@ximian.com>
5322
5323         Reflect latest API changes in the August CTP.
5324
5325         * icall.c
5326         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
5327         ("MonoType.HasGenericArguments"): Removed.
5328         ("MonoMethod.BindGenericParameters"): Renamed to
5329         "MakeGenericMethod".
5330         ("MethodBuilder.BindGenericParameters"): Renamed to
5331         "MakeGenericMethod".    
5332
5333 2005-09-05  Martin Baulig  <martin@ximian.com>
5334
5335         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
5336
5337 2005-09-05  Martin Baulig  <martin@ximian.com>
5338
5339         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5340
5341         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
5342         generic_container is non-NULL.
5343
5344 2005-09-05  Martin Baulig  <martin@ximian.com>
5345
5346         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5347
5348         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
5349
5350 2005-08-29  Michal Moskal  <malekith@nemerle.org>
5351
5352         * reflection.c (encode_locals,
5353         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
5354         for large generic types.
5355
5356 2005-09-05  Martin Baulig  <martin@ximian.com>
5357
5358         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5359
5360         * class.c (mono_dup_array_type): New public method.
5361         (mono_metadata_signature_deep_dup): New public method.
5362         (dup_type): Correctly duplicate array and function types.
5363
5364 2005-09-05  Martin Baulig  <martin@ximian.com>
5365
5366         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5367
5368         * reflection.c (get_default_param_value_blobs): Handle generic types
5369         and generic methods.
5370
5371 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
5372
5373         * class.c: Fixed error reporting (method/class were inversed) for 
5374         inheritance demands.
5375         * security-manager.c|h: Added the AppDomain when calling the managed
5376         System.Security.SecurityManager.InheritanceDemand method.
5377
5378 2005-09-01  Raja R Harinath  <rharinath@novell.com>
5379
5380         * reflection.c (encode_marshal_blob): 'marshaltype' and
5381         'marshaltyperef' are alternate sources for the custom marshaler
5382         name.
5383
5384 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
5385
5386         * class.c: fix creation of array classes with rank == 1
5387         (patch by Ankit Jain <jankit@novell.com>).
5388
5389 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
5390
5391         * object.c: fix check for creating the bound data for arrays vs
5392         szarrays.
5393
5394 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5395
5396         * object.c: configuration file name is now based on the executable name,
5397         not the image name. Fixes bug #75931.
5398
5399 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
5400
5401         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
5402         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
5403
5404 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
5405
5406         * rand.c: Use wincrypt.h instead of WinCrypt.h.
5407
5408 2005-08-24  Ankit Jain  <jankit@novell.com>
5409             Raja R Harinath  <rharinath@novell.com>
5410
5411         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
5412           called by it recursively.
5413           (mono_class_init): Remove special case in pending_init handling, since it's
5414           superseded by the fix to mono_class_from_typeref.
5415
5416 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
5417
5418         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
5419         BROKEN_THREAD_START stuff.
5420
5421 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
5422
5423         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
5424         trampoline.
5425
5426         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
5427         
5428         * object.c (mono_delegate_ctor): Replace the original function address with
5429         a delegate trampoline.
5430
5431 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
5432
5433         * icall.c: add boolean argument to base64_to_byte_array and 
5434         InternalFromBase64String to control whether a whitespace-only string
5435         is allowed (or should casue a FormatException to be thrown). We need
5436         this as the behavior has changed between MS.NET 1.x and 2.0, and we
5437         to match the MS behaviour in both profiles.
5438         * appdomain.c: Bump corlib version.
5439
5440 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5441
5442         This patch implements a big portion of publisher policy
5443         support, used to bind assembly versions and redirect
5444         one assembly from version A to version B.
5445
5446         * assembly.c:
5447         New GSList loaded_assembly_bindings, for storing the cached
5448         assembly bindings.
5449         (assembly_binding_maps_name): New static function for checking if a 
5450         assembly binding information maps an assembly name.
5451         (mono_assembly_binding_info_free): New function for freeing
5452         assembly binding information resources.
5453         (get_publisher_policy_info): New static function for retrieving 
5454         assembly binding information from a MonoImage.
5455         (compare_versions): New static function for comparing an assembly
5456         binding information data and the version of an assembly name.
5457         (check_policy_versions): New static function for checking if an
5458         assembly binding info mapping an assembly name is valid for it.
5459         (mono_assembly_load_publisher_policy): New static function for
5460         loading the 'policy.major.minor.MyAssembly' image for an assembly
5461         with an assembly name 'aname'.
5462         (mono_assembly_bind_version): New static function for updating
5463         assembly redirection.
5464         (mono_assembly_apply_binding): New static function for applying
5465         assembly binding.
5466         (search_binding_loaded): New static function for searching 
5467         loaded assembly binding infos in the cache domain.
5468         (mono_assembly_load_full): Don't apply assembly binding for
5469         reflection only assemblies.
5470
5471         * metadata-internals.h: Add MonoAssemblyBindingInfo,
5472         which contains information about assembly binding. Also
5473         declare signature for mono_config_parse_publisher_policy ()
5474         function, used to retrieve pub policy info.
5475         
5476         * mono-config.c:
5477         (publisher_policy_start): New static function used to parse publisher 
5478         policy config files.
5479         (publisher_policy_parser): New static MonoParseHandler containing 
5480         the functions used when parsing config files.
5481         (mono_config_parse_publisher_policy): New function for parsing
5482         publisher policy files.
5483         
5484 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
5485
5486         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
5487
5488         * marshal.c (mono_delegate_free_ftnptr): Ditto.
5489
5490         * object.c (mono_get_addr_from_ftnptr): New helper function.
5491
5492         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
5493
5494         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5495
5496 2005-08-19  Dick Porter  <dick@ximian.com>
5497
5498         * threads.c, threads.h, appdomain.c, appdomain.h,
5499         profiler-private.h, monitor.c, object.c, object-internals.h,
5500         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
5501         store the thread ID, so it can hold a 64 bit value if needed.
5502
5503 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
5504
5505         * reflection.c (mono_reflection_create_dynamic_method): Store the
5506         handle class into the method references as well so ldtoken works in
5507         dynamic methods.
5508
5509         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
5510         types.
5511
5512 2005-08-19  Ankit Jain <jankit@novell.com>
5513
5514         Fix #75847.
5515         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
5516           here rather than using the method signature of a arbitrary function
5517           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
5518           two arguments.
5519           Hack done with Harinath.
5520
5521 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5522
5523         * threadpool.c: disable printing stack traces when we get a exception
5524         in a threadpool thread. I need to do more testing to figure out which
5525         cases actually print this. Fixes bug #75828.
5526
5527 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5528
5529         * icall.c: there might be ignored whitespace after the last '='. This
5530         fixes length computation and bug #75840.
5531
5532 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
5533
5534         * assembly.c (mono_assembly_load_full): Consider .exe extension as
5535         well. Fixes #75809.
5536
5537         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
5538         #75784.
5539         
5540         * reflection.c (create_custom_attr_data): Ditto.
5541
5542 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
5543
5544         * locales.c, culture-info.h : removed RegionLCIDMap.
5545         * culture-info-tables.h : regenerated.
5546
5547 2005-08-16  Martin Baulig  <martin@ximian.com>
5548
5549         * class.c (mono_type_get_name_recurse): Small fix.
5550
5551 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
5552
5553         * locales.c : indentation fixie.
5554
5555 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
5556
5557         * object-internals.h,
5558           locales.h,
5559           locales.c,
5560           culture-info.h,
5561           icall.c : added RegionInfo table support.
5562         * culture-info-table.h : regenerated for region support.
5563
5564 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
5565
5566         * reflection.c (resolve_object): handle all kinds of MonoMethod
5567         including generic ones
5568
5569 2005-08-12  Ankit Jain <jankit@novell.com>
5570
5571         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
5572           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
5573
5574 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
5575
5576         * process.c: Don't close a thread handle when it's NULL. This is a
5577         workaround for bug #75733.
5578
5579 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
5580
5581         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
5582
5583 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
5584
5585         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
5586
5587 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5588
5589         * threadpool.c: if a work item in the thread pool has a callback that
5590         catches a exception, don't propagate it after invoking the callback.
5591         Fixes bug #75336.
5592
5593 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
5594
5595         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
5596
5597         * class-internals.h (MonoCachedClassInfo): Add some new fields.
5598
5599         * class.c (mono_class_init): Load field info lazily in the AOT case.    
5600
5601         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
5602
5603 2005-08-03  Ankit Jain  <jankit@novell.com>
5604
5605         Fix #75683.
5606         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
5607           PInvoke calling convention is 0.
5608
5609 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
5610
5611         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
5612         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
5613
5614 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
5615
5616         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
5617         to handle threads not started by the GC (patch by Michael Meeks
5618         <michael.meeks@novell.com>).
5619
5620 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
5621
5622         * reflection.c: Make buffer used in emitting types larger for some
5623         big generic types (patch by Michal Moskal).
5624
5625 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
5626
5627         * mono-debug.c: Fix some (not all) alignment problems.
5628
5629 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5630
5631         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
5632         Invoke mono_image_load_from_data_full passing the refonly
5633         parameter.
5634
5635         * assembly.c
5636         (mono_assembly_open_from_bundle): Add the refonly argument, 
5637         in order to pass it to other methods it calls to.
5638         (do_mono_assembly_open): Add the refonly argument, in order 
5639         to pass it to other methods it calls to.
5640         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
5641         the refonly parameter to it.
5642
5643         * image.c: Add loaded_images_refonly_hash and
5644         loaded_images_refonly_guid_hash to cache the reflection
5645         only loaded images.
5646         (mono_images_init): Initialize the hash tables used for
5647         caching the reflection only images.
5648         (load_modules): Invoke mono_image_open_full passing the refonly
5649         parameter to load the modules the correct way.
5650         (build_guid_table): Add the refonly argument, to re-build the 
5651         correct hash table.
5652         (do_mono_image_open): Added the refonly argument, in order to
5653         define it for the loaded image.
5654         (mono_image_loaded_full): New function, which receives an
5655         additional parameter to look for the image in the refonly or
5656         non-refonly section.
5657         (mono_image_loaded): Updated, using mono_image_loaded_full.
5658         (mono_image_loaded_by_guid_full): The same case that happens
5659         with mono_image_loaded_full.
5660         (mono_image_loaded_by_guid): Likewise.
5661         (register_image): Use the ref_only variable inside MonoImage
5662         to decide in which hash table store the current image.
5663         (mono_image_open_from_data_full): Rename
5664         mono_image_open_from_data to mono_image_open_from_data_full,
5665         adding the refonly argument, to define the ref_only variable 
5666         inside MonoImage.
5667         (mono_image_open_from_data): Return 
5668         mono_image_open_from_data_full.
5669         (mono_image_open_full): Rename mono_image_open to
5670         mono_image_open_full, receiving the new refonly argument,
5671         to pass it to inner methods.
5672         (mono_pe_file_open): Update this function, to open
5673         a MonoImage as a non-refonly image.
5674         (mono_image_close): Use the refonly variable inside
5675         MonoImage to remove the image from the correct caches.
5676
5677         * image.h: Add the signatures of mono_image_open_full,
5678         mono_image_open_from_data_full, mono_image_loaded_full,
5679         mono_image_loaded_by_guid_full.
5680
5681         * metadata-internals.h: Add the ref_only field to 
5682         MonoImage.
5683         
5684 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5685
5686         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
5687         Fix the last behavior, which used to load the assemblies and
5688         extract MonoReflectionAssemblyName information, instead of
5689         extract it from the metadata tables. Needed for Reflection
5690         Only assemblies.
5691         
5692 2005-07-29  Martin Baulig  <martin@ximian.com>
5693
5694         * mono-debug-debugger.c
5695         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
5696         not initialized.
5697
5698         * mono-debug.c
5699         (mono_debug_address_from_il_offset): Check whether we have
5700         debugging support before attempting to take the lock.
5701         (mono_debug_source_location_from_address): Likewise.
5702         (mono_debug_source_location_from_il_offset): Likewise.
5703         (mono_debug_il_offset_from_address): Likewise.
5704         (mono_debug_address_from_il_offset): Likewise.
5705
5706 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
5707
5708         * class.c (mono_class_from_name_case): Add support for dynamic images.
5709         Fixes #75650.
5710
5711         * object.c (mono_class_compute_gc_descriptor): Add a workaround
5712         for #75479.
5713
5714 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
5715         
5716         * reflection.c (mono_method_get_object): Fix warning.
5717
5718 2005-07-28  Martin Baulig  <martin@ximian.com>
5719
5720         * mono-debug.c
5721         (mono_debug_add_wrapper): Also write the wrapper type.
5722
5723 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
5724
5725         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
5726         
5727         * class.c (mono_class_init): Avoid reading nested classes if the AOT
5728         data indicates the class has none.
5729
5730 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
5731
5732         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
5733         loader lock with the debugger lock. Prevents deadlocks for beagle.
5734
5735         Beagle can now run on an smp box for a weekend without any
5736         issues. Woohoo!
5737
5738 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
5739
5740         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
5741         in a module. Fixes #75629.
5742
5743 2005-07-26  Martin Baulig  <martin@ximian.com>
5744
5745         * mono-debug.c (mono_debug_add_wrapper): New static method.
5746         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
5747         interncall or a wrapper.
5748
5749         * mono-debug.h (MonoDebugWrapperData): New public typedef.
5750         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
5751         (MONO_DEBUGGER_VERSION): Bump to 51.
5752
5753         * mono-debug-debugger.c
5754         (mono_debugger_add_type): Removed this empty function.
5755         (mono_debugger_add_method): Likewise.
5756
5757 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
5758
5759         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
5760         before accessing method->slot.
5761
5762 2005-07-21  Jb Evain  <jbevain@gmail.com>
5763
5764         * reflection.c (method_encode_clauses/class): Handle filters clauses.
5765         Fixes #75010.
5766
5767 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
5768
5769         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
5770         #75587.
5771
5772 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
5773
5774         * image.h image.c: Add mono_image_get_guid () API function.
5775
5776 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
5777
5778         There were issues when multiple threads tried to load
5779         assemblies. A deadlock was created between assemblies_mutex and
5780         mono_domain_assemblies_lock. This fixes the issue by making the
5781         assembly ref counting be lock free. See bug 75586.
5782         
5783         * image.c (mono_image_close): The add ref function here was using
5784         Interlocked operations while the unref was using a mutex and a
5785         --. I don't think this was ever a bug that would be exposed in a
5786         non-pendantic way (ie, by an embedder doing a ref on one thread
5787         and an unref on another), but for the sake of correctness, this is
5788         now Interlocked.
5789
5790         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
5791         (mono_assembly_load_reference): Call mono_assembly_addref rather
5792         than touching the refcount ourselves.
5793         (mono_assembly_close): Use InterlockedDecrement to unref the
5794         assembly. Don't acquire the lock unless it is actually needed.
5795
5796 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
5797
5798         * class.c (mono_class_layout_fields): Fix calculation of has_references
5799         for generic types.
5800
5801 2005-07-12  Martin Baulig  <martin@ximian.com>
5802
5803         Applying a patch from Michal Moskal <malekith@nemerle.org>.
5804
5805         * metadata.c
5806         (mono_type_hash): Provide better hashing for generic instances.
5807         (mono_generic_inst_hash): Improve hashing.
5808         (mono_generic_class_hash): Likewise.
5809
5810         * reflection.c (mymono_metadata_type_hash): Improve hashing for
5811         generic instances.
5812
5813 2005-07-12  Martin Baulig  <martin@ximian.com>
5814
5815         * reflection.c (mono_reflection_create_runtime_class): Remove the
5816         hack for generic type definitions and non-`Run' assemblies.
5817         (mono_reflection_bind_generic_parameters): Also use
5818         `klass->wastypebuilder' to check for TypeBuilders.
5819
5820 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
5821
5822         * class.c (mono_class_layout_fields): Fix calculation of has_references
5823         for generic types.
5824
5825         * class.c (inflate_generic_class): Fix a leak.
5826         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
5827         for generic types.
5828
5829 2005-07-11  Martin Baulig  <martin@ximian.com>
5830
5831         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
5832         on error.
5833
5834 2005-07-11  Martin Baulig  <martin@ximian.com>
5835
5836         * loader.c (find_method): Also lookup in
5837         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
5838
5839 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5840
5841         * appdomain.c (mono_domain_unload): Don't free the error message
5842         before passing it to mono_get_exception_...
5843
5844         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
5845         
5846 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
5847
5848         * threads.c: try to better guess an available RT signal (bug #75387).
5849
5850 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5851
5852         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
5853         and CACHE_OBJECT.
5854
5855 2005-07-07  Martin Baulig  <martin@ximian.com>
5856
5857         * class.c (mono_type_get_name_full): Return NULL for
5858         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
5859         fixes #75408.
5860
5861 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5862
5863         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
5864         exit the appdomain as well being aborted.
5865
5866         * threadpool.c: Create all threadpool threads inside the root appdomain, and
5867         change back to the root domain after calling managed code. This enables
5868         appdomains using threadpools to be unloaded.
5869
5870 2005-07-07  Martin Baulig  <martin@ximian.com>
5871
5872         * class-internals.h
5873         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
5874         into `MonoDynamicGenericClass' since we only need it for dynamic
5875         types.
5876
5877         * reflection.c (mono_class_bind_generic_parameters): We don't need
5878         to compute the `parent' here.
5879
5880 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
5881
5882         * culture-info-table.h : regenerated.
5883
5884 2005-07-06  Martin Baulig  <martin@ximian.com>
5885
5886         * icall.c
5887         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
5888
5889         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
5890
5891 2005-07-06  Martin Baulig  <martin@ximian.com>
5892
5893         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
5894         we're doing a signature-only comparision; fixes #74945.
5895
5896 2005-07-06  Martin Baulig  <martin@ximian.com>
5897
5898         * class-internals.h (MonoGenericClass): Moved some things out into
5899         a new `MonoInflatedGenericClass' type.  
5900         (MonoInflatedGenericClass): New type; the `klass' of a
5901         `MonoGenericClass' is now computed lazyly in
5902         mono_get_inflated_generic_class().      
5903
5904         * class.c (mono_get_inflated_generic_class): New public function.
5905         (mono_class_inflate_generic_method): Removed the unused
5906         `MonoClass *' argument.
5907         (setup_generic_vtable): Don't call mono_get_inflated_method() on
5908         all the methods.
5909         (mono_class_create_generic): Make this static and merge it with
5910         mono_class_create_generic_2(); we're now called automatically from
5911         mono_get_inflated_generic_class().
5912
5913         * loader.c (mono_method_signature): Call
5914         mono_get_inflated_method() here.
5915
5916 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
5917
5918         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
5919         type of fields with RVA.
5920
5921         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
5922         for this pseudo class.
5923         (my_mono_class_from_generic_parameter): Likewise.
5924         (mono_class_init): Allow interfaces to have cctors.
5925
5926 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
5927
5928         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
5929         lazily for AOT methods.
5930
5931 2005-07-05  Martin Baulig  <martin@ximian.com>
5932
5933         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
5934         returns FALSE for a successful match, not TRUE.
5935
5936 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
5937
5938         * loader.c (mono_method_get_index): Optimize this a bit.
5939
5940 2005-07-04  Martin Baulig  <martin@ximian.com>
5941
5942         * class.c
5943         (class_compute_field_layout): Move the check for generic type
5944         definitions into mono_class_layout_fields().  Fixes #74684.
5945         (mono_class_from_generic_parameter): Correctly compute
5946         `klass->parent'; fixes #75457.
5947
5948         * reflection.c (register_assembly, register_module): Make sure
5949         `domain->rejobject_hash' is already created.
5950
5951 2005-07-02  Martin Baulig  <martin@ximian.com>
5952
5953         * class-internals.h
5954         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
5955         `MonoDynamicGenericClass'.      
5956
5957 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
5958
5959         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
5960         returned by a field getter is null, since null is a valid value.
5961
5962 2005-07-01  Martin Baulig  <martin@ximian.com>
5963
5964         * reflection.c (mono_reflection_generic_class_initialize): Update
5965         the `dgclass->fields [i].parent' to the correct class.
5966         (mono_image_get_fieldref_token): Use the declaring type, not the
5967         reflected type.
5968
5969 2005-07-01  Martin Baulig  <martin@ximian.com>
5970
5971         * loader.c (find_method): Also look in the interfaces; fixes #75429.
5972
5973 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
5974
5975         * threads.c (thread_cleanup): assert that thread != NULL
5976         (wait_for_tids_or_state_change): We were using the wrong variable
5977         when accessing wait->threads. `i' was always out of the bounds of
5978         the array.
5979
5980 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5981
5982         * loader.c: map user32 and kernel32 to libMonoSupportW
5983
5984 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
5985
5986         * appdomain.c (unload_thread_main): Mark this as WINAPI.
5987
5988 2005-06-28  Martin Baulig  <martin@ximian.com>
5989
5990         * loader.c (method_from_methodspec): Fix #75334.
5991
5992 2005-06-28  Martin Baulig  <martin@ximian.com>
5993
5994         Fix #74953 - Arrays now implement the generic IList<T> interface
5995         on the 2.0 platform.
5996
5997         * class-internals.h (MonoDefaults): Added `generic_array_class'.
5998
5999         * reflection.c (mono_class_bind_generic_parameters): New public
6000         function; similar to mono_reflection_bind_generic_parameters(),
6001         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
6002
6003         * domain.c (mono_init_internal): Try to initialize.
6004         `mono_defaults.generic_array_class' here; this'll only succeed if
6005         we're using the 2.0 corlib.
6006
6007         * icall.c
6008         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
6009         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
6010         (mono_lookup_internal_call): Added support for nested classes.
6011
6012         * loader.c
6013         (mono_get_method_from_token): Set `result->signature->pinvoke' if
6014         we're an interncall and have generic arguments.
6015
6016         * class.c
6017         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
6018         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
6019         instance of System.Array.InternalArray<T> for arrays, so they
6020         implement the generic IList<T> interface.
6021
6022 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
6023
6024         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
6025         (chastamar@yahoo.com). Fixes #75374.    
6026
6027 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
6028
6029         * culture-info-table.h: regenerated.
6030
6031 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6032
6033         * icall.c: handle spaces correctly for base64 strings.
6034
6035 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
6036
6037         * *.c: Kill some warnings.
6038
6039 2005-06-23  Duncan Mak  <duncan@novell.com>
6040
6041         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
6042         that this builds on Solaris 10 (x86).
6043
6044 2005-06-23  Martin Baulig  <martin@ximian.com>
6045
6046         * class.c
6047         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
6048         generic type definitions.
6049
6050 2005-06-23  Martin Baulig  <martin@ximian.com>
6051
6052         Fix #75331.
6053
6054         * metadata.c (mono_class_get_overrides): Renamed to
6055         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
6056         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
6057         pass it to mono_get_method_full().
6058
6059 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
6060
6061         * reflection.c (mono_reflection_create_runtime_class): take the
6062         mono_domain_lock in this method. Prevents deadlocks
6063
6064 2005-06-22  Martin Baulig  <martin@ximian.com>
6065
6066         * loader.c (method_from_methodspec): Fix #75330.
6067
6068 2005-06-22  Martin Baulig  <martin@ximian.com>
6069
6070         * reflection.c (type_get_qualified_name): Use
6071         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
6072         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
6073         argument; use it if we don't have an assembly name.
6074
6075 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
6076
6077         * object.c: In mono_message_init, set "copy out" flag for in
6078         parameters with the [Out] flag.
6079
6080 2005-06-21  Martin Baulig  <martin@ximian.com>
6081
6082         * class.c
6083         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
6084         and MONO_TYPE_PTR.
6085
6086 2005-06-21  Martin Baulig  <martin@ximian.com>
6087
6088         * class.c (mono_class_init): Don't initialize `class->fields' for
6089         generic instances since they're initialized again in
6090         compute_field_layout(). 
6091         (compute_field_layout): Set the field's `generic_info' here; fix
6092         #75320. 
6093
6094 2005-06-21  Martin Baulig  <martin@ximian.com>
6095
6096         * class-internals.h
6097         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
6098
6099         * metadata.c (mono_metadata_generic_method_equal): Also
6100         distinguish the `generic_class'; fixes #75334.
6101
6102 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6103
6104         * domain.c:
6105         * appdomain.c:
6106         * domain-internals.h:
6107         * reflection.c: 'domain_assemblies' field is now protected by its own
6108         lock. Don't call into managed code to run the AssemblyLoad event if we
6109         now there are no registered delegates for it.
6110
6111 2005-06-20  Martin Baulig  <martin@ximian.com>
6112
6113         * class.c (mono_class_is_assignable_from): Use a custom version of
6114         mono_class_has_parent() to make things work for generic instances;
6115         fix #75300.
6116
6117 2005-06-20  Martin Baulig  <martin@ximian.com>
6118
6119         * loader.c (method_from_methodspec): Apply a patch from
6120         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
6121
6122 2005-06-20  Martin Baulig  <martin@ximian.com>
6123
6124         * class.c (mono_class_init): Reverted Zoltan's last change; it
6125         breaks generics.
6126
6127 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
6128
6129         * threads.c (wait_for_tids_or_state_change): Add missing locking.
6130
6131 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6132
6133         * socket-io.c: fix the index in the socket array for writable/error
6134         sockets. Fixes bug #75306.
6135
6136 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
6137
6138         * class.c (mono_class_init): Allow interfaces to have static ctors.
6139
6140 2005-06-17  Martin Baulig  <martin@ximian.com>
6141
6142         * loader.c (method_from_methodspec): Use `context->container' when
6143         parsing the `gmethod->inst'.
6144
6145 2005-06-17  Martin Baulig  <martin@ximian.com>
6146
6147         * class.c (mono_type_get_name_recurse): Don't add the assembly
6148         name for type arguments.
6149
6150 2005-06-15  Martin Baulig  <martin@ximian.com>
6151
6152         * reflection.c (mono_image_get_inflated_method_token): Encode
6153         correct klass; fixes #75260.
6154
6155 2005-06-13 Michal Moskal <malekith@nemerle.org>
6156
6157         * icall.c: Make GetCorrespondingMethod/Constructor take
6158         MonoReflectionMethod method not MonoMethod. Removed
6159         MonoType.GetCorrespondingField, and make
6160         MonoGenericType.GetCorrespondingField take name not
6161         MonoClassField.
6162
6163 2005-06-13  Michal Moskal <malekith@nemerle.org>
6164
6165         * reflection.c (field_encode_signature, encode_locals):
6166          Make sizes of buffers for types larger (for big generic types).
6167          (create_generic_typespec,
6168          mono_reflection_sighelper_get_signature_local,
6169          mono_reflection_sighelper_get_signature_field):
6170          Add asserts for too small buffers.
6171
6172 2005-06-15  Martin Baulig  <martin@ximian.com>
6173
6174         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
6175         if our parent is not a dynamic type.
6176
6177 2005-06-15  Martin Baulig  <martin@ximian.com>
6178
6179         * class-internals.h (MonoTypeNameFormat): New enum.
6180
6181         * class.c
6182         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
6183         (mono_type_get_full_name): Removed.
6184         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
6185         argument instead of the boolean's.
6186
6187         * icall.c (ves_icall_System_MonoType_getFullName):
6188         Added `gboolean assembly_qualified'.    
6189
6190         * reflection.h
6191         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
6192
6193         * reflection.c (mono_reflection_parse_type): Parse the new type
6194         name format.
6195
6196 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6197
6198         * icall.c: no need to convert from utf16 to utf8 and then back again
6199         after the call to GetLogicalDrives.
6200
6201 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6202
6203         * icall.c: frombase64. Fix problems exposed by new tests.
6204
6205 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6206
6207         * icall.c: added internal calls for converting char [] and strings in
6208         base64 into byte [].
6209
6210 2005-06-10  Martin Baulig  <martin@ximian.com>
6211
6212         * class.c (mono_class_create_generic_2): Read the nested classes
6213         from the metadata rather than from `gklass->nested_classes' since
6214         `gklass' might not be initialized yet.
6215
6216 2005-06-09  Duncan Mak  <duncan@novell.com>
6217
6218         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
6219         all public headers. Fixes #74919.
6220
6221 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
6222
6223         * domain.c: The key for proxy_vtable_hash is now a pointer
6224         array. Added new GHashFunc and GCompareFunc functions for this.
6225
6226         * class.h: The list of interfaces in MonoRemoteClass is known in
6227         advance and can't grow (we create a new MonoRemoteClass if needed),
6228         so now the interface array can be allocated together with
6229         MonoRemoteClass.
6230         
6231         * object.c: Added a new method create_remote_class_key.
6232         Fixed mono_remote_class so it does not depend on
6233         mono_upgrade_remote_class.
6234         Removed extend_interface_array.
6235         Added new method clone_remote_class(), which makes a copy of a remote
6236         class and adds a new interface or class to it.
6237         mono_upgrade_remote_class() now creates a new remote class (or gets
6238         it from the cache) if an vtable upgrade is needed. In this way
6239         we make sure that other objects sharing the same remote class
6240         don't get the new vtable with unwanted interfaces.
6241         
6242         * object-internals.h:
6243         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
6244         
6245         * marshal.c: Track changes in mono_upgrade_remote_class().
6246
6247 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
6248         * icall.c: Add runtime methods for obtaining members of inflated
6249         class, which were created from supplied non-inflated members. It
6250         is used in internal Get{Method,Constructor,Field} methods in
6251         System.Type
6252
6253 2005-06-09  Martin Baulig  <martin@ximian.com>
6254
6255         * reflection.c
6256         (mono_reflection_bind_generic_method_parameters): Fix #75169.
6257
6258 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6259         * reflection.c (mono_image_basic_init): Define
6260         Version in MonoDynamicAssembly. 
6261         
6262 2005-06-08  Martin Baulig  <martin@ximian.com>
6263
6264         Fix #75136.
6265
6266         * loader.c
6267         (mono_method_signature_full): New public method; takes a
6268         `MonoGenericContext *'.
6269         (find_method): Use mono_method_signature_full() and pass the
6270         klass'es context to it.
6271
6272         * class.c (mono_class_is_inflated_method): Use
6273         mono_method_signature_full() and pass the context to it.
6274
6275 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
6276
6277         * object.c: add proper locking in mono_remote_class_vtable(),
6278         fixes possible memory corruption.
6279
6280 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
6281
6282         * marshal.c (mono_remoting_marshal_init): set
6283         initialized after initialization.
6284
6285 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
6286
6287         * locales.c : hush.
6288
6289 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
6290
6291         * object.c (extend_interface_array): fix really silly
6292         memory corrupting / comparison bug.
6293
6294 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6295
6296         * reflection.c: Functions added to support the creation
6297         of CustomAttributeData, which includes Attribute data
6298         used by ReflectionOnly methods.
6299
6300         * reflection.h:  mono_reflection_get_custom_attrs_data and
6301          mono_custom_attrs_data_construct added (functions exposed).
6302
6303          * icall.c: Added mono_reflection_get_custom_attrs_data
6304          as icall.
6305         
6306 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
6307
6308         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
6309         lupus's request.
6310
6311 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
6312
6313         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
6314
6315         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
6316         dynamic DllImportAttribute.
6317
6318         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
6319         dynamic DllImportAttribute.
6320
6321         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
6322         Fixes #75162.
6323
6324 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6325
6326         * threads.c: avoid segfault when an unstarted thread is aborted.
6327
6328 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
6329
6330         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
6331         Returns the name and version of the runtime for reporting.
6332
6333 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6334
6335         * appdomain.c: bump corlib version.
6336         * object-internals.h: new field in MonoReflectionAssembly.
6337
6338 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6339
6340         * object-internals.h: Carlos forgot to add this field.
6341
6342 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6343
6344         * icall.c: Added create_version to create instances
6345         of Version of MonoReflectionAssemblyName. This change helps
6346         the AssemblyName tests to keep running fine.
6347         
6348 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
6349   
6350         * object.c (mono_method_return_message_restore): A somehow less
6351         intrusive fix for #75138.
6352
6353 2005-06-03  Raja R Harinath  <rharinath@novell.com>
6354
6355         * object.c (mono_method_return_message_restore): Fix computation
6356         of expected number of out args.
6357
6358 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
6359
6360         * reflection.c (mono_image_get_method_info): Fix the case when the
6361         charset is empty.
6362
6363 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
6364
6365         * object.c: Added missing null check in
6366           mono_method_return_message_restore.
6367
6368 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
6369
6370         * reflection.c (mono_image_get_method_info): Handle the case when
6371         dllentry is empty.
6372
6373 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
6374
6375         * object.c: When creating the vtable for a proxy, take into account
6376         all inherited interfaces, not only the ones registered in
6377         iclass->interfaces. This fixs bug #74996.
6378         Also, in mono_method_return_message_restore, verify that the array
6379         of out args has the expected lengh.
6380
6381 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6382
6383         * socket-io.c: update the timeout in Poll when the call is interrupte.
6384
6385 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6386
6387         * socket-io.c: support abort/suspend in Select_internal after last
6388         change.
6389
6390 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6391
6392         * threadpool.c: remove warning.
6393
6394 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6395
6396         * icall.c:
6397         * socket-io.[ch]: Select_internal uses poll() now when available, thus
6398         removing the 1024 limit from select(). Runtime part of the fix for
6399         bug #71203.
6400
6401 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6402
6403         * socket-io.c: when resolving the addresses for the same
6404         host returned by gethostname(), get the local IPs from the interface
6405         list. Loopback addresses are discarded if the are interfaces up with
6406         non-loopback ones. Fixes bug #63265.
6407
6408 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
6409
6410         * appdomain.c, verify.c, object-internals.h, reflection.c:
6411         bumped corlib number to 36, and added new extra_flags field
6412         to ReflectionMethodBuilder and friends.  Fixes #75060.
6413
6414 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
6415
6416         * gc.c: register a new weak link only if the object is non-null
6417         (fixes bug#75047).
6418
6419 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6420
6421         * culture-info.h : short time pattern too.
6422
6423 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
6424
6425         * culture-info.h : expand long time pattern string length.
6426
6427 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
6428
6429         * culture-info-table.h : update (more French date format; #72788).
6430
6431 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
6432
6433         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
6434         the method is static. Fixes #75029.
6435
6436 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
6437
6438         * reflection.c: Update the table_idx field of method builders after
6439         saving the module, since it can change. This is a workaround for
6440         bug #74914. 
6441
6442 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
6443
6444         * culture-info-table.h : update (additional French date format).
6445
6446 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
6447
6448         * icall.c (ves_icall_type_Equals): Revert last change.
6449         
6450         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
6451
6452         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
6453
6454 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
6455
6456         * class-internals.h: Added executioncontext_class field to 
6457         MonoDefaults structure.
6458         * domain.c: Cache System.Threading.ExecutionContext class in 
6459         mono_defaults.
6460         * object.c: Capture the ExecutionContext for asynchroneous calls in
6461          mono_async_result_new.
6462         * object-internals.h: Added execution_context and original_context 
6463         fields to MonoAsyncResult. Added execution_context to MonoThread.
6464         * security-manager.c|.h: Added mono_get_context_capture_method to 
6465         return the capture method (if required by the security manager or by
6466         the framework version used).
6467         * threadpool.c: Apply capture (if present) ExecutionContext in 
6468         mono_async_invoke and revert to original context after it completes.
6469
6470 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
6471
6472         * culture-info-table.h : updated (real hacky solution for zh-CHT).
6473
6474 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
6475
6476         * culture-info-table.h : zh-CHT related workaround.
6477
6478 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
6479
6480         * marshal.c (emit_marshal_custom): Add some error checking and call the
6481         methods in the ICustomMarshaler interface. Fixes #74875.
6482         
6483         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
6484         native->managed wrappers.
6485
6486 2005-05-12  Martin Baulig  <martin@ximian.com>
6487
6488         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
6489         here and use the loader lock.
6490
6491         * mono-debug.c: Properly lock when the debugger is not attached.
6492         (mono_debug_init): Release the initial lock if we're not running
6493         in the debugger.
6494
6495 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
6496
6497         * marshal.c (emit_marshal_custom): Pass through NULL values without
6498         calling the custom marshalling routines.
6499
6500         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
6501         conversion in structures. Fixes #74882.
6502
6503 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
6504
6505         * culture-info-table.h : zh-* cultures were missing.
6506
6507 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
6508
6509         * threads.c: Added a new event background_change_event which is signaled
6510         when a thread changes its background mode.
6511         Moved here several checks previously done in managed code. The checks
6512         require the thread lock, and using the thread lock in managed code
6513         can result in deadlocks.
6514         Merged Start_internal and Thread_internal into a single method. Now 
6515         Thread_internal does all work of creating and starting a thread.
6516         Added icalls for setting and getting the state of the object. Moved from
6517         managed code to avoid locking there.
6518         Added wait_for_tids_or_state_change() which is called instad of
6519         wait_for_tids when waiting for non-backround threads to end. This method
6520         will return if one of the threads ends or the background_change_event
6521         is signaled.
6522         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
6523         the background mode. This method signals the background_change_event
6524         event.
6525         * icall.c:
6526         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
6527         removed Start_internal.
6528         
6529 2005-05-11  Martin Baulig  <martin@ximian.com>
6530
6531         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
6532         to order of some fields to get proper alignment on 64-bit machines.
6533
6534 2005-05-11  Martin Baulig  <martin@ximian.com>
6535
6536         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
6537         changes as they're broken and completely fuck up the debugger.
6538
6539         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
6540
6541 2005-05-10  Martin Baulig  <martin@ximian.com>
6542
6543         * reflection.c (mono_reflection_generic_class_initialize): Don't
6544         call mono_class_setup_parent() here.
6545
6546 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6547
6548         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
6549         send/receive timeout use an integer in milliseconds. We were using a
6550         struct timeval.
6551
6552 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6553
6554         * locales.c:
6555         (internal_get_cultures): reserve the first slot of the array for the
6556         InvariantCulture, which will be filled in managed code.
6557
6558 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
6559
6560         * reflection.c (mono_image_fill_module_table): Initialize the
6561         GENERATION field as well.
6562
6563 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6564
6565         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
6566         Monitor.Enter on the object.
6567
6568 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
6569
6570         * threads.c: Enable the wait for running threads when exiting.
6571         * icall.c: Suspend all threads before exiting.
6572
6573 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
6574
6575         * assembly.c (mono_assembly_load_reference): Fix warning.
6576
6577 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6578
6579         * threadpool.c: changed the default number of threads per cpu. From now
6580         on, the default will be 20 + (5 * number of cpus) instead of 50.
6581
6582 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
6583
6584         * loader.c (mono_method_get_signature_full): Add locking here.
6585
6586 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
6587
6588         * appdomain.c: Moved methods for parsing and freeing assembly
6589         names to assembly.c.
6590         * assembly.c, domain-internals.h: Created public methods for parsing
6591         assembly names. Fixed mono_assembly_load_with_partial_name:
6592         it now finds the best match, taking into account the version,
6593         token and culture specified in the partial name. Also return
6594         the latest version if no version information is specified.
6595
6596 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
6597
6598         * threadpool.c: replace check for SocketAsyncCall class.
6599
6600 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6601
6602         * threadpool-internals.h:
6603         * Makefile.am: added threadpool-internals.h
6604
6605         * threadpool.c: call mono_unhandled_exception on exceptions not handled
6606         that happen in threadpool threads (tested on MS).
6607         (mono_thread_pool_remove_socket): new function that dispatch any pending
6608         AIO call on a socket that is closing. By now only epoll really needs it,
6609         as select/poll wake up when the socket closes.
6610
6611
6612         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
6613
6614 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
6615
6616         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
6617
6618 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
6619
6620         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
6621
6622 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
6623
6624         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
6625         has an abort request, convert it into a suspend request.
6626
6627 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
6628
6629         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
6630         warning for the usage of `UnmanagedFunctionPointerAttribute' which
6631         is not supported yet.
6632
6633 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6634
6635         * image.c: register assemblies loaded from data (bundles) in the loaded
6636         assemblies hash. Fixes bug #74772.
6637
6638 2005-04-29  Martin Baulig  <martin@ximian.com>
6639
6640         * class.c (mono_type_get_name_recurse): Update to the new naming
6641         schema from the latest .NET 2.x beta2.
6642         (mono_class_setup_vtable_general): If we're a generic instance,
6643         copy the vtable from our generic type definition and inflate all
6644         the methods in it.
6645
6646         * loader.c (find_method): Update to the new naming schema from the
6647         latest .NET 2.x beta2.
6648
6649 2005-04-29  Raja R Harinath  <harinath@gmail.com>
6650
6651         * class.c (mono_class_init): Add a mono_loader_unlock to the
6652         #74734 fix.
6653
6654 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
6655
6656         * icall.c (ves_icall_System_Environment_Exit): Remove the 
6657         suspend_all_other_threads () call for the time being, since it can hang.
6658
6659         * threads.c (mono_thread_manage): Similarly, disable the waiting for
6660         the background threads to exit, since it can also hang.
6661
6662         * class.c (mono_class_init): Applied patch from Ankit Jain 
6663         (radical@gmail.com). Avoid pending init errors when a field refers
6664         to a nested class using a typeref. Fixes #74734.
6665
6666         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
6667         this for dynamic modules.
6668
6669 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6670
6671         * threads.c: don't wait for threads that are in the process of aborting
6672         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
6673         and waiting for background threads to finish. This makes xsp and
6674         mod-mono-server exit without random length delays and/or hangs.
6675
6676 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6677
6678         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
6679
6680 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
6681
6682         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
6683         dynamic types to prevent infinite loops. Fixes #74727.
6684
6685         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
6686         ..._is_assignable_to.
6687
6688 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
6689
6690         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
6691
6692 2005-04-25  Martin Baulig  <martin@ximian.com>
6693
6694         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
6695
6696         * domain.c
6697         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
6698
6699         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
6700
6701         * reflection.c (build_compressed_metadata): Set metadata header
6702         version to 2.0.
6703
6704 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
6705
6706         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
6707         number into an integral and a decimal part. Fixes #70473.
6708
6709         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
6710
6711 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
6712
6713         * culture-info-table.h : reflected the latest locale-builder output.
6714
6715 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6716
6717         * threadpool.c: check for SuspendRequested too when deciding if
6718         mono_thread_interruption_checkpoint should be called.
6719
6720 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6721
6722         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
6723         * threads.c: remove interruption_mutex and use Interlocked instead. When
6724         suspending all the threads, wait for all the suspended events at once.
6725         If we're shutting down and get an APC that is going to be queued,
6726         call mono_thread_execute_interruption immediately, as the thread might
6727         be sleeping on a pthread condition or mutex.
6728
6729         * icall.c: call mono_runtime_set_shutting_down before suspending the
6730         threads.
6731
6732         Fixes bug #74693. And now xsp is happier when exiting.
6733
6734 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
6735
6736         * loader.c (mono_stack_walk): Fix #74690.
6737
6738 2005-04-22  Martin Baulig  <martin@ximian.com>
6739
6740         * mono-debug.h (MonoDebugMethodJitInfo): Added
6741         `MonoDebugMethodJitInfo *jit'.
6742
6743         * mono-debug.c (mono_debug_read_method): Cache the
6744         MonoDebugMethodJitInfo in `address->jit'.
6745         (mono_debug_free_method_jit_info): New public method.
6746
6747 2005-04-22  Martin Baulig  <martin@ximian.com>
6748
6749         * class.c (mono_class_is_assignable_from): Disallow
6750         type parameter -> interface.
6751
6752 2005-04-21  Dick Porter  <dick@ximian.com>
6753
6754         * threads.c (mono_thread_create): Turn an assertion into an error.
6755
6756 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
6757
6758         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
6759         
6760         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
6761         Fix some gcc 4.0 warnings.
6762
6763 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
6764
6765         * file-io.c: fix alt dir separator char on unix systems
6766         and cleanup (fixes bug #71214).
6767
6768 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
6769
6770         * marshal.c: Use CALLVIRT instead of CALL when dispatching
6771         a call to a remote domain, since the method may be an
6772         interface method in the client domain. This fixes bug #74192.
6773
6774 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6775
6776         * threadpool.c: recv/send are now performed before going back to managed
6777         code to save one transition.
6778
6779 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6780
6781         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
6782
6783         * metadata/threadpool.c: removed hack to workaround the bug above.
6784
6785         Fixes bug #74618.
6786
6787 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
6788
6789         * reflection.c reflection.h: Fix handling of parameter defaults in
6790         dynamic methods. Also fixes handling of parameter attributes.
6791         Fixes #74609.
6792
6793         * mono-debug.c (mono_debug_close_image): Fix warning.
6794
6795 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6796
6797         * socket-io.h: replaced old unused field with new 'blocking'.
6798         * threadpool.c: restore socket blocking state on windows(tm).
6799
6800 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
6801
6802         * icall.c: don't return the codebase in the AssemblyName[] returned by
6803         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
6804         * object-internals.h: Removed FIXME (fields were presents) and fixed
6805         versioncompat declaration.
6806
6807 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6808
6809         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
6810         not closed, so don't cleanup when it happens.
6811
6812 2005-04-13  Chris Toshok  <toshok@ximian.com>
6813
6814         * mono-debug-debugger.h: change prototype for
6815         mono_debugger_lookup_type.
6816
6817         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
6818         this function, although it should probably be named
6819         mono_debugger_init_type.
6820
6821 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6822
6823         * threadpool.c: fix non-AIO case.
6824
6825 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
6826
6827         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
6828         the built-in profiler to measure just JIT compilation times.
6829
6830 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6831
6832         * threadpool.c: the epollfd might be closed by another thread at
6833         any time, so ignore EBADF at treat it as a "we're closing" sign.
6834
6835 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6836
6837         * threadpool.c: release the semaphores with a count equals to the number
6838         of working threads in both IO and regular pools. Fixed typo that messed
6839         up the count of IO pool threads. Don't initialize the pipe handles if
6840         we're using epoll.
6841
6842 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6843
6844         * threadpool.c: some systems don't like a NULL when deleting the socket
6845         from epoll.
6846
6847 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6848
6849         * threadpool.c: fix semaphore allocation.
6850
6851 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6852
6853         * threadpool.c: added epoll() based implementation for asynchronous IO
6854         that is used instead of the default poll() when available.
6855         It can be disabled by setting MONO_DISABLE_AIO.
6856
6857 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6858
6859         * threadpool.c: windows needs 'closesocket' and instead of returning
6860         0 when the stream is closed while in select, it returns -1. Fixes bug
6861         #74573.
6862
6863 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
6864
6865         * class.c (class_compute_field_layout): Fix the regression caused by
6866         the previous try.
6867
6868 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6869
6870         * threadpool.c: separate pool for socket async. IO.
6871         * threadpool.h: mono_max_worker_threads is not a global any more.
6872
6873 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
6874
6875         * class.c (class_compute_field_layout): Fix #74549.
6876
6877 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6878
6879         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
6880         use 2 connected sockets instead.
6881
6882 2005-04-08  Miguel de Icaza  <miguel@novell.com>
6883
6884         * mono-config.c: Add new entry point for mkbundle
6885         mono_config_parse_memory. 
6886
6887 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6888
6889         * threadpool.c: removed another unused function.
6890
6891 2005-04-08  Ankit Jain  <radical@corewars.org>
6892
6893         * reflection.c (get_default_param_value_blobs): Add 'types'
6894         parameter to get the types encoded in the constant table.
6895         (mono_param_get_objects): Use the type from the constant table,
6896         not the type of the parameter, when creating default values.
6897         Handle null default values correctly.
6898
6899 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6900
6901         * file-io.c:
6902         * file-io.h:
6903         * threadpool.c:
6904         * threadpool.h:
6905         * icall.c:
6906         * socket-io.c: removed dead code for async IO.
6907
6908 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6909
6910         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
6911
6912         * threadpool.c: intercept socket async. calls and pass them to a thread
6913         that is polling and dispatching the job items to the threadpool as
6914         socket become ready. Fixes bugs #71217, #71933.
6915
6916         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
6917         between char and short/ushort arrays.
6918
6919         * socket-io.c: remove dead code.
6920
6921 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
6922
6923         * locales.c,
6924           icall.c : removed InternalToUpper_Comp() and
6925           InternalToLower_Comp().
6926
6927 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
6928
6929         * char-conversions.h : The tables were incorrectly generated. Should
6930           be generated against invariant culture.
6931
6932 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
6933
6934         * object.c (mono_runtime_invoke_array): Fix return value when 
6935         passing pre-created valuetype objects to ctors.
6936
6937         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
6938         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
6939         Fixes #74338.
6940
6941 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
6942
6943         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
6944         only used with --security and hides the wrong corlib version error.
6945
6946 2005-03-30  Joshua Tauberer  <tauberer@for.net>
6947
6948         * class.c: Changed mono_class_name_from_token so that types
6949         outside of a namespace don't have an initial period.  Improved
6950         the g_warning message used in _mono_class_get when loading
6951         fails.
6952         * assembly.c: In mono_assembly_load_reference, when an assembly
6953         can't be found, "No such file or directory" is misleading and
6954         unhelpful because a few paths were checked for the presence of
6955         the assembly.  When that happens (ENOENT), display a nicer
6956         message indicating the directories that were searched.  In all
6957         cases, the warning is made easier to read for non-hackers.
6958
6959 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
6960
6961         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
6962         project/solution.
6963         * appdomain.h|domain.c: Removed inline from functions.
6964         * appdomain.c: Reduced warnings when compiling on windows.
6965         * icall.c: Fixed output_debug declaration to gunichar2*.
6966         * mono-config.c: Reduced warnings when compiling on windows.
6967         * rand.c: Added missing "windows.h". Added missing return value.
6968         * rawbuffer.c: Added missing winsock2.h for windows.
6969         * sysmath.h: Added mono-compiler.h header to allow/ease 
6970         compilation with non-GCC compilers.
6971         * threads.c: Fixed declarations to compile with VS.NET C compiler.
6972         Removed cast warnings.
6973
6974         Adapted from the work of J Lothian (for VC6).
6975
6976 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
6977
6978         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
6979         from default_path.
6980
6981 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
6982
6983         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
6984         the 2.0 profile.
6985
6986 2005-03-27  Raja R Harinath  <harinath@gmail.com>
6987
6988         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
6989         has to be in $(exec_prefix).  $(prefix) is for arch-independent
6990         stuff, and it would probably use $(prefix)/share rather than
6991         $(prefix)/lib.
6992
6993 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6994
6995         * console-io.c: added 2 includes that might be missing.
6996
6997 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
6998
6999         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
7000         profile.
7001
7002         * reflection.c (create_custom_attr): Allocate the params array using
7003         alloca so it gets GC tracking.
7004
7005 2005-03-23  Chris Toshok  <toshok@ximian.com>
7006
7007         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
7008         out some spew.
7009
7010 2005-03-24  Raja R Harinath  <rharinath@novell.com>
7011
7012         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
7013         changes to pick up any changes in prefix, etc.
7014
7015 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7016
7017         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
7018         
7019         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
7020         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
7021
7022 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
7023
7024         * class-internals.h object-internals.h class.c reflection.c: Extend the
7025         mono_lookup_dynamic_token () function to return the class of the
7026         token as well. 
7027
7028         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
7029         well. Fixes #73848.
7030
7031 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
7032
7033         * security-manager.c: Skip inheritance checks for intra-corlib
7034         class inheritance and method overrides. This skips a lot of checks
7035         and (anyway) permissions cannot work until corlib is loaded.
7036
7037 2005-03-23  Martin Baulig  <martin@ximian.com>
7038
7039         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
7040         MONO_TYPE_GENERICINST.  
7041
7042 2005-03-23  Martin Baulig  <martin@ximian.com>
7043
7044         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
7045
7046 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7047
7048         * class.c: added locking comments to some functions.
7049         Cache the interface offsets arrays (saves about 20 KB
7050         of runtime memory in a typical app).
7051         Reduce the time overhead in mono_class_setup_supertypes ().
7052
7053 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
7054
7055         * icall.c: speedup and fix leaks in GetMethodsByName and
7056         GetPropertiesByName.
7057
7058 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7059
7060         * reflection.c: some locking fixes.
7061
7062 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7063
7064         * metadata.c: added missing break in case statement.
7065
7066 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
7067
7068         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
7069         typedbyref return values. Fixes #73941.
7070
7071 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
7072
7073         * security-manager.c|h: Added demandunmanaged method and 
7074         suppressunmanagedcodesecurity class to MonoSecurityManager.
7075         Renamed aptc class to allowpartiallytrustedcallers.
7076
7077 2005-03-17  Martin Baulig  <martin@ximian.com>
7078
7079         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
7080
7081 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7082
7083         * file-io.c: disabled file async. IO using aio_*. It uses the
7084         threadpool now. Workaround for bug #73718.
7085
7086 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7087
7088         * assembly.h, mono-config.c: added code to deal with bundled configs
7089         for bundled assemblies.
7090
7091 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
7092
7093         * *.c, private.h: cleanup, removing old private.h header file.
7094
7095 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
7096
7097         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
7098         and throw_on_unmappable_char attributes.
7099
7100 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
7101
7102         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
7103         _ProcessName_internal.
7104
7105 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
7106
7107         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
7108         #73631.
7109
7110         * icall.c threads.c threads-types.h: Remove slothash icalls as they
7111         are no longer used.
7112
7113 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
7114
7115         * object.c (compute_class_bitmap): Add support for generics. Fixes
7116         #73527.
7117
7118 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
7119
7120         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
7121
7122 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7123
7124         * filewatcher.c: commented out the code for windows watcher, as we don't
7125         use it (we use the managed implementation instead).
7126
7127 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
7128
7129         * object-internals.h (MonoThread): Remove 'unused1' field.
7130
7131         * appdomain.c: Bump corlib version.
7132
7133         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
7134
7135         * reflection.c (mono_reflection_create_runtime_class): Remove the
7136         AssemblyBuilder.Save optimization since it causes too many problems.
7137
7138 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
7139
7140         * exception.c|h: Added mono_get_exception_reflection_type_load to
7141         create a ReflectionTypeLoadException object.
7142         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
7143         to return NULL is a InheritanceDemand fails during reflection. Updated
7144         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
7145         ReflectionTypeLoadException if an InheritanceDemand fails during 
7146         reflection. Added icall mapping for GetLinkDemandSecurity.
7147         * security-manager.c|h: Added ves_icall_System_Security_
7148         SecurityManager_GetLinkDemandSecurity internal call to return the
7149         class and methods permissions set for a LinkDemand. Removed unused
7150         fields in MonoSecurityManager.
7151
7152 2005-03-10  Martin Baulig  <martin@ximian.com>
7153
7154         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
7155         it's a generic instance.
7156
7157 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
7158
7159         * reflection.c (mono_get_object_from_blob): Applied patch from
7160         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
7161
7162         * class.c (mono_class_is_assignable_from): Another try at fixing 
7163         #73469 without breaking anything.
7164
7165 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7166
7167         * class.c: (mono_class_is_assignable_from): Revert the last changes
7168         since they don't work with generics.
7169         
7170         * class.c (mono_class_is_assignable_from): Fix build bustage.
7171
7172         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
7173         the managed IsAssignableFrom method. Fixes #73469.
7174
7175         * reflection.c (mono_reflection_call_is_assignable_from): New helper
7176         function.
7177
7178 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7179
7180         * object.c (mono_load_remote_field_new): Fix returning uninitialized
7181         memory when the remoting callback does not sets the out arguments.
7182         Fixes #73007.
7183
7184         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
7185         by mistake.
7186
7187         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
7188
7189         * object-internals.h (MonoStackFrame): Sync with managed object layout.
7190
7191         * appdomain.c: Bump corlib version.
7192
7193 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7194
7195         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
7196         function.
7197
7198         * threads.c (mono_thread_attach): Detect threads which are not started
7199         by the GC pthread wrappers.
7200
7201 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
7202
7203         * icall.c: Added new icall for RNG.
7204         * rand.c|h: Added new icall to open the RNG. This allows to share a 
7205         single handle on Linux to access /dev/urandom and fix #73183.
7206
7207 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
7208
7209         * object.c: setting the new vtable in a transparent proxy object must
7210         not change the GC descriptor.
7211
7212 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7213
7214         * object.c: fixed compilation without GCJ support.
7215         * reflection.c: for runtime-created types ensure klass->has_references
7216         is correct (bug #73215).
7217
7218 2005-03-02  Martin Baulig  <martin@ximian.com>
7219
7220         * class.c (mono_class_is_assignable_from): Make this work if
7221         `oklass' is a generic instance; fixes #72831.
7222
7223 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
7224
7225         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
7226         with hasthis set.
7227         
7228         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
7229
7230         * marshal.c: Reorganize native->managed marshalling code to also use
7231         the emit_marshal_... functions.
7232
7233 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7234
7235         * object.c: typed allocs have issues with bitmap sizes > 30,
7236         so check for max_set >= 30.
7237
7238 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
7239
7240         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
7241         managed code. Fixes #73012.
7242
7243         * metadata.h (MonoMarshalSpec): Add elem_mult field.
7244
7245         * metadata.c reflection.c: Load/Emit elem_mult as well.
7246         
7247         * metadata.h (MonoMarshalSpec): Add comment.
7248
7249         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
7250
7251         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
7252         num_elem to -1 if not given.
7253
7254         * object-internals.h (MonoReflectionMarshal): Add has_size field.
7255
7256         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
7257         given values.
7258
7259 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
7260
7261         * null-gc.c (mono_gc_free_fixed): Was not compilable.
7262
7263 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
7264
7265         * reflection.c (encode_marshal_blob): Encode param_num field as well.
7266
7267         * object-internals.h (MonoReflectionMarshal): Add param_num field.
7268
7269 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
7270
7271         * object.c: generalized the reference bitmap creation
7272         and added hooks for the new GC.
7273         * class-internals.c: removed the gc_bitmap field from MonoClass.
7274
7275 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7276
7277         * domain.c: help the compiler to produce better code
7278         in mono_jit_info_table_find ().
7279
7280 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7281
7282         * object.c: make all allocations look typed.
7283
7284 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7285
7286         * socket-io.c: load Mono.Posix if it's not loaded already
7287         (fixes bug#73033).
7288
7289 2005-02-24  Martin Baulig  <martin@ximian.com>
7290
7291         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
7292         * reflection.c (dup_type): Likewise.
7293
7294 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
7295
7296         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
7297         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
7298
7299 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7300
7301         * domain.c, threads.c, object-internals.h: make the critical thread
7302         local vars use the fast access mode (even when we're compiled in
7303         a lib). Provide accessors to be used by the jit during codegen.
7304
7305 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7306
7307         * appdomain.c: Changed hook functios behavior to include
7308         support for the reflection only assemblies. Some icalls were changed
7309         to support the mentioned assemblies too. Signatures of static methods
7310         try_assembly_resolve and real_load now have an additional parameter:
7311         refonly.
7312
7313         * assembly.c: General changes to mono_assembly_ methods to support
7314         reflection only api. Functions mono_assembly_open, mono_assembly_load,
7315         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
7316         suffix, to support an additional gbool parameter to specify whether
7317         the assembli is reflection only or not. Created some new hook functions 
7318         to add support for reflection only assemblies. Signatures of static 
7319         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
7320         have now an additional parameter: refonly.
7321
7322         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
7323         indicating whether the assembly is reflection only or not.
7324
7325         * exception.c: Add mono_get_exception_invalid_operation.
7326
7327         * icall.c: Throw an InvalidOperationException when trying to invoke
7328         a property/method/event, or trying to set/get the value of a field.
7329         Also add an icall to retrieve the ref_only flag to the
7330         MonoReflectionAssembly.
7331
7332 2005-02-23  Chris Toshok  <toshok@ximian.com>
7333
7334         Part of fix for #72827.
7335         * mono-debug.c (mono_debug_add_method): add lexical block data to
7336         the info we write.  Kind of a hack at the moment - we copy the
7337         lexical block info from the MonoDebugMethodInfo to the
7338         MonoDebugMethodJitInfo here, before writing it.
7339         (mono_debug_read_method): read the lexical block info.
7340
7341         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
7342
7343         * debug-mono-symfile.h: add lexical block support.
7344
7345         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
7346         support.
7347
7348 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7349
7350         * loader.c (mono_lookup_pinvoke_call): Fix warning.
7351
7352         * object.c (mono_runtime_free_method): Call mono_free_method () and
7353         put the TODOs there.
7354
7355         * loader.c (mono_free_method): Free up most memory allocated for 
7356         dynamic methods.
7357
7358 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7359
7360         * reflection.c: properly flag a Type argument to a
7361         named custom attr value (bug #72248).
7362
7363 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7364
7365         * reflection.c: reduce code duplication in named custom
7366         attribute encoding.
7367
7368 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
7369
7370         * reflection.c: properly encode custom attrs of type object
7371         (bug #72649).
7372
7373 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7374
7375         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
7376
7377 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
7378
7379         * socket-io.c: load System.dll if it's not loaded already
7380         (bug #72850 and #70477).
7381
7382 2005-02-21  Martin Baulig  <martin@ximian.com>
7383
7384         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
7385         generic instances.
7386
7387 2005-02-21  Martin Baulig  <martin@ximian.com>
7388
7389         * reflection.c (mono_image_build_metadata): We also need to
7390         "fixup" the MethodImpl table after we computed the final method
7391         indices.  Call fixup_methodimpl() to do that.
7392         (fixup_methodimpl): New private method.
7393
7394 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
7395
7396         * assembly.c: special case mscorlib.dll (bug#72536),
7397         patch from Carlos Alberto Cortez.
7398
7399 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7400
7401         * threads-types.h threads.c: Fix build bustage.
7402
7403         * threads.c: Use a union for long<->double conversions.
7404
7405         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
7406         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
7407
7408         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
7409         containing the checkpoint call with NOT_TAKEN.
7410         
7411         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
7412         checkpoint before pushing the arguments, so they won't have to be
7413         spilled to stack.
7414
7415 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7416
7417         * domain.c, assembly.c, domain-internals.h: make some data
7418         const and relocation-free.
7419
7420 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
7421
7422         * object.c, appdomain.c, class-internals.h: introduce the
7423         MonoClassRuntimeInfo structure to hold the info needed to
7424         use a class at runtime. Made mono_class_vtable() lock-free
7425         for all the appdomains.
7426
7427 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
7428
7429         * metadata-internals.h, image.c: introduce a per-image mempool to
7430         be used for memory that has the same lifetime as the image.
7431
7432 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
7433
7434         * domain.c: In mono_init_internal(), instead of selecting the first
7435         runtime version supported by an executable, get a list of all
7436         supported versions and select the one for which an mscorlib exists
7437         (since even if the runtime supports a given version, it doesn't mean
7438         that the framework for that version is installed).
7439         Modified get_runtimes_from_exe to support this behavior.
7440         In supported_runtimes, added information about additional system
7441         assembly versions.
7442         
7443         * assembly.c: Added support for more than one system assembly version
7444         per runtime version. Updated the assembly list.
7445         In mono_assembly_remap_version, removed the initial version check,
7446         since we don't know to which version we need to compare until we
7447         get the version set on which the assembly is based.
7448         Moved the code for loading corlib into the new method
7449         mono_assembly_load_corlib(), so it can be used by the initialization
7450         code.
7451         
7452         * domain-internals.h: Updated data structures and added declaration
7453         for mono_assembly_load_corlib.
7454
7455 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7456
7457         * reflection.c (resolve_object): Fix the creation of the signature in 
7458         the SignatureHelper case.
7459
7460         * assembly.c (mono_assembly_remap_version): Fix binary search.
7461         
7462 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
7463  
7464         * class.c: Added inheritance check when a method is overloaded (from a
7465         virtual method or when implementing an interface) and when a class is
7466         inherited. Added functions to set a failure for a class and to 
7467         retreive the exception from a failure.
7468         * class-internals.h: Added fields to MonoClass to keep the exception
7469         information status for inheritance (or other exceptions) to be thrown
7470         later (i.e. not at load time).
7471         * object.c: Throw the inheritance SecurityException when a type is to 
7472         be created with either class or method inheritance violations.
7473         * reflection.c|h: Fix when getting declsec from a class. Removed 
7474         unrequired code for class. Improved sanity in parameter naming.
7475         * security-manager.c|h: Added functions to check for class and method
7476         inheritance.
7477
7478 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7479
7480         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
7481         and has_finalize in dynamic types as well.
7482
7483 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
7484
7485         * culture-info-table.h : fixed currency format for en-GB (and so on).
7486
7487 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
7488
7489         * gc.c: ensure the GC handles never have 0 as a value.
7490
7491 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
7492
7493         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
7494         a pointer to a struct to unmanaged code. Fixes #72625.
7495
7496 2005-02-16  Martin Baulig  <martin@ximian.com>
7497
7498         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
7499
7500 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
7501
7502         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
7503
7504 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
7505
7506         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
7507
7508         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
7509         UnmanagedFunctionPointerAttribute, use it for determining calling convention
7510         etc. Fixes #71471.
7511
7512         * reflection.c (mono_custom_attrs_get_attr): New helper function.
7513
7514         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
7515
7516 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
7517
7518         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
7519         changes to make the current context a field in MonoThread.
7520
7521 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
7522
7523         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
7524         the last change.
7525         
7526         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
7527         extracted from mono_marshal_get_native_wrapper.
7528
7529         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
7530         to create wrappers around native functions.
7531
7532         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
7533         delegates for arbitrary function pointers. Fixes #71472.
7534
7535 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7536
7537         * threads.c: cleaned up the code a little.
7538
7539 2005-02-15  Martin Baulig  <martin@ximian.com>
7540
7541         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
7542         the data table.
7543
7544         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
7545         allocate larger chunks if needed.
7546
7547 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7548
7549         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
7550         in by mistake.
7551
7552 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
7553
7554         * domain.c: keep the domains in an array and ensure the domain ids
7555         are kept small, so they can be used as indexes to domain-specific data
7556         with a small memory overhead.
7557
7558 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7559
7560         * icall.c: Handle byref types in Type icalls. Fixes #72544.
7561
7562 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
7563
7564         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
7565
7566 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
7567
7568         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
7569
7570         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
7571         values.
7572
7573         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
7574         
7575 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
7576
7577         * domain-internals.h: add the hashtable here.
7578
7579         * class-internals.h: Remove `info' from MonoMethod
7580
7581         * domain.c: Add a new hashtable, jit_trampoline_hash
7582
7583 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7584
7585         * object.c: don't set the value of static fields
7586         (fixes bug#72494).
7587
7588 2005-02-11  Martin Baulig  <martin@ximian.com>
7589
7590         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
7591         (mono_debug_add_method): Silently ignore the method if it's too big.
7592         (mono_debug_add_type): Likewise.
7593
7594 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
7595
7596         * threads.c, appdomain.c: remove #ifdefs from the code.
7597
7598 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
7599
7600         * metadata-internals.h: Added flags to MonoAssembly to cache the most
7601         common security informations. This allows us to stay in unmanaged code
7602         when doing LinkDemand and it's special cases (except for the first 
7603         time for initialization). The flags a very much used with --security.
7604         * reflection.c|h: Added code to get declarative security attributes 
7605         for LinkDemand and InheritanceDemand. This required to refactor the
7606         existing code for Demand.
7607         * security-manager.c|h: Added new method fields for the special cases
7608         of LinkDemand.
7609
7610 2005-02-10  Martin Baulig  <martin@ximian.com>
7611
7612         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
7613         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
7614
7615 2005-02-10  Martin Baulig  <martin@ximian.com>
7616
7617         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
7618         debugging code; this is almost a complete rewrite.
7619
7620         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
7621
7622 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7623
7624         * domain.c, object.h: expose mono_string_equal () and 
7625         mono_string_hash ().
7626         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
7627         it's implemented in managed code.
7628
7629 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7630
7631         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
7632         lo leak objects between appdomains.
7633
7634 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7635
7636         * assembly.c: old compilers compilation fix from 
7637         robertj@gmx.net (Robert Jordan).
7638
7639 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
7640
7641         * class-internals.h: Little reminder for the future.
7642
7643         * debug-helpers.c: Fix up wrapper_type_names
7644
7645 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7646
7647         * image.c, metadata-internals.h: when loading an image from a file,
7648         mmap all of it and use the same codepaths as when using a
7649         in-memory image: the code is simpler and we use less memory
7650         (both writable and readonly).
7651
7652 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7653
7654         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
7655         API to alloc runtime data structures that need to be tracked by the
7656         GC and contain pointers.
7657         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
7658         make the code more readable and eventually use a different GC.
7659
7660 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
7661
7662         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
7663         for out arguments.
7664         
7665 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
7666
7667         * object.c: In release_type_locks(), don't release the cctor lock
7668         if it has already been released. This fixes a crash in the
7669         thread5 test.
7670
7671 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7672
7673         * gc.c, marshal.c, icall.c: register a delegate for finalization
7674         only when the native function pointer has been allocated for it.
7675
7676 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7677
7678         * object.c: cleaned up some code, allocate objects that are
7679         pointer free with the atomic malloc variant. Allocate memory
7680         for static data from the mempool if it's pointer-free.
7681         Allocate the bounds array at the end of the array data, when needed.
7682         * object-internals.h, object.h: move a private function in a private
7683         header.
7684         * class.c: handle missing case in tracking references in fields.
7685
7686 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
7687
7688         * class.c, class-internals.h: keep track if a type has
7689         reference fields in either the instance or static fields.
7690
7691 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
7692
7693         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
7694         and renamed to MonoRuntimeInfo. Added fields to store the expected
7695         framework assembly version. Changed mono_get_framework_version and
7696         mono_get_runtime_version for a single mono_get_runtime_info method.
7697         
7698         * assembly.c: Added method to remap system assembly versions to the
7699         current executing runtime version. Removed old mapping code.
7700         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
7701         
7702         * icall.c, reflection.c: Track api changes.
7703
7704 2005-02-06  Miguel de Icaza  <miguel@novell.com>
7705
7706         * loader.c (method_from_memberref): Improve error reporting,
7707         produce the class name instead of the typeref/typedef index. 
7708
7709 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
7710
7711         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
7712
7713 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7714
7715         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
7716         stdcall and charset name mangling.  Reorganize the code and add
7717         some tracing stuff.
7718
7719 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
7720
7721         * monodiet.c: More iters!
7722
7723         * marshal.c: Iter usage.
7724
7725         * icall.c: Iter usage.
7726
7727         * object.c: Use iters.
7728
7729         * debug-helpers.c: More iters
7730
7731 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7732
7733         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
7734         under win32.
7735
7736 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
7737
7738         * mono-debug-debugger.c: use iters
7739
7740         * class.c, class-internals.h: mono_class_setup_events is static
7741         now
7742
7743         * All callers: use iters
7744
7745 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7746
7747         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
7748         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
7749
7750 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
7751
7752         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
7753
7754         * marshal.h: Add prototypes for ldfld/stfld_remote.
7755
7756         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
7757         this is called during startup.
7758         
7759 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
7760
7761         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
7762         MonoThreadsSync struct private in monitor.c. Changed the way
7763         MonoThreadsSync is allocated so it's faster and there is no
7764         need to keep track of it with a finalizer and it uses less memory.
7765         This also finally allows us to allocate mono objects as ptrfree when
7766         there are no reference fields.
7767
7768 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
7769
7770         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
7771         disappearing link to the GC interface and use them to simplify
7772         the gchandles code.
7773
7774 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
7775
7776         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
7777         stfld_remote which call mono_load/store_field_new. This allows methods
7778         calling ldfld/stfld wrappers to be AOTed.
7779
7780         * console-io.c: Include sys/filio.h under solaris.
7781         
7782         * console-io.c: Include curses.h if needed correctly.
7783
7784 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
7785         
7786         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
7787         method->klass as well.
7788
7789         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
7790
7791         * class.c (mono_class_init): Switch on lazy initialization of 
7792         methods.
7793
7794         * class.c (mono_class_get_finalizer): Handle the case when the 
7795         finalizer is inherited.
7796
7797 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7798
7799         * console-io.c: <curses.h> is needed by term.h on solaris.
7800
7801 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
7802
7803         * icall.c, class-internals.h, monodiet.c, class.c: Remove
7804         mono_class_setup_properties where possible. Remove this ftn from
7805         the header file, and make it static.
7806
7807 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
7808
7809         * loader.c: Add missing setup_... call.
7810
7811         * class.c: Add missing setup_... calls.
7812
7813         * class.c (mono_class_init): Switch on lazy initialization of 
7814         the generic vtable.
7815         
7816         * class.c (mono_class_init): Fix generics broken by the recent changes.
7817
7818         * monodiet.c (handle_type): Add missing setup_... calls.
7819
7820         * class.c: Back out garbage in previous patch.
7821         
7822         * class.c: Add missing setup_... calls.
7823
7824         * class.c (mono_class_get_method_from_name_flags): Avoid calling
7825         mono_class_setup_methods () if possible.
7826
7827         * class-internals.h (MonoClass): Add 'has_cctor' flag.
7828
7829         * class-internals.h (MonoCachedClassInfo): New structure.
7830
7831         * class.c: Initialize properties and events fields of MonoClass lazily.
7832
7833         * class.c: Add infrastructure for lazily initializing the methods and
7834         vtable fields of MonoClass. Not yet used.
7835
7836         * class.c (mono_class_get_finalizer): New helper function.
7837
7838         * class.c: Add infrastructure for loading some class related data from
7839         an AOT file.
7840
7841         * object.c: Add infrastructure for initializing the vtable from data
7842         in the AOT file.
7843
7844         * gc.c (run_finalize): Use mono_class_get_finalizer ().
7845
7846         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
7847         appropriate initialization function before accessing parts of the
7848         MonoClass structure.
7849
7850         * marshal.c: Fix warnings.
7851         
7852         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
7853
7854         * mono-debug-debugger.c (get_exception_message): Use 
7855         mono_class_get_method_from_name_flags ().
7856
7857 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
7858
7859         * reflection.c, appdomain.c: Replace a few manual searches that
7860         Zoltan missed. (Paolo approved this part of my initial patch).
7861
7862 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
7863
7864         * profiler.c: disable recording statistical events at report time.
7865
7866 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7867
7868         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
7869         to byteswap arrays of enum values, too (bug #72080).
7870
7871 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
7872
7873         * appdomain.c (set_domain_search_path): Allow this to be called if
7874         domain->setup is not yet set.
7875
7876         * loader.c (mono_method_get_index): New helper function.
7877
7878         * loader.c reflection.c: Use mono_method_get_index ().
7879
7880         * class.c (mono_class_get_method_from_name_flags): New helper method.
7881
7882         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
7883         this.
7884
7885         * class.c (mono_class_get_cctor): New helper method.
7886
7887         * string-icalls.c object.c class.c marshal.c reflection.c: Use
7888         mono_class_get_method () to look up methods.
7889
7890 2005-02-01  Miguel de Icaza  <miguel@novell.com>
7891
7892         * console-io.c: Fix the build, this should work on Windows.
7893
7894 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
7895
7896         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
7897         be set to null to keep things valid
7898
7899 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7900
7901         * icall.c: added Console 2.0 icalls.
7902         * Makefile.am: added console-io.[ch]
7903         * console-io.[ch]: internal calls for Console 2.0 API.
7904
7905 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
7906
7907         * class.c: make sure we consider all the interfaces
7908         when calculating max_interface_id (bug found by
7909         Jeroen Frijters running ikvm).
7910
7911 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
7912
7913         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
7914         valuetype fields to null.
7915
7916         * object.c (set_value): Ditto. Fixes #71669.    
7917
7918 2005-01-31  Martin Baulig  <martin@ximian.com>
7919
7920         * metadata.c (mono_metadata_has_generic_params): New public
7921         function; checks whether something is a generic method.
7922
7923 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7924
7925         * appdomain.c: fix infinite recursion when adding assemblies.
7926
7927 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
7928
7929         * object.c: Fix small typo to return all items for Environment.
7930         GetCommandLineArgs.
7931
7932 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7933
7934         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
7935         reflection.c: more domain and assembly-unload related fixes
7936         and memory leaks plugs.
7937
7938 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
7939
7940         * 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.
7941
7942 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
7943
7944         * loader.c (mono_method_signature): Make this method lazy
7945         (mono_get_method_from_token): Don't computate the signature here.
7946
7947         Doing this saves quite a bit of memory. I got 90 kb on starting up
7948         monodoc. It should also save some disk reads on startup.
7949
7950         * *: MonoMethod->signature might be NULL now. You *MUST* use
7951         mono_method_signature.
7952
7953 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
7954
7955         * object.c (mono_runtime_get_main_args): Return an array from the
7956         current domain here. Fixes #71938.
7957
7958 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
7959
7960         * monitor.c: formatting changes to comply with the
7961         mono coding style and remove #ifdefs from the code.
7962
7963 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
7964
7965         * metadata.c, private.h: remove some unneeded data
7966         and use a more compact representation for table schemas.
7967
7968 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
7969
7970         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
7971         to get a better distribution in hash tables.
7972         * *.c: use mono_aligned_addr_hash() where appropriate.
7973         * assembly.c: make var static.
7974
7975 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
7976
7977         * domain-internals.h: Put MonoJitInfo on a diet.
7978
7979         * domain.c: Fix a warning.
7980
7981 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7982
7983         * gc.c: rework the gc handles code to reuse handles
7984         when freed.
7985
7986 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
7987
7988         * domain.c: fixed long standing bug in mono_string_equal() which
7989         was brought to light with the ldstr changes.
7990
7991 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
7992
7993         * reflection.c: Remove warning by adding missing include for marshal.h
7994
7995 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
7996
7997         * domain.c, object.c: change the ldstr_table to hold
7998         MonoString* as keys: makes the runtime isinterned lookup
7999         faster and simplifies memory management.
8000
8001 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
8002  
8003         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
8004         possible to add imperative security checks before calling the icall.
8005         * reflection.c: Return security attributes on the original MonoMethod
8006         (and not the wrapped one). This fix permissions on icalls.
8007
8008 2005-01-25  Dick Porter  <dick@ximian.com>
8009
8010         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
8011         the check for mktime() support actually test the mktime() return
8012         value.  "Fixes" bug 71682, though the output is still different to
8013         MS.
8014
8015 2005-01-25  Martin Baulig  <martin@ximian.com>
8016
8017         * class.c (mono_class_is_assignable_from): Make this work for
8018         generic instances.
8019
8020 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
8021
8022         * marshal.c (mono_string_utf8_to_builder)
8023         (mono_string_builder_to_utf16): We might not have ownership of the
8024         string. In thise case, we need to create a new buffer.
8025
8026         * object-internals.h (mono_stringbuilder_capacity): sb->str might
8027         be null, in which case, use the default capacity.
8028
8029 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
8030
8031         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
8032         GC events to the profiler.
8033
8034 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
8035
8036         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
8037         if you don't want the GC to run.
8038
8039 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
8040
8041         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
8042         start providing a GC API and keeping different implementations in
8043         their own file.
8044         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
8045
8046 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
8047
8048         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
8049         mmap rather than allocating a huge buffer.
8050         (mono_debug_close_mono_symbol_file): Free the buffer allocated
8051         above.
8052
8053 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
8054
8055         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
8056         and CheckExecutionRights.
8057         * reflection.c|h: Keep the index of the declarative security to be 
8058         used, instead of the pointer, when AOT compiler is used. Also add 
8059         class initialization when requesting demands.
8060         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
8061         CheckExecutionRights. Both properties are now FALSE by default, and
8062         unmodifiable, unless the --security option is used.
8063
8064 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8065
8066         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
8067         reflection.c: properly refcount images and assemblies, many leaks fixed.
8068
8069 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8070
8071         * threadpool.c: increase the timeout for threads in the thread pool to
8072         10s.  Fixes bug #67159.
8073
8074 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
8075
8076         * class-internals.h: Sun's compiler insists on explicit
8077         signed on bit fields to handle then correctly.
8078
8079 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
8080
8081         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
8082         Make the size of the array fit only the number of invalid path
8083         chars that we have.
8084
8085         * class.c (_mono_class_get): Improve the error reporting when a
8086         class referenced is not found, to assist debugging. 
8087
8088 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
8089
8090         * threads.c: fix off-by-one error.
8091         * domain.c: free data allocated in the domain.
8092
8093 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
8094
8095         * reflection.c (mono_method_body_get_object): Fill out exception info
8096         as well.
8097
8098         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
8099         structure.
8100         
8101 2005-01-19  Martin Baulig  <martin@ximian.com>
8102
8103         * loader.c (mono_get_method_constrained): Make this work again.
8104
8105 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
8106
8107         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
8108         guint16 to match the managed side.
8109
8110         * reflection.c (mono_reflection_body_get_object): Fill out local
8111         variables array.
8112
8113         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
8114         as well.
8115
8116         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
8117         'local_var_sig_token'.
8118
8119 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
8120
8121         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
8122         System.Drawing.
8123
8124         * reflection.c (mono_method_body_get_object): Handle abstract and
8125         runtime methods.
8126
8127 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
8128
8129         * marshal.c, loader.c, class-internals.h, reflection.c:
8130         store the emthod data for a wrapper in an array instead of a list.
8131
8132 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
8133
8134         * marshal.c: change the code to allocate memory more
8135         conservatively for method wrappers.
8136
8137 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8138
8139         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
8140         fields from MonoClass to the marshal info structure where they belong.
8141
8142 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8143
8144         * class.c, object.c, class-internals.h, marshal.c: rearrange
8145         some fields and tweak some types to lower memory usage.
8146
8147 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
8148
8149         * threads.c (signal_thread_state_change): Handle the case when the
8150         target thread is the current thread.
8151
8152         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
8153
8154         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
8155         emit_ptr_to_object_conv. 
8156
8157         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
8158         marshalling. Fixes #71352.
8159
8160 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8161
8162         * metadata.h, blob.h: move table enum to blob.h so it can be included
8163         in any header.
8164         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
8165         cut the size of MonoImage/MonoDynamicImage.
8166
8167 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
8168
8169         * profiler.c (mono_profiler_install_simple): Fix default arguments.
8170
8171 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
8172
8173         * reflection.c, reflection.h, icall.c: add a function to check
8174         if an attribute type is defined for a metadata object.
8175
8176 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
8177
8178         * object-internals.h: Added some needed fields from StringBuilder class.
8179         * marshal.c: Set the maxCapacity when creating a StringBuilder.
8180
8181 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
8182
8183         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
8184         threads before shutting down the runtime.
8185
8186         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
8187
8188 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8189
8190         * object-internal.h, threads.c: implement stacksize and 
8191         parameterized thread start functionality (requires
8192         matching corlib). Marked broken code for later removal.
8193
8194 2005-01-12  Martin Baulig  <martin@ximian.com>
8195
8196         * class-internals.h (MonoGenericClass): Moved the `initialized'
8197         flag to MonoDynamicGenericClass, removed `init_pending'.
8198         (MonoGenericInst): Added `is_reference' flag.
8199
8200 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
8201
8202         * reflection.c (mono_image_create_pefile): Only set the pe_offset
8203         inside the MSDOS header. Fixes #71201.
8204
8205         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
8206         gc thread.
8207         (mono_domain_finalize): Ditto.
8208
8209 2005-01-12  Martin Baulig  <martin@ximian.com>
8210
8211         * class.c (mono_get_shared_generic_class): Use the cache for
8212         non-dynamic generic classes.
8213
8214         * class-internals.h (mono_class_create_generic_2): Removed
8215         function prototype, this function is now static inside class.c.
8216
8217         * class.c (mono_class_create_generic_2): Made this static, only
8218         call it from mono_class_init() and mono_class_setup_parent().
8219         (collect_implemented_interfaces_aux): Call mono_class_init() on
8220         the interfaces we collect.
8221         (mono_class_setup_vtable): Call mono_class_init (class->parent).
8222
8223 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8224
8225         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
8226         it a real thread handle.
8227
8228         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
8229         MonoJitExceptionInfo, since each catch clause needs its own variable.
8230         
8231 2005-01-11  Dick Porter  <dick@ximian.com>
8232
8233         * image.c (mono_pe_file_open): New variant on mono_image_open()
8234         that does not set up the CLI metadata; used for FileVersionInfo so
8235         it can get the data for windows binaries too.
8236         
8237         * process.c (process_read_string_block): Don't read off the end of
8238         the StringTable block.
8239
8240         These both fix bug 70766.
8241
8242 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
8243
8244         * gc.c: set some fields to NULL at GC cleanup time.
8245         * threads.c: if we quit the main thread, call exit ().
8246
8247 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
8248
8249         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
8250
8251 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
8252
8253         * threads.h, threads.c, object.c: added accessor and settor for
8254         main_thread. Handle it specially when exiting from it: wait
8255         for other foreground threads to exit.
8256
8257 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
8258
8259         * process.c, verify.c: remove some bloat.
8260
8261 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
8262
8263         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
8264         the calling convention to cdecl under win32.
8265
8266 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
8267
8268         * object.c (mono_object_get_size): New function to get the size of
8269         an object instance.
8270
8271         * profiler.c (simple_allocation): Use above.
8272
8273 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
8274
8275         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
8276         ves_icall_System_AppDomain_getRootDomain (as it's not required to
8277         get an appdomain by it's id and we can't assume the root's id is 0).
8278         * domain-internals.h: Change the function prototype to match.
8279         * icall.c: Change the icall table for AppDomain.
8280
8281 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
8282
8283         * locales.c (string_invariant_compare_char): Only compute
8284         GUnicodeTypes in the case where we need them.  Test for ordinality
8285         first and return if so.
8286
8287         From the commit:
8288
8289                 /*
8290                  * FIXME: here we must use the information from c1type and c2type
8291                  * to find out the proper collation, even on the InvariantCulture, the
8292                  * sorting is not done by computing the unicode values, but their
8293                  * actual sort order.
8294                  */
8295
8296 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8297
8298         * loader.c: for P/Invoke methods, allow the "Internal" shared
8299         library name to refer to the calling process symbol namespace.
8300
8301 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
8302
8303         * Makefile.am: Add the security manager to the build.
8304         * security-manager.c|h: New. Initialization of the security manager.
8305
8306 2005-01-07  Dick Porter  <dick@ximian.com>
8307
8308         * threads.c: 
8309         * monitor.c: Update thread state during Monitor and WaitHandle
8310         waits.  Fixes bug 71031.
8311
8312 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
8313
8314         * reflection.c (property_encode_signature): Correctly handle when the
8315         property has no methods.
8316
8317 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
8318
8319         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
8320         
8321         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
8322         fields from mb, not rmb. Fixes #71017.
8323
8324         * marshal.c (emit_ptr_to_str_conv): Add support for 
8325         ByValTStr -> string conversion. Fixes #71015.
8326
8327         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
8328
8329         * mempool.c (mono_mempool_contains_addr): New helper function.
8330
8331 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8332
8333         * metadata.c (mono_metadata_compute_size): Fix size calculation of
8334         HasSematics encoded fields.
8335         
8336         * metadata.c (mono_type_to_unmanaged): Improve error message for 
8337         invalid string marshalling.
8338
8339         * metadata.c: Fix warnings.
8340         
8341 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8342
8343         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
8344         profiler support.
8345
8346 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
8347
8348         * domain.c object.c domain-internals.h: Revert part of r38077 since the
8349         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
8350         tests.
8351
8352 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
8353
8354         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
8355         so methods containing these can be AOTed.
8356
8357 2005-01-03  Martin Baulig  <martin@ximian.com>
8358
8359         * loader.c (find_method): Removed the hack for generic instances.
8360         (method_from_memberref): If our parent is a generic instance, pass
8361         its generic type definition to find_method() and then inflate the
8362         method.
8363         (mono_get_method_constrained): Pass the generic type definition to
8364         find_method() and inflate the method later.
8365
8366         * class-internals.h (MonoStats): Added `generic_class_count'.
8367
8368         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
8369         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
8370
8371         * reflection.c (mono_custom_attrs_from_params): Don't ignore
8372         generic type definitions.
8373
8374 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
8375
8376         * loader.c icall.c: Fix warnings.
8377
8378 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
8379
8380         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
8381         blittable types. Fixes #70864.
8382
8383 2004-12-29  Martin Baulig  <martin@ximian.com>
8384
8385         * icall.c
8386         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
8387
8388         * reflection.c (mono_method_get_object): Create a
8389         "System.Reflection.MonoGenericMethod" for inflated methods; don't
8390         call mono_get_inflated_method().
8391
8392         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
8393
8394 2004-12-27  Martin Baulig  <martin@ximian.com>
8395
8396         * class-internals.h (MonoMethod): Added `is_inflated' flag.
8397         (MonoMethodInflated): Added `inflated' field.
8398
8399         * class.c (mono_class_inflate_generic_method): Don't really
8400         inflate the method here; just set the `is_inflated' flag in the
8401         MonoMethod.
8402         (mono_class_get_inflated_method): Actually inflate the method here
8403         if it's not already inflated; we use the MonoMethodInflated's new
8404         `inflated' field as a cache.
8405
8406 2004-12-26  Martin Baulig  <martin@ximian.com>
8407
8408         * class.c
8409         (inflate_generic_class): Moved some code out of inflate_generic_type().
8410         (mono_class_inflate_generic_method): If we're already inflated,
8411         inflate the context and use the declaring method; ie. make sure
8412         the declaring method of an inflated method is always the generic
8413         method definition.
8414         (mono_class_create_from_typedef): Create
8415         `class->generic_container->context->gclass'.
8416
8417 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
8418
8419         * metadata-internals.h, marshal.c, reflection.c: More
8420         MonoGHashTable->GHashTable.
8421
8422         * domain-internals.h, class.c: Change MonoGHashTable's into
8423         GHashTables for some cases where no gc stuff is used
8424
8425         All users: update apis
8426
8427 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
8428
8429         * metadata.c (builtin_types): Make this `const'. Makes this get
8430         put into the shareable section.
8431         (mono_metadata_init): Casts to make gcc happy.
8432
8433 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
8434
8435         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
8436
8437 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
8438
8439         * icall.c: Added an internal call to retrieve the position and length
8440         of assembly-level declarative security attributes (RequestMinimum, 
8441         RequestOptional and RequestRefuse). This is used by the Assembly class
8442         to re-create the corresponding permission sets.
8443
8444 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
8445
8446         * marshal.c: fix the stelemref wrapper to be type correct
8447         (and faster).
8448
8449 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8450
8451         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
8452         to do key & 0x7fffffff. Hashtable already does this. It just
8453         results in longer code.
8454
8455 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8456
8457         * appdomain.c: Bump corlib version.
8458         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
8459         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
8460         * reflection.c|h: Add functions to get declarative security infos
8461         (blob position and length) for assemblies, classes and methods.
8462
8463 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
8464
8465         * reflection.c: sort the constant table (bug #70693).
8466
8467 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
8468
8469         * object-internals.h, threads.c, domain.c: add accessors for
8470         the MonoThread and MonoDomain tls keys.
8471
8472 2004-12-18  Martin Baulig  <martin@ximian.com>
8473
8474         * class.c (inflate_generic_type): If we're inflating a generic
8475         instance, set `ngclass->context->container = context->container';
8476         ie. the container we inflated into.
8477
8478         * metadata.c (mono_metadata_parse_generic_param): Reflect above
8479         inflate_generic_type() changes.
8480
8481 2004-12-17  Martin Baulig  <martin@ximian.com>
8482
8483         * class-internals.h
8484         (MonoGenericClass): Replaced `MonoType *generic_type' with
8485         `MonoClass *generic_class'.  Removed `dynamic_info'; if
8486         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
8487         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
8488
8489 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8490
8491         * exception.c (mono_exception_from_token): New helper function.
8492
8493 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8494
8495         * assembly.c (mono_assembly_load_with_partial_name): Call 
8496         mono_assembly_loaded before invoking the preload hooks. Fixes
8497         #70564.
8498
8499         * object-internals.h (MonoThread): Change culture_info and 
8500         ui_culture_info into an array.
8501
8502         * threads.c: Cache culture info objects from more than one appdomain.
8503
8504         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
8505         current UI culture.
8506
8507 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8508
8509         * threads.h threads.c appdomain.c: Clear the culture_info field of
8510         all threads during unloading if they point to an object in the dying
8511         appdomain.
8512
8513 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
8514
8515         * culture-info.h (TextInfoEntry): New struct
8516         * object-internals.h: sync with managed
8517         * locales.c: fill the `text_info_data' field
8518         * culture-info-tables.h: update
8519
8520 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
8521
8522         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
8523         collector.
8524
8525 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
8526
8527         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
8528         (ves_icall_ModuleBuilder_getMethodToken): Ditto
8529
8530 2004-12-12  Martin Baulig  <martin@ximian.com>
8531
8532         * mono-debug-debugger.c (write_type): If we're an enum and the
8533         builtin types have already been initialized, call mono_class_init().
8534
8535 2004-12-11  Martin Baulig  <martin@ximian.com>
8536
8537         * metadata.c (mono_metadata_load_generic_params): Added
8538         `MonoGenericContainer *parent_container' argument; automatically
8539         compute `container->is_method'; pass the correct owner to
8540         get_constraints().      
8541
8542         * reflection.c (compare_genericparam): Sort the GenericParam table
8543         according to increasing owners. 
8544
8545 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
8546
8547         * profiler.c: allow disabling the default profiler.
8548
8549 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
8550
8551         * decimal.c, icall.c: allow disabling System.Decimal support.
8552
8553 2004-12-09  Marek Safar <marek.safar@seznam.cz>
8554
8555         * reflection.c: Add support for null attribute arguments.
8556
8557 2004-12-09  Martin Baulig  <martin@ximian.com>
8558
8559         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
8560         names to get rid of compiler warnings.
8561
8562 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8563
8564         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
8565         mono_marshal_load_type_info (). Fixes #69625.
8566         (mono_marshal_get_ptr_to_struct): Likewise.
8567
8568 2004-12-08  Martin Baulig  <martin@ximian.com>
8569
8570         * mono-debug.h: Bumped version number to 47.
8571
8572         * mono-debug-debugger.c
8573         (mono_debugger_event_handler, mono_debugger_event): Take two
8574         guint64 arguments insteed of a gpointer and a guint32.  
8575
8576 2004-12-08  Martin Baulig  <martin@ximian.com>
8577
8578         * debug-mono-symfile.h
8579         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
8580         `address' to `native_offset'.
8581
8582 2004-12-08  Martin Baulig  <martin@ximian.com>
8583
8584         * class.c (mono_class_create_from_typespec): Only inflate if we
8585         either have `context->gclass' or `context->gmethod'.
8586
8587 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8588
8589         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
8590
8591         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
8592
8593         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
8594
8595         * reflection.c (mono_assembly_get_object): Remove the workaround put
8596         in for the release.
8597         
8598         * appdomain.c: Use the corlib_internal field from MonoAssembly.
8599
8600         * appdomain.c: Bump corlib version.
8601
8602         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
8603         be visible in other appdomains.
8604
8605 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
8606
8607         * threads.c: Interlocked inc and dec for longs were messed up,
8608         use a KISS based impl for this. Fixes 70234
8609
8610 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
8611
8612         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
8613
8614 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
8615
8616         * icall.c: fix to follow policy not to allow struct
8617         arguments in icalls.
8618
8619 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8620
8621         * process.c: make the patch that handles spaces in file paths work
8622         on mono/windows too.
8623
8624 2004-12-06  Martin Baulig  <martin@ximian.com>
8625
8626         * class.c (mono_class_create_generic): Call
8627         mono_class_setup_supertypes() if we're dynamic.
8628         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
8629
8630 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
8631
8632         * object-internals.h: Add new fields to MonoThread.
8633
8634         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8635
8636         * icall.c threads-types.h threads.c: Add new icalls.
8637
8638         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
8639
8640         * object-internals.h (MonoReflectionAssembly): Sync object layout with
8641         managed side.
8642
8643         * appdomain.c: Bump corlib version.
8644
8645         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
8646         internal assemblies. Fixes #69181.
8647
8648 2004-12-05  Martin Baulig  <martin@ximian.com>
8649
8650         * class.c (mono_class_inflate_generic_signature): Make this a
8651         no-op if `context' is NULL or we don't have any type parameters;
8652         also copy `sentinelpos'.        
8653
8654 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
8655
8656         * image.c: Add unbox_wrapper_cache.
8657
8658         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
8659
8660         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
8661         function generator.
8662         
8663         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
8664         Fixes #70173.
8665
8666         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
8667         
8668 2004-12-04  Martin Baulig  <martin@ximian.com>
8669
8670         * loader.c (mono_method_get_signature_full): New public function;
8671         like mono_method_get_signature(), but with an additional
8672         `MonoGenericContext *' argument.
8673
8674         * class.c (mono_class_inflate_generic_signature): Formerly known
8675         as inflate_generic_signature(); make this public.
8676
8677 2004-12-04  Martin Baulig  <martin@ximian.com>
8678
8679         * metadata.c
8680         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
8681         instead of a `MonoGenericContainer *'.  
8682         (mono_metadata_parse_array_full): Likewise.
8683         (mono_metadata_parse_signature_full): Likewise.
8684         (mono_metadata_parse_method_signature_full): Likewise.
8685         (mono_metadata_parse_generic_inst): Likewise.
8686         (mono_metadata_parse_generic_param): Likewise.
8687         (mono_metadata_parse_mh_full): Likewise.
8688         (mono_type_create_from_typespec_full): Likewise.
8689
8690 2004-12-03  Martin Baulig  <martin@ximian.com>
8691
8692         * class-internals.h (MonoGenericContainer): Replaced the
8693         `MonoGenericContext * pointer with a `MonoGenericContext'
8694         structure and made it the first element.
8695
8696 2004-12-03  Martin Baulig  <martin@ximian.com>
8697
8698         * class.c
8699         (inflate_generic_type): Set the `context->container' when creating
8700         a new MonoGenericContext.
8701         (mono_class_inflate_generic_method): Likewise.
8702         (mono_class_create_from_typespec): Just use `context->container'
8703         to get the container.
8704
8705         * loader.c (method_from_methodspec): Set `context->parent' from
8706         `context->container' - and if that's a method container, use its
8707         parent.  Also set the `context->container' when creating a new
8708         MonoGenericContext.
8709         (mono_get_method_from_token): Use just `context->container' to get
8710         the container.
8711
8712         * metadata.c (do_mono_metadata_parse_generic_class): Also set
8713         `gclass->context->container'.
8714
8715         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
8716         the `context->container' when creating a new MonoGenericContext.
8717
8718 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
8719
8720         * reflection.c (compare_genericparam): Sort params with identical
8721         owner by their number. Fixes gen-111 on sparc.
8722
8723 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
8724
8725         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
8726         around the domain changes.
8727
8728         * appdomain.c (mono_domain_unload): Handle the case when the thread
8729         calling Unload is itself being aborted during unloading. Fixes #70022.
8730
8731         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
8732
8733         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
8734         checkpoint_func as an icall so it gets a wrapper.
8735         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
8736         in the cross-appdomain wrappers too.
8737
8738         * threads.c (mono_thread_has_appdomain_ref): Make this public.
8739
8740         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
8741
8742         * reflection.c: Fix some memory leaks.
8743         
8744 2004-12-02  Martin Baulig  <martin@ximian.com>
8745
8746         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
8747
8748         * metadata.c (generic_class_cache): New static hashtable.
8749         (mono_metadata_lookup_generic_class): New public method.
8750
8751 2004-12-02  Martin Baulig  <martin@ximian.com>
8752
8753         * class.c (mono_class_create_from_typedef): Call
8754         mono_class_setup_parent() and mono_class_create_mono_type() before
8755         parsing the interfaces.
8756
8757 2004-12-02  Martin Baulig  <martin@ximian.com>
8758
8759         * metadata.c (generic_inst_cache): New static hashtable.
8760         (mono_metadata_lookup_generic_inst): New public function.
8761         (mono_metadata_inflate_generic_inst): New public function.
8762         (mono_metadata_parse_generic_inst): New public function.
8763         (do_mono_metadata_parse_generic_class): Use the new
8764         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
8765         since this'll also use the cache.
8766
8767         * reflection.c (mono_reflection_bind_generic_method_parameters):
8768         Use mono_metadata_lookup_generic_inst() to use the new cache.
8769
8770         * class.c (inflate_mono_type): Use
8771         mono_metadata_inflate_generic_inst() to inflate a generic
8772         instance; this'll also use the new cache.
8773
8774         * loader.c (method_from_methodspec): Use
8775         mono_metadata_parse_generic_inst() and
8776         mono_metadata_inflate_generic_inst() rather than parsing it
8777         manually, so we can use the new cache.
8778
8779 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
8780
8781         * threads.c (wait_for_tids): Do not incorrectly free threads when 
8782         the wait times out.
8783
8784 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8785
8786         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
8787         iter->args based on whether parameters are passed in registers (i.e.
8788         MONO_ARCH_REGPARMS is defined)
8789
8790 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
8791
8792         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
8793         the exception message. Fixes #70070.
8794         (method_from_methodspec): Fix warnings.
8795
8796 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8797
8798         * process.c: (complete_path) return the path quoted
8799
8800 2004-12-01  Martin Baulig  <martin@ximian.com>
8801
8802         * class-internals.h (MonoGenericInst): New structure.
8803         (MonoGenericClass): Replaced `type_argc', `type_argv' and
8804         `is_open' with `MonoGenericInst *inst'.
8805         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
8806         `is_open' with `MonoGenericInst *inst'.
8807
8808 2004-11-30  Martin Baulig  <martin@ximian.com>
8809
8810         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
8811
8812         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
8813         to `generic_class_cache'.
8814
8815         * metadata.c
8816         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
8817         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
8818         (mono_generic_inst_is_valuetype): Renamed to
8819         mono_generic_class_is_valuetype().
8820
8821         * class-internals.h
8822         (MonoGenericInst): Renamed to MonoGenericClass.
8823         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
8824         (MonoClass): Renamed `generic_inst' to `generic_class'.
8825         (MonoGenericContext): Renamed `ginst' to `gclass'.
8826
8827         * object-internals.h
8828         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
8829
8830         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
8831         mono_reflection_generic_class_initialize().
8832
8833         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
8834         now known as "System.Reflection.MonoGenericClass".
8835         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
8836
8837 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
8838
8839         * class-internals.h: Added a flag field to MonoClass to cache the
8840         declarative security attributes actions associated with the class.
8841         * domain-internals.h: Added booleans to MonoJitInfo to cache the
8842         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
8843         applicable to the JITted method.
8844         * reflection.c|h: Added functions to extract (as flags) which security
8845         actions are available (declaratively) for a method, class or assembly.
8846         * metadata.c|h: Added functions to search the declarative security
8847         table in the metadata.
8848         
8849 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
8850
8851         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
8852         EXPORTEDTYPES are already in the class name cache, so there is no
8853         need to add extra code here to look at them. Just removes a bit of
8854         cruft.
8855
8856         (ves_icall_System_Environment_get_TickCount): No need for #if
8857         WINDOWS. We already have the code in io-layer.
8858
8859 2004-11-28  Martin Baulig  <martin@ximian.com>
8860
8861         * loader.c
8862         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
8863         Fixes gen-112.cs.
8864
8865 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
8866
8867         * assembly.c (do_mono_assembly_open): Instead of having a
8868         conditional WITH_BUNDLE, incorporate support for bundles here, by
8869         having a global `bundles' variable holding a pointer to the actual
8870         bundles. 
8871
8872         (mono_register_bundled_assemblies): New API call used by the
8873         bundle code. 
8874
8875         See mkbundle.1 for details.
8876         
8877 2004-11-27  Martin Baulig  <martin@ximian.com>
8878
8879         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
8880         the vtable for generic methods.
8881
8882 2004-11-26  Martin Baulig  <martin@ximian.com>
8883
8884         * metadata.c
8885         (mono_metadata_generic_method_hash): New public function.
8886         (mono_metadata_generic_method_equal): Likewise.
8887
8888         * class-internals.h
8889         (MonoGenericContainer): Added `GHashTable *method_hash'.
8890
8891         * reflection.c (ReflectionMethodBuilder): Added
8892         `MonoGenericContainer *generic_container'.
8893         (reflection_methodbuilder_to_mono_method): Don't create a new
8894         MonoGenericContainer each time we're called.
8895         (mono_reflection_bind_generic_method_parameters): Use
8896         `container->method_hash' to cache the results so we don't create a
8897         different method if we're called several times with the same
8898         arguments.
8899
8900         * loader.c (method_from_methodspec): Use the new
8901         `container->method_hash' here, too.
8902
8903 2004-11-26  Martin Baulig  <martin@ximian.com>
8904
8905         * class.c (inflate_generic_signature): Correctly compute
8906         `res->has_type_parameters'.
8907         (mono_class_vtable): Use the `has_type_parameters' flag to
8908         determine whether we're a generic method.
8909
8910         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
8911
8912 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
8913
8914         * object.c (mono_runtime_run_main): Fix a small memory leak.
8915
8916 2004-11-25  Martin Baulig  <martin@ximian.com>
8917
8918         * class.c (set_generic_param_owner): Fixed the loop.
8919
8920 2004-11-25  Martin Baulig  <martin@ximian.com>
8921
8922         * object.c (mono_class_vtable): Don't create any JIT wrappers for
8923         generic methods.
8924
8925 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
8926
8927         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
8928         names. Fixes #69787.
8929
8930 2004-11-24  Martin Baulig  <martin@ximian.com>
8931
8932         * class.c (mono_class_create_generic_2): If we don't have a
8933         `ginst->parent', inflate `gklass->parent' to get our parent.
8934
8935 2004-11-24  Martin Baulig  <martin@ximian.com>
8936
8937         * reflection.c (compare_genericparam): Correctly sort the
8938         GenericParam table; fixes #69779.
8939
8940 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
8941
8942         * reflection.c: When writing a PE file, don't create a huge
8943         buffer in memory. Just write the arrays we have to the file.
8944         This reduces memory usage.
8945
8946         * metadata-internals.h: MonoDynamicStream pefile is no longer used
8947         globally.
8948
8949 2004-11-17  Martin Baulig  <martin@ximian.com>
8950
8951         * class.c (mono_class_init): Don't setup `class->parent' for
8952         dynamic instances; moved this to mono_class_generic_2().
8953         (mono_class_create_generic): Also set `klass->inited' for dynamic
8954         generic instances.
8955         (mono_class_create_generic_2): Don't do anything for dynamic
8956         generic instances.  Set `klass->parent' here and also call
8957         mono_class_setup_parent() here. 
8958
8959         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
8960         `MonoType *parent' argument; set `ginst->parent' before calling
8961         mono_class_create_generic_2(), so we set the correct parent.
8962
8963 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
8964
8965         * reflection.c: allow getting attributes from ModuleBuilder
8966         (used by ikvm).
8967
8968 2004-11-17  Martin Baulig  <martin@ximian.com>
8969
8970         * class.c (mono_class_create_from_typedef): If a type parameter is
8971         inherited from an outer class, set its owner to that class.
8972
8973 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
8974
8975         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
8976           for (int*) written size. This fixes bug #69592.
8977
8978 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
8979
8980         * icall.c: Added IsAuthenticodePresnet internal call.
8981         * image.c|h: New function that check a MonoImage for an Authenticode
8982         signature in the certificate PE data directory.
8983         * security.c|h: New internal call to ask the runtime if an 
8984         Authenticode signature seems referenced in the PE header.
8985
8986 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
8987
8988         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
8989
8990         * reflection.c (mono_image_create_pefile): Free the assembly streams
8991         after writing out the assembly file.
8992
8993         * object.c (mono_runtime_run_main): Fix small memory leak.
8994
8995         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
8996         property access modifiers. Fixes #69389.
8997
8998 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
8999
9000         * domain.c, object.c, object-internals.h, domain-internals.h,
9001         object.h, marshal.c: keep dynamic code info per domain.
9002
9003 2004-11-15  Martin Baulig  <martin@ximian.com>
9004
9005         * class.c (mono_type_get_name_recurse): Put type arguments in
9006         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
9007         see bug #68387.
9008
9009 2004-11-15  Martin Baulig  <martin@ximian.com>
9010
9011         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
9012         (mono_class_setup_vtable): When computing `the_cname' for a
9013         generic instance, don't include the namespace since we'd otherwise
9014         add it twice.
9015
9016 2004-11-15  Martin Baulig  <martin@ximian.com>
9017
9018         * class.c (mono_class_create_generic): Changed return type to void.
9019         (mono_class_create_generic_2): New public function; setup
9020         `class->method', `class->field' and `class->interfaces' here
9021         instead of in mono_class_init().
9022
9023         * class.h (mono_class_create_generic): Moved to class-internals.h.
9024
9025 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
9026
9027         * reflection.c (mono_image_create_pefile): take a file HANDLE.
9028         rather than writing to memory, write to this file. Right now,
9029         we are just writting into a buffer, and copying that. However
9030         we can avoid the buffer later.
9031
9032         (mono_dynamic_stream_reset): new function
9033
9034         * icall.c, object-internals.h: update for the above.
9035
9036 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
9037
9038         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
9039         have been using gc'd memory. First it is slower, unlikely
9040         the comment in the source code said, secondly, it increases
9041         our footprint to do it in the gc.
9042
9043         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
9044         the method so that it does not have to copy to managed code.
9045
9046 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
9047
9048         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
9049
9050 2004-11-12  Martin Baulig  <martin@localhost>
9051
9052         * reflection.c (mono_image_create_token): Allow generic method
9053         definitions here, since they may appear in an `.override'; see
9054         gen-98/gen-99 for an example.
9055
9056 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
9057
9058         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
9059         #69365.
9060
9061         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
9062         descriptive.
9063
9064 2004-11-11  Martin Baulig  <martin@ximian.com>
9065
9066         * class.c (mono_class_setup_vtable): In an explicit interface
9067         implementation, the method name now includes the arity.
9068
9069 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
9070
9071         * object.c (mono_array_full_copy): Fix warning.
9072
9073 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
9074
9075         * appdomain.c: Removed look_for_method_by_name(). Use the new method
9076         mono_class_get_method_from_name() instead.
9077         
9078         * class-internals.h: Added two new types of wrappers. 
9079         Added MonoRemotingTarget enum. Added new trampoline function type, which
9080         takes an additional MonoRemotingTarget value as parameter, so it is
9081         possible to request a trampoline for a specific target.
9082         
9083         * class.c: Added new mono_class_get_method_from_name() method.
9084         
9085         * class.h: In MonoRemoteClass, we can have now to vtables, one for
9086         general remoting sinks and one specific for cross domain calls.
9087         
9088         * debug-helpers.c: Added new wrapper names.
9089         
9090         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
9091         of a remote class.
9092         
9093         * image.c: Porperly delete value objects form the remoting invoke hashtable.
9094         
9095         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
9096         with several other methods (mono_marshal_get_xappdomain_dispatch,
9097         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
9098         and others) can generate a fast remoting wrapper for cross domain calls.
9099         More information can be found in docs/remoting.
9100         Other changes: Removed mono_find_method_by_name, and used
9101         mono_class_get_method_from_name instead.
9102         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
9103         is stored in the remoting invoke hashtable.
9104         
9105         * marshal.h: published the new method for getting the xdomain wrapper,
9106         and also added a method for getting the adequate wrapper for a given
9107         method and target.
9108         
9109         * object-internals.h, object.c: Added a couple of methods for capying and
9110         cloning arrays.
9111         Modified mono_install_remoting_trampoline, which takes the new remoting
9112         trampoline that has a remoting target as parameter.
9113         mono_class_proxy_vtable now also takes a remoting target as parameter, and
9114         will return the most suitable vtable for the target.
9115         Added mono_remote_class_vtable, which returns the vtable of a remote class
9116         (which can be the normal remoting vtable or the xdomain vtable).
9117         
9118         * threads.c: the xdomain invoke and dispatch wrappers must also be
9119         protected against interruptions.
9120
9121 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9122
9123         * icall.c: use memmove in BlockCopyInternal when the source and
9124         destination arrays are the same.
9125
9126 2004-11-09  Martin Baulig  <martin@ximian.com>
9127
9128         * class-internals.h (MonoGenericContainer): Removed `method' and
9129         `signature', replaced them with `is_method' and `is_signature'
9130         flags.  Added `context'.
9131
9132         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
9133         instead of a `MonoGenericContainer *'.
9134
9135         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
9136         for dynamic type parameters.
9137         (mono_metadata_load_generic_params): Setup `container->context'.
9138
9139         * reflection.c (mono_reflection_setup_generic_class): Setup
9140         `tb->generic_container->context'.
9141         (do_mono_reflection_bind_generic_parameters): Use
9142         mono_class_inflate_generic_type() to correctly inflate types,
9143         rather than using our own hack just for MONO_TYPE_VAR.
9144
9145 2004-11-09  Martin Baulig  <martin@ximian.com>
9146
9147         * class.c (mono_class_inflate_generic_method): Small fix; don't
9148         crash here.
9149
9150         * icall.c
9151         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
9152         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
9153         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
9154         (ves_icall_Type_BindGenericParameters): Likewise.
9155         (ves_icall_Type_get_IsGenericInstance): Likewise.
9156         (ves_icall_Type_GetGenericParameterPosition): Likewise.
9157         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
9158         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
9159         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
9160
9161 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
9162
9163         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
9164         assembly versions and public key tokens. Fixes #69113.
9165
9166 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
9167
9168         * metadata.c: fix bug introduced with the type cache changes
9169         on 2004-11-06.
9170
9171 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
9172
9173         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
9174         the MonoClass pointer instead of the token in exception clauses.
9175         * reflection.c: updates for the above and make the code not depend
9176         on the structure of MonoExceptionClause.
9177
9178 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
9179
9180         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9181         Add support for dynamic assemblies. Fixes #69114.
9182
9183         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
9184
9185 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
9186
9187         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
9188         since most only those methods use it. the code member of
9189         MonoMethodPInvoke was dead, so that can be removed too. Also,
9190         remove inline_count (again, not used), and move slot so that it
9191         can share bits with some other flags. This saves 8 bytes in the
9192         structure and gives us about 50 kb back for mcs helloworld.cs
9193
9194         * *.[ch]: Do naming changes for the above.
9195
9196         * loader.c (mono_method_get_header): Lazily init the header
9197         on first access.
9198         (mono_get_method_from_token): don't init the header here
9199         (mono_free_method): the header may never be allocated
9200
9201         Overall, this saves 150 kb of unmanaged allocations
9202         for mcs helloworld.cs. That accounts for 10% of the unmanaged
9203         memory at runtime.
9204         
9205         * loader.c, loader.h (mono_method_get_header): new accessor.
9206
9207         * *.[ch]: use the above method. Prepares us to lazily load
9208         the header.
9209
9210         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
9211         three warnings, which are actual bugs (see 69206).
9212
9213         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
9214         unused. Saves a cool 4 bytes / method.
9215
9216 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
9217
9218         * metadata.c (builtin_types): Add types for System.Object here.
9219         (mono_metadata_parse_type_full): Cache MonoType*'s that are
9220         for a class or valuetype from klass->this_arg or klass->byval_arg.
9221
9222         On mcs for a hello world, this gets us down from 21836 MonoType's
9223         to 14560.
9224
9225         (mono_metadata_free_type): Account for the above change.
9226
9227 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
9228
9229         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
9230         exception instead of asserting if name is null.
9231         (ves_icall_System_AppDomain_GetData): Ditto.
9232
9233 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
9234
9235         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
9236         EnumBuilder.
9237
9238         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
9239         Return NULL when the domain does not have entry_assembly set.
9240
9241         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
9242         Add a 'resource_modules' argument.
9243         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
9244
9245         * reflection.c (mono_reflection_create_runtime_class): Move setting
9246         of wastypebuilder here, so mono_get_type_object () returns a MonoType
9247         for enums too.
9248
9249         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
9250         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
9251         Throw an ArgumentNullException if 'ptr' is null.
9252
9253         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
9254         assemblies here. Fixes #69020.
9255
9256 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
9257
9258         * reflection.c (build_compressed_metadata): Fix the previous patch for
9259         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
9260         the stack.
9261
9262 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
9263
9264         * assembly.c (mono_assembly_names_equal): Allow a match if one of
9265         the cultures is false. Fixes #69090.
9266
9267         * reflection.c (build_compressed_metadata): Fix invalid memory read 
9268         detected by valgrind.
9269         
9270         * reflection.c (mono_reflection_get_type): Avoid triggering a 
9271         TypeResolve multiple times for the same type. Fixes #65577.
9272
9273 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
9274
9275         * marshal.c: Avoid using ldftn to call managed functions. It is
9276         much slower than just a call.
9277
9278         * reflection.c (mono_module_get_object): free the basename we
9279         allocate here from glib.
9280         
9281         * reflection.c (ensure_runtime_vtable): make sure to free
9282         overrides.  Also, we were allocating an array of MonoMethod not an
9283         array of MonoMethod*.
9284
9285         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
9286
9287         * image.c (mono_image_close): free image->guid here.
9288
9289 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
9290
9291         * reflection.c: Fix some spec conformance issues with the PE file
9292         structures so mcs compiled apps run on the Net 2.0 beta.
9293
9294 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
9295
9296         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
9297         Implement this. Fixes #67264.
9298
9299         * debug-helpers.h debug-helpers.c marshal.c: Move 
9300         mono_find_method_by_name to debug-helpers.c.
9301
9302 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
9303
9304         * object.c (mono_release_type_locks): type_initialization_hash is
9305         a GHashTable.
9306
9307         * reflection.c object.c object-internals.h: Fix warnings.
9308
9309         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
9310         without accessors. Fixes #61561.
9311
9312         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
9313         application base from the root domain if not set. Fixes #65641.
9314         (mono_runtime_init): Fix warning.
9315
9316 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9317
9318         * appdomain.c: call mono_thread_pool_init.
9319         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
9320         of worker threads based on the number of CPUs and the environment
9321         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
9322         for non-windows (windows) systems.
9323
9324 2004-10-27  Chris Toshok  <toshok@ximian.com>
9325
9326         * mono-debug-debugger.c (write_class): don't call mono_class_init
9327         here, as even with the check for (!klass->init_pending), we get
9328         into a situation where we're hitting cycles in class
9329         initialization.  Fixes #68816.
9330
9331 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
9332
9333         * image.c: Avoid overwriting values in the loaded_images_hash when an
9334         assembly is loaded multiple times. Fixes #61152.
9335
9336         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
9337         so multiple satellite assemblies for the same name can be loaded.
9338         Fixes #68259.
9339
9340         * mono_domain_assembly_preload: Actually return the loaded assembly, 
9341         not NULL.
9342
9343         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
9344         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
9345
9346         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
9347         pending finalizers are not invoked after the appdomain has been 
9348         unloaded. Fixes #67862.
9349
9350 2004-10-22  Martin Baulig  <martin@ximian.com>
9351
9352         * mono-debug-debugger.c
9353         (mono_debugger_runtime_invoke): Don't box valuetypes.
9354
9355 2004-10-22  Chris Toshok  <toshok@ximian.com>
9356
9357         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
9358         don't hide private methods.
9359
9360 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
9361
9362         * icall.c: Allows the runtime to "share" (when known) the public key
9363         token of an assembly. This avoid the need to recalculate the token 
9364         (from the public key) in managed code.
9365
9366 2004-10-21  Chris Toshok  <toshok@ximian.com>
9367
9368         * debug-helpers.c (append_class_name): argh, revert last patch.
9369         
9370 2004-10-21  Chris Toshok  <toshok@ximian.com>
9371
9372         * debug-helpers.c (append_class_name): use '+' as the delimiter,
9373         not '/', so that it matches what the debugger uses to look up
9374         methods.
9375
9376 2004-10-21  Martin Baulig  <martin@ximian.com>
9377
9378         * mono-debug-debugger.c (mono_debugger_throw_exception): New
9379         public method; this is called each time an exception is thrown and
9380         allows the debugger to use exception catch points.
9381
9382 2004-10-21  Martin Baulig  <martin@ximian.com>
9383
9384         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
9385         the stack pointer and the exception object in some struct and pass
9386         that to the debugger.
9387
9388 2004-10-21  Chris Toshok  <toshok@ximian.com>
9389
9390         * mono-debug-debugger.c (do_write_class): add instance/static
9391         event support.  We don't expose "raise" or "other" yet.
9392         (event_is_static): new method.
9393
9394 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
9395
9396         * mono-debug-debugger.c
9397         (mono_debugger_handle_exception): Remove
9398         bogus return value for fussy compilers.
9399
9400 2004-10-20  Martin Baulig  <martin@ximian.com>
9401
9402         * mono-debug-debugger.c
9403         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
9404         (mono_debugger_handled_exception): Likewise.
9405
9406 2004-10-20  Martin Baulig  <martin@ximian.com>
9407
9408         * mono-debug-debugger.h (MonoDebuggerEvent): Added
9409         MONO_DEBUGGER_EVENT_EXCEPTION.
9410
9411         * mono-debug-debugger.c (mono_debugger_handle_exception): New
9412         public function to send the debugger a notification for an
9413         exception and inform it about a catch/finally clause.
9414
9415 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
9416
9417         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
9418         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
9419         fix 2.95 build. 
9420
9421         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
9422
9423 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
9424
9425         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
9426         marshalled as [In,Out]. Fixes #58325.
9427
9428 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
9429
9430         * reflection.c (mono_method_body_get_object): Implement some fields.
9431
9432 2004-10-12  Martin Baulig  <martin@ximian.com>
9433
9434         * reflection.c (mono_reflection_bind_generic_parameters): Small
9435         fix, correctly retrieve our parent from a generic instance.
9436
9437 2004-10-12  Martin Baulig  <martin@ximian.com>
9438
9439         * metadata.c (mono_metadata_generic_param_equal): We always have
9440         an owner.
9441
9442         * class.c
9443         (mono_class_from_generic_parameter): We need to have an owner.
9444         (my_mono_class_from_generic_parameter): Likewise.
9445
9446         * reflection.c (mono_reflection_setup_generic_class): Renamed to
9447         mono_reflection_create_generic_class() and added a new
9448         mono_reflection_setup_generic_class().  
9449         (mono_reflection_initialize_generic_param): If we're a nested
9450         generic type and inherited from the containing class, set our
9451         owner to the outer class.
9452
9453 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
9454
9455         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
9456
9457         * reflection.c (mono_method_body_get_object): New function to create
9458         a MethodBody object.
9459
9460         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
9461
9462 2004-10-11  Martin Baulig  <martin@ximian.com>
9463
9464         * metadata.c (_mono_metadata_type_equal): Renamed to
9465         do_mono_metadata_type_equal() and made static.
9466
9467 2004-10-11  Martin Baulig  <martin@ximian.com>
9468
9469         * appdomain.c: Bump corlib version number to 28.
9470
9471 2004-10-10  Martin Baulig  <martin@ximian.com>
9472
9473         * class-internals.h
9474         (MonoGenericInst): Added `MonoGenericContainer *container'.
9475         (MonoGenericMethod): Likewise.
9476         (MonoGenericContext): Likewise.
9477         (MonoGenericParam): Added `MonoGenericContainer *owner'.
9478
9479         * metadata.c
9480         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
9481         (do_mono_metadata_parse_generic_inst): Likewise.
9482         (mono_metadata_parse_type_full): New public method.  This is the actual
9483         mono_metadata_parse_type() implementation - with an additional
9484         `MonoGenericContainer *' argument.
9485         (mono_metadata_parse_array_full): Likewise.
9486         (mono_metadata_parse_signature_full): Likewise.
9487         (mono_metadata_parse_method_signature_full): Likewise.
9488         (mono_metadata_parse_mh_full): Likewise.
9489         (mono_type_create_from_typespec): Likewise.
9490         (mono_metadata_interfaces_from_typedef_full): New public method;
9491         this is similar to the other _full() methods, but we take a
9492         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
9493         (mono_metadata_parse_generic_param): Take an additional
9494         `MonoGenericContainer *' argument and lookup the MonoGenericParam
9495         from that container.
9496         (mono_metadata_generic_param_equal): New static method to compare
9497         two type parameters.
9498         (_mono_metadata_type_equal): New static method; takes an
9499         additional `gboolean signature_only' argument - if true, we don't
9500         compare the owners of generic parameters.
9501         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
9502         with a TRUE argument - do a signature-only comparision.
9503
9504         * loader.c: Use the new _full() methods and pass the
9505         MonoGenericContainer to them.
9506
9507         * object-internals.h (MonoReflectionTypeBuilder): Added
9508         `MonoGenericContainer *generic_container' field.
9509         (MonoReflectionMethodBuilder): Likewise.
9510
9511 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
9512
9513         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
9514         case initial images of dynamic assemblies.
9515
9516         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
9517
9518         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
9519
9520         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
9521         length of event->other array.
9522         (typebuilder_setup_events): Ditto.
9523
9524         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
9525         'assembly_by_name' and add an 'assemblies' list.
9526
9527         * assembly.h assembly.c: Add a new search hook for determining whenever
9528         an assembly is already loaded. Use this instead of searching in the
9529         loaded_assemblies list.
9530
9531         * domain.c appdomain.c: Implement the new search hook so loaded 
9532         assemblies are now scoped by appdomain. Fixes #67727.
9533
9534 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
9535
9536         * threads.c (mono_thread_attach): Initialize synch_lock field so
9537         mono_thread_detach works again.
9538
9539         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
9540         'lib' too. Fixes #63130.
9541
9542 2004-10-06  Jackson Harper  <jackson@ximian.com>
9543
9544         * culture-info-tables.h: regenerated.
9545
9546 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
9547
9548         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
9549         implemented by other interfaces in the result. Fixes #65764.
9550         
9551         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9552         Handle unloadable modules without crashing.
9553
9554         * image.c (load_modules): Revert the previous patch since modules must
9555         have a fixed index inside the array.
9556         
9557         * image.c (load_modules): Don't include native modules in the modules
9558         array.
9559
9560 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
9561
9562         * reflection.h: Add param_defaults field.
9563
9564         * reflection.c: Add support for parameter defaults in dynamic methods.
9565         Fixes #64595.
9566
9567         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
9568         an empty string when a type has no namespace. Fixes #64230.
9569
9570 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
9571
9572         * tabledefs.h: Added "internal" security actions to support non-CAS
9573         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
9574         Note: they do not seems to be used anymore in 2.0 (new metadata format)
9575
9576 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
9577
9578         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
9579         constructor of abstract class. Fixes #61689.
9580
9581 2004-10-04  Martin Baulig  <martin@ximian.com>
9582
9583         * class-internals.h (MonoGenericContainer): New type.
9584         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
9585         `MonoGenericContainer *generic_container'.
9586         (MonoClass): Replaced `gen_params' and `num_gen_params' with
9587         `MonoGenericContainer *generic_container'.
9588
9589         * metadata.c (mono_metadata_load_generic_params): Return a
9590         `MonoGenericContainer *' instead of a `MonoGenericParam *';
9591         removed the `num' argument.
9592
9593 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
9594
9595         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
9596         for dynamic images.
9597
9598         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
9599         machine fields.
9600
9601         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
9602
9603         * reflection.c: Save pe_kind and machine values into the generated
9604         image file.
9605
9606         * appdomain.c: Bump corlib version number.
9607
9608         * object-internals.h: Reorganize layout of LocalBuilder.
9609
9610         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
9611         New helper function.
9612
9613         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
9614         created MonoType for dynamic types. Fixes #66180.
9615
9616 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
9617
9618         * threadpool.c: the ares hashtable needs a critical section around it.
9619         this prevents some nasty segfaults
9620
9621 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
9622
9623         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
9624         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
9625         bug 67324).
9626         
9627 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
9628
9629         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
9630         
9631 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
9632
9633         * image.c: Always canonicalize image file names, to avoid loading
9634         the same assembly twice when referenced using a relative path.
9635
9636 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
9637
9638         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
9639
9640         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
9641
9642         * marshal.c: Fix warnings.
9643
9644 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
9645
9646         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
9647         attempting to marshal the delegate_trampoline as the method_addr.
9648         This patch has a static hashtable of marshalled delegates so that 
9649         we can map delegate_trampoline addresses back to delegates.  This
9650         allows a delegate passed to managed code to be passed back into native
9651         code.  Fixes #67039
9652
9653 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9654
9655         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
9656
9657         * reflection.c (method_encode_code): Align method headers properly.
9658         Fixes #66025.
9659
9660 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9661
9662         * marshal.c: In the runtime invoke wrapper, reset the abort
9663         exception if it is cached. This avoids the automatic rethrowal of 
9664         the exception after the catch of the wrapper. Also check for pending
9665         interruptions before calling the managed method. This is done using
9666         the new method emit_thread_force_interrupt_checkpoint, since the
9667         normal checkpoint method is ignored when running the invoke wrapper.
9668         * object.c: If the abort exception is rethrown, set the abort_exc
9669         field of the thread, so it will be rethrown aftere every catch.
9670         * threadpool.c: Only run an interruption checkpoint if what has been
9671         requested is a stop of the thread (aborts will be ignored).
9672         * threads.c: By default, a thread will now never be interrumped while
9673         running the runtime invoke wrapper (this ensures that runtime_invoke
9674         will always return to the caller if an exception pointer is provided).
9675         There is a new special method mono_thread_force_interruption_checkpoint()
9676         to force an interruption checkpoint even if running a protected
9677         wrapper, which is used by the same runtime invoke wrapper to do a check
9678         at a safe point.
9679
9680 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
9681
9682         * object.c, object-internals.h: Implemented mono_release_type_locks,
9683         which releases the cctor locks held by a thread.
9684         * threads.c, threads.h: In thread_cleanup, release cctor locks held
9685         by a thread. Added mono_thread_exit() method to be used to safely stop
9686         a thread.
9687
9688 2004-09-28  Raja R Harinath  <rharinath@novell.com>
9689
9690         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9691         Move null check before dereference.  Avoid indexing beyond the end
9692         of the 'modules' array.
9693
9694 2004-09-28  Raja R Harinath  <rharinath@novell.com>
9695
9696         * metadata-internals.h (MonoImage): Add module_count field.
9697         * image.c (load_modules): Set image->module_count.
9698         (mono_image_load_file_for_image): Use image->module_count.
9699         * reflection.c (mono_image_load_module): Append to image->modules array 
9700         of dynamic assembly.
9701         (mono_module_get_object): Fix loop to actually increment index.
9702         Use image->module_count.
9703         * assembly.c (mono_assembly_load_references): Use image->module_count.
9704         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9705         Likewise.
9706
9707 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
9708
9709         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
9710         Avoid assert on generic types.
9711
9712 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
9713
9714         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
9715
9716         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
9717
9718         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
9719         function to convert a MarshalSpec structure to its managed counterpart.
9720
9721         * reflection.c: Fix warnings.
9722         
9723         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
9724         field.
9725
9726         * icall.c (mono_create_icall_signature): Fix build.
9727
9728 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * icall.c: Add MakePointType icall.
9731
9732         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
9733         warnings.
9734
9735 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9736
9737         * threadpool.c: reuse allocated slots in the queue.
9738
9739 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
9740
9741         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
9742
9743         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
9744
9745         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
9746         previous change.
9747
9748         * tabledefs.h: Add constants for pinvoke attributes BestFit and
9749         ThrowOnUnmappableChar.
9750
9751         * icall.c (ves_icall_Type_GetPacking): New icall.
9752
9753 2004-09-24  Martin Baulig  <martin@ximian.com>
9754
9755         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
9756
9757 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9758
9759         * appdomain.c:
9760         (mono_domain_set): allow setting a domain that is being unloaded.
9761         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
9762         being unloaded.
9763
9764 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9765
9766         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
9767         the GetCustomAttributes icall.
9768
9769 2004-09-23  Martin Baulig  <martin@ximian.com>
9770
9771         * object-internals.h (MonoReflectionGenericParam): Replaced
9772         'has_ctor_constraint', `has_reference_type' and `has_value_type'
9773         with `guint32 attrs'.
9774
9775 2004-09-23  Martin Baulig  <martin@ximian.com>
9776
9777         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
9778
9779 2004-09-23  Martin Baulig  <martin@ximian.com>
9780
9781         * object-internals.h (GenericParameterAttributes): New enum.
9782
9783 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
9784
9785         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
9786         
9787         * class.c (init_events): Fill out event->other field.
9788
9789         * class.c: Fix warnings.
9790
9791         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
9792
9793 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
9794
9795         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
9796         walk which doesn't supply the IL offset.
9797
9798 2004-09-22  Martin Baulig  <martin@ximian.com>
9799
9800         * reflection.c (mono_reflection_setup_internal_class): If we're
9801         System.ValueType, System.Object or System.Enum, set
9802         `klass->instance_size' and create the vtable.
9803         (mono_reflection_create_internal_class): If we're an enum type,
9804         get the base class from our current corlib.
9805
9806 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
9807
9808         * reflection.h (MonoResolveTokenError): New type.
9809
9810         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
9811         icall.
9812
9813         * icall.c: Add an 'error' argument to the ResolveToken icalls.
9814
9815 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
9816
9817         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
9818         Support also calling constructors, but only for already allocated objects.
9819
9820 2004-09-17  Geoff Norton <gnorton@customerdna.com>
9821
9822         * reflection.c (type_get_qualified_name): If the klass is null
9823         return the typename to avoid a NullRefEx.
9824         (encode_cattr_value): Get the qualified name of the boxed type,
9825         not the underlying enumtype.  Fixes #62984.
9826
9827 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
9828
9829         * marshal.c: Fix problems with previous checkin.
9830
9831 2004-09-21    <vargaz@freemail.hu>
9832
9833         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
9834         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
9835
9836         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
9837
9838 2004-09-21  Geoff Norton <gnorton@customerdna.com>
9839
9840         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
9841         should only return a type for pointers, arrays, and passbyref types.
9842         Fixes bug #63841.
9843
9844 2004-09-21  Martin Baulig  <martin@ximian.com>
9845
9846         * domain.c (mono_debugger_check_runtime_version): New public
9847         function.
9848
9849         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
9850
9851 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
9852
9853         * reflection.c: Added missing sort to the declarative security 
9854         attributes table. MS implementation stops seeing the attributes if the
9855         token number regress in the table (as shown by ildasm and permview).
9856
9857 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
9858
9859         * object-internals.h (MonoReflectionModule): Add 'token' field.
9860         
9861         * reflection.c (mono_reflection_get_token): Add support for Module
9862         and Assembly.
9863         (mono_module_get_object): Set 'token' field.
9864         (mono_module_file_get_object): Set 'token' field.
9865
9866         * icall.c: Add new Assembly and Module icalls.
9867
9868         * appdomain.c: Bump corlib version.
9869
9870 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
9871
9872         * loader.h loader.c class.h class.c: Add helper functions for obtaining
9873         tokens of metadata objects.
9874
9875         * reflection.h reflection.c (mono_reflection_get_token): New function
9876         to obtain the token of a metadata object.
9877
9878         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
9879
9880 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
9881
9882         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
9883         
9884         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
9885
9886 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
9887
9888         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
9889         * object-internals.h: Added 3 MonoArray* members to MonoReflection
9890         AssemblyBuilder to access the permissions set in the class lib.
9891         * reflection.c: Added security attributes encoding step in 
9892         mono_image_build_metadata.
9893         * tabledefs.h: Added new security actions defined in 2.0:
9894         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
9895
9896 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
9897
9898         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
9899         macro parameter.
9900
9901 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
9902  
9903         * locales.c: nullify the ICU_collator member of CompareInfo when it is
9904           finalized. There where random SIGSEVs at program termination, when
9905           an object being finalized was trying to do a string comparison and
9906           the current culture was already finalized.
9907  
9908 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9909
9910         * threads.c: call thread_cleanup before finishing the thread if we get
9911         there.
9912
9913 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
9914
9915         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
9916         assemblies from the parent. Fixes #65665.
9917
9918 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
9919
9920         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
9921         modifiers.
9922
9923 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
9924
9925         * reflection.h: add prototype for mono_get_dbnull_object
9926         * reflection.c: add prototypes for get_default_param_value_blobs 
9927         and mono_get_object_from_blob for fussier compilers
9928
9929 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
9930  
9931         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
9932         false deadlock checks in class initialization.
9933  
9934 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
9935
9936         * image.c (mono_image_addref): Fix comment.
9937
9938         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
9939         possible.
9940
9941 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
9942
9943         * reflection.c (mono_param_get_objects): Modified to return
9944         ParameterInfo.DefaultValue object.
9945
9946         (get_default_param_value_blobs):
9947         (mono_get_object_from_blob):
9948         (mono_get_dbnull_object): New helper routines. 
9949
9950         * object.c (mono_get_constant_value_from_blob): New helper routine
9951         carved out from get_default_field_value ()
9952
9953         * object-internals.h (mono_get_constant_value_from_blob): Added
9954         function declaration.
9955
9956 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
9957
9958         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
9959         referenced assemblies. Fixes #62135.
9960
9961         * exception.h exception.c (mono_get_exception_file_not_found2): New
9962         helper function.
9963
9964 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
9965
9966         * class.h class.c: Add mono_type_get_underlying_type ().
9967
9968 2004-09-09  Geoff Norton <gnorton@customerndna.com>
9969
9970         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
9971         Fix GetTypes() to support dynamically created assemblies.
9972
9973 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
9974
9975         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
9976         
9977         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
9978         previous patch.
9979
9980         * reflection.h reflection.c loader.c: Allow dynamic construction of
9981         pinvoke methods. Fixes #65571.
9982         
9983         * reflection.c (mono_reflection_get_type): Revert previous change since
9984         it causes regressions.
9985
9986 2004-09-08  Martin Baulig  <martin@ximian.com>
9987
9988         * class.c (class_compute_field_layout): Don't call
9989         mono_class_layout_fields() for open generic instances.
9990
9991 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
9992         * threads.c appdomain.c: fix typo in GC macro
9993
9994 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9995
9996         * threads.c: don't call mono_thread_detach() in start_wrapper(),
9997         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
9998
9999 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
10000
10001         * image.c (mono_image_close): Applied patch from 
10002         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
10003         assembly is loaded multiple times from data.
10004         
10005         * image.c (mono_image_open): Fix warning.
10006
10007 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
10008
10009         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
10010         once. Fixes #58334.
10011         
10012         * reflection.c (mono_reflection_create_runtime_class): Initialize
10013         klass->nested_classes. Fixes #61224.
10014
10015 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10016
10017         * threads.c: sched_yield() on exit, to allow threads to quit.
10018
10019 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
10020
10021         * object.c (mono_unhandled_exception): Remove leftover debug code.
10022
10023 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
10024
10025         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
10026
10027 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
10028
10029         * marshal.c (emit_marshal_array): Really null terminate string arrays.
10030         
10031         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
10032
10033 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10034
10035         * marshal.c (emit_marshal_array): Null terminate string arrays.
10036         
10037         * marshal.c (raise_auto_layout_exception): Fix warning.
10038
10039         * reflection.c (mono_param_get_objects): Initialize the default value
10040         with DBNull.Value, not null. Fixes #62123.
10041
10042 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
10043
10044         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
10045         throw an exception with a cute explanation.
10046
10047 2004-09-06  Dick Porter  <dick@ximian.com>
10048
10049         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
10050         Close the new process's thread handle, as we don't use it.  The
10051         handle stays around forever otherwise.
10052
10053 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10054
10055         * object.c (arith_overflow): Fix warning.
10056
10057         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
10058         calling conventions in method refs. Fixes #65352.
10059
10060         * reflection.c: Fix warnings.
10061
10062 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
10063
10064         * icall.c: Add a new icall for Array.Clear
10065
10066 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
10067
10068         * object.c: When allocating an array, we have to throw
10069         an overflow exception if any of the lengths are < 0.
10070
10071 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10072
10073         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
10074         properly. Also move implementation of string array marshalling to 
10075         managed code. Fixes #42316.
10076
10077 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10078
10079         * assembly.c: provide more information when loading an assembly fails.
10080
10081 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10082
10083         * filewatcher.c: don't expect the development fam package to be
10084         installed.
10085
10086 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
10087
10088         * marshal.c: Make a copy of the signature cookie since it will be
10089         freed by the caller.
10090         
10091         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
10092
10093         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
10094
10095         * metadata.c (mono_metadata_free_marshal_spec): New function to free
10096         marshal specs.
10097
10098         * marshal.c: More refactoring.
10099         
10100         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
10101         smaller functions.
10102
10103 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
10104
10105         * object.c: In mono_message_invoke, fill the output parameter array after
10106           calling the managed method (it was done before the call). This fixes
10107           bug #59299.
10108
10109 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10110
10111         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
10112         as well.
10113
10114 2004-09-02  Martin Baulig  <martin@ximian.com>
10115
10116         * class.c (mono_class_instance_size): Don't allow generic type
10117         definitions or open generic instances.
10118         (mono_class_array_element_size): If we're a value type, call
10119         mono_class_instance_size() on the original class.
10120
10121         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
10122         handle generic instances.
10123
10124         * mono-debug-debugger.c (write_type): Handle generic instances
10125         like classes.
10126
10127 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10128
10129         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
10130         the allocation request fails. Fixes #65089.
10131
10132         * object.c (mono_runtime_free_method): Do not call mono_free_method.
10133         
10134         * object.c (mono_runtime_free_method): New function to free a dynamic
10135         method.
10136
10137         * marshal.c (mono_delegate_free_ftnptr): New function to free the
10138         delegate trampoline.
10139
10140         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
10141         with hasthis as dynamic,
10142
10143         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
10144
10145         * domain.c (mono_jit_info_table_remove): New function to remove an
10146         entry from the jit info table.
10147
10148         * class-internals.h (MonoMethod): Add 'dynamic' field.
10149
10150         * loader.c: Fix warnings.
10151
10152 2004-09-01  Martin Baulig  <martin@ximian.com>
10153
10154         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
10155         instead of mono_debugger_lock() because the latter one is a no-op
10156         unless running in the debugger.
10157
10158 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
10159
10160         * class.c (class_compute_field_layout): Classes with auto-layout or
10161         reference fields are not blittable.
10162         
10163 2004-09-01  Dick Porter  <dick@ximian.com>
10164
10165         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
10166         mono_image_get_filename() to get the assembly location.
10167
10168         * icall.c:
10169         * metadata.h: Fix compile warnings
10170
10171 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
10172
10173         * class.c (class_compute_field_layout): System.Object is blittable.
10174
10175         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
10176         as in/out. Fixes #59909.
10177
10178 2004-09-01  Martin Baulig  <martin@ximian.com>
10179
10180         * metadata.h (MONO_TYPE_ISREFERENCE): Call
10181         mono_metadata_generic_inst_is_valuetype() if we're a generic
10182         instance to check whether our underlying type is a reference type.
10183
10184 2004-09-01  Martin Baulig  <martin@ximian.com>
10185
10186         * metadata.c (mono_type_size): If we're a generic instance, call
10187         mono_class_value_size() for value types.
10188
10189 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
10190
10191         * marshal.c: Implement more custom marshalling functionality. Fixes
10192         #64915.
10193
10194 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10195
10196         * mono-debug.c, debug-mono-symfile.c: add some locking love.
10197
10198 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10199
10200         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
10201
10202         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
10203
10204         * icall.c: Fix some warnings.
10205
10206         * threads.c (abort_appdomain_thread): Fix unref errors.
10207         (mono_thread_current): Fix THREAD_DEBUG define.
10208
10209 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10210
10211         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
10212
10213         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
10214
10215 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
10216
10217         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
10218         string arrays.
10219
10220 2004-08-28  Martin Baulig  <martin@ximian.com>
10221
10222         * metadata.c
10223         (mono_metadata_generic_inst_is_valuetype): New public function.
10224
10225         * metadata.h (MONO_TYPE_ISSTRUCT): Call
10226         mono_metadata_generic_inst_is_valuetype() if we're a generic
10227         instance to check whether our underlying type is a valuetype.
10228
10229 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10230
10231         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
10232         #63768.
10233
10234 2004-08-25  Martin Baulig  <martin@ximian.com>
10235
10236         * loader.c (mono_get_method_from_token): Abstract methods can also
10237         be generic and thus have type parameters.
10238
10239         * metadata-internals.h
10240         (MonoDynamicImage): Added `GPtrArray *gen_params'.
10241
10242         * reflection.c (mono_image_get_generic_param_info): Don't create a
10243         metadata row, just add an entry to the `gen_params' array.
10244         (build_compressed_metadata): Sort the `gen_params' array and then
10245         actually create the metadata.
10246
10247 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10248
10249         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
10250
10251 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10252
10253         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
10254
10255 2004-08-24  Martin Baulig  <martin@ximian.com>
10256
10257         * class.cs (mono_class_is_subclass_of): Like an interface, a
10258         generic instance also derives from System.Object.
10259
10260 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10261
10262         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
10263         custom modifiers to be in any order. Fixes #61990.
10264
10265 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10266
10267         * object.c: Register mono_object_new_fast icall.
10268         
10269         * object.c (mono_class_get_allocation_ftn): Return to calling
10270         mono_object_new_fast, since it seems faster to compute the object 
10271         size in unmanaged code than passing it as a parameter.
10272
10273         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
10274
10275         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
10276         this function with Boehm as the oom handler, so we don't have to check
10277         the result of GC_malloc.
10278
10279         * object.c: Remove checks for oom.
10280
10281         * object.h object.c (mono_class_get_allocation_ftn): New function to
10282         return the icall which can be used to allocate an instance of a given
10283         class. 
10284
10285         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
10286
10287         * class-internals.h: Add 'enabled' field.
10288
10289 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
10290
10291         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
10292
10293 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
10294         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
10295         value 0x0010.
10296
10297 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10298
10299         * appdomain.c: use the Tls function for appdomain too,
10300         at Zoltan's request. Actually return in mono_context_get
10301
10302         * appdomain.c, profiler.c, threads.c: use __thread
10303
10304 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * appdomain.c threads.c: Call GC_CreateThread on windows.
10307
10308         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
10309         multiple libraries since this don't work on windows.
10310
10311 2004-08-18  Martin Baulig  <martin@ximian.com>
10312
10313         * class-internals.h
10314         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
10315         MonoMethodHeader.
10316
10317         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
10318         MonoMethodNormal since we also need it for abstract and interface
10319         methods.
10320
10321         * reflection.c
10322         (build_compressed_metadata): Sort the GenericParam table.
10323         (mono_image_create_token): Added `gboolean create_methodspec'
10324         argument; this is false when generating a MethodImpl token.
10325         (reflection_methodbuilder_to_mono_method): Abstract and interface
10326         methods may also have generic parameters.
10327
10328 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10329
10330         * appdomain.c: thread local alloc
10331
10332 2004-08-17  Martin Baulig  <martin@ximian.com>
10333
10334         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
10335
10336         * icall.c
10337         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
10338         argument.
10339
10340         * class.c (mono_type_get_full_name): New public function.
10341         (mono_type_get_name): Don't include the type arguments.
10342
10343 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10344
10345         * Makefile.am: Build static versions of libmetadata and libmonoruntime
10346         for inclusion into the mono executable.
10347
10348 2004-08-16  Martin Baulig  <martin@ximian.com>
10349
10350         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
10351         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
10352
10353 2004-08-14  Martin Baulig  <martin@ximian.com>
10354
10355         * class.c (dup_type): Also copy the `byref' field.
10356
10357 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10358
10359         * reflection.c (create_dynamic_mono_image): Revert the last change 
10360         since it breaks bootstrap.
10361
10362 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10363
10364         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
10365
10366         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
10367         not free them with g_free.
10368
10369 2004-08-11  Martin Baulig  <martin@ximian.com>
10370
10371         * reflection.c (mono_reflection_setup_internal_class): Also call
10372         mono_class_setup_mono_type() if we already have a `tb->type.type'.
10373
10374 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
10375
10376         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
10377         called during default (first) AppDomain creation. Keep track of
10378         Evidence when loading assemblies.
10379
10380 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10381
10382         * opcodes.c, opcodes.h: reduce runtime relocations.
10383
10384 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
10385
10386         * culture-info.h, locales.c: fixes and chages to sue the new
10387         optimized format of the locale data.
10388         * culture-info-tables.h: regenerated.
10389
10390 2004-08-06  Geoff Norton <gnorton@customerdna.com>
10391         
10392         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
10393
10394 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
10395
10396         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
10397         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
10398         * domain-internals.h: icall declaration.
10399         * icall.c: icall registration.
10400         * object-internals.h: New fields in MonoAssembly for CAS.
10401
10402 2004-08-05  Duncan Mak  <duncan@ximian.com>
10403
10404         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10405         CEE_LDELEM_ANY.
10406
10407 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10408
10409         * reflection.c: fix to deal with object[] arrays in custom ctors
10410         (bug #62550).
10411
10412 2004-08-05  Martin Baulig  <martin@ximian.com>
10413
10414         * class.c (mono_class_array_element_size): Added support for
10415         generic instances and correctly handle "recursive" types.
10416
10417 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10418
10419         * assembly.c: Fix warnings.
10420
10421 2004-08-04  Martin Baulig  <martin@ximian.com>
10422
10423         * class.c
10424         (mono_type_get_name_recurse): Added `gboolean include_arity'
10425         argument specifying whether or not we should include the generic
10426         arity in the type name.
10427         (_mono_type_get_name): New static function.
10428         (mono_class_setup_vtable): If we're a generic instance, don't
10429         include the generic arity in the names of explicit method
10430         implementations.        
10431
10432 2004-08-03  Martin Baulig  <martin@ximian.com>
10433
10434         * class.c (mono_type_get_name_recurse): Enclose the generic type
10435         arguments in `<', '>'.
10436
10437 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10438
10439         * gc.c: make GC warning messages use the trace API, they are just
10440         noise to most of the users.
10441
10442 2004-08-03  Martin Baulig  <martin@ximian.com>
10443
10444         * debug-mono-symfile.c (read_string): Correctly read the string.
10445
10446 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10447
10448         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
10449         
10450         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
10451         icalls.
10452         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
10453
10454 2004-07-30  Martin Baulig  <martin@ximian.com>
10455
10456         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
10457         Reflect latest symbol writer changes.   
10458
10459 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10460
10461         * object.c: always create an object if null is passed
10462         to Invoke() where a valuetype is expected.
10463
10464 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10465
10466         * marshal.c (mono_marshal_init): make managed
10467         signatures match native ones better for 64bits.
10468
10469 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10470
10471         * appdomain.c: hack to build correctly the private bin path on windows.
10472         Fixes bug #61991.
10473
10474 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10475
10476         * assembly.c: Load mscorlib from the correct framework directory
10477           (mono/<version>/mscorlib.dll).
10478         * appdomain.h: Added prototypes for new functions.
10479         * internals.h: Added some prototypes.
10480         * domain.c: When initializing the runtime, get from the executable and
10481           the configuration files the runtime version that the app supports.
10482           Added support methods for reading app.exe.config. Added list of versions
10483           supported by the JIT. Added two new methods: mono_init_from_assembly,
10484           which initializes the runtime and determines the required version from
10485           the provided exe file, and mono_init_version, which initializes
10486           the runtime using the provided version.
10487         * icall.c: Get machine.config from version-specific directory.
10488         * reflection.c: When generating an image, embed the version number
10489           of the current runtime.
10490
10491 2004-07-28  Dick Porter  <dick@ximian.com>
10492
10493         * socket-io.c
10494         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
10495         returned sockaddr size before creating the remote address object.
10496         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
10497         61608.
10498
10499 2004-07-28  Dick Porter  <dick@ximian.com>
10500
10501         * locales.c (string_invariant_compare_char): Fix invariant char
10502         compares between upper and lower cases.  Fixes bug 61458.
10503
10504 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
10505         
10506         * marshal.c: actually cache stelem.ref wrappers.
10507         
10508 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10509
10510         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
10511         sections and remove the mono_cli_rva_map () function.
10512
10513 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10514
10515         * debug-mono-symfile.c: fix one more endianess issue, from a patch
10516         by Geoff Norton (<gnorton@customerdna.com>).
10517
10518 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10519
10520         * class.c: fix class loads for pointer types (typeof(int) !=
10521         typeof(int*)).
10522
10523 2004-07-27  Martin Baulig  <martin@ximian.com>
10524
10525         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
10526         reading the debugging information from an external ".mdb" file.
10527
10528 2004-07-24  Martin Baulig  <martin@ximian.com>
10529
10530         * reflection.c (mono_image_get_type_info): Only write a class
10531         layout entry if we actually have a size or a packing size.
10532
10533 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
10534
10535         * reflection.c (type_get_fully_qualified_name): 
10536         insert cast to get type checking of ?: with non-gcc compilers
10537
10538 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
10539
10540         * rand.c: use g_getenv for both lookups of
10541         MONO_EGD_SOCKET
10542
10543 2004-07-17  Martin Baulig  <martin@ximian.com>
10544
10545         * reflection.c (mono_reflection_bind_generic_method_parameters):
10546         Set `gmethod->reflection_info'.
10547
10548 2004-07-17  Martin Baulig  <martin@ximian.com>
10549
10550         * class.c (mono_class_create_from_typedef): Insert the newly
10551         created class into the hash table before computing the interfaces
10552         since we could be called recursively.
10553
10554 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
10555
10556         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
10557         function to implement stelem.ref in managed code
10558         * class-internals.h, debug-helpers.c: a new wrapper type
10559         for the above.
10560
10561 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
10562
10563         * gc.c: allow GC handles to work even when no GC is compiled in.
10564         Fix part of bug #61134 (GetAddrOfPinnedObject).
10565
10566 2004-07-13  Peter Williams  <peter@newton.cx>
10567  
10568         * process.c (complete_path): Make sure we don't attempt to execute
10569         directories.
10570  
10571 2004-07-12  Geoff Norton <gnorton@customerdna.com>
10572
10573         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
10574           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
10575           and will add/subtract the hour if needed
10576
10577 2004-07-12  Martin Baulig  <martin@ximian.com>
10578
10579         * reflection.c (mono_field_get_object): If we have
10580         `field->generic_info', take the attributes from
10581         `field->generic_info->generic_type'.    
10582
10583 2004-07-12  Martin Baulig  <martin@ximian.com>
10584
10585         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
10586         This function must be called before initializing the runtime.
10587         (mono_debug_init_1): New function; call this after initializing
10588         the runtime, but before loading the assembly.  It tells the
10589         debugger to load corlib and the builtin types.
10590
10591         * mono-debug-debugger.c: Did some larger changes in the debugging
10592         code; support recursive class declarations, make sure we actually
10593         add all classes.
10594
10595 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10596
10597         * debug-helpers.c: undo my previous patch and fixed the real issue in
10598         ../mini/exceptions-x86.c
10599
10600 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10601
10602         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
10603         when no HOME env. variable was set and a NullRef was thrown in a .cctor
10604         called from other .cctors.
10605
10606 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
10607
10608         * loader.c: Removed the mono_loader_wine_init hack now that we are
10609         doing a managed version of Windows.Forms.
10610
10611 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
10612
10613         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
10614         threadpool.c, threads.c: remove static data from rootset.
10615
10616 2004-07-09  Dick Porter  <dick@ximian.com>
10617
10618         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
10619         Don't do any more processing if the matched length was 0.  It was
10620         increasing the size of the string before.  Fixes bug 61167.
10621
10622 2004-07-09  Dick Porter  <dick@ximian.com>
10623
10624         * socket-io.h:
10625         * socket-io.c
10626         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
10627         Add support for SO_PEERCRED if its available.
10628
10629 2004-07-09  Peter Bartok <pbartok@novell.com>
10630         * loader.c: winelib.exe.so error message is now only displayed if
10631         MONO_DEBUG is set. To help us avoid questions when people are trying
10632         out the new Managed.Windows.Forms.
10633
10634 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
10635
10636         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
10637         for isinst and castclass wrappers.
10638
10639         * class-internals.h icall.c: Move registration and lookup of JIT icalls
10640         to libmetadata from the JIT, so they could be used by the marshalling
10641         code and the interpreter.
10642
10643         * marshal.c: Register marshalling related JIT icalls here instead of
10644         in mini.c. Use CEE_MONO_ICALL instead of the family of 
10645         CEE_MONO_PROC<x> opcodes to call marshalling functions.
10646
10647         * metadata.h: Remove unneeded marshalling conversions.
10648
10649         * opcodes.c: Update for new opcodes.
10650         
10651 2004-07-08  Martin Baulig  <martin@ximian.com>
10652
10653         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
10654         (mono_debug_get_domain_data): Make this function static.
10655
10656 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10657
10658         * gc.c, object.h: add nice GC handle API for embedders.
10659
10660 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
10661
10662         * reflection.c: more changes for the new api
10663
10664         * object.c: When we reflect on a field w/ a constant value, it
10665         will not have a memory location, so we must access metadata. Also,
10666         allow easier reading of strings so that we can read them from
10667         the constant data.
10668
10669         * class.c (mono_class_layout_fields): no need for literal fields here.
10670
10671         * class-internals.h: api changes for const fields
10672
10673         * icall.c (ves_icall_get_enum_info): use new apis for const fields
10674
10675 2004-07-06  Martin Baulig  <martin@ximian.com>
10676
10677         * mono-debug.h: Increment version number to 44.
10678
10679         * mono-debug.c (mono_debug_add_wrapper): The second argument is
10680         now a gpointer, rewrote this whole method.
10681
10682         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
10683         function.  Add information about the wrapper in a new "misc table".
10684
10685         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
10686         for the new misc table.
10687
10688 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
10689
10690         * metadata-internals.h image.c: Add a cache for helper signatures.
10691
10692         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
10693
10694 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
10695
10696         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
10697         delegates from a delegate. Fixes #61033.
10698         
10699         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
10700         marshalling of stringbuilder arrays. Fixes #59900.
10701
10702 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
10703
10704         * icall.c: Add EnumBuilder:setup_enum_type icall.
10705
10706 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
10707
10708         * icall.c: Added a new icall for the property version of
10709         OffsetOfStringData.
10710
10711 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
10712
10713         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
10714         it has a constant size across platforms.
10715
10716         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
10717         stack trace.
10718
10719 2004-06-29  Martin Baulig  <martin@ximian.com>
10720
10721         * mono-debug.c (mono_debug_add_method): Protect the whole function
10722         in mono_debugger_lock(), not just parts of it.
10723
10724 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10725
10726         * reflection.c: make sure padding bytes in heaps are zeroed.
10727
10728 2004-06-24  David Waite  <mass@akuma.org>
10729
10730         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
10731         image.c, loader.c, locales.c, marshal.c, metadata.c,
10732         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
10733         string-icalls.c, threads.c: change to C90-style comments from C99 /
10734         C++ -style
10735
10736 2004-06-24  Dick Porter  <dick@ximian.com>
10737
10738         * threads.c
10739         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
10740         return createdNew.  Fixes bug 60412.
10741
10742         * threads-types.h: 
10743         * icall.c: Add createdNew parameter to CreateMutex icall
10744
10745 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10746
10747         * reflection.c, object-internals.h: save default value in params.
10748
10749 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10750
10751         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
10752         no need to build a new path combining that with the application base.
10753         Fixes bug #60442.
10754
10755 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
10756
10757         * reflection.c: fixed minor standard compliance issues.
10758
10759 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
10760
10761         * reflection.c: fixed issue with encoding some custom attributes
10762         (arrays in properties and fields, bug #60411).
10763
10764 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10765
10766         * reflection.c: fix start address when copying the public key token.
10767
10768 2004-06-23  Martin Baulig  <martin@ximian.com>
10769
10770         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
10771         the `exc' object in a static object to put it into the GC's root set.
10772
10773 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
10774
10775         * reflection.c: make mono_reflection_setup_internal_class ()
10776         callable a second time to setup a new parent class.
10777
10778 2004-06-23  Dick Porter  <dick@ximian.com>
10779
10780         * threads.c: Check for WAIT_IO_COMPLETION return values.
10781
10782 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
10783
10784         * appdomain.c: Removed the g_free on the public key token. Now copy 
10785         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
10786         * assembly.c: Added public key token string value when loading 
10787         assemblies. Fix bug #60439.
10788         * icall.c: Added missing informations (like public key) in 
10789         GetReferencedAssemblies. Fix #60519.
10790         * image.h: Changed definition for public key token from const char*
10791         public_tok_value to guchar public_key_token [17];
10792         * reflection.c: Updated for changes to public key token.
10793
10794 2004-06-22  Lluis Sanchez Gual
10795
10796         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
10797         for the field in base classes.
10798
10799 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
10800
10801         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
10802         mark headers as not supported, they are installed only for use by the
10803         debugger.
10804
10805 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
10806
10807         * *.c, *.h: avoid namespace pollution in public headers.
10808
10809 2004-06-21  Martin Baulig  <martin@ximian.com>
10810
10811         * exception.c (mono_get_exception_security): It's in
10812         "System.Security", not in "System".
10813
10814         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
10815         the exception classes.
10816
10817 2004-06-21  Martin Baulig  <martin@ximian.com>
10818
10819         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
10820         Protect the exception object from being finalized.
10821
10822 2004-06-21  Martin Baulig  <martin@ximian.com>
10823
10824         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
10825         public function.
10826
10827 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
10828
10829         * reflection.c: Load the assembly in mono_reflection_type_from_name,
10830         if it was not loaded before. Fix parts of #60439.
10831
10832 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
10833
10834         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
10835         code that was broken since Ben's change: wrappers are now
10836         dependent on the method signature only again.
10837
10838 2004-06-21  Martin Baulig  <martin@ximian.com>
10839
10840         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
10841         added interface support.
10842
10843 2004-06-21  Martin Baulig  <martin@ximian.com>
10844
10845         * class.c (mono_vtable_get_static_field_data): New public method.
10846
10847 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
10848
10849         * filewatcher.c : Windows build fix to be compliant with API changes.
10850
10851 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10852
10853         * class.h, class.c: more accessors.
10854         * metadata.h, metadata.c: prepare for hiding MonoType and
10855         MonoMethodSignature: people should use the accessors from now on
10856         outside of the tree.
10857
10858 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10859
10860         * *.c, *.h: more API cleanups.
10861
10862 2004-06-18  Jackson Harper  <jackson@ximian.com>
10863
10864         * assembly.c: Trace loading assemblies.
10865         * loader.c: Trace loading native libraries.
10866         * mono-config.c: Trace loading config files.
10867         
10868 2004-06-18  Dick Porter  <dick@ximian.com>
10869
10870         * locales.c: Tell ICU the lengths of strings, it can cope with
10871         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
10872
10873 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
10874
10875         * image.c: swapped name/filename;
10876
10877 2004-06-18  Martin Baulig  <martin@ximian.com>
10878
10879         * mono-debug-debugger.c (write_class): Write the parent class at
10880         the end of the header.
10881
10882 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
10883
10884         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
10885
10886 2004-06-17  Raja R Harinath  <rharinath@novell.com>
10887
10888         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
10889         (bundle_obj): New conditional define.
10890         (BUILT_SOURCES): Remove.
10891         ($(bundle_srcs)): Make parallel-make safe.
10892         (libmonoruntime_la_LIBADD): Make unconditional.
10893         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
10894         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
10895
10896 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
10897
10898         * culture-info-tables.h: It was inconsistent with the latest
10899           supp info files.
10900
10901 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
10904         be loaded.
10905
10906         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
10907         with gcc 2.95.
10908
10909 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
10910
10911         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
10912         cleaned up public header threads.h.
10913
10914 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10915
10916         * Makefile.am, *.c, *.h: more API cleanups.
10917
10918 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10919
10920         * Makefile.am: removed monosn from compilation.
10921         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
10922         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
10923         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
10924         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
10925         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
10926         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
10927
10928 2004-06-15  Jackson Harper  <jackson@ximian.com>
10929
10930         * assembly.c: Make locales lower case when searching the GAC for
10931         assemblies. gacutil will always make locales lowercase when
10932         installing so this effectively makes them case insensitive.
10933         
10934 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
10935
10936         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
10937         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
10938           parameter which allows to choose whether the wait can be interrupted or 
10939           not. Also added the method mono_monitor_enter(), which locks the monitor
10940           using an infinite wait and without allowing interruption.
10941           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
10942           interrupted.
10943         * object.h: Added new fields in MonoThread. suspend_event holds the event
10944           used to susped/resume the thread. synch_lock is the lock object to use for
10945           modifying the thread state.
10946         * threads.c: Use the new synch_lock object for locking, instead of "this",
10947           which can generate deadlocks.
10948           Moved thread state change in Thread.Sleep and Thread.Join from managed
10949           to unmanaged code. This avoids a deadlock when the thread was suspended
10950           just after acquiring the thread lock.
10951           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
10952           Implemented Thread.Suspend using an event instead of ThreadSuspend,
10953           which is not fully implemented in the io-layer.
10954         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
10955
10956 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
10957
10958         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
10959         threads-types.h: more API cleanups.
10960
10961 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
10962
10963         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
10964         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
10965         threadpool.c, threads.c: first pass at the exported API cleanup.
10966
10967 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10968
10969         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
10970
10971 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10972
10973         * icall.c: added internalGetHome.
10974
10975 2004-06-14  Dick Porter  <dick@ximian.com>
10976
10977         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
10978         possible to return successfully when '.' or '..' were the only
10979         entries in a directory, but were skipped.  The MonoIOStat was not
10980         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
10981         Fixes bug 59574.
10982
10983 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10984
10985         * reflection.c: make binaries run on .Net 1.1 by default.
10986
10987 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10988
10989         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
10990
10991 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
10992
10993         * marshal.c: keep track of struct size with explicit layout
10994         (bug #59979).
10995
10996 2004-06-12  Martin Baulig  <martin@ximian.com>
10997
10998         * mono-debug-debugger.c: Comment out a debugging g_message().
10999
11000 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
11001
11002         * reflection.c, reflection.h: do not free custom attrs that are cached.
11003         * icall.c: use braces to make code clearer.
11004
11005 2004-06-11  Martin Baulig  <martin@ximian.com>
11006
11007         * class.h (MonoInflatedField): New type.
11008         (MonoClassField): Replaced `MonoType *generic_type' with
11009         `MonoInflatedField *generic_info'.
11010
11011         * icall.c
11012         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
11013
11014 2004-06-11  Martin Baulig  <martin@ximian.com>
11015
11016         * reflection.c (mono_image_create_method_token): Correctly encode
11017         varargs methods.
11018
11019 2004-06-11  Martin Baulig  <martin@ximian.com>
11020
11021         * metadata.c (mono_metadata_parse_method_signature): When parsing
11022         a MethodDef which has VarArgs, also set sentinelpos if we don't
11023         have any parameters.
11024
11025 2004-06-11  Martin Baulig  <martin@ximian.com>
11026
11027         * verify.c (mono_method_verify): In CEE_CALL, use
11028         mono_method_get_signature() to get the method's signature, unless
11029         we're a PInvoke method.
11030
11031 2004-06-10  Jackson Harper  <jackson@ximian.com>
11032
11033         * assembly.c: Use <path>/lib/mono/gac for the extra paths
11034         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
11035         logical name as the supplied path is just a prefix to the gac not
11036         the direct path to it.
11037         
11038 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
11039
11040         * reflection.c: make the token for a created method match
11041         the token of the MethodBuilder it was created from
11042         (IKVM requires this behaviour now).
11043
11044 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
11045
11046         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
11047         reflection.c, socket-io.c: leak fixes.
11048
11049 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11050
11051         * icall.c: handle sentinel pos in vararg methods in position different
11052         from 0.
11053
11054 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11055
11056         * culture-info-tables.h: freshly generated.
11057
11058 2004-06-09  Martin Baulig  <martin@ximian.com>
11059
11060         * loader.c (mono_get_method_constrained): Call `mono_class_init
11061         (constrained_class)'.   
11062
11063 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
11064
11065         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
11066         any methods. Fixes #59629.
11067
11068 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
11069
11070         * culture-info-tables.h: reflecting locale-builder updates.
11071
11072 2004-06-08  Dick Porter  <dick@ximian.com>
11073
11074         * object.h:
11075         * locales.c: Fixed compile warnings, including a real bug in
11076         CompareInfo_internal_compare.
11077         
11078 2004-06-08  Dick Porter  <dick@ximian.com>
11079
11080         * locales.c
11081         (ves_icall_System_Globalization_CompareInfo_internal_index):
11082         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
11083         Double-check the resuls of usearches, because ICU currently
11084         ignores most of the collator settings here.  Fixes bug 59720.
11085         
11086 2004-06-08  Dick Porter  <dick@ximian.com>
11087
11088         * locales.c
11089         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
11090         Fix memory leak and segfault-causing typo.  No idea how this one
11091         lasted so long without being noticed.
11092
11093 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
11094
11095         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
11096         any methods. Fixes #59629.
11097
11098 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11099
11100         * assembly.c:
11101         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
11102         own the critical section before). Removed dead code (that's done
11103         in the preload hook).
11104
11105         (mono_assembly_load_with_partial_name): call the preload hook.
11106
11107 2004-06-08  Martin Baulig  <martin@ximian.com>
11108
11109         * metadata.c (mono_metadata_signature_alloc): Default
11110         `sentinelpos' to -1.
11111
11112         * reflection.c (mono_image_get_array_token): Likewise.
11113
11114 2004-06-08  Martin Baulig  <martin@ximian.com>
11115
11116         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
11117
11118         * metadata.c (mono_metadata_parse_method_signature): When parsing
11119         a MethodDef which has VarArgs, set sentinelpos.
11120
11121         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
11122         `gint16' since we're using -1 for non-varargs methods.
11123
11124         * reflection.c
11125         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
11126         (method_encode_signature): Added varargs support.
11127         (method_builder_encode_signature): Likewise.
11128         (mono_image_get_varargs_method_token): New static method.
11129         (mono_image_create_method_token): New public method; this is
11130         called via an icall instead of mono_image_create_token() when
11131         calling a varargs method.       
11132
11133 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
11134
11135         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
11136
11137 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
11138
11139         * culture-info-tables.h : Reflecting the latest locale-builder that
11140           fixed empty array representation ({} to {0}).
11141
11142 2004-06-07  Jackson Harper  <jackson@ximian.com>
11143
11144         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
11145         looking up extra gac paths. This allows MONO_GAC_PATH to act
11146         exactly like a prefix.
11147         
11148 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
11149
11150         * reflection.c (mono_reflection_type_from_name): Make a copy of the
11151         type name before modifying it. Fixes #59405.
11152
11153 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
11154
11155         * culture-info.h: added fields for "all datetime patterns".
11156         * locales.c: (  ves_icall_System_Globalization_CultureInfo
11157           _construct_datetime_format ()): fill xxx_patterns fields.
11158         * object.h: added fields for "all datetime patterns" to
11159           MonoDateTimeFormatInfo.
11160         * culture-info-tables.h: reflecting locale-builder updates.
11161
11162 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
11163
11164         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
11165         the event has no add and remove methods. Fixes #59629.
11166
11167 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
11168
11169         * object.c: Fixed possible integer overflow when allocating large
11170         strings.
11171
11172 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
11173
11174         * culture-info-tables.h: reflecting locale-builder updates.
11175
11176 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
11177
11178         * culture-info-tables.h: reflecting locale-builder updates.
11179
11180 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
11181
11182         * culture-info-tables.h: reflecting locale-builder updates.
11183
11184 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
11185
11186         * threads.c: Made Thread.Sleep abortable.
11187
11188 2004-06-02  Martin Baulig  <martin@ximian.com>
11189
11190         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
11191
11192         * debug-mono-symfile.h: Bumped symbol file version number to 37.
11193
11194 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
11195
11196         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
11197
11198 2004-05-30  Jackson Harper  <jackson@ximian.com>
11199
11200         * reflection.c: Do not hardcode assembly versions or public key
11201         tokens anymore. All of this except the corlib section was dead
11202         code anyways.
11203         
11204 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
11205
11206         * object.c (mono_runtime_invoke_array): Automatically create boxed
11207         objects for byref valuetypes if needed. Fixes #59300.
11208         
11209         * object.c (mono_method_return_message_restore): Handle 
11210         MONO_TYPE_OBJECT as well.
11211
11212 2004-05-28  Jackson Harper  <jackson@ximian.com>
11213
11214         * reflection.c: The modified type encoding was causing build
11215         problems. Reverted for now.
11216         
11217 2004-05-28  Jackson Harper  <jackson@ximian.com>
11218
11219         * reflection.c/h: Take an assembly ref so that we dont create
11220         fully qualified names when encoding types in the same assembly as
11221         the custom attribute being emitted.
11222         * appdomain.c: Increment version number.
11223         
11224 2004-05-26  Duncan Mak  <duncan@ximian.com>
11225
11226         * icall.c
11227         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11228         Set the full version number (major, minor, build, revision).
11229
11230 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
11231
11232         * marshal.c (emit_struct_conv): increment src/dst after blit
11233         (mono_marshal_get_managed_wrapper,
11234         mono_marshal_get_native_wrapper): make sure we have marshalling
11235         info before marshalling params (info computation affects
11236         blittable)
11237
11238         * class.c (class_compute_field_layout): correctly deal with
11239         blittable
11240         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
11241         value types (as per what windows dows by default)
11242         (mono_class_setup_mono_type): System.ValueType is blittable
11243         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
11244         blittable
11245
11246         * marshal.c (mono_marshal_load_type_info): flag types  as
11247         non-blittable if the native layout doesn't match the managed
11248         layout
11249
11250 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11251
11252         * appdomain.c: don't add stuff in the private search path that is
11253         above the application base. If application base is not set, there's
11254         no private search path.
11255
11256 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
11257
11258         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
11259         byref struct arguments in native->managed marshalling.
11260
11261 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
11262
11263         * marshal.c (mono_marshal_get_runtime_invoke): correctly
11264         cache methods using signature (special case for methods
11265         that are value type or string class)
11266         
11267         * image.c (mono_image_close): clean up allocated GSList's
11268         in runtime_invoke_cache.
11269
11270 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11271
11272         * mono-config.c: set the correct path for mono_cfg_dir on windows when
11273         there's no MONO_CFG_DIR environment variable defined.
11274
11275 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11276
11277         * threads.c: windows version must be >= 0x0500 to include OpenThread.
11278
11279 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
11280
11281         * threadpool.c: Really wait for 500ms after the async call, even if the wait
11282           is interrumped.
11283         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
11284           before waiting for it, and call CloseHandle after the wait to unref it.
11285           This will make sure that handles are not disposed too early.
11286
11287 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11288
11289         * appdomain.c:
11290         * appdomain.h:
11291         * icall.c: removed
11292         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
11293         needed now.
11294
11295         * object.c: se the application_base only for the domain that runs
11296         Main. Fixes bug #59216,
11297
11298 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11299
11300         * appdomain.c:
11301         * object.c: only the domain in which Main is run have
11302         SetupInformation.ConfigurationFile set, so moved a few lines from
11303         appdomain.c to object.c.
11304
11305 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11306
11307         * appdomain.c: we tried to load [name].(dll|exe), but according
11308         to bug #57710, we must also try [culture]/[name].(dll|exe) and
11309         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
11310         There's a test case attached to bug #58922.
11311
11312 2004-05-27  Dick Porter  <dick@ximian.com>
11313
11314         * icall.c:
11315         * file-io.c: Implemented icalls for locking and unlocking regions
11316         in a file.
11317         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
11318         FALSE on error (fixes both compiler warning and real bug.)
11319
11320 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
11321
11322         * culture-info-tables.h: reflecting locale-builder updates.
11323
11324           (Added missing ChangeLog entry for 05/26)
11325
11326 2004-05-27  Jackson Harper  <jackson@ximian.com>
11327
11328         * locales.c: Fix some cut and paste errors.
11329         
11330 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11331
11332         * mono-config.c: set the correct path for config. directory on windows.
11333
11334 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
11335
11336         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
11337           on win32.
11338
11339 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11340
11341         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
11342         from pinvoke functions.
11343         
11344         * marshal.c (mono_ftnptr_to_delegate): Implement this.
11345
11346 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
11347
11348         * culture-info-tables.h: reflecting locale-builder updates.
11349
11350 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11351
11352         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
11353         #59086.
11354
11355 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
11356
11357         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
11358         * icall.c: Modified icalls for RNG.
11359         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
11360         Windows (CryptoAPI).
11361
11362 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11363
11364         * locales.c: Fix build.
11365
11366 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
11367
11368         * culture-info-tables.h: reflecting locale-builder updates.
11369
11370 2004-05-25  Jackson Harper  <jackson@ximian.com>
11371
11372         * locales.c: When creating the current culture use the $LANGs
11373         specific culture. So DateTimeFormat and NumberFormat entries are created.
11374         
11375 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11376
11377         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
11378         a char array as parameter.
11379
11380 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
11381
11382         * image.c: In mono_image_open(), always use an absolute path name to
11383           look for already loaded images.
11384
11385 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
11386
11387         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
11388         missing in the windows build (like older cygwin include files).
11389
11390 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
11391
11392         * icall.c: Fixed check for possible integer overflow in Buffer_
11393         BlockCopy icall. Replaced comments style // by /* */.
11394
11395 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
11396
11397         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
11398         
11399         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
11400         check after MONO_VTADDR. Fixes pinvoke2.exe.
11401
11402         * marshal.h marshal.c metadata.h: Add beginnings of support for
11403         ftnptr -> delegate marshalling.
11404
11405 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
11406
11407         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
11408         * threads.c: Fix warnings.
11409
11410 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
11411
11412         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
11413         * icall.c: Registered icalls for Suspend and Resume.
11414         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
11415           Thread.Abort.
11416         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
11417         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
11418         * process.c: Use WaitForSingleObjectEx.
11419         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
11420           checkpoints.
11421         * threads.c, threads.h: Make use of new Ex wait methods. Improved
11422           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
11423           for Suspend and Resume. Added new mono_thread_stop, used for stoping
11424           background threads. Added basic support for Abort in Windows.
11425           Start new threads using a managed delegate invoke wrapper. This wrapper
11426           has an interruption checkpoint that is needed since an interruption
11427           can be requested before the thread leaves the unmanaged code that starts 
11428           the thread.
11429         * marshal.c: Added interruption checkpoint after every native call, and
11430           also before managed calls for wrappers called from unmanaged code to
11431           go into managed code.
11432         * object.h: Added new field in MonoThread to keep track of interruption
11433           requests.
11434
11435 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
11436
11437         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
11438         calls.
11439
11440 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11441
11442         * appdomain.c:
11443         * assembly.c:
11444         * gc.c:
11445         * locales.c:
11446         * mono-config.c:
11447         * rand.c: getenv -> g_getenv (windows!)
11448
11449         * process.c: complete_path is also used on non-windows platforms.
11450
11451 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11452
11453         * icall.c: new signature for Process_Start.
11454
11455         * process.[ch]: new signature for Process_Start. If we're on windows
11456         and UseShellExecute is false, we have to search for the program by
11457         ourselves if we don't get a full path.
11458
11459 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11460
11461         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
11462         marshalling and call CleanUpNativeData if needed. Fixes #58646.
11463
11464 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11465
11466         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
11467         Fixes bug #58373.
11468
11469 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11470
11471         * process.c: use double quotes to quote program name and arguments on
11472         windows. Fixes bug #58575.
11473
11474 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11475
11476         * file-io.c: don't return "." and ".." when using windows Find*File.
11477
11478 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
11479
11480         * marshal.c: Don't pass wrappers to message init because method 
11481         addressed used to lookup metadata. part of remoting[2|3] fix.
11482
11483 2004-05-15  Jackson Harper  <jackson@ximian.com>
11484
11485         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
11486         path is essentially the same as MONO_PATH except that it points to
11487         GACs instead of lib directories.
11488         * loader.h: The user gac is gone so we dont need function to
11489         enable/disable it.
11490         * mono-config.c: user gac option is now gone.
11491         
11492 2004-05-15  Jackson Harper  <jackson@ximian.com>
11493
11494         * culture-info.h: Make defines more consistent, add calendar data
11495         to the culture info table.
11496         * culture-info-tables.h: Add basic calendar data. Basically
11497         everyone gets default gregorian until all the data is
11498         updated.
11499         * locales.c: Use the new consistent defines. Set calendar data for
11500         culture info objects.
11501         * object.h: add a field for calendar data to CultureInfo
11502         
11503 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11504
11505         * image.c: image->runtime_invoke_cache is keyed on signatures now.
11506         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
11507         a signature.
11508         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
11509         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
11510         an extra param that is the pointer of the method to invoke. The IL for
11511         the invoke method is no longer specific to the method, but to the
11512         signature of the method. Thus, we can share the same code for multiple
11513         methods. This reduces the number of methods that have to be compiled.
11514
11515 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11516
11517         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
11518
11519         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11520
11521         * icall.c: Optimize Buffer.BlockCopy.
11522
11523 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11524
11525         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
11526         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
11527         quote). Changed them to "MMMM yyyy".
11528
11529 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
11530
11531         * rand.c
11532         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
11533
11534 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
11535
11536         * reflection.h: Updated after changes to managed structures.
11537
11538         * appdomain.c: Bump corlib version.
11539
11540 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11541
11542         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
11543         windows.
11544
11545 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11546
11547         * Makefile.am: link to ../os/libmonoos.la on windows.
11548
11549         * assembly.c:
11550                 -If MONO_DEBUG, warn about non-existing directories in
11551                 MONO_PATH.
11552                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
11553                 compile time variable.
11554                 -Removed init_default_path and call mono_set_rootdir from
11555                 libmonoos.a instead (windows only).
11556
11557         * assembly.h: declare mono_assembly_getrootdir().
11558
11559         * domain.c:
11560         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
11561
11562         * loader.c: s/getenv/g_getenv/
11563
11564 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11565
11566         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
11567
11568         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
11569
11570         * metadata.h: Add new marshalling conversions.
11571
11572         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
11573         function.
11574
11575         * reflection.c (mono_reflection_get_type): Lookup the type in all
11576         modules of a multi-module assembly. Fixes #58291.
11577
11578 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11579
11580         * threads.c: Before aborting a background, set the StopRequested
11581         state.  This avoids throwing the Abort exception.
11582         In mono_thread_manage, don't continue with the shutdown until all
11583         aborted threads have actually stopped.
11584
11585 2004-05-10  Jackson Harper  <jackson@ximian.com>
11586
11587         * locales.c: Remove the modifier from culture names.
11588         
11589 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11590
11591         * Makefile.am: monosn is not installed any more. It has been deprecated
11592         in favor of sn.
11593
11594 2004-05-07  Jackson Harper  <jackson@ximian.com>
11595
11596         * locales.c
11597         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
11598         Fix array construction, add bailout if the length is 0.
11599
11600 2004-05-07  Dick Porter  <dick@ximian.com>
11601
11602         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
11603         machine doesn't have a DNS entry.  Patch by Urs Muff
11604         (umuff@quark.com), fixes bug 57928.
11605
11606 2004-05-06  Jackson Harper  <jackson@ximian.com>
11607
11608         * reflection.c: Handle null PublicTokens properly. alloc mem for
11609         assembly names culture so we dont crash when freeing it.
11610         
11611 2004-05-06  Jackson Harper  <jackson@ximian.com>
11612
11613         * assembly.c: Check the usergac when loading with partial names.
11614         
11615 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
11616
11617         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
11618         does nothing for now (not required for Linux/Windows) but the class
11619         library can call it (and a newer or modified runtime could need it).
11620         * icall.c: Registred icall.
11621
11622 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11623
11624         * loader.c: prints a message on module loading error we set MONO_DEBUG
11625         environment variable.
11626
11627 2004-05-05  Jackson Harper  <jackson@ximian.com>
11628
11629         * appdomain.c: Handle PublicKeyToken=null properly.
11630         
11631 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
11632
11633         * environment.c|h: Added icall ves_icall_System_Environment_
11634         GetOSVersionString to get the current OS version as a string.
11635         * icall.c: Registred icall.
11636
11637 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
11638
11639         * object.c: in mono_object_get_virtual_method(), take into account that
11640         non-virtual methods don't have a slot in the vtable. Check needed when
11641         the object is a proxy.
11642
11643 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11644
11645         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
11646         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
11647
11648         * object.c (mono_class_compute_gc_descriptor): Fix warning.
11649
11650         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
11651         passed when a valuetype is expected.
11652
11653         * object.c (mono_unhandled_exception): Only set the exit code if the
11654         exception happens in the main thread. Fixes thread5.exe.
11655
11656         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
11657         invalid names. Fixes #58047.
11658
11659 2004-05-03  Jackson Harper  <jackson@ximian.com>
11660
11661         * assembly.c: This line was committed accidently and is unneeded.
11662         
11663 2004-05-03  Jackson Harper  <jackson@ximian.com>
11664
11665         * icall.c: Add new icall for Assembly::LoadWithPartialName
11666         * assembly.c/.h: new function that probes the GAC to load partial
11667         assembly names by Paolo Molaro.
11668         
11669 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11670
11671         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
11672         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
11673         (type_get_fully_qualified_name): Added PublicKeyToken when building a
11674         full type name.
11675
11676 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11677
11678         * appdomain.c: fixed check for 'neutral' culture and removed warning.
11679         * reflection.c: fix bug when parsing a full type name and Version is not
11680         the last thing in the string.
11681
11682 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
11683
11684         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
11685         crashes when it is freed.
11686
11687 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11688
11689         * assembly.c: print the compat warning to stderr.
11690
11691 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
11692
11693         * assembly.c (mono_assembly_load_references): Add a compatibility
11694         hack to run old applications that might be still referencing the
11695         3300-based assemblies, only do this for System.xxx.
11696
11697 2004-05-01  Jackson Harper  <jackson@ximian.com>
11698
11699         * appdomain.c: If the culture is neutral we set it to "".
11700         
11701 2004-04-29  Jackson Harper  <jackson@ximian.com>
11702
11703         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
11704
11705 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
11706  
11707         * string-icalls.c: added low overhead function for copying chars
11708         * icall.c: added needed icall for the above function
11709  
11710 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11711
11712         * icall.c: fix return value of get_global_assembly_cache.  Implemented
11713         Environment.GetLogicalDrives.
11714
11715 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
11716
11717         * rand.c: try and talk to egd or prngd
11718         for random bytes if opening devices fail.
11719
11720 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11721
11722         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
11723         alignment for the type using the native alignment of its members 
11724         instead of using klass->min_align.
11725
11726         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
11727
11728 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11729
11730         * file-io.c:
11731         * socket-io.c: added check for sys/aio.h.
11732
11733 2004-04-28  Dick Porter  <dick@ximian.com>
11734
11735         * threads.c: Don't abort a thread thats already aborting, when
11736         terminating everything.
11737
11738 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11739
11740         * icall.c: added 2 new async calls for Socket.
11741
11742         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
11743         IO on *nix systems.
11744
11745         * threadpool.c: removed unused variable.
11746
11747 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
11748
11749         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
11750
11751 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11752
11753         * locales.c: put back string_invariant_tolower () and
11754         string_invariant_toupper ().
11755
11756 2004-04-26 David Waite <mass@akuma.org>
11757
11758         * file-io.h:
11759         * socket-io.h:
11760         * threads.h:
11761         * unicode.h: remove comma from end of enumeration declarations
11762
11763 2004-04-26 David Waite <mass@akuma.org>
11764
11765         * debug-mono-symfile.h:
11766         * decimal.c:
11767         * mono_debug.h:
11768         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
11769
11770
11771 2004-04-26  Jackson Harper  <jackson@ximian.com>
11772
11773         * appdomain.c: Increment version number.
11774         
11775 2004-04-26  Jackson Harper  <jackson@ximian.com>
11776
11777         * appdomain.c: Set assembly references public token value when
11778         PublicKeyToken is specified, not the hash_value. Free public token
11779         values when free assembly name data. Previously the public key
11780         token was hex decoded, however we are using hex encoded public key
11781         tokens, so this is not neccasary.
11782         * assembly.c: Lookup assemblies in the gac if their public token
11783         value is set. Add function to allow enabling user gac
11784         lookups. Specify whether or not the assembly was loaded from the
11785         GAC. Compare full assembly names when checking the cache for
11786         assemblies (Temporarily disabled see comment in code). Remove
11787         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
11788         specifies trace-loader they get extra info to stdout on the
11789         loading of assemblies.
11790         * image.h: Add a field for an assembly references public token
11791         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
11792         whether an assembly has been loaded from the GAC.
11793         * image.c: Remove a corlib -> mscorlib name mapping.
11794         * loader.h: Add function to enable/disable the user gac.
11795         * mono-config.c: Check if the usergac is enabled in the config
11796         file.
11797         * icall.c: New icall to determine whether or not an assembly has
11798         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
11799         * tabldefs.h: Add constant for assemblyref flag that specifies a
11800         full public key is used instead of a public token.
11801         * reflection.c: Remove mscorlib -> corlib mappings. Set
11802         PublicTokenValue instead of hash value. This value is a hex
11803         string so it does not need to be expanded.
11804
11805 2004-04-26  Martin Baulig  <martin@ximian.com>
11806
11807         * mono-debug-debugger.c (mono_debugger_initialize): Set
11808         `mono_debugger_initialized' before calling mono_debug_lock().
11809
11810 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
11811
11812         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
11813           InternalToUpper/InternalToLower.
11814         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
11815           removed invariant culture shortcut.  This is now done in managed code.
11816         * locales.c: (string_invariant_toupper/tolower) removed.
11817
11818 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11819
11820         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
11821         Added Poll internal call.
11822
11823         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
11824         call for Poll. Select was too heavy for polling a single socket.
11825
11826         * threadpool.[ch]: added mono_threadpool_cleanup.
11827         * threads.c: use it. Don't use Thread_Abort on windows.
11828
11829 2004-04-23  Martin Baulig  <martin@ximian.com>
11830
11831         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
11832
11833 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
11834
11835         * icall.c: Registred new icalls for key pair protection and added an
11836         icall for Environment.GetFolderPath on Windows.
11837         * security.c|h: Added new icalls for key pair protection.
11838
11839 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11840
11841         * socket-io.c: don't display the non-supported family warning for known
11842         families. Now this is not displayed on windows when checking support
11843         for IPv4/IPv6.
11844
11845 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11846
11847         * class.c: don't display the layout warning for static fields.
11848
11849 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
11850
11851         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
11852         * locales.c, locales.h: Added new icalls for culture-specific
11853         Char.ToLower and Char.ToUpper.
11854
11855 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11856
11857         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
11858         by David Waite.
11859
11860 2004-04-20  Martin Baulig  <martin@ximian.com>
11861
11862         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
11863         of the type name before passing it to mono_reflection_type_from_name().
11864
11865 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11866
11867         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
11868         encodings here. Fixes #56965.
11869
11870 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
11871
11872         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11873         fix test on strstr result not that I can see anything that
11874         relies on the result.
11875
11876 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11877
11878         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
11879         Fixes #57081.
11880
11881         * marshal.c (mono_marshal_get_string_encoding): New helper function.
11882
11883         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
11884         function to determine which marshalling to use for strings. Fixes
11885         #56965.
11886
11887         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
11888
11889         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
11890
11891 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
11892
11893         * icall.c: #include mono-config.h
11894
11895 2004-04-15  Jackson Harper  <jackson@ximian.com>
11896
11897         * culture-info-tables.h: Fix date formats for en-US culture.
11898         
11899 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
11900
11901         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
11902         ThreadPool.SetMinThreads.
11903         * threadpool.c: Implemented ThreadPool.GetMinThreads and
11904         ThreadPool.SetMinThreads.
11905
11906 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11907
11908         * mono-config.c: also load the .config file in the directory
11909         where the assembly was found.
11910
11911 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11912
11913         * assembly.c: load per-assembly config files.
11914         * icall.c: decrapified code to get the config dir and moved to
11915         mono-config.c.
11916         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
11917         per-assembly config files. When doing a dll map lookup give precedence
11918         to the per-assembly data.
11919
11920 2004-04-14  Martin Baulig  <martin@ximian.com>
11921
11922         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
11923         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
11924         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
11925
11926         * mono-debugger-debugger.c: While the debugger is locked, remember
11927         whether the symbol tables have changes and send one single
11928         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
11929
11930 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11931
11932         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
11933
11934         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
11935         function.
11936
11937         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
11938         account when marshalling string arrays. Fixes #56965.
11939
11940 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
11941
11942         * icall.c: Add new icalls mapping for security.
11943         * security.c|h: Add internal calls for WindowsIdentity,
11944         WindowsImpersonationContext and WindowsPrincipal.
11945
11946 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
11947
11948         * class.c: Added comment to ensure the System.MonoDummy class
11949         is removed when no longer necessary
11950
11951 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11952
11953         * appdomain.c: Pass arguments to the bootstraping exceptions to
11954         minimize JITed methods at boot
11955
11956         * metadata.c (mono_exception_from_name_two_strings): Allow for the
11957         second string to be null.
11958
11959         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
11960         Change the protocol to minimize the JIT methods at startup.  Now
11961         it Returns the internal codepage, if the value of "int_code_page"
11962         is 1 at entry, and we can not compute a suitable code page
11963         number, returns the code page as a string.
11964
11965 2004-04-13  Jackson Harper  <jackson@ximian.com>
11966
11967         * culture-info-tables.h: Fix number of decimal digits for all
11968         english locales.
11969
11970 2004-04-13  Jackson Harper  <jackson@ximian.com>
11971
11972         * icall.c: Clairfy out of sync error message. It is not always
11973         your corlib that is out of sync.
11974
11975 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
11976
11977         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
11978         properties when only the set accessor is overriden. Fixes #55874.
11979
11980 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
11981
11982         * assembly.c (mono_assembly_load_references): Make this thread safe.
11983         Fixes #56327.
11984
11985 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11986
11987         * monosn.c: Add missing initialization calls.
11988
11989 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
11990
11991         * locales.c:
11992         ves_icall_System_Globalization_CultureInfo_construct_number_format
11993         Fix g_assert so it compiles on fussier compilers re int/ptr
11994         mismatch
11995
11996 2004-04-08  Dick Porter  <dick@ximian.com>
11997
11998         * socket-io.h:
11999         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
12000         53992.  Also rearrange the code so that the internal calls return
12001         an error value and exceptions are thrown from managed code.
12002
12003         * icall.c: Add type info to the socket icalls.
12004
12005 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12006
12007         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
12008         owes me a beer.
12009
12010 2004-04-07  Martin Baulig  <martin@ximian.com>
12011
12012         * class.c (mono_class_from_generic_parameter): Don't default
12013         `klass->parent' to `mono_defaults.object_type'.
12014
12015 2004-04-07  Martin Baulig  <martin@ximian.com>
12016
12017         * reflection.c (mono_reflection_initialize_generic_parameter): Set
12018         `param->pklass->reflection_info'.       
12019
12020 2004-04-07  Jackson Harper  <jackson@ximian.com>
12021
12022         * culture-info-tables.h: Fix date separator symbol.
12023         
12024 2004-04-07  Martin Baulig  <martin@ximian.com>
12025
12026         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
12027         from System.Type to System.MonoType.
12028
12029 2004-04-07  Martin Baulig  <martin@ximian.com>
12030
12031         * reflection.h
12032         (MonoReflectionGenericParam): Added `has_reference_type' and
12033         `has_value_type' fields.
12034
12035         * reflection.c (mono_image_get_generic_param_info): Encode the
12036         correct flags if we have the `class' or `struct' constraint.
12037
12038 2004-04-07  Martin Baulig  <martin@ximian.com>
12039
12040         * reflection.h
12041         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
12042
12043 2004-04-07  Jackson Harper  <jackson@ximian.com>
12044
12045         * appdomain.c: Revert extra patches, just wanted to bump the
12046         version number.
12047         
12048 2004-04-07  Jackson Harper  <jackson@ximian.com>
12049
12050         * Makefile.am: Add culture-info private headers.
12051         * icall.c: Add new icalls for contructing locales.
12052         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
12053         * locales.h: Declare new culture info construction methods.
12054         * object.h: Add new fields used to avoid the CultureMap to
12055         MonoCultureInfo.
12056         * culture-info.h: Definition of structs used in the culture info
12057         tables.
12058         * culture-info-tables.h: Autogenerated tables that contain culture
12059         info data. This file was generated with the locale-builder tool.
12060         * appdomain.c: Incement corlib version number.
12061         
12062 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
12063
12064         * appdomain.c: (mono_runtime_init) move mono_thread_init
12065         to before mono_object_new calls so critical sections
12066         are initialized before use.
12067
12068 2004-04-07  Martin Baulig  <martin@ximian.com>
12069
12070         * icall.c
12071         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
12072         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
12073         (ves_icall_MonoGenericParam_initialize): Removed.
12074         (monogenericparam_icalls): Removed.
12075         (generictypeparambuilder_icalls): Added new table for
12076         System.Reflection.Emit.GenericTypeParameterBuilder.
12077
12078         * reflection.c
12079         (mono_reflection_define_generic_parameter): Removed.
12080         (mono_reflection_initialize_generic_parameter): This is now called
12081         from GenericTypeParameterBuilder's .ctor.
12082
12083 2004-04-06  Martin Baulig  <martin@ximian.com>
12084
12085         * class.c (mono_class_init): Don't inflate nested classes in a
12086         generic instance.
12087         (mono_type_get_name_recurse): Include the generic arguments for
12088         generic instances and generic type declarations.
12089         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
12090         (_mono_class_get_instantiation_name): Removed.
12091         (mono_class_create_generic): Always use `gklass->name' as our name.
12092
12093         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
12094
12095         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
12096         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
12097         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
12098         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
12099         closed generic methods here.
12100
12101         * reflection.c
12102         (mono_reflection_generic_inst_get_nested_types): Removed.
12103         (inflate_mono_method): Copy the generic parameters from the
12104         MonoMethodHeader into out MonoGenericMethod.
12105
12106 2004-04-06  Martin Baulig  <martin@ximian.com>
12107
12108         * row-indexes.h
12109         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
12110
12111         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
12112
12113         * reflection.c (build_compressed_metadata): If we have any entries
12114         in the GenericParam, MethodSpec or GenericParamConstraint tables,
12115         set the header version to 1.1.
12116
12117 2004-04-06  Martin Baulig  <martin@ximian.com>
12118
12119         * class.c (mono_class_init): If we're a generic instance,
12120         initialize our nested classes, too.
12121         (_mono_class_get_instantiation_name): Deal with the new `!%d'
12122         suffix. 
12123
12124 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12125
12126         * process.c: quote the argument passed to the shell on windows.
12127
12128 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12129
12130         * threads.c (mono_alloc_special_static_data): Allow this to be
12131         called during startup.
12132
12133 2004-04-02  Martin Baulig  <martin@ximian.com>
12134
12135         * icall.c
12136         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
12137
12138 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
12139
12140         * icall.c: Fix build.
12141
12142 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
12143
12144         * Makefile.am: Added security.c|h.
12145         * icall.c: Added icall for get_UserName;
12146         * security.c: New file for security related icalls. Added function
12147         get_UserName for System.Environment (fix #56144).
12148         * security.h: New. Header file for security.c
12149
12150 2004-04-02  Dick Porter  <dick@ximian.com>
12151
12152         * icall.c: Deleted the icalls that were obsoleted some time ago
12153         by the ICU string code, and which were mixed into the icall
12154         rearranging.  Fixes bug 55969.
12155
12156         * string-icalls.h: 
12157         * string-icalls.c: Deleted the code that those icalls reference.
12158
12159 2004-04-01  Martin Baulig  <martin@ximian.com>
12160
12161         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
12162
12163         * class.c (mono_class_from_generic_parameter): Don't set 
12164         TYPE_ATTRIBUTE_INTERFACE.
12165         (my_mono_class_from_generic_parameter): Likewise.
12166
12167 2004-04-01  Martin Baulig  <martin@ximian.com>
12168
12169         * loader.c (find_method): Added an optional `MonoClass *ic'
12170         argument to search in a specific interface.
12171         (mono_get_method_constrained): New public function.
12172
12173 2004-04-01  Martin Baulig  <martin@ximian.com>
12174
12175         * reflection.c (mono_image_get_generic_field_token): Use the
12176         `handleref' cache here.
12177
12178 2004-04-01  Martin Baulig  <martin@ximian.com>
12179
12180         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
12181
12182         * reflection.c (create_generic_typespec): Use the `typespec' hash
12183         here, not the `typeref' one.    
12184
12185 2004-04-01  Martin Baulig  <martin@ximian.com>
12186
12187         * class.c (mono_class_inflate_generic_type): Moved the
12188         functionality into a new static inflate_generic_type() which
12189         returns NULL if it didn't do anything.  Only increment the
12190         `mono_stats.inflated_type_count' if we actually inflated
12191         something.
12192         (mono_class_get_full): Check the classes type to see whether we
12193         need to inflate it; also inflate MONO_TYPE_(M)VAR.
12194
12195 2004-04-01  Jackson Harper  <jackson@ximian.com>
12196
12197         * reflection.c: Set culture for assembly references.
12198         
12199 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
12200
12201         * reflection.[ch], icall.[ch], Fix support for pinning variables.
12202
12203 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12204
12205         * assembly.c:
12206         (do_mono_assembly_open): the critical section also covers
12207         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
12208
12209 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12210
12211         * threads.c:
12212         (mono_manage_threads): abort the background threads when finishing.
12213         Fixes bug #47232.
12214
12215 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12216
12217         * gc.c: only close the done_event handle if there was no timeout.
12218         C-ified comments.
12219
12220 2004-03-30  Martin Baulig  <martin@ximian.com>
12221
12222         * icall.c (icall_entries): It's called "System.Activator", not
12223         "System.Activation".    
12224
12225 2004-03-30  Martin Baulig  <martin@ximian.com>
12226
12227         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
12228         (mono_class_create_from_typespec): Likewise.
12229
12230 2004-03-30  Martin Baulig  <martin@ximian.com>
12231
12232         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
12233         `has_ctor_constraint' and `initialized'.
12234
12235 2004-03-30  Martin Baulig  <martin@ximian.com>
12236
12237         * reflection.c (encode_new_constraint): New static function to add
12238         the constructor constraint attribute to a type parameter.
12239         (encode_constraints): Call encode_new_constraint() if necessary.
12240
12241         * reflection.h
12242         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
12243
12244         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
12245         
12246 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
12247
12248         * reflection.c, icall.c: add support for pinning variables. 
12249
12250 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
12251
12252         * marshal.c (mono_marshal_get_managed_wrapper):
12253         init bool local with zero rather than null.
12254
12255 2004-03-29  Martin Baulig  <martin@ximian.com>
12256
12257         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
12258         the "official" behavior here.
12259         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
12260
12261 2004-03-29  Martin Baulig  <martin@ximian.com>
12262
12263         * icall.c: Reflect latest API changes.
12264
12265 2004-03-29  Martin Baulig  <martin@ximian.com>
12266
12267         * loader.c (mono_get_method_from_token): Also call
12268         mono_metadata_load_generic_params () for abstract and interface
12269         methods; replace the type arguments in the method signature with
12270         the ones which are loaded from the metadata.
12271
12272 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
12273
12274         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
12275         of the lock is not the current thread. MS.NET don't do it, in spite of
12276         what the documentation says. See bug #56157.
12277
12278 2004-03-28  Martin Baulig  <martin@ximian.com>
12279
12280         * class.c (mono_class_init): Don't call init_properties() and
12281         init_events() for generic instances; set `prop->parent' when
12282         inflating properties.
12283
12284         * reflection.c (mono_generic_inst_get_object): Call
12285         `mono_class_init (ginst->klass)'.
12286         (mono_type_get_object): Only create a MonoGenericInst if your
12287         generic type is a TypeBuilder.
12288         (do_mono_reflection_bind_generic_parameters): Only set
12289         `ginst->is_dynamic' if our generic type is a TypeBuilder.
12290
12291 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12292
12293         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
12294         Fixes #56091.
12295
12296 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12297
12298         * icall.c: added Kill_internal icall.
12299         * process.[ch]: added Kill_internal icall.
12300
12301 2004-03-25  Martin Baulig  <martin@ximian.com>
12302
12303         * class.h (MonoStats): Added `generic_instance_count',
12304         `inflated_method_count', `inflated_type_count' and
12305         `generics_metadata_size'.       
12306
12307 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12308
12309         * reflection.c: no warnings now.
12310
12311 2004-03-25  Martin Baulig  <martin@ximian.com>
12312
12313         * class.c (mono_class_get_full): New public function; does a
12314         mono_class_get(), but also takes a `MonoGenericContext *'.
12315
12316         * loader.c (mono_field_from_memberref): Renamed to
12317         `field_from_memberref', made static and added `MonoGenericContext *'
12318         argument.
12319         (mono_field_from_token): Added `MonoGenericInst *' argument.
12320         (method_from_memberef): Likewise.
12321         (mono_get_method_from_token): Likewise.
12322         (mono_get_method_full): New public function; does a
12323         mono_get_method(), but also takes a `MonoGenericContext *'.
12324
12325         * verify.c (mono_method_verify): Get the method's generic context
12326         and pass it to mono_field_from_token(), mono_get_method_full() and
12327         mono_class_get_full().
12328
12329 2004-03-25  Martin Baulig  <martin@ximian.com>
12330
12331         * class.c (mono_class_inflate_generic_type): Take a
12332         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
12333         `MonoGenericMethod *'.
12334
12335 2004-03-25  Martin Baulig  <martin@ximian.com>
12336
12337         * loader.h (MonoMethodInflated): Store the MonoGenericContext
12338         instead of the MonoGenericMethod here.
12339
12340 2004-03-25  Martin Baulig  <martin@ximian.com>
12341
12342         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
12343         each time we create a new MonoGenericInst, we also create a new
12344         context which points back to us.
12345
12346         * class.c (inflate_method): Use `ginst->context' instead of
12347         creating a new context.
12348
12349         * loader.c (method_from_memberref): Use
12350         `klass->generic_inst->context' instead of creating a new context.
12351
12352 2004-03-25  Martin Baulig  <martin@ximian.com>
12353
12354         * class.h (MonoGenericContext): New struct.
12355         (MonoGenericMethod): Removed `generic_inst'.
12356
12357         * class.c (mono_class_inflate_generic_method): Take a
12358         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
12359
12360 2004-03-25  Martin Baulig  <martin@ximian.com>
12361
12362         * loader.h (MonoMethodInflated): New typedef.
12363
12364         * metadata.h (MonoMethodSignature): Removed `gen_method', make
12365         `generic_param_count' consume just 30 bits, added `is_inflated'
12366         and `has_type_parameters' flags (one bit each).
12367
12368         * class.c (mono_class_inflate_generic_method): Create a
12369         MonoMethodInflated instead of a MonoMethodNormal and set
12370         `is_inflated' in the method signature.
12371
12372         * class.h (MonoGenericMethod): Removed `generic_method'.
12373
12374 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
12375
12376         * image.c: Make sure the name of a MonoImage is always an absolute path.
12377           This fixes bug #54415.
12378
12379 2004-03-24  Martin Baulig  <martin@ximian.com>
12380
12381         * class.c (mono_class_setup_vtable): If we're a generic instance,
12382         use our generic type's vtable size.
12383
12384 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12385
12386         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
12387         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
12388         problems.
12389
12390 2004-03-23  Martin Baulig  <martin@ximian.com>
12391
12392         * class.h (MonoDynamicGenericInst): Added `int count_events' and
12393         `MonoEvent *events'.
12394
12395         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
12396         (typebuilder_icalls): Added "get_event_info"; calls
12397         mono_reflection_event_builder_get_event_info(). 
12398
12399         * reflection.c (mono_reflection_generic_inst_initialize): Added
12400         `MonoArray *events'.
12401         (mono_reflection_event_builder_get_event_info): New function.
12402
12403 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
12404
12405         * object.h: add mono_type_initialization_init
12406
12407         * object.c (mono_runtime_class_init): 
12408         implement class constructor synchronization rules
12409         to cope with threading issues.  
12410         add mono_type_initialization_init
12411
12412         * appdomain.c (mono_runtime_init): call 
12413         mono_type_initialization_init
12414
12415         * class.h: removing initializing field from MonoVTable
12416
12417 2004-03-23  Martin Baulig  <martin@ximian.com>
12418
12419         * class.c (my_mono_class_from_generic_parameter): Use
12420         `param->name' if it's not NULL. 
12421
12422 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
12423
12424         * class.c: do not insert non-virtual methods in the vtable.
12425         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
12426         that means the method is non-virtual. This never would have
12427         happened before.
12428
12429 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12430
12431         * profiler.c: Added lock for accessing coverage_hash.
12432
12433 2004-03-22  Martin Baulig  <martin@ximian.com>
12434
12435         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
12436         `method->method->signature->generic_param_count != 0' to make it
12437         work for interface methods.
12438
12439 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12440
12441         * process.c: quote the string passed to the shell using g_shell_quote.
12442
12443 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12444
12445         * threads.c:
12446         (mono_threads_manage): don't remove the finalizer thread and self
12447         from the threads hash table so that mono_thread_manage can be called
12448         more than once.
12449
12450 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12451
12452         * process.c: quote the arguments when UseShellExecute is true. Fixes
12453         bug #55790.
12454
12455 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12456
12457         * threads.c: set mono_thread_detach as a cleanup routine for every
12458         thread. This way it's always executed upon thread termination, either
12459         aborted or finished normally. No more xsp hangs!
12460
12461 2004-03-17  Martin Baulig  <martin@ximian.com>
12462
12463         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
12464         `int count_nested' and a `MonoType **nested'.
12465
12466         * reflection.c (mono_reflection_bind_generic_parameters): Moved
12467         most of the functionality into a new static
12468         do_mono_reflection_bind_generic_parameters() and don't take a
12469         `MonoType *nested_in' argument any more.  Don't compute nested
12470         types here.
12471         (mono_reflection_generic_inst_get_nested_types): New public method
12472         to get nested types.
12473
12474         * class.c (mono_class_create_generic): Set `klass->nested_in' if
12475         we're a nested class.
12476
12477         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
12478         mono_reflection_generic_inst_get_nested_types() to compute the
12479         nested types.
12480
12481 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12482
12483         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
12484         descriptive error message under windows.
12485         
12486 2004-03-17  Martin Baulig  <martin@ximian.com>
12487
12488         * class.c (dup_type): Added `const MonoType *original' argument;
12489         copy the attrs from the original type.
12490
12491 2004-03-17  Martin Baulig  <martin@ximian.com>
12492
12493         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
12494         `m->generic_inst_cache' here.
12495
12496 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12497
12498         * exception.h exception.c: Add stack_overflow_exception.
12499
12500 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12501
12502         * threadpool.c:
12503         (overlapped_callback): call SetEvent *after* invoking the callback.
12504         No need to call CloseHandle.
12505
12506 2004-03-16  Martin Baulig  <martin@ximian.com>
12507
12508         * reflection.c (mono_image_get_fieldref_token): Take a
12509         `MonoReflectionField *' instead of a `MonoClassField *' and a
12510         `MonoClass *'; store the `MonoReflectionField *' in the hash.
12511
12512 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12513
12514         * appdomain.c: don't add the culture to the filename we're looking for
12515         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
12516
12517 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12518
12519         * locales.c: don't ignore symbols when doing case insensitive compares.
12520         Thanks Dick! Fixes bug #54046.
12521
12522         * threads.c: surround 'threads' usage with enter/leave in
12523         mono_thread_manage.
12524
12525 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12526
12527         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
12528         implicitly marshalled as [Out]. Fixes #55450.
12529
12530         (mono_marshal_get_runtime_invoke): Zero out the result if there is
12531         an exception.
12532
12533 2004-03-16  Martin Baulig  <martin@ximian.com>
12534
12535         * class.c (mono_class_from_generic_parameter): Use the actual
12536         parameter name. 
12537
12538 2004-03-16  Martin Baulig  <martin@ximian.com>
12539
12540         * reflection.c (type_get_signature_size): New static function.
12541         Compues the size of the type in a method signature.
12542         (method_get_signature_size): New static function; calls
12543         type_get_signature_size() to compute the actual size of the
12544         method's signature.
12545         (method_encode_signature): Use method_get_signature_size() to get
12546         the signature's size rather than using `nparams * 10'.
12547
12548 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12549
12550         * file-io.h: define here WapiOverlapped on windows. I don't want the
12551         regular OVERLAPPED one.
12552
12553         * file-io.c:
12554         * threadpool.c: somehow, BindIoCompletionCallback is not found.
12555         Disabling AIO on windows.
12556
12557 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12558
12559         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
12560         bug #55385.
12561
12562 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12563
12564         * appdomain.c: upgraded corlib version.
12565
12566         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
12567         and BeginWrite. Allow opening files for asynchrnous operations.
12568
12569         * file-io.h: new struct that maps FileStreamAsyncResult.
12570         * icall.c: added new icalls.
12571         * process.[ch]: support setting child process environment variables
12572         and use the SHELL or COMSPEC when UseShellExecute is true.
12573
12574         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
12575         callback for async. IO is here and also BindHandle.
12576
12577         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
12578         from here.
12579
12580 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12581
12582         * reflection.c (create_custom_attr): Allow len == 0.
12583
12584         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
12585         computation on big-endian machines.
12586
12587 2004-03-13  Martin Baulig  <martin@ximian.com>
12588
12589         * class.h (MonoGenericInst): Added `int count_ifaces'.
12590
12591         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
12592         `ginst->count_ifaces' instead `klass->interface_count' since we
12593         may get called before the vtable is created.
12594
12595         * loader.c (mono_method_get_param_names): If we're a generic
12596         instance, return and don't initialize the class.
12597
12598         * reflection.c (mono_reflection_setup_generic_class): Don't call
12599         ensure_runtime_vtable().
12600         (mono_reflection_bind_generic_parameters): Set
12601         `ginst->count_ifaces'.
12602
12603 2004-03-11  Jackson Harper <jackson@ximian.com>
12604
12605         * icall.c:
12606         * unicode.c:
12607         * unicode.h: Remove unused System.Char icalls.
12608         
12609 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
12610
12611         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
12612         code when we P/Invoke the first library in Windows.Forms, instead
12613         of when we first open the assembly.
12614
12615         * assembly.c: Drop the lookup from here.
12616
12617 2004-03-10  Martin Baulig  <martin@ximian.com>
12618
12619         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
12620         class for properties, fields and events.  Finally fixes #54945.
12621
12622 2004-03-10  Martin Baulig  <martin@ximian.com>
12623
12624         * metadata.c (mono_metadata_class_equal): New static function;
12625         checks whether two generic instances or two generic parameters are
12626         equal.
12627         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
12628         compare classes.        
12629
12630 2004-03-10  Martin Baulig  <martin@ximian.com>
12631
12632         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
12633
12634         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
12635         argument and write it into the `reflection_info' field.
12636
12637         * icall.c
12638         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
12639         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
12640
12641 2004-03-09  Jackson Harper  <jackson@ximian.com>
12642
12643         * char-conversions.h: use 8 bits for numeric data its all we need
12644         * icall.c: numeric data is only 8 bits now.
12645
12646 2004-03-09  Martin Baulig  <martin@ximian.com>
12647
12648         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
12649
12650         * class.c (init_properties, init_events): Initialize the new
12651         `parent' field.
12652
12653         * reflection.c (typebuilder_setup_properties): Likewise.
12654         (typebuilder_setup_events): Likewise.
12655
12656         * reflection.h (MonoEventInfo): Replaced `parent with
12657         `declaring_type' and `reflected_type'.
12658
12659         * icall.c (ves_icall_get_property_info): Distinguish between
12660         declaring and reflected type.
12661         (ves_icall_get_event_info): Likewise.
12662
12663 2004-03-09  Martin Baulig  <martin@ximian.com>
12664
12665         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
12666         (ves_icall_Type_GetField): Correctly set field->klass.
12667
12668 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
12669
12670         * loader.h: Fix warning.
12671
12672 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
12673
12674         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
12675         library routine if present.  Notice that it will still continue
12676         executing even if its missing, for those working on the Gtk#
12677         edition of Windows.Forms.
12678
12679         * assembly.c (do_mono_assembly_open): If loading the
12680         System.Windows.Forms call mono_loader_wini_init.
12681
12682 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
12683
12684         * class.h: Added MonoRemoteClass struct.
12685         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
12686         function for MonoStrings.
12687         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
12688         Added internal call for getting the proxy type.
12689         * marshal.c: Get the type of transparent proxies from its remote_class.
12690         Added methods that generate the IL for type checks and casts:
12691         mono_marshal_get_isinst, mono_marshal_get_castclass, 
12692         mono_marshal_get_proxy_cancast.
12693         * marshal.h: Declaration of the previous new methods.
12694         * object.c: Added new moethods for creating and updating MonoRemoteClass
12695         instances: mono_remote_class, mono_upgrade_remote_class, 
12696         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
12697         * verify.c: FIx transparent_proxy_fields layout.
12698         * appdomain.c: Bump corlib version.
12699
12700 2004-03-04  Jackson Harper  <jackson@ximian.com>
12701
12702         * icall.c: Add icall to access char conversion tables.
12703         * char-conversions.h: Character conversion tables.
12704         * Makefile.am: Add char-conversions.h private header file.
12705         
12706 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
12707
12708         * appdomain.c (unload_thread_main): Increase unloading timeout to
12709         10 sec as a temporary workaround for Nant problems.
12710
12711 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
12712
12713         * gc.c: Add checks for GC_enable and GC_disable.
12714
12715         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
12716         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
12717         (bug #54988).
12718         
12719 2004-02-27  Martin Baulig  <martin@ximian.com>
12720
12721         * reflection.c (mono_reflection_bind_generic_parameters): Take a
12722         `MonoReflectionType *' instead of a `MonoType *'.
12723
12724 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
12725
12726         * gc.c (run_finalize): Avoid finalizing the object representing the
12727         finalizer thread.
12728         (finalizer_thread): Fix warning.
12729
12730 2004-02-25  Martin Baulig  <martin@ximian.com>
12731
12732         * class.c (_mono_class_get_instantiation_name): Added `int offset'
12733         argument for nested types.
12734         (mono_class_create_generic): Added support for nested generictypes.
12735
12736         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
12737         `GList *nested'.
12738
12739         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
12740
12741         * reflection.c (method_encode_signature): Increase the minimum
12742         value of `size' from 10 to 11.
12743         (mono_reflection_bind_generic_parameters): Take `int type_argc'
12744         and `MonoType **types' arguments instead of the `MonoArray
12745         *types'; added `MonoType *nested_in'.  Recursively instantiate
12746         nested classes. 
12747
12748 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
12749
12750         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
12751         stack_overflow_ex members which are used by exception handling.
12752
12753         * appdomain.c (mono_runtime_init): Initialize the new members.
12754
12755         * gc.c (mono_gc_enable): New helper function.
12756         * gc.c (mono_gc_disable): New helper function.
12757
12758 2004-02-23  Martin Baulig  <martin@ximian.com>
12759
12760         * icall.c: I must have been really stupid - make it actually work
12761         this time ;-)
12762
12763 2004-02-23  Martin Baulig  <martin@ximian.com>
12764
12765         * loader.c (method_from_memberref): Only inflate the method if
12766         it's in another klass.
12767
12768 2004-02-23  Martin Baulig  <martin@ximian.com>
12769
12770         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
12771         (mono_class_init): If we're a generic instance and an interface,
12772         compute `class->interface_id'; also create `class->interfaces'
12773         here and inflate them.
12774
12775         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
12776         `ginst->is_open'.
12777         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
12778
12779         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
12780
12781 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
12782
12783         * reflection.c (method_encode_code): Improved the error message
12784         generated by the exception.
12785
12786 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12787
12788         * icall.c: Martin did not do what he said in the ChangeLog for
12789         2004-02-18, but put back the changes for properties and events.
12790         Commenting those changes out again and adding comment to bug #54518.
12791         
12792         * process.c: removed warning.
12793
12794 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
12795
12796         * marshal.c (emit_struct_conv): Print an error message instead of
12797         asserting when a type does not have the StructLayout attribute.
12798
12799 2004-02-20  Martin Baulig  <martin@ximian.com>
12800
12801         * reflection.c (mono_type_get_object): Also use the cache for
12802         generic instances.
12803         (mono_reflection_bind_generic_parameters): Always compute
12804         `ginst->ifaces'.        
12805
12806 2004-02-20  Martin Baulig  <martin@ximian.com>
12807
12808         * class.h (MonoGenericMethod): Removed `klass'.
12809
12810         * class.c (mono_class_inflate_generic_method): Added `MonoClass
12811         *klass' argument.
12812
12813 2004-02-20  Martin Baulig  <martin@ximian.com>
12814
12815         * reflection.c (method_encode_methodspec): Actually use the
12816         uninflated signature for the memberref.
12817
12818 2004-02-20  Martin Baulig  <martin@ximian.com>
12819
12820         * class.h (MonoGenericMethod): Removed `declaring'.
12821
12822         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
12823         is NULL, compute it here.
12824
12825 2004-02-20  Martin Baulig  <martin@ximian.com>
12826
12827         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
12828
12829         * metadata.c (mono_metadata_generic_inst_hash): New method.
12830         (mono_metadata_generic_inst_equal): New method.
12831
12832         * reflection.c (mono_reflection_bind_generic_parameters): Use the
12833         `klass->image->generic_inst_cache' cache to avoid creating
12834         duplicate MonoGenericInst's.
12835
12836         * class.c (mono_class_inflate_generic_type): Use the cache.
12837
12838 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
12839
12840         * object.c: fixed gc descriptor calculation for embedded valuetypes.
12841
12842 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12843
12844         * icall.c: added Socket.WSAIoctl icall.
12845
12846         * socket-io.[ch]: implemented
12847         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
12848
12849 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
12850
12851         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
12852
12853 2004-02-18  Urs C Muff  <umuff@quark.com>
12854
12855         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
12856         this work on PPC and other big-endian architectures.
12857
12858         * debug-mono-symfile.h: Prepended the names of all the `guint32'
12859         fields with an underscore to make sure they're only accessed by
12860         the read32() macro.
12861
12862 2004-02-18  Martin Baulig  <martin@ximian.com>
12863
12864         * icall.c: Put the klass->refclass changes back for methods and
12865         fields, but not for properties and events.  We're currently not
12866         distinguishing between DeclaringType and ReflectedType for
12867         properties and events, that's what caused the regressions.
12868
12869 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12870
12871         * object.c:
12872         (mono_async_result_new): the handle can be NULL.
12873
12874         * threadpool.c: Use an event instead of a semaphore, don't initialize
12875         it until needed. This saves quite a few semaphores from being created
12876         when using the threadpool.
12877
12878 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
12879
12880         * object.c (mono_string_is_interned_lookup): Fix interning of long
12881         strings. Fixes #54473.
12882
12883         * domain.c (ldstr_equal): Optimize if the two strings are equal.
12884
12885         * icall.c: Revert the klass->refclass changes since they introduce
12886         regressions (bug #54518).
12887
12888 2004-02-18  Martin Baulig  <martin@ximian.com>
12889
12890         * class.c (mono_class_init): If we're a generic instance and don't
12891         come from a TypeBuilder, inflate our members here.
12892         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
12893         (mono_class_create_generic): New public method.
12894         (mono_class_initialize_generic): Removed.
12895         (get_instantiation_name): Renamed to
12896         _mono_class_get_instantiation_name() and made it public.
12897
12898 2004-02-18  Martin Baulig  <martin@ximian.com>
12899
12900         * class.c (mono_class_inflate_generic_type): Clear the new
12901         instance's `nginst->klass' when inflating a generic instance.
12902         (mono_class_is_subclass_of): Added (basic) support for generic
12903         instances.
12904
12905 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
12906
12907         * appdomain.h, domain.c: use a MonoCodeManager instead of a
12908         MonoMempool to hold compiled native code.
12909
12910 2004-02-17  Martin Baulig  <martin@ximian.com>
12911
12912         * class.h (MonoDynamicGenericInst): Added `count_properties' and
12913         `properties'.
12914
12915         * reflection.c (mono_reflection_generic_inst_initialize): Added
12916         `MonoArray *properties' argument.
12917
12918         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
12919
12920 2004-02-17  Martin Baulig  <martin@ximian.com>
12921
12922         * icall.c (ves_icall_Type_GetFields): Renamed to
12923         ves_icall_Type_GetFields_internal() and added a
12924         `MonoReflectionType *rtype' argument; pass it to
12925         mono_field_get_object() to set the field's "reflected" type.
12926         (ves_icall_Type_GetConstructors): Likewise.
12927         (ves_icall_Type_GetEvents): Likewise.
12928         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
12929         argument; pass it to mono_method_get_object() to set the method's
12930         "reflected" type.       
12931
12932 2004-02-17  Martin Baulig  <martin@ximian.com>
12933
12934         * class.h (MonoDynamicGenericInst): New type.
12935         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
12936
12937         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
12938         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
12939         (ves_icall_MonoGenericInst_GetFields): New interncall.
12940
12941         * class.c (mono_class_from_generic): Don't call
12942         mono_class_initialize_generic() if this is a dynamic instance;
12943         ie. it's being created from a TypeBuilder.
12944         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
12945         `class->byval_arg.type'.
12946
12947         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
12948         to `inflate_method' and made static.
12949         (mono_reflection_inflate_field): Removed.
12950         (mono_reflection_generic_inst_initialize): New public method.
12951
12952         * reflection.h (MonoReflectionGenericInst): Removed `methods',
12953         `ctors' and `fields'; added `initialized'.
12954
12955 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
12956
12957         * debug-helpers.c (mono_method_full_name): Fix output for empty
12958         namespaces.
12959
12960 2004-02-12  Martin Baulig  <martin@ximian.com>
12961
12962         * class.h (MonoClassField): Added `MonoType *generic_type'.
12963
12964         * reflection.c (mono_image_get_fieldref_token): Added support for
12965         instantiated generic types.
12966         (field_encode_inflated_field): Removed.
12967         (mono_image_get_inflated_field_token): Removed.
12968         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
12969
12970         * reflection.h (MonoReflectionInflatedField): Removed.
12971
12972 2004-02-12  Martin Baulig  <martin@ximian.com>
12973
12974         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
12975         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
12976
12977         * reflection.c (mono_image_get_methodspec_token): Take a
12978         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
12979         (mono_image_create_token): Check whether we have a
12980         `method->signature->gen_method' and call
12981         mono_image_get_methodspec_token() if appropriate.
12982         (inflated_method_get_object): Removed.
12983         (mono_reflection_bind_generic_method_parameters): Return a
12984         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
12985         (mono_reflection_inflate_method_or_ctor): Likewise.
12986
12987         * reflection.h (MonoReflectionInflatedMethod): Removed.
12988
12989 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
12990
12991         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
12992         for custom valuetype marshalling.
12993
12994         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
12995
12996 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12997
12998         * icall.c: fixed WSAGetLastError_internal name.
12999
13000 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
13001
13002         * threads.c (mono_thread_attach): Allow this to be called multiple
13003         times for a thread.
13004         
13005         * threads.c (build_wait_tids): Do not wait for ourselves.
13006
13007         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
13008         appdomain list is empty.
13009
13010         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
13011         memory returned by mono_string_builder_to_utf16, since it points into
13012         managed memory. Thanks to Bernie Solomon for noticing this.
13013
13014         * icall.c: Add AppDomainSetup icalls.
13015
13016         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
13017
13018         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
13019         types.
13020
13021         * reflection.c (reflection_methodbuilder_to_mono_method): Save
13022         custom attributes to the method_aux struct. Also fix array indexes etc.
13023
13024         * loader.c (mono_method_get_param_names): Make dynamic case work again.
13025         
13026 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
13027
13028         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
13029         (both static and runtime) and reduce startup time.
13030
13031 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
13032
13033         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
13034         AsAny marshalling conversion instead of crashing.
13035
13036         * marshal.c: Fix warnings.
13037
13038 2004-02-09  Martin Baulig  <martin@ximian.com>
13039
13040         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
13041
13042         * reflection.h (MonoReflectionInflatedMethod): Removed the
13043         `declaring' field, it's now in the unmanaged MonoGenericMethod.
13044
13045         * reflection.c (method_encode_methodspec): Removed the `method'
13046         argument; we get it from `gmethod->declaring'.
13047         (inflated_method_get_object): Removed the `declaring' argument.
13048
13049 2004-02-09  Martin Baulig  <martin@ximian.com>
13050
13051         * class.h (MonoGenericMethod): New type.
13052         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
13053         `generic_method'.
13054
13055         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
13056         a `MonoGenericMethod *gen_method' one.
13057
13058         * class.c (mono_class_inflate_generic_type): Take an additional
13059         `MonoGenericMethod * argument.  This is only non-NULL if we're
13060         inflating types for a generic method.   
13061         (mono_class_inflate_generic_signature): Renamed to
13062         inflate_generic_signature() and made static; take a
13063         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
13064         (inflate_generic_header): Take a `MonoGenericMethod *' argument
13065         instead of a `MonoGenericInst *' one.
13066         (mono_class_inflate_generic_method): Likewise.
13067
13068         * reflection.c (encode_generic_method_sig): Take a
13069         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
13070         (method_encode_methodspec): Likewise.
13071         (inflated_method_get_object): Likewise. 
13072
13073         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
13074         field with a `MonoGenericMethod *gmethod' one.  
13075
13076 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
13077
13078         * class.h (mono_class_has_parent): add parens to expansion
13079         so you can ! this.
13080
13081 2004-02-08  Martin Baulig  <martin@ximian.com>
13082
13083         * image.h (MonoImage): Removed `generics_cache'.
13084
13085         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
13086         instead of a `MonoType *' argument; removed the `inflate_methods'
13087         argument.  Don't inflate methods here.
13088
13089         * loader.c (find_method): If it's a generic instance, call
13090         mono_class_init() on the `sclass->generic_inst->generic_type'.
13091
13092         * metadata.c (mono_type_size): Make this work on uninitialized
13093         generic instances; call it on the `ginst->generic_type's class.
13094
13095         * reflection.c (mono_reflection_bind_generic_parameters): Call
13096         mono_class_from_generic() to create the `ginst->klass'.
13097
13098 2004-02-08  Martin Baulig  <martin@ximian.com>
13099
13100         * class.h (MonoClass): Changed type of `generic_inst' from
13101         `MonoType *' to `MonoGenericInst *'.
13102
13103 2004-02-08  Martin Baulig  <martin@ximian.com>
13104
13105         * icall.c (ves_icall_Type_BindGenericParameters): Just call
13106         mono_type_get_object(), this is now creating a `MonoGenericInst'
13107         for MONO_TYPE_GENERICINST.
13108         (ves_icall_MonoGenericInst_GetParentType): Likewise.
13109         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
13110
13111         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
13112         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
13113         (inflated_method_get_object): Added `MonoClass *refclass' argument.
13114         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
13115         and reflected type.
13116
13117         * reflection.h (MonoReflectionInflatedMethod): Removed
13118         `declaring_type' and `reflected_type'.
13119
13120 2004-02-08  Martin Baulig  <martin@ximian.com>
13121
13122         * class.h (MonoGenericInst): Added `MonoType *parent' and
13123         `MonoType **ifaces'.
13124
13125         * reflection.h (MonoReflectionGenericInst): Removed `klass',
13126         `parent' and `interfaces'.
13127
13128         * reflection.c (mono_reflection_bind_generic_parameters): Take a
13129         `MonoType *' argument and return a `MonoType *'.
13130
13131         * icall.c
13132         (ves_icall_MonoGenericInst_GetParentType): New interncall.
13133         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
13134
13135 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
13136
13137         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
13138         valuetype marshalling.
13139
13140 2004-02-06  Martin Baulig  <martin@ximian.com>
13141
13142         * class.c
13143         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
13144         (my_mono_class_from_generic_parameter): Likewise.
13145
13146 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
13147
13148         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
13149         contents of the symbol files lazily.
13150
13151         * object.h (MonoThread): Add 'name' and 'name_len' fields.
13152
13153         * threads.h threads.c icall.c: New icalls for getting and setting the
13154         threads name.
13155
13156 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
13157
13158         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
13159         Raise an exception when the domain is not found.
13160
13161 2004-02-03  Martin Baulig  <martin@ximian.com>
13162
13163         * reflection.c (mono_image_get_methodspec_token): Use the
13164         uninflated signature; fixes gen-33.
13165
13166 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
13167
13168         * gc.c threads.c: Make the finalizer thread a normal managed thread so
13169         the finalizer code can use thread functionality.
13170
13171         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
13172         the finalizer thread.
13173
13174         * threads.c: Make some functions more robust.
13175
13176         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
13177
13178         * metadata.h: Add new marshalling conventions.
13179
13180         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
13181         stringbuilder marshalling. Fixes #53700.
13182
13183         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
13184
13185         * reflection.c (mono_image_get_type_info): Save declarative security
13186         info.
13187
13188         * reflection.c (mono_image_get_field_info): Handle uninitialized 
13189         unmanaged fields as well.
13190
13191         * appdomain.c: Bump corlib version.
13192
13193 2004-02-01  Martin Baulig  <martin@ximian.com>
13194
13195         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
13196         method type arguments.  
13197
13198 2004-01-30  Duncan Mak  <duncan@ximian.com>
13199
13200         * marshal.h: Add prototype for
13201         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
13202         and
13203         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
13204         fix the build.
13205
13206 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
13207
13208         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
13209         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
13210
13211 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
13212
13213         * marshal.c (mono_marshal_get_native_wrapper): Add support for
13214         custom marshalling of valuetypes.
13215
13216         * marshal.c: Fix some warnings.
13217
13218 2004-01-29  Martin Baulig  <martin@ximian.com>
13219
13220         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
13221         for generic method parameters.
13222
13223         * reflection.c (method_encode_methodspec): Write the uninflated
13224         signature into the methodspec table.
13225         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
13226         is always the uninflated method.
13227         (reflection_methodbuilder_to_mono_method): Copy the generic
13228         parameters from the MethodBuilder into `header->gen_params'.
13229
13230 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
13231
13232         * class.c (mono_class_from_generic_parameter): Fix warning.
13233
13234 2004-01-27  Martin Baulig  <martin@ximian.com>
13235
13236         * class.c (mono_class_from_generic_parameter): Don't create
13237         `klass->methods' here.  
13238
13239 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
13240
13241         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
13242         extension since it does not work with libraries named lib<FOO>.dll.so.
13243
13244 2004-01-25  Martin Baulig  <martin@ximian.com>
13245
13246         * class.c (mono_class_inflate_generic_type): Added support for
13247         MONO_TYPE_GENERICINST.
13248
13249         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
13250         inflate methods on open constructed types.      
13251
13252 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13253
13254         * object.c: fire ProcessExit event in the root AppDomain after running
13255         Main. Fixes bug #53299.
13256
13257 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13258
13259         * socket-io.c: include the new socket-wrappers.h header.
13260         Use the wrappers instead of the unix socket functions to make the code
13261         more clear.
13262
13263 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13264
13265         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
13266
13267         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13268         Fixes #22532.
13269
13270 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
13271
13272         * reflection.c (mono_image_create_pefile): Handle the case when the
13273         entry point is not a MethodBuilder.
13274
13275         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13276         field to ReflectionMethod since it is not allways a builder.
13277
13278         * reflection.c (type_get_fully_qualified_name): New helper function to
13279         return the fully qualified name of a type.
13280
13281         * reflection.c (encode_marshal_blob): Always emit the fully qualified
13282         type name for custom marshallers.
13283
13284         * reflection.c (mono_marshal_spec_from_builder): Ditto.
13285
13286         * class.c (mono_class_setup_vtable): If a parent class already 
13287         implements an interface, use the implementing methods from that class.
13288         Fixes #53148.
13289
13290 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13291
13292         * threadpool.c: just return instead of ExitThread to allow for thread
13293         clean up earlier.
13294
13295 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
13296
13297         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
13298         when closing resource modules.
13299
13300         * reflection.c (mono_image_create_pefile): Handle the case when the
13301         entry point is not a MethodBuilder.
13302
13303         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
13304         field to ReflectionMethod since it is not allways a builder.
13305
13306 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
13307
13308         * marshal.c (mono_marshal_get_managed_wrapper): 
13309         mono_marshal_alloc takes native int so CONV_I
13310         the arg for 64bits.
13311
13312 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
13313
13314         * reflection.c (fixup_cattrs): New function to fixup the methoddef
13315         tokens in the cattr table. Fixes #53108.
13316
13317 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13318
13319         * loader.c: don't trim ".dll" before looking up in the config file.
13320         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
13321
13322 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13323
13324         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
13325         Return the module which contains the resource as well.
13326         (ves_icall_System_Reflection_Module_Close): New icall.
13327
13328         * appdomain.c: Bump corlib version number.
13329
13330         * image.c (mono_image_addref): New public function.
13331
13332         * assembly.c: Call mono_image_addref.
13333
13334         * reflection.c (mono_module_get_object): Increase reference count of 
13335         the image.
13336
13337         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
13338         Fixes #22532.
13339
13340         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
13341         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
13342         proper exceptions on DllImport problems.
13343
13344 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
13345
13346         * class.c, metadata.c: eliminate CSIZE macro.
13347
13348 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
13349
13350         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
13351         * object.h: Added async_callback field in MonoAsyncResult.
13352         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
13353         * verify.c: Added async_callback in MonoAsyncResult layout.
13354
13355 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
13356
13357         * reflection.c (mono_reflection_get_custom_attrs): Add support
13358         for Modules.
13359
13360 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13361
13362         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
13363         marshalling.
13364         (mono_marshal_method_from_wrapper): Add null pointer check.
13365
13366 2004-01-16  Martin Baulig  <martin@ximian.com>
13367
13368         * debug-mono-symfile.h: Set version number to 36 and reflect
13369         latest symbol writer changes.
13370
13371 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13372
13373         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
13374         multi-dimensional arrays.
13375         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
13376         (mono_class_from_mono_type): Use bounded_array_class_get.
13377         
13378         * class.c (mono_bounded_array_class_get): New function which takes
13379         a 'bounded' bool argument to distinguish vectors from one dimensional
13380         arrays.
13381
13382         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
13383         bounded_array_class_get if the array has bounds.
13384
13385         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
13386         Search modules loaded using AssemblyBuilder:AddModule as well.
13387
13388 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13389
13390         * appdomain.c: increased corlib version.
13391         * filewatcher.c: removed g_print.
13392         * icall.c:
13393         (get_property_info): only allocate what is actually requested.
13394         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
13395
13396 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13397
13398         * Makefile.am: added filewatcher.[ch]
13399         * filewatcher.[ch]: FileSystemWatcher runtime support.
13400         * icall.c: added new FSW icalls.
13401
13402 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13403
13404         * string-icalls.c: fix stringbuilder regression as suggested by
13405         Iain McCoy <iain@mccoy.id.au>.
13406
13407 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13408
13409         * process.c (process_read_stringtable_block): Recognize '007f' as
13410         a language neutral stringtable block.
13411
13412 2004-01-12  Patrik Torstensson
13413
13414         * object.h (MonoStringBuilder) : Changed layout to support our
13415         new stringbuilder class.
13416         * marshal.c: Change marshalling to support the new layout of 
13417         string builder.
13418         * appdomain.c: increased version number because new layout of
13419         string builder.
13420
13421 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
13422
13423         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
13424         assembly name as an string instead of an AssemblyName, since it is
13425         easier to extract info from it.
13426
13427         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
13428         the culture subdirectories too. Fixes #52231.
13429
13430 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13431
13432         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
13433         It takes 2 new parameters with an optional name for the method to look
13434         for and case ignoring info.
13435
13436         * threadpool.c: removed unused variable.
13437
13438 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13439
13440         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
13441         It takes 2 new parameters with an optional name for the property to look
13442         for and case ignoring info.
13443         Fixes bug #52753.
13444
13445 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13446
13447         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
13448         Fix #52451.
13449
13450 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13451
13452         * appdomain.c:
13453         * assembly.c: escape the uri before passing it to g_filename_from_uri.
13454         Fixes bug #52630.
13455
13456 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
13457
13458         * reflection.c: Add support for more than one unmanaged resource.
13459
13460         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
13461         in field->def_value, as done in all other cases.
13462
13463         * reflection.c (mono_reflection_get_custom_attrs): Add support for
13464         TypeBuilders.
13465
13466         * reflection.c (mono_reflection_create_runtime_class): Remove 
13467         errorneous assignment to klass->element_class, since it is already
13468         done in mono_reflection_setup_internal_class.
13469
13470 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13471
13472         * gc.c: added missing LeaveCriticalSection.
13473         * icall.c: indented a couple of lines.
13474         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
13475         if we call EndInvoke inside a callback. Fixes bug #52601.
13476
13477 2004-01-07  Martin Baulig  <martin@ximian.com>
13478
13479         * mono-debug-debugger.h
13480         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
13481
13482 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
13483
13484         * appdomain.c: Use messages in NotImplementedException.
13485
13486         * exception.c (mono_get_exception_not_implemented): Now this takes
13487         a message argument.
13488
13489         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
13490         exception instead of g_asserting an aborting when something is not
13491         implemented.
13492
13493         Add some inline docs.
13494
13495 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
13496
13497         * reflection.h: Update after changes to object layout.
13498
13499         * reflection.c: Implement saving of unmanaged aka win32 resources.
13500
13501         * appdomain.c: Bump version number.
13502
13503         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
13504         Handle missing domains gracefully.
13505
13506 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
13507
13508         * file-io.c : On Windows, there are much more invalid_path_chars.
13509
13510 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13511
13512         * class.h, object.c: prepare for GetType () speedup.
13513
13514 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
13515
13516         * profiler.c: workaround for --profile null reference exception on
13517           cygwin. Patch by Patrik Torstensson.
13518
13519 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
13520
13521         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
13522         make work for unaligned access.
13523
13524 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
13525
13526         * class.c: small cleanup (class->fields [i] -> field).
13527         * image.c: check address of metadata is valid.
13528
13529 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
13530
13531         * assembly.h assembly.c (mono_assembly_loaded): New public function to
13532         search the list of loaded assemblies.
13533
13534         * reflection.c (mono_reflection_type_from_name): Use 
13535         mono_assembly_loaded instead of mono_image_loaded.
13536
13537         * reflection.c: Fix warnings.
13538
13539 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
13540
13541         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
13542         is dynamic. This is needed since an assembly can contain both dynamic and
13543         non-dynamic images.
13544
13545         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
13546         assembly->dynamic.
13547
13548         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
13549
13550         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
13551         to store modules loaded using AddModule.
13552
13553         * reflection.c (mono_image_fill_file_table): Generalize this so it works
13554         on Modules.
13555
13556         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
13557
13558         * reflection.c (mono_image_fill_export_table_from_module): New function to
13559         fill out the EXPORTEDTYPES table from a module.
13560
13561         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
13562         into a separate function. Also handle loaded non-dynamic modules.
13563
13564         * reflection.c (mono_image_basic_init): Fix memory allocation.
13565
13566         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13567
13568         * assembly.c (mono_assembly_load_references): Make this public.
13569
13570 2003-12-19  Martin Baulig  <martin@ximian.com>
13571
13572         * class.c (mono_class_initialize_generic): Made this static, take
13573         a `MonoGenericInst *' instead of a `MonoClass *'.
13574         (mono_class_from_generic): Call mono_class_initialize_generic()
13575         unless we're already initialized or being called from
13576         do_mono_metadata_parse_generic_inst().
13577
13578         * class.h (MonoGenericInst): Added `initialized' and
13579         `init_pending' flags.
13580
13581         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
13582         `mono_class_init (gklass)' or mono_class_initialize_generic()
13583         here; set `generic_inst->init_pending' while parsing the
13584         `type_argv'.
13585
13586 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
13587
13588         * locales.c: include string.h for memxxx prototypes
13589
13590 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
13593         constructor when accessing literal fields.
13594
13595 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
13596
13597         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13598
13599         * reflection.c (assembly_add_resource_manifest): New function to fill
13600         the MANIFESTRESOURCE table.
13601
13602         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
13603
13604         * reflection.h: Update to changes in class layout.
13605
13606         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
13607         Reenable call to mono_runtime_is_shutting_down ().
13608
13609         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
13610         determine if the runtime is shutting down.
13611
13612 2003-12-16  Jackson Harper <jackson@ximian.com>
13613
13614         * icall.c: comment out call to mono_runtime_is_shutting_down to
13615         fix build.
13616         
13617 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
13618
13619         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
13620         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
13621
13622 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
13623
13624         * reflection.c: move definition of swap_with_size
13625         to before its first call
13626
13627 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
13628
13629         * appdomain.c (mono_runtime_is_shutting_down): New public function.
13630
13631         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
13632         icall.
13633
13634         * object.c: Fix warnings.
13635
13636         * icall.c (ves_icall_Type_Get...): Only consider inherited static
13637         members if FlattenHierarchy is set.
13638
13639         * reflection.c (mono_image_add_decl_security): New function to emit
13640         declarative security.
13641
13642         * reflection.h reflection.c: Add support for declarative security.
13643
13644         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13645         
13646 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13647
13648         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
13649         
13650         * appdomain.c verify.c: Moved corlib version checking into its own
13651         function in appdomain.c since it needs to create vtables etc.
13652
13653 2003-12-13  Patrik Torstensson <p@rxc.se>
13654
13655         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
13656         instead of unwrapped server.
13657
13658 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
13659
13660         * verify.c (check_corlib): Fix field index.
13661
13662 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
13663
13664         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
13665         GetGacPath icall.
13666
13667 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
13668
13669         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
13670         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
13671         cope with sizeof(size_t) != sizeof(guint32).
13672
13673 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13674
13675         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
13676         in case of failure.
13677
13678 2003-12-10  Mark Crichton <crichton@gimp.org>
13679
13680         * icall.c: removed the GetNonZeroBytes.  We now handle this case
13681         in managed code.
13682
13683         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
13684
13685 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
13686
13687         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
13688         marked as deleted.
13689
13690 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13691
13692         * verify.c (check_corlib): Handle the case when the version field is 
13693         initialized by a static constructor.
13694
13695 2003-12-08  Patrik Torstensson  <p@rxc.se>
13696
13697     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
13698
13699 2003-12-08  Martin Baulig  <martin@ximian.com>
13700
13701         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
13702         a MonoReflectionGenericParameter, also take the parameter index
13703         and name as arguments.
13704         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
13705         (ves_icall_MonoGenericParam_initialize): New interncall.
13706         (ves_icall_Type_make_byref_type): New interncall.
13707
13708         * reflection.h (MonoReflectionGenericParam): Derive from
13709         MonoReflectionType, not just from MonoObject.  Added `refobj' and
13710         `index' fields.
13711
13712         * reflection.c (mono_reflection_define_generic_parameter): Create
13713         and return a new MonoReflectionGenericParam; don't initialize the
13714         constraints here.
13715         (mono_reflection_initialize_generic_parameter): New public method;
13716         initializes the constraints and creates the `param->pklass'.
13717
13718 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13719
13720         * reflection.h reflection.c: Use the new fields 'num_types', 
13721         'num_fields' and 'num_methods' to track the number of types etc.
13722
13723         * verify.c (check_corlib): Check corlib version number.
13724
13725 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
13726
13727         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
13728         function works on all methods.
13729
13730 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13731
13732         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
13733         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
13734         the custom_type_info flag of the transparent proxy.
13735         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
13736         objects that supports IRemotingTypeInfo.
13737         * object.h: Added custom_type_info field in transparent proxy.
13738
13739 2003-12-06  Martin Baulig  <martin@ximian.com>
13740
13741         * class.c (mono_class_create_from_generic): Removed.
13742         (mono_class_from_generic): Check `ginst->klass' before doing
13743         anything else.  This is important to fully support "recursive"
13744         generic types.
13745
13746         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
13747         empty `generic_inst->klass' before doing anything else.
13748
13749 2003-12-06  Dick Porter  <dick@ximian.com>
13750
13751         * verify.c: 
13752         * object.h:
13753         * icall.c:
13754         * locales.c: Use C structs to access class fields.  Don't do a
13755         conversion between MonoString and UChar because both are
13756         platform-endian UTF-16.  Compare now takes startindex and count
13757         parameters.  Add a char overload for IndexOf.  Speed up the
13758         invariant string IndexOf.
13759
13760 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
13761
13762         * Makefile.am (monosn_LDADD): Fix parallel build.
13763
13764 2003-12-04  Martin Baulig  <martin@ximian.com>
13765
13766         * icall.c
13767         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13768         (ves_icall_Type_make_array_type): New interncall.       
13769
13770 2003-12-04  Martin Baulig  <martin@ximian.com>
13771
13772         * locales.c: also change it in the !HAVE_ICU case.
13773
13774 2003-12-04  Dick Porter  <dick@ximian.com>
13775
13776         * icall.c:
13777         * locales.c: construct_compareinfo is now in CompareInfo, not
13778         CultureInfo.
13779
13780 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13781
13782         * image.c (mono_image_load_file_for_image): Cache loaded images in the
13783         image->files array.
13784
13785         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
13786         table as well.
13787
13788         * assembly.c (mono_assembly_load_references): Only load references
13789         once.
13790
13791         * class.c (mono_class_from_name): Avoid linear search of the 
13792         EXPORTEDTYPE table.
13793
13794         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
13795
13796 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13797
13798         * image.h (MonoImage): Add 'field_cache' field.
13799
13800         * loader.c (mono_field_from_token): Cache field lookups.
13801         
13802         * reflection.c (mono_module_get_object): Fix name property.
13803
13804         * icall.c (ves_icall_get_enum_info): Update after changes to 
13805         mono_metadata_get_constant_index ().
13806
13807         * icall.c: Get rid of get_type_info icall, use a separate icall for
13808         each type property to avoid needless memory allocations. Fixes #51514.
13809
13810         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
13811         to avoid needless binary searches.
13812
13813         * class.c (class_compute_field_layout): Move the initialization of
13814         field->def_value to mono_class_vtable ().
13815
13816         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
13817         non-corlib types.
13818
13819         * object.c (mono_object_allocate): Make it inline.
13820
13821         * object.c (mono_object_allocate_spec): Make it inline.
13822         
13823 2003-12-02  Dick Porter  <dick@ximian.com>
13824
13825         * locales.c (create_NumberFormat): NumberFormatInfo construction.
13826         Patch by Mohammad DAMT (mdamt@cdl2000.com).
13827
13828 2003-12-01  Dick Porter  <dick@ximian.com>
13829
13830         * threads.c: Fix signature and call in CreateMutex and
13831         CreateEvent.
13832
13833 2003-12-01  Dick Porter  <dick@ximian.com>
13834
13835         * icall.c: 
13836         * locales.c: Implement string compares and searching
13837
13838         * object.h: Add extra Thread field
13839
13840 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
13841
13842         * reflection.c (fixup_method): Add support for MonoCMethod.
13843
13844 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
13845
13846         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
13847
13848         * reflection.c (assembly_name_to_aname): Allow extra characters in
13849         assembly names. Fixes #51468.
13850
13851 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
13852
13853         * exception.c (mono_exception_from_name_domain): New helper function.
13854
13855         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
13856         exception object in the correct domain.
13857
13858         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
13859         formatting + make a copy a the input data.
13860
13861         * loader.c (mono_get_method_from_token): Methods which contain
13862         native code do not have entries in the ImplMap.
13863
13864         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
13865         Thanks to Gonzalo for spotting this.
13866         
13867         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
13868         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
13869
13870         * assembly.h (mono_assembly_load_from): Split the second part of 
13871         assembly loading into a new public function.
13872
13873         * exception.h (mono_get_exception_bad_image_format): New function.
13874
13875 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
13876
13877         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
13878         Enumerate all modules inside a dynamic assembly. Fixes #51293.
13879         
13880         * icall.c: Add new icall for creating dynamic methods.
13881
13882         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
13883
13884         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
13885
13886         * reflection.c (mono_reflection_create_dynamic_method): New icall to
13887         create a dynamic method.
13888
13889         * reflection.c (resolve_object): New helper function.
13890
13891         * reflection.c: Generalize ReflectionMethodBuilder and the functions
13892         which manipulate it so they can also work on dynamic methods.
13893
13894         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
13895         creating the MonoReflectionMethodAux structure if it is not needed.
13896         
13897         * reflection.h verify.c: Update after changes to object layout.
13898
13899         * reflection.c (method_builder_encode_signature): Fix compilation on
13900         gcc 2.95.x.
13901
13902 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
13903
13904         * appdomain.h: Added support for context static fields. Added static_data
13905           field to MonoAppContext and renamed thread_static_fields to a more
13906           generic special_static_fields in MonoAppDomain, since it can now contain
13907           context static fields.
13908         * domain.c: Updated hashtable name.
13909         * object.c: Replaced field_is_thread_static() for a more generic
13910           field_is_special_static() which also checks for context static attribute.
13911           In mono_class_vtable(), added support for static context fields.
13912         * threads.c: Changed methods that manage thread static fields to more
13913           generic methods so they can be reused both for thread and context static
13914           data.
13915         * threads.h: Declared some new methods.
13916
13917 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
13918
13919         * reflection.h: Update after changes to the managed types.
13920
13921         * reflection.c (encode_custom_modifiers): New helper function.
13922
13923         * reflection.c (method_encode_signature): Emit custom modifiers.
13924
13925         * reflection.c (field_encode_signature): Emit custom modifiers.
13926
13927 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13928
13929         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
13930
13931         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
13932         implementation.
13933
13934         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
13935         icall.
13936
13937         * object.c (mono_field_get_value_object): New function.
13938
13939         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
13940         specific.
13941
13942 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
13943
13944         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
13945         return a preallocated out-of-memory exception instance.
13946
13947         * object.c (out_of_memory): Use the new function.
13948
13949         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
13950         flag is before the custom modifiers. Fixes #49802.
13951
13952 2003-11-16  Martin Baulig  <martin@ximian.com>
13953
13954         * class.c (mono_class_is_open_constructed_type): Implemented the
13955         MONO_TYPE_GENERICINST case.
13956
13957 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
13958
13959         * assembly.c (mono_assembly_fill_assembly_name): New function to
13960         fill out the MonoAssemblyName structure.
13961         (mono_assembly_open): Use the new function.
13962
13963         * icall.c (fill_reflection_assembly_name): New helper function.
13964
13965         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
13966         new function.
13967
13968         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
13969
13970 2003-11-15  Martin Baulig  <martin@ximian.com>
13971
13972         * class.c (mono_class_is_open_constructed_type): New public
13973         function; checks whether a type is an open constructed type,
13974         ie. whether it still contains type parameters.
13975         (mono_class_inflate_generic_type): If we're a type parameter and
13976         the inflated type is also a MONO_TYPE_(M)VAR, return the original
13977         type.
13978
13979         * class.h (MonoGenericInst): Added `guint32 is_open'.
13980
13981         * loader.c (method_from_methodspec): Check whether we're an open
13982         or closed constructed type and set `ginst->is_open'.
13983
13984         * reflection.c (mono_reflection_bind_generic_parameters): Check
13985         whether we're an open or closed constructed type and set
13986         `ginst->is_open'.
13987         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
13988         from open constructed types.
13989
13990 2003-11-15  Martin Baulig  <martin@ximian.com>
13991
13992         * reflection.c (mono_reflection_bind_generic_parameters): If we're
13993         a generic instance (instead of a generic type declaration) with
13994         unbound generic parameters, bind them to our actual types.
13995
13996 2003-11-14  Martin Baulig  <martin@ximian.com>
13997
13998         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
13999
14000         * reflection.c (mono_reflection_bind_generic_parameters): If we're
14001         an interface type, populate `res->interfaces' with instantiated
14002         versions of all the interfaces we inherit.
14003
14004 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
14005
14006         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
14007         when MONO_PATH is set but doesn't contain the install dir.
14008
14009 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14010
14011         * icall.c:
14012         (ves_icall_Type_GetInterfaces): don't return an interface twice when
14013         it's also implemented in base classes. Fixes bug #50927.
14014
14015 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
14016
14017         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
14018         if this method is called from a finalizer. Fixes #50913.
14019
14020 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
14021
14022         * threads.c: Implement VolatileRead/VolatileWrite
14023
14024         * icall.c: Add new icalls for VolatileRead/VolatileWrite
14025
14026 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14027
14028         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
14029         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
14030         2.95.3.
14031
14032         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
14033         from Peter Ross (pro@missioncriticalit.com).
14034         
14035 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
14036
14037         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
14038
14039 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14040
14041         * assembly.c (mono_assembly_load_references): Disable check because it
14042         triggers on older corlibs which lots of people have.
14043
14044 2003-11-12  Jackson Harper  <jackson@ximian.com>
14045
14046         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
14047         load corlib.dll if mscorlib.dll is not found.
14048         * assembly.h: Remove corlib name define.
14049         * class.c:
14050         * domain.c:
14051         * image.c: Change corlib name to mscorlib.
14052         
14053 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14054
14055         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
14056
14057 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
14058
14059         * appdomain.h: Added loader_optimization here to sync with the C#
14060         code, and add disallow_binding_redirects field.
14061
14062 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
14063
14064         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
14065
14066         * reflection.c (mono_image_build_metadata): Fix crash on modules
14067         with no types.
14068
14069         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
14070
14071         * icall.c (ves_icall_get_method_info): Return callingConvention as
14072         well.
14073
14074         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
14075         namespaces from the EXPORTEDTYPE table as well.
14076
14077         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
14078         from all modules inside the assembly.
14079         
14080 2003-11-11  Martin Baulig  <martin@ximian.com>
14081
14082         * reflection.c (mono_reflection_bind_generic_parameters): Make
14083         this work for interfaces.
14084
14085 2003-11-11  Martin Baulig  <martin@ximian.com>
14086
14087         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
14088
14089 2003-11-11  Martin Baulig  <martin@ximian.com>
14090
14091         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
14092         "MonoInflatedMethod" and "MonoInflatedCtor".
14093
14094 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
14095
14096         * reflection.c (resolution_scope_from_image): Use the assembly table
14097         from the manifest module, since other modules don't have it.
14098
14099         * debug-helpers.c (mono_type_full_name): New helper function.
14100
14101         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
14102
14103         * image.c (mono_image_load_file_for_image): New public function which
14104         is a replacement for the load_file_for_image in class.c.
14105
14106         * assembly.c (mono_assembly_load_module): A wrapper for the function
14107         above which does assembly association and reference loading too.
14108
14109         * class.c (mono_class_from_name): Call mono_assembly_load_module.
14110
14111 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14112
14113         * appdomain.c: not all of the attributes for the full assembly name
14114         are required and the order doesn't matter. Fixes bug #50787.
14115
14116 2003-11-10  Dick Porter  <dick@ximian.com>
14117
14118         * locales.c: Use platform-endian UTF16
14119
14120 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
14121
14122         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
14123         
14124 2003-11-10  Martin Baulig  <martin@ximian.com>
14125
14126         * metadata.c
14127         (mono_metadata_load_generic_params): Make this actually work.
14128
14129         * reflection.c (mono_reflection_bind_generic_parameters): If our
14130         parent is a generic instance, pass all the `types' to it, no
14131         matter whether it has the same number of type parameters or not.
14132
14133 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
14134
14135         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
14136
14137         * assembly.c (mono_assembly_load_references): Move the image<->assembly
14138         assignment code to this function so it gets called recursively for all
14139         modules.
14140
14141         * image.c (load_modules): Remove the assembly assignment since it is
14142         now done by mono_assembly_load_references.
14143         
14144         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
14145         Add 'module' argument.
14146         (mono_module_get_types): New helper function.
14147         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
14148
14149 2003-11-08  Martin Baulig  <martin@ximian.com>
14150
14151         * class.c (mono_class_inflate_generic_method): Interface method
14152         don't have a header.
14153
14154         * reflection.c (mono_image_get_methodspec_token): Take an
14155         additional `MonoGenericInst *' argument instead of reading it from
14156         the header; this is necessary to support interfaces.
14157         (mono_image_create_token): Pass the `MonoGenericInst *' from the
14158         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
14159         (inflated_method_get_object): Take an additional `MonoGenericInst *'
14160         argument.
14161
14162         * reflection.h (MonoReflectionInflatedMethod): Added
14163         `MonoGenericInst *ginst'.
14164
14165 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
14166
14167         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
14168
14169 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
14170
14171         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
14172
14173 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14174
14175         * reflection.c 
14176         (reflection_methodbuilder_from_method_builder):
14177         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
14178         initialize a ReflectionMethodBuilder structure.
14179         (mono_image_get_methodbuilder_token):
14180         (mono_image_get_ctorbuilder_token): New functions to emit memberref
14181         tokens which point to types in another module inside the same assembly.
14182
14183         * reflection.c: Use the new helper functions.
14184         
14185         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
14186
14187         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
14188         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
14189
14190         * reflection.c (resolution_scope_from_image): Emit a moduleref if
14191         neccesary.
14192
14193         * reflection.c (mono_image_build_metadata): Emit metadata only for the
14194         current module. Emit the manifest only for the main module.
14195
14196         * reflection.c (mono_image_create_token): Add assertion when a 
14197         memberref needs to be created.
14198
14199         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
14200
14201         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
14202         larger buffer for the custom attribute blob. Fixes #50637.
14203         
14204 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14205
14206         * threadpool.c: notify listener on async processing handles after
14207         invoking the async callback. Thanks to Zoltan.
14208
14209 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
14210
14211         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
14212         avoid code duplication.
14213
14214         * reflection.h (MonoDynamicImage): New type which is currently unused,
14215         but will be used through the ref.emit code in place of 
14216         MonoDynamicAssembly.
14217
14218         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14219         object layout.
14220
14221         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
14222         a MonoDynamicImage instead of just a MonoImage.
14223         
14224         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
14225         icalls to ModuleBuilder but keep their semantics, so they will work
14226         with moduleb->assemblyb. This will change later.
14227         
14228 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
14229
14230         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
14231         object layout.
14232
14233         * reflection.c (mono_image_build_metadata): Avoid creation of a default
14234         main module, since it is now done by the managed code.
14235
14236 2003-11-03  Martin Baulig  <martin@ximian.com>
14237
14238         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
14239         `ginst->klass' here.
14240         (method_encode_methodspec): Don't use the `ginst->generic_method's
14241         klass if it's a generic instance, use `ginst->klass' in this case.
14242
14243 2003-11-03  Martin Baulig  <martin@ximian.com>
14244
14245         * reflection.c (mono_image_get_generic_method_param_info):
14246         Removed, use mono_image_get_generic_param_info() instead.
14247         (mono_image_get_type_info): Write the GenericParam table before
14248         the Method table.  This is neccessary because in the GenericParam
14249         table, type parameters of the class (ie. '!0' etc.) must come
14250         before the ones from its generic methods (ie. '!!0' etc).
14251
14252 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
14253
14254         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
14255
14256 2003-11-02  Martin Baulig  <martin@ximian.com>
14257
14258         * reflection.c (create_generic_typespec): Take a
14259         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
14260         the generic parameters from it.
14261
14262 2003-11-02  Martin Baulig  <martin@ximian.com>
14263
14264         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
14265         instead of a `MonoClassField *' since we just need the type.
14266         (create_generic_typespec): New static function.  Creates a
14267         TypeSpec token for a generic type declaration.
14268         (mono_image_get_generic_field_token): New static function.
14269         (mono_image_create_token): If we're a FieldBuilder in a generic
14270         type declaration, call mono_image_get_generic_field_token() to get
14271         the token.
14272
14273 2003-11-02  Martin Baulig  <martin@ximian.com>
14274
14275         * reflection.h
14276         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
14277         `MonoReflectionGenericInst *declaring_type' and
14278         `MonoReflectionGenericInst *reflected_type' fields.
14279
14280         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
14281         `MonoReflectionGenericInst *declaring_type' and a
14282         `MonoReflectionGenericInst *reflected_type' argument instead of a
14283         single `MonoReflectionGenericInst *type' one.  Set
14284         `res->declaring_type' and `res->reflected_type' from them.
14285         (mono_reflection_inflate_field): Likewise.      
14286
14287 2003-11-02  Martin Baulig  <martin@ximian.com>
14288
14289         * class.c (mono_class_setup_vtable): Don't store generic methods
14290         in the vtable.  
14291
14292 2003-11-02  Martin Baulig  <martin@ximian.com>
14293
14294         * reflection.h (MonoReflectionGenericInst): Added
14295         `MonoReflectionType *declaring_type'.
14296
14297         * reflection.c (mono_reflection_bind_generic_parameters): Use
14298         `if (tb->parent)' instead of `klass->parent'.
14299
14300 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
14301
14302         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
14303         with an empty ASSEMBLY table.
14304
14305         * reflection.c (mono_image_build_metadata): Avoid using the same loop
14306         variable in the inner and outer loops.
14307
14308 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * metadata.h (mono_metadata_make_token): Put parentheses around macro
14311         argument.
14312
14313         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
14314         
14315         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
14316         icalls. Instead, do everything in managed code. This is needed since
14317         it is hard to restore the original domain etc. in unmanaged code in the
14318         presence of undeniable exceptions.
14319
14320         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
14321         New icalls to push and pop appdomain refs.
14322
14323 2003-10-31  Martin Baulig  <martin@ximian.com>
14324
14325         * class.c (inflate_generic_type): Renamed to
14326         mono_class_inflate_generic_type() and made it public.
14327
14328         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
14329         New interncall.
14330
14331         * loader.c (mono_field_from_memberref): Also set the retklass for
14332         typespecs.
14333
14334         * fielder.c (mono_image_get_inflated_field_token): New static
14335         method; creates a metadata token for an inflated field.
14336         (mono_image_create_token, fixup_method): Added support for
14337         "MonoInflatedField".
14338         (fieldbuilder_to_mono_class_field): New static function.
14339         (mono_reflection_inflate_field): New public function.
14340
14341         * reflection.h
14342         (MonoReflectionGenericInst): Added `MonoArray *fields'.
14343         (MonoReflectionInflatedField): New typedef.     
14344
14345 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
14346
14347         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
14348         for Solaris and other platforms without s6_addr16
14349
14350 2003-10-30  Martin Baulig  <martin@ximian.com>
14351
14352         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
14353         argument instead of two.
14354         (mono_class_inflate_generic_signature): Likewise.
14355         (inflate_generic_header): Likewise.
14356         (mono_class_inflate_generic_method): Likewise.  In addition, if
14357         `ginst->klass' is set, it becomes the new `method->klass'.
14358
14359         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
14360         field.
14361
14362         * reflection.c (encode_generic_method_sig): Write a 0xa as the
14363         first byte. [FIXME]
14364         (method_encode_methodspec): If we have generic parameters, create
14365         a MethodSpec instead of a MethodRef.
14366         (fixup_method): Added support for "MonoInflatedMethod" and
14367         "MonoInflatedCtor".
14368         (mono_image_create_token): Added support for "MonoInflatedMethod"
14369         and "MonoInflatedCtor".
14370         (inflated_method_get_object): New static function; returns a
14371         managed "System.Reflection.MonoInflatedMethod" object.
14372         (mono_reflection_bind_generic_method_parameters): Return a
14373         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
14374         (mono_reflection_inflate_method_or_ctor): Likewise.
14375         (mono_image_get_generic_method_param_info): Initialize unused
14376         fields to zero.
14377         (mono_image_get_generic_param_info): Likewise.
14378
14379         * reflection.h (MonoReflectionInflatedMethod): New public
14380         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
14381         "S.R.MonoInflatedCtor" classes.
14382
14383         * loader.c (method_from_memberref): If we're a TypeSpec and it
14384         resolves to a generic instance, inflate the method.
14385
14386 2003-10-28  Dick Porter  <dick@ximian.com>
14387
14388         * object.c (mono_runtime_run_main): Convert command-line arguments
14389         into utf8, falling back to the user's locale encoding to do so.
14390
14391 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14392
14393         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
14394         at this time.
14395
14396         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
14397
14398         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
14399         up icalls at method definition time. Partially fixes #33569.
14400
14401 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
14402
14403         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
14404         marshalling of arrays. Fixes #50116.
14405
14406         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
14407
14408         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
14409         points to a vtable in the dying appdomain.
14410
14411         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
14412         listeners into unmanaged code inside the lock.
14413
14414         * object.c (mono_class_vtable): Turn off typed allocation in non-root
14415         domains and add some comments.
14416
14417 2003-10-25  Martin Baulig  <martin@ximian.com>
14418
14419         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
14420
14421         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
14422
14423         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
14424         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
14425         currently parsing.  Create the generic class and store it in
14426         `generic_inst->klass' before parsing the type arguments.  This is
14427         required to support "recursive" definitions; see mcs/tests/gen-23.cs
14428         for an example.
14429         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
14430         to support recursive typespec entries.
14431
14432         * class.c (mono_class_setup_parent): If our parent is a generic
14433         instance, we may get called before it has its name set.
14434         (mono_class_from_generic): Splitted into
14435         mono_class_create_from_generic() and mono_class_initialize_generic().
14436
14437 2003-10-25  Martin Baulig  <martin@ximian.com>
14438
14439         * icall.c (ves_icall_Type_BindGenericParameters): Return a
14440         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
14441         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
14442         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
14443
14444         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
14445         (create_typespec): Likewise.
14446         (mono_reflection_bind_generic_parameters): Return a
14447         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
14448         (mono_reflection_inflate_method_or_ctor): New public function.
14449
14450         * reflection.h (MonoReflectionGenericInst): New typedef.        
14451
14452 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14453
14454         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
14455         inside the domain lock. Fixes #49993.
14456         
14457         * object.c (mono_class_vtable): When typed allocation is used, 
14458         allocate vtables in the GC heap instead of in the mempool, since the
14459         vtables contain GC descriptors which are used by the collector even
14460         after the domain owning the mempool is unloaded.
14461
14462         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
14463
14464         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
14465         reflect what it does. Also invalidate mempools instead of freeing
14466         them if a define is set.
14467
14468         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
14469         of the appdomain.
14470         
14471         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
14472         hold the finalizable objects in this domain.
14473
14474         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
14475         appdomain.
14476
14477         * appdomain.c (mono_domain_set): New function to set the current
14478         appdomain, but only if it is not being unloaded.
14479
14480         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
14481         appdomain which is being unloaded.
14482         
14483         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
14484         unloading of the root appdomain.
14485
14486         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
14487         icall to execute a method in another appdomain. Intended as a 
14488         replacement for InternalSetDomain, which can confuse the code 
14489         generation in the JIT.
14490
14491         * appdomain.c (mono_domain_is_unloading): New function to determine
14492         whenever an appdomain is unloading.
14493
14494         * appdomain.c (mono_domain_unload): New function to correctly unload
14495         an appdomain.
14496
14497         * assembly.c (mono_assembly_load_references): Check that an assembly
14498         does not references itself.
14499
14500         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
14501         domain manually, it asks the finalizer thread to do it, then waits for
14502         the result. Also added a timeout.
14503
14504         * icall.c: Register the new icalls.
14505
14506         * threads.h threads.c: Export the mono_gc_stop_world and 
14507         mono_gc_start_world functions.
14508         
14509         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
14510         function to fill out the mempool with 0x2a.
14511
14512 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
14513
14514         * reflection.h (MonoReflectionMethodAux): New structure to store
14515         information which is rarely used, thus is not in the MonoMethod
14516         structure.
14517
14518         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
14519         store the aux info.
14520
14521         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
14522         and marshalling info into the aux structure.
14523
14524         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
14525         from the aux structure.
14526
14527         * loader.c (mono_method_get_param_names): Retrieve the param names from
14528         the aux structure.
14529         
14530 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
14531
14532         * exception.h exception.c: Add AppDomainUnloadedException && fix 
14533         warning.
14534
14535 2003-10-21  Dick Porter  <dick@ximian.com>
14536
14537         * socket-io.c
14538         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
14539         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
14540
14541 2003-10-21  Martin Baulig  <martin@ximian.com>
14542
14543         * reflection.c (mono_reflection_bind_generic_parameters):
14544         `klass->parent' is NULL for interfaces.
14545
14546 2003-10-21  Martin Baulig  <martin@ximian.com>
14547
14548         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14549
14550 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
14551
14552         * exception.c (mono_exception_from_name_msg): New helper function for
14553         creating exceptions and initializing their message field.
14554
14555         * exception.c: Simplify functions using the new helper.
14556
14557         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
14558         New function.
14559
14560         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
14561         mono_raise_exception, since otherwise gcc doesn't generate the function
14562         epilog for raise_exception, confusing the stack unwinding in the JIT.
14563         Fixes #45043.
14564
14565         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
14566         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
14567         Fixes #49499.
14568
14569 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14570
14571         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
14572         utf8.
14573
14574 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
14575
14576         * icall.c: Removed GetUninitializedObject method because
14577           AllocateUninitializedClassInstance does the same.
14578
14579 2003-10-18  Martin Baulig  <martin@ximian.com>
14580
14581         * class.c (inflate_generic_signature): Renamed to
14582         mono_class_inflate_generic_signature() and made it public.
14583         (my_mono_class_from_generic_parameter): New static function; if we
14584         don't already have the generic parameter's MonoClass, create a
14585         very simple one which is just used internally in the runtime and
14586         not passed back to managed code.
14587
14588         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
14589
14590         * metadata.h (MonoMethodSignature): Moved the
14591         `MonoGenericParam *gen_params' to the MonoMethodHeader.
14592         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
14593
14594         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
14595         ves_icall_MonoMethod_GetGenericArguments(); this is now an
14596         interncall on the MonoMethod class, not on MethodInfo.
14597         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
14598         calling mono_reflection_bind_generic_method_parameters() directly.
14599
14600         * loader.c (mono_method_get_signature): If this is a MethodSpec;
14601         return the already computed `method->signature'.
14602         (method_from_methodspec): New static function to load a method
14603         from a MethodSpec entry.
14604         (mono_get_method_from_token): Call the new method_from_methodspec()
14605         for MethodSpec tokens.  
14606         (mono_get_method_from_token): If we're a generic method, load the
14607         type parameters.
14608
14609         * reflection.c (mono_image_get_memberref_token): Allow
14610         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
14611         table.
14612         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
14613         (mono_image_create_token): First check whether it's a generic
14614         method (so we'd need to create a MethodSpec), then do the other
14615         two alternatives.
14616         (mono_reflection_bind_generic_method_parameters): Return a
14617         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
14618         called directly from the interncall.
14619
14620 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
14621
14622         * reflection.c (load_public_key): Move loading of the public key
14623         into managed code.
14624
14625         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
14626
14627         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
14628         fields.
14629
14630         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
14631         culture, hash_alg and public_key. Fixes #49555.
14632
14633 2003-10-17  Martin Baulig  <martin@ximian.com>
14634
14635         * class.h (MonoGenericInst): Moved this declaration here and added
14636         `MonoMethod *generic_method'.
14637
14638         * icall.c
14639         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
14640         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
14641
14642         * metadata.c (mono_metadata_type_equal): Two types of
14643         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
14644         index; ie. don't compare the address of the `MonoGenericParam'
14645         structure.
14646         (mono_metadata_load_generic_params): Removed the `MonoMethod
14647         *method' argument.
14648
14649         * metadata.h (MonoGenericInst): Moved declaration to class.h.
14650         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
14651
14652         * reflection.c (method_encode_signature): Encode the number of
14653         generic parameters.
14654         (encode_generic_method_sig): New static function.
14655         (method_encode_methodspec): New static function; creates an entry
14656         in the MethodSpec table for a generic method.
14657         (mono_image_get_methodspec_token): New static function.
14658         (mono_image_create_token): Call mono_image_get_methodspec_token()
14659         for generic methods.
14660         (mono_reflection_bind_generic_method_parameters): New public
14661         function.  Instantiates a generic method.
14662
14663 2003-10-16  Martin Baulig  <martin@ximian.com>
14664
14665         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
14666         *gen_params' here from MonoMethodHeader.
14667
14668         * metadata.c (mono_metadata_parse_method_signature): If we have
14669         generic parameters, initialize `method->gen_params' and then set
14670         the correct `type->data.generic_param' in all the parameters.
14671
14672 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14673
14674         * threads.c (mono_threads_get_default_stacksize): New function to 
14675         return the default stacksize.
14676
14677         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
14678         termination of the finalizer thread, since the previous method had
14679         race conditions. Fixes #49628.
14680
14681         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
14682         as for the other managed threads.
14683
14684 2003-10-16  Martin Baulig  <martin@ximian.com>
14685
14686         * class.c (inflate_generic_signature): Copy `generic_param_count'
14687         and `gen_params'.
14688
14689         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
14690         New interncall.
14691
14692         * metadata.c (mono_metadata_parse_method_signature): Actually set
14693         the `method->generic_param_count' here.
14694         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
14695
14696 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14697
14698         * object.h: Add a new field to TypedRef to simplify the implementation
14699         of the REFANY opcodes in the JIT.
14700
14701         * icall.c: Make use of the new field.
14702
14703         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
14704         dynamically.
14705
14706 2003-10-15  Martin Baulig  <martin@ximian.com>
14707
14708         * class.c (mono_class_from_gen_param): Renamed to
14709         mono_class_from_generic_parameter() and moved most of the
14710         functionality from mono_reflection_define_generic_parameter()
14711         here; ie. we create a "real" class here.
14712         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
14713         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
14714         previously been called.
14715
14716         * class.h (MonoGenericParam): Moved the declaration of this struct
14717         here from metadata.h and added `MonoMethod *method'.
14718
14719         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
14720         interncall.
14721
14722         * loader.c (mono_get_method_from_token): If we have any generic
14723         parameters, call mono_metadata_load_generic_params() to read them
14724         from the MONO_TABLE_GENERICPAR.
14725
14726         * metadata.c (mono_metadata_load_generic_params): Added
14727         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
14728
14729         * metadata.h (MonoMethodSignature): Replaced
14730         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
14731         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
14732
14733         * reflection.c (mono_reflection_define_generic_parameter): Moved
14734         most of the functionality into the new
14735         mono_class_from_generic_parameter(); set the `method' field if
14736         we're a method parameter.       
14737
14738 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
14739
14740         * marshal.c (emit_struct_conv): if native size is 0
14741         emit no code.
14742
14743 2003-10-14  Martin Baulig  <martin@ximian.com>
14744
14745         * icall.c: The generics API has changed in the spec since it was
14746         added to System.Type; these modifications make it match the spec
14747         again.
14748         (ves_icall_Type_GetGenericParameters): Renamed to
14749         `ves_icall_Type_GetGenericArguments'.
14750         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
14751         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
14752         `ves_icall_MonoType_get_HasGenericArguments'.
14753         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
14754         `ves_icall_MonoType_get_IsGenericParameter'.
14755         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
14756         this is no interncall anymore.
14757         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
14758         `ves_icall_TypeBuilder_get_IsGenericParameter'.
14759
14760 2003-10-14  Martin Baulig  <martin@ximian.com>
14761
14762         * reflection.c (mono_reflection_bind_generic_parameters): Also
14763         inflate generic methods if we're reading the class from IL.
14764
14765 2003-10-13  Martin Baulig  <martin@ximian.com>
14766
14767         * reflection.c (mono_reflection_define_generic_parameter): This
14768         method isn't called directly from the icall anymore; take a
14769         `MonoReflectionAssemblyBuilder *' so we can use this for type and
14770         method generic parameters.
14771         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
14772         (method_builder_encode_signature): Encode generic parameters.
14773         (mono_image_get_method_info): Write generic params to the
14774         MONO_TABLE_GENERICPARAM table.
14775
14776         * reflection.h (MonoReflectionMethodBuilder): Added
14777         `MonoArray *generic_params'.
14778
14779         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
14780
14781         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
14782         wrapper for mono_reflection_define_generic_parameter().
14783         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
14784
14785 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
14786
14787         * marshal.h: Add missing function to fix build.
14788
14789         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
14790         the SetLastError pinvoke attribute.
14791
14792         * marshal.c (mono_marshal_set_last_error): New helper function called
14793         by the generated code.
14794         
14795         * marshal.c (mono_mb_emit_branch): New helper function.
14796
14797         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
14798
14799         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14800         classes as parameters and return values of delegates. Fixes #29256. 
14801
14802 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
14803
14804         * locales.c: use gint32 in non HAVE_ICU case
14805
14806 2003-10-11  Martin Baulig  <martin@ximian.com>
14807
14808         * mono-debug.c (mono_debug_add_method): Added a workaround for
14809         bug #48591.
14810
14811 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14812
14813         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
14814         delegates passed to native code must use the STDCALL calling 
14815         convention. Fixes #35987.
14816
14817 2003-10-10  Martin Baulig  <martin@ximian.com>
14818
14819         * class.c (inflate_generic_type): If we're inflating for a generic
14820         type instance (and not for a generic method), return
14821         MONO_TYPE_MVAR unchanged.
14822
14823 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14824
14825         * string-icalls.c: Join ignores null strings in the source array.
14826         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
14827         * threads.c: GetAvailableTheads is slightly more accurate.
14828
14829 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
14830
14831         * threads.h threads.c : add mono_threads_set_default_stacksize
14832         and pass default to CreateThread calls.
14833
14834 2003-10-09  Dick Porter  <dick@ximian.com>
14835
14836         * icall.c:
14837         * locales.h:
14838         * locales.c: Internal calls for constructing CultureInfo and
14839         related objects from libicu (if its available.)
14840
14841 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14842
14843         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
14844
14845 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14846
14847         * threadpool.c: added an argument to async_invoke_thread that is the
14848         item to process, pass the MonoAsyncResult to the thread start function
14849         when creating a new thread. This way we don't need to acquire any lock
14850         when we're creating a new thread. Readded a semaphore for faster
14851         response times (instead of that Sleep i added).
14852
14853 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
14854
14855         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
14856         get daylight change dates better on Windows, fix handling
14857         of platforms without tm_gmtoff.
14858
14859 2003-10-06  Martin Baulig  <martin@ximian.com>
14860
14861         * class.c (inflate_generic_method): Renamed to
14862         mono_class_inflate_generic_method() and made public.
14863         (mono_class_init): Don't inflate the generic methods here.
14864         (mono_class_from_generic): Added `gboolean inflate_methods'
14865         argument.  Inflate the methods here.
14866
14867         * loader.c (mono_method_get_param_names): Ignore instances of
14868         generic types for the moment.
14869
14870         * reflection.c (fixup_method): Added support for inflated methods.
14871         (mono_image_create_token): Use mono_image_get_methodref_token()
14872         for inflated methods.
14873         (mono_custom_attrs_from_param): Ignore instances of generic types
14874         for the moment.
14875         (mono_reflection_bind_generic_parameters): New public function.
14876         Moved all the functionality from
14877         ves_icall_Type_BindGenericParameters() here and added support for
14878         dynamic types.
14879         (mono_reflection_define_generic_parameter): Initialize
14880         `klass->methods' here.
14881
14882         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
14883         functionality into mono_reflection_define_generic_parameter().
14884         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
14885         TypeBuilder, return that TypeBuilder.
14886
14887 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14888
14889         * appdomain.c: removed mono_delegate_semaphore.
14890
14891         * threadpool.c:
14892         (mono_thread_pool_add): moved hash table creation inside and the thread 
14893         creation outside of the critical region.
14894         (mono_thread_pool_finish): removed obsolete code.
14895         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
14896         continue or exit the thread depending on the queue.
14897
14898 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
14899
14900         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
14901         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
14902         handle more bool marshalling options
14903
14904 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
14905
14906         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
14907         arrays of structs. Also add a more descriptive error message when
14908         a structure member is marshalled as LPArray.
14909
14910 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14911
14912         * marshal.c (mono_marshal_get_native_wrapper): Add support for
14913         marshalling arrays of complex types. Fixes #29098. Also remove an
14914         usused and incomplete function.
14915
14916 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14917
14918         * gc.c: report heap_size - free_bytes as total memory allocated
14919         (bug#49362).
14920
14921 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14922
14923         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
14924         fix timezone handling problems on Windows.
14925         
14926         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
14927         asserts when the year is outside the range handled by ms the functions.
14928
14929         * class.c (setup_interface_offsets): If the class is an interface,
14930         fill out its interface_offsets slot.
14931
14932 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14933
14934         * threadpool.c: mark threadpool threads as background.
14935
14936 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
14937
14938         * decimal.c - define DECINLINE to nothing if not using GCC
14939
14940 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14941
14942         * assembly.c: More refcount fixes.
14943
14944 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14945
14946         * string-icalls.c: if we're not trimming, return the same string.
14947         When not splitting, don't create a new string.
14948
14949 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14950
14951         * image.c:
14952         (mono_image_open): increment the ref_count inside the critical section.
14953
14954 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
14955
14956         * image.c (mono_image_open): Fix reference counting bug.
14957
14958 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
14959
14960         * marshal.c (mono_marshal_type_size) struct alignment changed for 
14961         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
14962         64bits. Avoid leak in mono_marshal_get_native_wrapper when
14963         mono_lookup_pinvoke_call throws.        
14964
14965 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14966
14967         * reflection.c (mono_reflection_parse_type): Fix #49114.
14968
14969         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
14970         temporary workaround for cygwin header problem.
14971
14972         * object.c (mono_object_isinst): Synchronize this with the code
14973         generated by the JIT for casts.
14974
14975 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14976
14977         * reflection.c (encode_type): Fix #38332.
14978
14979 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14980
14981         * marshal.c (mono_marshal_method_from_wrapper): New function to return
14982         the original method from the wrapper method.
14983
14984 2003-09-25  Martin Baulig  <martin@ximian.com>
14985
14986         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
14987         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
14988         (ves_icall_Type_get_IsGenericInstance): New interncall.
14989
14990 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
14991
14992         * object.c: fix cast warning in big endian code.
14993
14994 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
14995
14996         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
14997         
14998 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14999
15000         * assembly.c: don't call check_env from mono_assembly_load. It's
15001         already done once in mono_assemblies_init and may cause headaches when
15002         multiple threads are loading assemblies.
15003
15004 2003-09-19  Martin Baulig  <martin@ximian.com>
15005
15006         * reflection.c (mono_reflection_define_generic_parameter): Don't
15007         allocate `klass->methods', set `klass->flags' to
15008         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
15009
15010 2003-09-18  Martin Baulig  <martin@ximian.com>
15011
15012         * class.c (mono_class_init): Don't create `class->methods' if it's
15013         already initialized.
15014
15015         * metadata.c (mono_metadata_load_generic_params): Make this
15016         actually work.
15017
15018         * reflection.c (mono_reflection_define_generic_parameter): Set
15019         parent class and interfaces from the constraints.
15020
15021         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
15022         to keep this struct in sync with the declaration in TypeBuilder.cs.
15023
15024 2003-09-17  Martin Baulig  <martin@ximian.com>
15025
15026         * metadata.h (MonoType): Replaced the data's `int type_param'
15027         field with `MonoGenericParam *generic_param'.
15028         (MonoGenericParam): Added `MonoClass *klass'.
15029
15030         * class.c (mono_class_from_gen_param): Removed the
15031         `MonoImage *image' and `int type_num' arguments.
15032
15033         * metadata.c (mono_metadata_parse_generic_param): New static
15034         method; creates a MonoGenericParam which just contains the index.
15035         (do_mono_metadata_parse_type): Call
15036         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
15037         MONO_TYPE_MVAR.
15038
15039         * reflection.c (mono_image_typedef_or_ref): Generic type
15040         parameters may be in the same assembly, but never use a typedef
15041         for them.
15042         (mono_reflection_define_generic_parameter): We're now creating a
15043         "real" class for the type parameter; it's now safe to call
15044         mono_class_from_mono_type() on the class'es type, it'll do the
15045         right thing.
15046
15047 2003-09-16  Martin Baulig  <martin@ximian.com>
15048
15049         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
15050         `symfile->range_entry_size' and `symfile->class_entry_size' here;
15051         the `symfile' data structure must be fully initialized before it
15052         gets added to the table.
15053
15054 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15055
15056         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
15057
15058         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
15059         class init trampolines.
15060
15061 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15062
15063         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
15064         to the built-in profiler to turn off time and allocation profiling
15065         respectively.
15066
15067 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15068
15069         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
15070         g_direct_equal.
15071
15072         * debug-helpers.c (mono_method_full_name): Print the wrapper type
15073         in human readable form.
15074
15075 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15076
15077         * reflection.c icall.c: Fixed warnings.
15078
15079         * image.c (load_class_names): Use a temporary hash table to hold the
15080         namespaces in order to avoid doing many string comparisons.
15081
15082         * image.h: Fix typo.
15083
15084         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
15085         Pass NULL instead of g_direct_equal to the GHashTable constructor 
15086         since the NULL case is short-circuited inside g_hash_table_lookup, 
15087         leading to better performance.  
15088
15089         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
15090         obtain the first custom attribute for a given index. Depends on the
15091         CustomAttribute table being sorted by the parent field.
15092
15093         * reflection.c (mono_custom_attrs_from_index): Use the new function 
15094         for better performance.
15095
15096 2003-09-07  Martin Baulig  <martin@ximian.com>
15097
15098         * class.c (mono_class_init): If we're a generic instance, inflate
15099         all our methods instead of loading them from the image.
15100         (mono_class_from_generic): Set `class->methods = gklass->methods'.
15101
15102 2003-09-07  Martin Baulig  <martin@ximian.com>
15103
15104         * mono-debug-debugger.c: Added support for constructors.
15105
15106 2003-09-06  Martin Baulig  <martin@ximian.com>
15107
15108         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
15109         New interncall.
15110
15111         * reflection.c (mono_reflection_setup_generic_class): Call
15112         ensure_runtime_vtable() to create the vtable.
15113
15114 2003-09-05  Martin Baulig  <martin@ximian.com>
15115
15116         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
15117         MONO_TYPE_MVAR.
15118
15119 2003-09-04  Martin Baulig  <martin@ximian.com>
15120
15121         * reflection.c (mono_reflection_define_generic_parameter): Generic
15122         parameters start with zero.
15123
15124 2003-09-04  Martin Baulig  <martin@ximian.com>
15125
15126         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
15127
15128         * reflection.h (MonoReflectionGenericParam): New typedef.
15129         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
15130         the generic parameters from the managed TypeBuilder.
15131
15132         * reflection.c (mono_reflection_define_generic_parameter): New function.
15133         (mono_reflection_create_runtime_class): Encode generic parameters.
15134         (mono_reflection_setup_generic_class): New function; this is
15135         called after adding adding all generic params to the TypeBuilder.
15136         (encode_type): Added MONO_TYPE_VAR.
15137
15138 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15139
15140         * class.h class.c (mono_class_needs_cctor_run): Moved this method
15141         here from the JIT.
15142
15143         * assembly.h assembly.c: Moved the AOT loading code into an assembly
15144         load hook.
15145
15146 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
15147
15148         * reflection.h reflection.c class.h class.c: Delete duplicate 
15149         definition of mono_type_get_name () from reflection.c and export the
15150         one in class.c.
15151
15152         * class.c: Class loading fixes from Bernie Solomon 
15153         (bernard@ugsolutions.com).
15154
15155         * reflection.c: Endianness fixes from Bernie Solomon 
15156         (bernard@ugsolutions.com).
15157         
15158 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15159
15160         * assembly.h assembly.c: Define a file format version for AOT
15161         libraries.
15162         
15163         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
15164
15165         * appdomain.h (MonoJitInfo): New field to determine whenever the
15166         code is domain neutral.
15167         
15168 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
15169
15170         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
15171
15172 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15173
15174         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
15175         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
15176         Avoid caching the result since strings must be domain specific. Fixes
15177         #48050.
15178
15179 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15180
15181         * marshal.c (mono_marshal_init): Make this callable multiple times
15182         since it is hard to find a correct place to call it.
15183
15184         * object.c (mono_runtime_class_init): Execute static constructors in
15185         the correct appdomain.
15186
15187         * image.c (build_guid_table): Handle the case when multiple images have
15188         the same GUID.
15189
15190 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15191
15192         * icall.c: added a couple of icalls for System.Web.
15193
15194 2003-08-28  Martin Baulig  <martin@ximian.com>
15195
15196         * icall.c (ves_icall_Type_BindGenericParameters): Use
15197         `klass->generic_inst' instead of `&klass->byval_arg' in the
15198         mono_type_get_object() call.  The returned type must be
15199         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
15200
15201 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15202
15203         * NOTES: New file.
15204
15205         * object.c (mono_class_proxy_vtable): Make it thread safe.
15206
15207         * pedump.c: Fix warning.
15208
15209         * object.c appdomain.h: Get rid of metadata_section. 
15210         It is no longer needed and it was causing deadlocks with domain->lock.
15211
15212         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
15213
15214 2003-08-26  Martin Baulig  <martin@ximian.com>
15215
15216         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
15217
15218 2003-08-26  Martin Baulig  <martin@ximian.com>
15219
15220         * pedump.c (main): Call mono_metadata_init(),
15221         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
15222         and mono_loader_init().
15223
15224 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
15225
15226         * loader.h: Add missing include to fix build.
15227
15228         * image.h: mono_image_load_references is no more.
15229
15230         * assembly.c: Reworked assembly loading to make it really thread safe.
15231         After these changes, the assembly returned by mono_assembly_open is
15232         fully initialized, i.e. all its references assemblies are loaded.
15233
15234         * assembly.c (mono_image_load_references): Renamed to 
15235         mono_assembly_load_references, and made private, since clients no
15236         longer need to call it.
15237
15238         * class.c: Removed calls to mono_assembly_load_references, since it was
15239         a source of deadlocks.
15240
15241         * loader.h loader.c class.h class.c: Protect data structures using a 
15242         new lock, the loader lock.
15243
15244         * class.c (mono_class_setup_vtable): Create temporary hash tables and
15245         GPtrArrays only when needed.
15246
15247         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
15248         into empty structures by mcs. Fixes pinvoke7.cs.
15249         
15250         * domain.c (mono_init): Call a new initialization function.
15251
15252         * appdomain.c (mono_runtime_init): Call the new initializer function
15253         of the marshal module.
15254
15255         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
15256         inserted into empty structures by mcs. Fixes pinvoke7.cs.
15257
15258         * marshal.h marshal.c: Added locks around the wrapper caches to make
15259         this module thread safe.
15260
15261         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
15262         this argument. Fixes pinvoke1.exe.
15263
15264 2003-08-25  Lluis Sanchez <lluis@ximian.com>
15265
15266         * object.h: Added call_type field to MonoMethodMessage and the corresponding
15267         enumeration of values. Removed fields to store remote call output values in
15268         MonoAsyncResult. Not needed any more.
15269         * object.c: Initialize call_type and async_result fields in mono_message_init.
15270         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
15271         dispatching the message.
15272         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
15273         async call to finish. To do it use a message with EndInvoke call type.
15274
15275 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15276
15277         * loader.h loader.c (mono_method_hash_marhal_info): New function which
15278         determines whenever a method has marshalling info.
15279
15280 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15281
15282         * assembly.c: fix the build on windows.
15283
15284 2003-08-22 Lluis Sanchez <lluis@ximian.com>
15285
15286         * object.cs: Fixed bug #47785.
15287
15288 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
15289
15290         * string-icalls.c (StringReplace): If their are no occurances of
15291         the old string found return a reference to the supplied
15292         string. This saves some memory and matches MS behavoir.
15293         
15294 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15295
15296         * socket-io.c: fixed compilation for systems that define AF_INET6
15297         and don't define SOL_IP/SOL_IPV6.
15298
15299 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
15300
15301         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
15302         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
15303
15304         * rawbuffer.c rawbuffer.h: Make this module thread safe.
15305
15306         * domain.c: Make this module thread safe.
15307
15308         * domain.c (mono_init): Call new initialization function.
15309
15310         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
15311         reference types too. Fixes #38812.
15312
15313         * image.c (mono_image_init): Fixed warnings.
15314
15315         * class.c (mono_class_from_typeref): Handle assembly load failure
15316         correctly.
15317
15318         * appdomain.c (add_assemblies_to_domain): Handle the case when
15319         the references of an assembly are not yet loaded.
15320
15321         * metadata.c image.c assembly.c: Moved initialization of global
15322         variables to a separate function called at startup since lazy 
15323         initialization of these variables is not thread safe.
15324         
15325         * image.c assembly.c: Made this module thread safe by adding locks in 
15326         the appropriate places.
15327
15328         * domain.c (mono_init): Call the new initialization functions of the
15329         three modules.
15330
15331 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
15332
15333         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
15334           make a direct call. It is proxy's work to make the call asynchronous.
15335           mono_delegate_end_invoke(): If the targe is a proxy, just collect
15336           the return values.
15337         * object.cs: mono_method_call_message_new(): read AsyncResult and
15338           state object from parameters list, if this info is requested.
15339         * object.h: Added fields to store remote call output values in
15340           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
15341
15342 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15343
15344         * object.h: add needed fields to MonoThread.
15345         * threads.c, threads.h: allow registering a function to cleanup data
15346         allocated per thread by the JIT.
15347
15348 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15349
15350         * loader.h: portability fix by Bernie Solomon
15351         * <bernard@ugsolutions.com>.
15352
15353 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
15354
15355         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
15356         return a MonoArray. This simplifies the code and also ensures that
15357         the cache allways contains an object reference as a value.
15358
15359         * icall.c (ves_icall_get_parameter_info): Simplified using the new
15360         function.
15361
15362 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15363
15364         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
15365         fixes a problem with byte ordering when getting the address family for
15366         a socket.
15367
15368 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
15369
15370         * .cvsignore: Added monosn.
15371
15372         * reflection.h reflection.c loader.c: Added support for parameter
15373         marshalling to dynamically created types. Fixes #47295.
15374
15375 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15376
15377         * rand.c: remove useless warnings.
15378
15379 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15380
15381         * class.c: implemented ldtoken for methods and fieldrefs.
15382
15383 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15384
15385         * threadpool.c: when mono_async_invoke was called, no one took care of
15386         monitoring the queue. So if the method invoked took some time and we
15387         got new async invoke requests after 500 ms (the thread created waited
15388         that long in WaitForSingleObject), the new async invoke was not called
15389         until the previous one finished.
15390
15391         This is fixed now. Thanks to Totte for helping with it.
15392
15393 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15394
15395         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
15396
15397 2003-08-11  Martin Baulig  <martin@ximian.com>
15398
15399         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
15400
15401 2003-08-06  Martin Baulig  <martin@ximian.com>
15402
15403         * mono-debug-debugger.c: Added support for static fields,
15404         properties and methods.
15405
15406 2003-08-06  Martin Baulig  <martin@ximian.com>
15407
15408         * mono-debug-debugger.c: Don't store the MonoString's vtable to
15409         make this work for applications with multiple application domains.
15410
15411 2003-08-04  Martin Baulig  <martin@ximian.com>
15412
15413         * mono-debug-debugger.c: Completely reworked the type support; the
15414         most important thing is that we're now just using one single
15415         `MonoType' instance per type.
15416
15417 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
15418
15419         * mono-endian.h, mono-endian.c, icall.c: Added icall
15420         ves_icall_System_Double_AssertEndianity to assert double word endianity
15421         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
15422
15423 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15424
15425         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
15426         support, icalls and fixes.
15427
15428 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
15429
15430         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
15431         classes that are a punctuation character in .NET is not the same a
15432         g_unichar_ispunct.
15433
15434 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15435
15436         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
15437
15438 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
15439
15440         * icall.c: Add new MemCopy internalcall.
15441         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
15442         Simplified code; It is not necessary to handle all the cases here,
15443         as the C# code takes care of it.  Only handle the case of the name
15444         resource embedded into the assembly.
15445
15446         Changed signature to return the data pointer and the size of the
15447         data. 
15448
15449 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
15450
15451         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
15452         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
15453
15454 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
15455
15456         * socket-io.c: ignore EINTR error in select.
15457
15458 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15459
15460         * class.h, class.c: removed unused subclasses field in MonoClass.
15461
15462 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
15463
15464         * icall.c: improve fix of get_base_definition(). If the parent class
15465           doesn't have the mehod, look at the parent of the parent.
15466         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
15467           to check if a parameter is an in or out parameter
15468           (PARAM_ATTRIBUTE_IN is not set by default).
15469           mono_method_return_message_restore(): Use mono_class_value_size to
15470           get the size of a value type. mono_type_stack_size (parameterType)
15471           does not return the correct value if parameterType is byRef.
15472           mono_load_remote_field(), mono_load_remote_field_new(),
15473           mono_store_remote_field(), mono_store_remote_field_new():
15474           raise exception if the remote call returns an exception.
15475
15476 2003-07-28  Martin Baulig  <martin@ximian.com>
15477
15478         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
15479         method.  This is a wrapper around mono_runtime_invoke() which
15480         boxes the instance object if neccessary.
15481
15482 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15483
15484         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
15485         metadata.h, row-indexes.h, verify.c: first cut of generics support.
15486
15487 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15488
15489         * icall.c: disable mcs bug workaround.
15490
15491 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15492
15493         * object.c (mono_runtime_class_init): Take the metadata_section
15494         mutex before obtaining the domain mutex.
15495
15496         * appdomain.h: Added definition of metadata_section mutex here. 
15497
15498         * object.c: define metadata_mutex here.
15499
15500 2003-07-24  Ravi Pratap  <ravi@ximian.com>
15501
15502         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
15503         fixed.
15504
15505 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
15506
15507         * reflection.c: Fix bug #46669
15508
15509 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15510
15511         * exception.c:
15512         * exception.h:
15513         * icall.c:
15514         * object.h: fill in the type name for TypeLoadException.
15515
15516 2003-07-23  Ravi Pratap  <ravi@ximian.com>
15517
15518         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
15519         relationship between TypeBuilders while compiling corlib) and bug
15520         45993 (Array types returned from the runtime while compiling
15521         corlib were from the loaded corlib).
15522
15523 2003-07-22  Martin Baulig  <martin@ximian.com>
15524
15525         * mono-debug-debugger.c: Reworked the type support a bit more;
15526         distinguish between types and classes.
15527
15528 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
15529
15530         * icall.c: add IsArrayImpl icall.
15531
15532 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
15533
15534         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
15535         initializing real_size only once. Also fix bug #46602.
15536
15537 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
15538
15539         * object.c: Renamed mono_metadata_section to metadata_section.
15540
15541 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
15542
15543         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
15544           empty array if the type is an array. Fixed.
15545           ves_icall_MonoMethod_get_base_definition: if the base method
15546           is abstract, get the MethodInfo from the list of methods of
15547           the class.
15548         * reflection.c: ParameterInfo.PositionImpl should be zero-based
15549           and it was 1-based. Fixed in mono_param_get_objects.
15550
15551 2003-07-20  Martin Baulig  <martin@ximian.com>
15552
15553         * mono-debug.h: Set version number to 31.
15554         (mono_debug_init): Added `MonoDomain *' argument.
15555
15556         * mono-debug-debugger.c: Reworked the type support; explicitly
15557         tell the debugger about builtin types; pass the `klass' address to
15558         the debugger.
15559
15560 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
15561
15562         * image.c: Allow new metadata tables to be loaded without a
15563         warning. Also update the warning message to give the new constant value.
15564                 
15565 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15566
15567         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
15568         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
15569         array type representation changes.
15570
15571 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15572
15573         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
15574         on Environment.Exit () call.
15575
15576 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15577
15578         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
15579         requires a matching corlib.
15580
15581 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
15582
15583         * Changelog: My editor decided to add a CR to each line. Sorry about that.
15584           Committed again without the CRs.
15585         
15586 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
15587
15588         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
15589           getting it from the "this" socket instance. Did not work
15590           if the socket is a subclass of Socket.
15591           Also fixed bug #35371.
15592
15593 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15594
15595         * metadata.c: fixed size for TypedByRef.
15596         * loader.c: when searching for a method, consider the vararg amrker.
15597         * unicode.c, decimal.c: constify some arrays.
15598
15599 2003-07-15  Dick Porter  <dick@ximian.com>
15600
15601         * socket-io.c: Fixed compilation for gcc < 3.2.
15602
15603         Fixed compilation for machines that don't have AF_INET6 (thanks to
15604         Bernie Solomon <bernard@ugsolutions.com> for that part.)
15605
15606         Fixed compile warnings.
15607         
15608         Fixed formatting and line endings.
15609
15610 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
15611
15612         * socket-io.h:
15613         * socket-io.c: Added IPv6 support.
15614
15615 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
15616
15617         * class.c (mono_class_is_assignable_from): New function to implement
15618         the is_assignable_from logic. Used by mono_object_isinst, 
15619         Type::IsAssignableFrom () and the interpreter.
15620
15621         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
15622         Object, even interfaces.
15623         
15624         * object.c (mono_object_isinst): Implement in terms of 
15625         is_assignable_from.
15626
15627         * icall.c (ves_icall_type_is_assignable_from): New icall.
15628
15629 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
15630
15631         * domain.c (foreach_domain): fix compiler warning.
15632
15633 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
15634
15635         * image.c (load_metadata_ptrs): use g_strndup because strndup is
15636         not available on all plattforms
15637
15638 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
15639
15640         * image.h image.c: Store the metadata version string in MonoImage.
15641         * icall.c: New icall to retrieve the image version.
15642         * reflection.c (create_dynamic_image): Fill in the image version field
15643         * reflection.c (build_compressed_metadata): Use the image version
15644         from the image structure.
15645
15646 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15647
15648         * appdomain.c: modified comment.
15649         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
15650         That will be its last iteration when mono_gc_cleanup is called from
15651         mono_runtime_cleanup and before the domain is unloaded.
15652
15653         Fixes bug #45962.
15654
15655 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
15656
15657         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
15658         attributes.
15659
15660 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15661
15662         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
15663         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
15664         Bernie Solomon <bernard@ugsolutions.com>.
15665
15666 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15667
15668         * object.c, object.h: provide mono_object_new_fast() for faster
15669         allocation in some special cases.
15670
15671 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15672
15673         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
15674         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
15675
15676 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15677
15678         * threadpool.c: fix leaks.
15679
15680 2003-07-01  Dick Porter  <dick@ximian.com>
15681
15682         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
15683         using MonoGHashTables.  Fixes threadpool bug posted to list.
15684
15685 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
15686
15687         * image.h, image.c: added support to load an assembly from a byte array.
15688         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
15689         assembly bundle support.
15690
15691 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
15692
15693         * threadpool.c (mono_thread_pool_add): keep a reference to the
15694         AsyncResult to prevent GC
15695
15696 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15697
15698         * class.c: leak fix.
15699
15700 2003-06-25  Dick Porter  <dick@ximian.com>
15701
15702         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
15703         for the async object, the WaitHandle object will close the handle.
15704         Fixes bug 45321.
15705
15706 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15707
15708         * class.c: in mono_array_class_get (), lookup from the hash with the
15709         same type we insert: this works around a bug in
15710         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
15711         lluis. The real fix will have to wait for after the release.
15712
15713 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15714
15715         * icall.c: fix memory leak when getting type members.
15716
15717 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15718
15719         * reflection.c: added more pubtoken special cases.
15720
15721 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15722
15723         * class.c: handle field offset correctly when class size
15724         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
15725
15726 2003-06-20  Martin Baulig  <martin@ximian.com>
15727
15728         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
15729         *image' field.
15730
15731 2003-06-20  Martin Baulig  <martin@ximian.com>
15732
15733         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
15734
15735 2003-06-20  Martin Baulig  <martin@ximian.com>
15736
15737         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
15738         just distinguish between variables in registers and variables at
15739         an offset relative to a register.
15740
15741 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15742
15743         * icall.c: #ifdef out latest changes until mcs is fixed.
15744
15745 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15746
15747         * icall.c: return members in metadata order.
15748
15749 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15750
15751         * icall.c: avoid infinite loop in GetTimeZoneData.
15752
15753 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15754
15755         * icall.c: added Marshal.Prelink/All icalls.
15756
15757 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
15758
15759         * object.c, object.h: fix warnings and do some overflow checking
15760         when creating arrays.
15761
15762 2003-06-17  Dick Porter  <dick@ximian.com>
15763
15764         * file-io.h:
15765         * file-io.c: File attributes need to be tweaked slightly when
15766         passed from the managed to the w32 world.
15767
15768 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15769         * profiler.h profiler-private.h profiler.c: Rework last patch
15770         based on suggestion by Paolo.
15771         
15772 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15773
15774         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
15775         instruction level coverage data collection.
15776         * profiler.h profiler.c (: Added new callback function which can be
15777         used by the profiler to limit which functions should have coverage
15778         instrumentation.
15779         * profiler.c (mono_profiler_load): Call g_module_build_path to
15780         generate the file name of the profiler library.
15781
15782 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15783
15784         * profiler.c, profiler.h, profiler-private.h: added basic block 
15785         coverage profiling API.
15786
15787 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
15788
15789         * reflection.c (mono_reflection_create_runtime_class): Add support
15790         for events in dynamically generated code.
15791
15792         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
15793         not allocated.
15794
15795 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15796
15797         * icall.c: when getting timezone info, return reasonable values if we
15798         can't get the actual data.
15799
15800 2003-06-14  Dick Porter  <dick@ximian.com>
15801
15802         * threads.c (start_wrapper): Remove the reference to the thread
15803         object in the TLS data, so the thread object can be finalized.
15804         This won't be reached if the thread threw an uncaught exception,
15805         so those thread handles will stay referenced :-( (This is due to
15806         missing support for scanning thread-specific data in the Boehm GC
15807         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
15808
15809 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
15810
15811         * reflection.c: ensure streams and tables are first allocated with
15812         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
15813
15814 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15815
15816         * icall.c: fixed GetElementType for byrefs (bug# 44792).
15817
15818 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
15819
15820         * reflection.c (mono_reflection_create_runtime_class): Add support for
15821         properties to dynamically created classes.
15822         * reflection.c: Fix a few places where non-MonoObjects were inserted
15823         into the tokens hashtable.
15824
15825 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15826
15827         * object.c: some support to handle out of memory exceptions.
15828
15829 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
15830
15831         * marshal.c (mono_marshal_get_native_wrapper): support reference
15832         return types
15833
15834 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15835
15836         * object.h, object.c: more portability stuff from Bernie Solomon.
15837         Unexport mono_object_allocate(). Added mono_object_unbox ().
15838         Set exitcode when an unhandled exception is thrown.
15839
15840 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
15841
15842         * marshal.c (mono_marshal_get_native_wrapper): use custom
15843         marshaler for return types.
15844
15845 2003-06-10  Dick Porter  <dick@ximian.com>
15846
15847         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
15848         ip_mreq is available
15849
15850 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15851
15852         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
15853         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
15854         by Bernie Solomon <bernard@ugsolutions.com>.
15855
15856 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
15857
15858         * gc.c (mono_gc_init): Avoid error message on shutdown when
15859         GC_DONT_GC=1 is used.
15860
15861         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
15862         New icall to return the GUID of a module.
15863
15864 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15865
15866         * class.c: ensure instance size always includes the parent's size
15867         even whem class size is set explicitly (fixes bug#44294).
15868
15869 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15870
15871         * profiler.h, profiler.c: made the simple profiler thread-safe,
15872         get more accurate timing info. Allow the loading of an
15873         externally-developed profiler module.
15874
15875 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
15876
15877         * marshal.c (mono_marshal_get_native_wrapper): improved
15878         class/byref arguments.
15879         (mono_marshal_get_native_wrapper): better string marshaling support.
15880
15881 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15882
15883         * class.c: ensure .pack and .size are handled correctly and
15884         simplified layout of static fields.
15885
15886 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15887
15888         * appdomain.c
15889         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
15890
15891         * loader.c (mono_lookup_pinvoke_call): look for modules in the
15892         current directory (fix bug 44008)
15893
15894 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
15895
15896         * marshal.c (mono_marshal_get_native_wrapper): started support for
15897         custom marshalers.
15898         (mono_delegate_to_ftnptr): consider marshalling specifications
15899
15900 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15901
15902         * reflection.c, reflection.h: emit custom marshal info.
15903
15904 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15905
15906         * object.c: free the GError.
15907         * icall.c: added CloseEvent_internal.
15908         * threads.[ch]:
15909         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
15910         call.
15911
15912 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
15913
15914         * loader.c (mono_method_get_signature): Add support for dynamic
15915         assemblies.
15916
15917 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15918
15919         * reflection.c: fixed bug #43905.
15920
15921 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15922
15923         * class.c, domain.c, icall.c, metadata.h, object.h: support for
15924         handling TypedReference and ArgIterator.
15925         * loader.c, loader.h: added function to get signature at call site.
15926
15927 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15928
15929         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
15930         data readonly. Buglets and warning fixes. Some MethodSpec support.
15931
15932 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15933
15934         * class.h, class.c, object.c: remove relative numbering support.
15935
15936 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
15937
15938         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
15939         free the string, until we get a chance to fix Gtk#
15940
15941 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15942
15943         * marshal.c: revert last patch.
15944
15945 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15946
15947         * icall.c: updates for new mono_class_vtable() not calling
15948         the type constructor anymore.
15949
15950 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15951
15952         * object.h, object.c: separate vtable creation from type
15953         initialization. Make running the .cctor thread safe.
15954
15955 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15956
15957         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
15958
15959 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15960
15961         * loader.c (mono_get_method): consider calling convention
15962
15963 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
15964
15965         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
15966         to return the invisible global type for a module.
15967
15968         * reflection.c (mono_image_build_metadata): Emit global fields too.
15969
15970 2003-05-20  Peter Williams  <peterw@ximian.com>
15971
15972         * loader.c (mono_lookup_internal_call): Add a few newlines.
15973
15974 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
15975
15976         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
15977         literal strings.
15978
15979         * appdomain.c (set_domain_search_path): Recalculate search path when
15980         AppDomainSetup.PrivateBinPath changes.
15981
15982         * object.c (mono_class_compute_gc_descriptor): It turns out some
15983         parts of the class libs (like System.Thread) holds pointers to
15984         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
15985         to treat native int a pointer type here.
15986         
15987 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
15988
15989         * appdomain.h, domain.c: add hashtable for jump target resolution.
15990
15991 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
15992
15993         * reflection.h reflection.c icall.c: Added new icalls 
15994         GetManifestResourceInfoInternal, GetModulesInternal and support
15995         infrastructure.
15996
15997 2003-05-16  Dick Porter  <dick@ximian.com>
15998
15999         * icall.c:
16000         * file-io.h:
16001         * file-io.c: Implement System.IO.MonoIO::GetTempPath
16002
16003 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
16004
16005         * object.c: mono_store_remote_field: little fix to previous patch.
16006
16007 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16008
16009         * class.c: add constructors to array classes.
16010         * icall.c: special case array construction for InternalInvoke (),
16011
16012 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
16013
16014         * class.h class.c reflection.c object.c: Added support for field
16015         defaults in dynamically generated classes.
16016
16017 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16018
16019         * reflection.c: properly encode charset for ddlimport.
16020
16021 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16022
16023         * threads.c: allow compiling without GC.
16024
16025 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16026
16027         * appdomain.h, object.c, object.h, threads.c, threads.h: added
16028         handling of thread static data.
16029
16030 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16031
16032         * reflection.h, reflection.c: added mono_custom_attrs_free ().
16033
16034 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16035
16036         * class.c (mono_array_class_get): always set the serializable flags
16037         (mono_array_class_get): always set the SEALED attribute for array types
16038
16039 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
16040
16041         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
16042         attributes (fix for bug 42021).
16043
16044 2003-05-12  Dick Porter  <dick@ximian.com>
16045
16046         * gc.c: Don't run finalizers when the finalizer thread is
16047         finishing up, because the default domain has already been
16048         destroyed.
16049
16050 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
16051
16052         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
16053         value is null, we should throw an exception.   This is slightly
16054         different than the other conventions used for the constructor.
16055
16056 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16057
16058         * socket-io.c: fixed windows build.
16059
16060 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16061
16062         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
16063
16064 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
16065
16066         * object.c (mono_string_new_wrapper): Compatibility fix for MS
16067         compilers.
16068
16069 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
16070
16071         * class.c (mono_class_layout_fields): Add experimental GC aware
16072         auto layout facility. Requires class library changes to work correctly.
16073
16074         (mono_class_setup_vtable): Avoid overriding explicit interface
16075         method implementations. Fixes iface3.exe test.
16076
16077         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
16078         object reference.
16079         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
16080         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
16081
16082         * metadata.h: Add new type classification macro which determines
16083         whenever the type holds an object reference.
16084
16085 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16086
16087         * marshal.c (mono_marshal_get_native_wrapper): cleanups
16088
16089 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
16090
16091         * gc.c (finalizer_thread): Work around a GC bug.
16092
16093 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
16094
16095         * marshal.c (emit_struct_conv): allow unions
16096
16097         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
16098
16099 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
16100
16101         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
16102
16103 2003-05-06  Martin Baulig  <martin@ximian.com>
16104
16105         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
16106
16107 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16108
16109         * socket-io.c:
16110         (Select_internal): allow NULLs, don't create arrays if not needed.
16111         Coupled with Socket.cs changes.
16112
16113         * threadpool.c:
16114         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
16115         register a finalizer for it that will close the semaphore handle. This
16116         fixes the leak and make Lupus' test run with > 4080 loops.
16117
16118 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16119
16120         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
16121         Jerome Laban (bug #42287)
16122
16123 2003-05-02  Martin Baulig  <martin@ximian.com>
16124
16125         * debug-mono-symfile.h
16126         (MonoSymbolFile): Moved declaration into mono-debug.h.
16127         (MonoDebugMethodJitInfo): Likewise.
16128         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
16129         argument.
16130         (_mono_debug_address_from_il_offset): Take a
16131         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
16132
16133         * mono-debug.h
16134         (MonoDebugDomainData): New struct.
16135         (mono_debug_get_domain_data): New function.
16136         (mono_debug_add_method): Take an additional `MonoDomain *'
16137         argument.
16138         (mono_debug_source_location_from_address): Likewise.
16139         (mono_debug_il_offset_from_address): Likewise.
16140         (mono_debug_address_from_il_offset): Likewise.
16141
16142 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
16143
16144         * reflection.c: one more check for null type in custom attrs.
16145
16146 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16147
16148         * reflection.c: avoid warning (comparison is always false due to limited
16149         range of data type).
16150
16151 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16152
16153         * icall.c: throw an exception in Type.GetField if the argument 'name'
16154         is NULL.
16155
16156 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
16157
16158         * reflection.c: fixed handling of enums in named arguments to custom
16159         attributes (bug #42123).
16160
16161 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16162
16163         * reflection.c: use the right array element type and handle
16164         a null for a Type argument, too.
16165
16166 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
16167
16168         * reflection.c: handle arrays as arguments to custom attributes.
16169
16170 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
16171
16172         * reflection.c: handle a string value in a custom attr
16173         ctor that takes an object.
16174
16175 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16176
16177         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
16178         (fix bug #42063)
16179
16180 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16181
16182         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
16183
16184 2003-04-27  Martin Baulig  <martin@ximian.com>
16185
16186         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
16187         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
16188         MONO_DEBUGGER_EVENT_BREAKPOINT.
16189         (mono_breakpoint_trampoline_code): Removed.
16190         (mono_debugger_event_handler): The last argument is now a
16191         `guint32'.
16192         (mono_debugger_insert_breakpoint_full): Removed the
16193         `use_trampoline' argument.
16194         (mono_debugger_method_has_breakpoint): Likewise.
16195         (mono_debugger_trampoline_breakpoint_callback): Renamed to
16196         mono_debugger_breakpoint_callback(); take the method and
16197         breakpoint number as arguments.
16198
16199 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16200
16201         * metadata.c: fix off by one when loading parameters attributes.
16202
16203 2003-04-24  Martin Baulig  <martin@ximian.com>
16204
16205         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
16206
16207 2003-04-24  Martin Baulig  <martin@ximian.com>
16208
16209         * mono-debug-debugger.c: Moved all code which interacts with the
16210         Mono Debugger here.
16211
16212         * debug-mono-symfile.c: This code now just deals with the symbol
16213         file itself, the debugger code is now in mono-debug-debugger.c.
16214
16215 2003-04-23  Martin Baulig  <martin@ximian.com>
16216
16217         * mono-debug.c (mono_debug_source_location_from_il_offset):
16218         New method; like mono_debug_source_location_from_address(), but
16219         takes an IL offset instead of a machine address.
16220
16221 2003-04-23  Martin Baulig  <martin@ximian.com>
16222
16223         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
16224         `line' field; this is now computed by the debugger.
16225
16226 2003-04-23  Martin Baulig  <martin@ximian.com>
16227
16228         * mono-debug.[ch]: New files.  This is the new debugging interface.
16229
16230         * mono-debug-debugger.[ch]: New files.  Moved all code which
16231         interacts with the Mono Debugger here.
16232
16233 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16234
16235         * domain.c (mono_init): initialize mono_defaults.monitor_class
16236
16237 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
16238
16239         * reflection.c (method_encode_code): Add a spicy exception to help
16240         future compiler authors.
16241
16242 2003-04-21  Martin Baulig  <martin@ximian.com>
16243
16244         * icall.c
16245         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16246         Make this work with relative pathnames; g_filename_to_uri() needs
16247         an absolute filename.
16248
16249 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
16250
16251         * icall.c: Track name changes in Object and ValueType.
16252
16253 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
16254
16255         * metadata.c (mono_type_stack_size): size should be a multiple of
16256         sizeof (gpointer)
16257
16258 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16259
16260         * gc.c:
16261         (internal_domain_finalize): moved into mono_domain_finalize. No need
16262         to create another thread because the finalizers will be run in the
16263         finalizer thread.
16264         
16265         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
16266         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
16267         to be run (MS does this too).
16268
16269 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16270
16271         * object.c (mono_class_compute_gc_descriptor): Update comment.
16272
16273         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
16274
16275         * image.h: Add synchronized wrapper cache.
16276
16277         * image.c (do_mono_image_open): Initialize cache.
16278
16279         * reflection.c (create_dynamic_mono_image): Initialize cache.
16280
16281 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16282
16283         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
16284         ves_icall_System_Buffer_ByteLengthInternal.
16285
16286 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16287
16288         * reflection.c: setup klass->nested_in earlier. Allow
16289         a dash in the assembly name.
16290
16291 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
16292
16293         * metadata.c (mono_type_to_unmanaged): dont access
16294         type->data.klass for MONO_TYPE_OBJECT
16295         (mono_type_to_unmanaged): consider System.Delegate class
16296
16297 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
16298
16299         * class.c: just setup supertypes in the proper place instead of
16300         initializing the full element class for arrays.
16301
16302 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16303
16304         * class.c: ensure the element class of arrays is initialized.
16305         Setup the supertype info for array classes, too.
16306
16307 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
16308
16309         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
16310
16311 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16312
16313         * Makefile.am: re-added -m option when running cygpath. This way,
16314         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
16315         separator.
16316         * mono-config.c: same codepath for locating mono config file for WIN32
16317         and the rest.
16318         * assembly.c: if mono_assembly_setrootdir is called, don't override
16319         the value set.
16320
16321 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16322
16323         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
16324         MONO_ASSEMBLIES variable.
16325
16326 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16327
16328         * icall.c: added Assembly::GetNamespaces() icall.
16329
16330 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16331
16332         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
16333
16334 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
16335
16336         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
16337         * object.c: fixed bug in the construction of vtable for proxies
16338
16339 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16340
16341         * object.c (mono_array_new): Mark mono_array_new as an icall.
16342
16343 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16344
16345         * class.c: fixed test for public method when overriding interfaces.
16346         Closes bug #40970.
16347
16348 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16349
16350         * appdomain.h, domain.c: added mono_domain_foreach() to
16351         be able to access the currently loaded appdomains.
16352         * object.c: make string interning work across sppdomains.
16353         Mark some functions for use as icalls.
16354
16355 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16356
16357         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
16358
16359         * reflection.h reflection.c: Allocate long living data using 
16360         GC_MALLOC_ATOMIC so the collector does not need to scan it.
16361
16362         * reflection.c: Double the allocation size in streams instead of
16363         increasing it, to prevent unneccesary copying on large assemblies.
16364         
16365         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
16366         creation if the assembly does not have the Run flag set.
16367
16368 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16369
16370         * class.h: avoid the C++ keywords in header files (Jerome Laban
16371         spotted and fixed this).
16372
16373 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16374
16375         * object.c:
16376         (mono_unhandled_exception): fill in the arguments for the
16377         UnhandledException event. Only trigger that event for the default
16378         domain (as MS does).
16379
16380 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
16381
16382         * object.c: Improve typed allocation stuff based on suggestions from
16383         Paolo. Also turn it on if the GC library supports it.
16384
16385 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
16386
16387         * object.c object.h class.h: Added experimental typed allocation
16388         facility using the interfaces in gc_gcj.h.
16389
16390         * os/gc_wrapper.h: Added new include files.
16391         
16392 2003-04-03  Martin Baulig  <martin@ximian.com>
16393
16394         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
16395         which is not yet enabled by default.
16396
16397         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
16398         functions.
16399         (mono_gc_lock, mono_gc_unlock): New static functions.
16400
16401         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
16402         functions; stop/start the world for the garbage collector.  This
16403         is using the windows API; we need to complete the SuspendThread()/
16404         ResumeThread() implementation in the io-layer to make this work on Unix.
16405         (mono_gc_push_all_stacks): New public function; tells the garbage
16406         collector about the stack pointers from all managed threads.
16407
16408 2003-04-03  Martin Baulig  <martin@ximian.com>
16409
16410         * object.h (MonoThread): Added `gpointer stack_ptr'.
16411
16412         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
16413
16414 2003-04-03  Martin Baulig  <martin@ximian.com>
16415
16416         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
16417
16418 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
16419
16420         * reflection.c (typebuilder_setup_fields): Initialize field.first and
16421         field.last.
16422
16423 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
16424
16425         * loader.c (mono_lookup_internal_call): Report the corlib that is
16426         out of sync.
16427
16428 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
16429
16430         * icall.c (ves_icall_type_GetTypeCode): fixed check for
16431         System.DBNull (it's class not valuetype).
16432
16433 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16434
16435         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
16436         if the array method was already assigned a token (fixes bug#40646).
16437
16438 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
16439
16440         * reflection.c (mono_reflection_get_type): Attempt type resolve even
16441         if no assembly is given.
16442
16443 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
16444
16445         * metadata.h: Added the new tables.
16446
16447         * row-indexes.h: Added definitions for new tables.
16448
16449         * metadata.c: Add schemas for new tables, and add support for
16450         computing the sizes of them.
16451
16452         * class.c: Update for handling the new type cases.
16453
16454 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
16455
16456         * metadata.h (MONO_TYPE_IS_VOID): new macro
16457
16458 2003-03-31  Martin Baulig  <martin@ximian.com>
16459
16460         * threads.h (MonoThreadCallbacks): Added `thread_created'.
16461
16462         * threads.c (mono_thread_new_init): Call `thread_created' in the
16463         mono_thread_callbacks.
16464
16465 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
16466
16467         * loader.h: added marshalbyrefobject_class to mono_defaults
16468         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
16469         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
16470           generation of output parameters.
16471           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
16472         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
16473           contextbound and the target object belongs to the context of the caller.
16474         * object.h: added context and unwrapped_server variables in MonoRealProxy.
16475         * object.c: Implemented support for interfaces and abstract classes
16476           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
16477           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
16478
16479 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
16480
16481         * class.h class.c (mono_class_is_subclass_of): New function.
16482         
16483         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
16484         routines for most common case (calls from ArrayList::ToArray).
16485
16486         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
16487         routine so programs which call Environment::Exit() can be profiled.
16488
16489         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
16490         Added MONO_ARCH_SAVE_REGS.
16491
16492         * icall.c (ves_icall_type_is_subtype_of): Use new function.
16493
16494 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
16495
16496         * blob.h: Add a couple of new MonoType types definitions.
16497
16498         * tabledefs.h: Add a couple of new call convs.
16499
16500 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
16501
16502         * reflection.h (MonoReflectionDynamicAssembly): track changes in
16503         the layout of the class.
16504
16505         * reflection.c (alloc_table): double the size on overflow to avoid
16506         unnecessary copying.
16507
16508         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
16509         avoid filling out metadata tables and blobs. Also set mb->ilgen to
16510         null so it can be garbage collected.
16511         
16512 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
16513
16514         * reflection.c (mono_reflection_get_type): Return the resolved type
16515         only if it is in the assembly we searched.
16516
16517         * reflection.c (ensure_runtime_vtable): Initialize method slots.
16518
16519         * class.c (mono_class_setup_vtable): Set the slot of the overriding
16520         method.
16521
16522 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16523
16524         * appdomain.c:
16525         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
16526         the right one is 'file:///blah', but MS allows it.
16527         * assembly.c:
16528         (mono_assembly_open): allow 'file://blah'
16529
16530         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
16531
16532 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
16533
16534         * socket-io.c: fixes bug #40310.
16535
16536 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
16537
16538         * reflection.c (mono_reflection_parse_type): handle deeply nested
16539         types correctly.
16540
16541         * reflection.c (mono_image_create_token): Use unique token values
16542         since they will be put into a hash table.
16543
16544         * class.c (mono_class_setup_vtable): If a method occurs in more than
16545         one place in the vtable, and it gets overriden, then change the
16546         other occurances too.
16547
16548         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
16549         object as return type.
16550
16551 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
16552
16553         * icall.c: Deleted "ToString" implementation for double and float
16554         because they are full implemented in managed code.
16555
16556 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16557
16558         * reflection.c, reflection.h: implemented and exported functions
16559         to retrieve info about custom attributes.
16560
16561 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16562
16563         * appdomain.c: moved Uri handling to assembly.c
16564         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
16565         work when using a file Uri in *nix and windows.
16566
16567         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
16568         GetReferencedAssemblies.
16569
16570 2003-03-18  Dick Porter  <dick@ximian.com>
16571
16572         * icall.c: Rename a couple of internal calls
16573
16574         * threads.c: Set the thread state to Stopped when a thread exits.
16575         Fixes bug 39377.
16576
16577 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
16578
16579         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
16580         New icall.
16581
16582         * object.c (mono_class_vtable): fix warning.
16583
16584 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
16585
16586         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
16587
16588         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
16589         memory.
16590         (method_encode_clauses): Create exception info structures in the right
16591         order.
16592         (mono_reflection_setup_internal_class): Initialize supertypes field.
16593
16594         * class.c object.c: Handle interfaces which implement other interfaces 
16595         correctly.
16596
16597         * class.h class.c: Move the supertypes array initialization code into 
16598         a separate function so it can be used for dynamic types too. Also call
16599         it earlier, in mono_class_init(), since it can be used before the
16600         type is initialized.
16601
16602 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16603
16604         * Makefile.am:
16605         * assembly.c:
16606         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
16607
16608         * appdomain.c:
16609         * appdomain.h:
16610         * marshal.c:
16611         * object.c: remove warnings.
16612
16613 2003-03-13  Martin Baulig  <martin@ximian.com>
16614
16615         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
16616         (MonoDebugLexicalBlockEntry): New types.
16617
16618         * debug-mono-symfile.c
16619         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
16620
16621 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16622
16623         * process.c: ret can be any non-zero value accroding to MS doc.
16624
16625 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
16626
16627         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
16628         fixing a warning for a miss-used prototype, would have cause
16629         random memory corruption.
16630
16631 2003-03-07  Martin Baulig  <martin@ximian.com>
16632
16633         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
16634         getting really annoying ....
16635
16636 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
16637
16638         * reflection.c (fixup_method): added support for array methods.
16639
16640 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16641
16642         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
16643         (pointed out by Michael Adams).
16644
16645 2003-03-04  Dick Porter  <dick@ximian.com>
16646
16647         * icall.c: Temporarily reverted the Double and Single ToString()
16648         change, because it broke nunit.
16649
16650 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
16651
16652         * object.h, threads.h: make include files compatible with C++
16653         (patch by Jerome Laban <jlaban@wanadoo.fr>).
16654
16655 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
16656
16657         * icall.c: Erased ToString helper functions for Double and Single.
16658         Now, that implementations ar all in managed code (Double and Single
16659         Formatters).
16660
16661 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
16662
16663         * appdomain.c: Added method for initializing the default context of
16664         a domain. Added internal call for getting the default context.
16665         * appdomain.h: Added context variable in MonoDomain struct.
16666         * domain.c: mono_domain_set also sets the default context of the domain
16667         * icall.c: Mapped internal method InternalGetDefaultContext.
16668         * object.c: mono_object_get_virtual_method returns always a remoting
16669         wrapper if the object is a transparent proxy.
16670         mono_runtime_invoke_array: when creating an object by calling the
16671         constructor, if the created object is a proxy, then the constructor should
16672         be called using the a remoting wrapper.
16673
16674 2003-03-03  Dick Porter  <dick@ximian.com>
16675
16676         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
16677         variable so it compiles on solaris.  Problem spotted by
16678         Christopher Taylor <ct@cs.clemson.edu>
16679
16680 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16681
16682         * appdomain.c:
16683         (get_info_from_assembly_name): don't leak value.
16684
16685         * icall.c:
16686         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
16687         result.
16688
16689 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16690
16691         * assembly.c: export mono_image_load_references ().
16692         * class.c: handle function pointers. mono_class_from_name() now
16693         supports nested type names directly.
16694
16695 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
16696
16697         * reflection.h reflection.c: Encode already created dynamic methods 
16698         and fields correctly as a DEF instead of a REF.
16699
16700         * reflection.c: Get rid of the force_ref argument to 
16701         mono_image_typedef_or_ref since it was wrong in the first place.
16702
16703         * string-icalls.c: add error checking to string constructors according
16704         to the MSDN docs.
16705
16706         * reflection.c: Emit types in the order their TypeBuilders were 
16707         created. Previously, a new table index was assigned to each type before
16708         the tables were emitted. This was wrong because the signature blob
16709         might already refer to a type by its original table index.
16710
16711 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
16712
16713         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
16714         change.
16715         
16716 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16717
16718         * Makefile.am: make assemblies dir have \ instead of / on windows.
16719
16720 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
16721
16722         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
16723         iterate over the NESTEDCLASS table using a linear search since the
16724         table is not guaranteed to be sorted by the secondary key.
16725
16726         * class.c (mono_class_create_from_typedef): fixed up call to
16727         mono_metadata_nesting_typedef.
16728         
16729 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
16730
16731         * marshal.c (mono_string_to_byvalstr): clear the memory as
16732         suggested by Jerome Laban <jlaban@wanadoo.fr>
16733
16734 2003-02-26  Dick Porter  <dick@ximian.com>
16735
16736         * process.c: Cope with padding in .rsrc blocks
16737
16738 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
16739
16740         * metadata.h: reverted the filter_len change, it breaks reflection
16741         
16742 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
16743
16744         * metadata.h: added a new field to store the filter_len
16745         
16746
16747 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16748
16749         * reflection.c: handle custom attributes for types and members
16750         created with Reflection.Emit (bug#38422).
16751
16752 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
16753
16754         * reflection.c: define RTSpecialName automatically for constructors for
16755         compatibility with MS.NET.
16756
16757         * reflection.c (mono_reflection_create_runtime_class): initialize
16758         nested_in field of dynamically created classes.
16759
16760 2003-02-22  Martin Baulig  <martin@ximian.com>
16761
16762         * debug-mono-symfile.h: Incremented version number.
16763
16764 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
16765
16766         * object.h icall.c process.c: fix warnings.
16767
16768 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
16769
16770         * appdomain.h appdomain.c:
16771         (mono_domain_try_type_resolve): split the 
16772         name_or_tb argument into a name and a tb argument.
16773         (mono_domain_has_type_resolve): new function to check whenever the
16774         application has registered a TypeResolve event handler.
16775         
16776         * icall.c reflection.h reflection.c: move the type resolve logic into
16777         mono_reflection_get_type () so it will be invoked when 
16778         Assembly::GetType () is called.
16779
16780         * reflection.c:
16781         (mono_reflection_get_type): renamed to get_type_internal.
16782         (mono_reflection_get_type): fixed type name generation so it works 
16783         for nested types too.
16784         (mono_reflection_get_type): call has_type_resolve () to avoid the 
16785         costly type name generation if there is no resolve event handler.
16786
16787 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16788
16789         * class.c, image.c: load exported types from file references.
16790
16791 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
16792
16793         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
16794           used to cache the managed methods used to create proxies and make 
16795           remote invocation of methods.
16796         * class.h: Added in MonoVTable a flag to indicate that a class needs 
16797           to be remotely created.
16798         * object.c: Modified the method mono_class_vtable(). It now initializes 
16799           the remote flag of the vtable. Modified mono_object_new_specific(), 
16800           so now it checks the remote flag.
16801         * icall.c: Added a couple of internal methods, one for enabling instance 
16802           creation interception for a type, and one for creating objects bypassing
16803           the remote check.
16804
16805 2003-02-18  Martin Baulig  <martin@ximian.com>
16806
16807         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
16808         New interncall to get a method's metadata token.
16809
16810         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
16811         New interncall for the debugger.
16812
16813 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
16814
16815         * class.c (mono_class_setup_vtable): allocate supertype array
16816
16817 2003-02-18  Martin Baulig  <martin@ximian.com>
16818
16819         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
16820
16821 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16822
16823         * reflection.c:
16824         (assembly_name_to_aname): jump over unknown properties (i've found
16825         something like: 'type, assembly, version=xxx, custom=null, public...',
16826         so now will ignore custom=null and still get the rest of the values).
16827
16828 2003-02-17  Dick Porter  <dick@ximian.com>
16829
16830         * threads.c: Have Thread.Start() wait for a semaphore to signal
16831         that the thread has set up all its local data.  This fixes bug
16832         34323, where Abort() raced the new thread's TLS data.
16833
16834         Also removes the handle_store() call from start_wrapper, because
16835         threads are now always created suspended and there is no longer a
16836         race between the parent and child threads to store the info.
16837
16838 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
16839
16840         * image.c: explain the #- heap issue in a message, hopefully
16841         avoiding FAQs on mono-list.
16842
16843 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16844
16845         * icall.c:
16846         (GetEntryAssembly): if the domain has not invoked
16847         AppDomain.ExecuteAssembly yet, return the assembly of the default
16848         AppDomain.
16849
16850 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
16851
16852         * class.c (mono_ldtoken): make it work in dynamic assemblies.
16853
16854 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16855
16856         * metadata.c, reflection.c: simple speedup to type hash
16857         and equals code.
16858
16859 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
16860
16861         * image.c, image.h, class.c, assembly.c: move module loading
16862         to MonoImage. When loading metadata, consider alignemnet from
16863         the start of metadata, not from the metadata address in memory.
16864
16865 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
16866
16867         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
16868         AssemblyBuilder objects. Factored out custom attribute creation into
16869         a separate function.
16870         (create_custom_attr): new function to create custom attributes.
16871
16872 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
16873
16874         * Makefile.am: Got tired of typing the full pathname to pedump.
16875         Until there is another option, am installing this.
16876
16877 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
16878
16879         * class.c (class_compute_field_layout): always set field->parent 
16880         (mono_ldtoken): use mono_defaults.fieldhandle_class;
16881
16882 2003-02-11  Dick Porter  <dick@ximian.com>
16883
16884         * threads-types.h:
16885         * monitor.c: Rewrote Monitor, making lock much faster and
16886         Pulse/Wait work as specified.  Also uses much fewer handles, and only
16887         creates them as needed.
16888
16889         * exception.c: Added SynchronizationLockException
16890
16891         * threads.c: Deleted old Monitor implementation.  The new one is
16892         in a new file.
16893
16894 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16895
16896         * class.c: handled TypedReference type code. Set the correct size for
16897         class data. Setup interface_offsets for interface classes, too.
16898
16899 2003-02-09  Martin Baulig  <martin@ximian.com>
16900
16901         * debug-mono-symfile.h: Reflect latest symbol writer changes.
16902
16903 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
16904
16905         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
16906         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
16907         * object.c: fixed mono_object_get_virtual_method () for interfaces.
16908         * verify.c: check for code that runs after the end of the method.
16909
16910 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
16911
16912         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
16913         "System.Math::Round2".
16914         * sysmath.h: Added Floor, Round and Round2 definitions.
16915         * sysmath.c: Modified certain functions that were not 100% compliant
16916         with MS.NET (math precision) and added the implementation of Floor,
16917         Round and Round2.
16918
16919 2003-02-07  Martin Baulig  <martin@ximian.com>
16920
16921         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
16922
16923 2003-02-07  Martin Baulig  <martin@ximian.com>
16924
16925         * debug-mono-symfile.c: Reflected latest symwriter changes.
16926         (mono_debug_create_mono_symbol_file): Removed.
16927         (mono_debug_open_mono_symbol_file): Take an argument which
16928         specifies whether to create a dynamic symbol file.
16929
16930 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
16931
16932         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
16933
16934 2003-02-05  Martin Baulig  <martin@ximian.com>
16935
16936         * reflection.c (mono_image_build_metadata): Make this public,
16937         protect it against being called multiple times, don't create
16938         resources and don't build the compressed metadata here.
16939         (mono_image_create_pefile): Do this here.
16940
16941         * icall.c
16942         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
16943
16944 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16945
16946         * socket-io.c: fixed bug #36322.
16947
16948 2003-02-06  Piers Haken <piersh@friskit.com>
16949
16950         * appdomain.[ch]:
16951         * class.h:
16952         * debug-mono-symfile.c:
16953         * icall.c:
16954         * loader.c:
16955         * mono-config.c:
16956         * monosn.c:
16957         * reflection.c:
16958         * socket-io.c: warning cleanups
16959
16960 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
16961
16962         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
16963         function. works like remoting invoke, but does a check for the Proxy first.
16964
16965 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
16966
16967         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
16968
16969 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
16970
16971         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
16972         array of pointers.
16973         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
16974         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
16975
16976         * object.c (mono_store_remote_field_new): used by the new jit
16977         instead of mono_store_remote_field
16978         (mono_load_remote_field_new): used by the new jit
16979         instead of mono_load_remote_field
16980
16981 2003-02-05  Patrik Torstensson
16982
16983         * appdomain.c: changed unload to take the domain id instead
16984         of domain
16985         
16986         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
16987
16988
16989 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16990
16991         * appdomain.c: don't look for assemblies in ApplicationBase if
16992         PrivateBinPathProbe is set.
16993
16994 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16995
16996         * object.c: make the first argument in main_args contain the absolute
16997         path to the assembly. Fixes bug #37511.
16998
16999 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17000
17001         * icall.c: get correct UTC offset for countries not using daylight
17002         time saving. Fixes bug #30030.
17003
17004 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17005
17006         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
17007         and 1 are the family).
17008
17009 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
17010
17011         * icall.c (ves_icall_InternalExecute): removed wrong assertion
17012
17013         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
17014
17015 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
17016
17017         * reflection.c: added support for SignatureHelper tokens, which is
17018         needed by the Calli opcode.
17019
17020         * reflection.h: track changes to SignatureHelper class.
17021
17022         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
17023
17024 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17025
17026         * appdomain.c: fixed loading assemblies from PrivateBinPath.
17027
17028 2003-02-03  Patrik Torstensson
17029         * appdomain.[c|h], domain.c : 
17030          - Added support for getting a domain via domain id
17031          - Support for setting and getting domain from System.AppDomain 
17032            (used in cross appdomain channel)
17033          - Added support for get/set for a MonoAppContext on a thread 
17034            (Context class in System.Runtime.Remoting.Contexts),
17035          - Removed hack in Get/SetData and ExecuteAssembly.
17036         
17037         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
17038         the managed world to get control when a proxy is created.
17039
17040         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
17041         
17042 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
17043
17044         * icall.c
17045         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
17046         Populate the codebase field as well.
17047
17048 2003-02-02  Martin Baulig  <martin@ximian.com>
17049
17050         * debug-mono-symfile.c
17051         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
17052         (mono_debug_symfile_add_method): Allow interncalls.
17053
17054 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17055
17056         * icall.c: throw parse exception if strtod fails or the string is empty.
17057
17058 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
17059
17060         * marshal.c: handle object type separately from defined
17061         class types.
17062
17063 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
17064
17065         * marshal.c: handle NATIVE_LPSTR for strings when it's
17066         explicitly specified.
17067
17068 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
17069
17070         * reflection.c, reflection.h, icall.c: setup the reflection
17071         handle cache for ModuleBuilders and AssemblyBuilders.
17072
17073 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
17074
17075         * reflection.c (reflection_methodbuilder_to_mono_method): set
17076         pinvoke flag
17077
17078 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17079
17080         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
17081
17082 2003-01-29  Dick Porter  <dick@ximian.com>
17083
17084         * threads.c: No need for the fake_thread kludge now that Thread
17085         doesn't run a class constructor
17086         
17087 2003-01-29  Dick Porter  <dick@ximian.com>
17088
17089         * threads.c: Use g_direct_hash instead of the rather bogus
17090         g_int_hash
17091
17092 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
17093
17094         * marshal.c (mono_marshal_get_native_wrapper): add check for null
17095         (fix pinvoke12.exe)
17096         (mono_marshal_get_struct_to_ptr): generate valid IL code
17097         (mono_marshal_get_ptr_to_struct): generate valid IL code
17098         (*): correctly set sig->pinvoke, we need to memdup the signature
17099         to do that
17100
17101 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17102
17103         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
17104         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
17105
17106 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
17107
17108         * profiler.c: provide more callers information.
17109
17110 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
17111
17112         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
17113
17114         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
17115
17116         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
17117
17118 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
17119
17120         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
17121         exception instead of going into an infinite loop on dates which it 
17122         can't yet handle.
17123
17124         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
17125         out-of-range exception if needed.
17126
17127         * class.c (mono_class_setup_vtable): allow a virtual method to provide
17128         an implementation for an interface method and to override an inherited
17129         method at the same time. 
17130         Imagine a scenario when a virtual method is used to override a
17131         virtual abstract method in a parent class, and this same method 
17132         provides an implementation for an method inherited from an interface. 
17133         In this case, the interface resolution code will set im->slot, which 
17134         means that the virtual method override pass will skip this method 
17135         which means a pointer to the abstract method inherited from the parent
17136         will remain in the vtable of this non-abstract class.
17137
17138         * class.c: (mono_class_setup_vtable): continue search for a real 
17139         method if only an abstract method is found.     
17140
17141 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
17142
17143         * reflection.c: add size to encoding for ByValStr and ByValArray
17144         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
17145
17146 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
17147
17148         * class.c (mono_class_setup_vtable): pass the override info as an
17149         argument.
17150
17151         * class.c (mono_class_setup_vtable): set the slot of overriding methods
17152         correctly.
17153         
17154         * reflection.c (ensure_runtime_vtable); add support for method 
17155         overrides.
17156         
17157 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
17158
17159         * reflection.c (resolution_scope_from_image): Hack to work to work with
17160         dynamic assemblies.
17161
17162         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
17163         added a 'force_ref' argument to force this function to allways return 
17164         a TypeRef. This is needed by mono_image_get_memberref_token ().
17165         
17166 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
17167
17168         * reflection.c (mono_image_get_type_info): interfaces really don't have
17169         a parent.
17170
17171         * reflection.c (mono_image_basic_init): fill out missing fields of
17172         image structure.
17173
17174         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
17175         dynamic assemblies. This is required so dynamic assemblies show up in
17176         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
17177         Type::GetType() etc. This is consistent with MS behaviour.
17178
17179         * image.c image.h reflection.c: add newly created classes to the name 
17180         cache so mono_class_get () will find them.      
17181
17182 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
17183
17184         First part of changes to get IKVM.NET running under mono.
17185         
17186         * appdomain.h, appdomain.c: added new function 
17187         mono_domain_try_type_resolve() which will emit TypeResolve events. 
17188         This function will call AppDomain::DoTypeResolve to do the actual work.
17189
17190         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
17191         moved existing code dealing with dynamic tokens to a new function 
17192         called mono_reflection_lookup_dynamic_token (). This function will 
17193         raise TypeResolve events when appropriate. Since reflection.c is not 
17194         part of libmetadata, a new hook function called 
17195         mono_lookup_dynamic_token() is added to class.c which will call this.
17196
17197         * assembly.h assembly.c: make the invoke_load_hook function public,
17198         so it can be called for dynamic assemblies.
17199
17200         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
17201
17202         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
17203         type isn't found.
17204
17205         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
17206         MonoGHashTable, since it contains pointers to objects which the GC 
17207         needs to track.
17208
17209         * assembly.c (search_loaded): remove unused variable.
17210         
17211 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
17212
17213         * object.c: fixed issue exposed by gcc-generated IL programs
17214         that use RVA data for pointers.
17215
17216 2003-01-25  Martin Baulig  <martin@ximian.com>
17217
17218         * threads.c (start_wrapper): Moved the initialization of
17219         `start_func' above the mono_new_thread_init() call to which we
17220         pass it as argument.
17221
17222 2003-01-24  Martin Baulig  <martin@ximian.com>
17223
17224         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
17225         the MonoThread pointer.
17226
17227 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
17228
17229         * icall.c: Rename `PowImpl' to Pow.
17230
17231 2003-01-23  Dick Porter  <dick@ximian.com>
17232
17233         * threads.c (start_wrapper): Create a Thread object if needed, so
17234         the Main() thread can do the class initialisation in a subthread
17235         that has been set up to allow managed code execution.
17236
17237         Pass the thread ID instead of the MonoThread pointer to the thread
17238         start and attach callbacks.  This change is required, because the
17239         jit thread start callback must be called _before_ the Thread
17240         object can be created.
17241         
17242         (mono_thread_init): Removed much object creation code that is no
17243         longer needed.  No managed code is called from here now.
17244
17245         * object.c (mono_runtime_exec_managed_code): Create a subthread
17246         for Main, and call back to the runtime to use it.
17247         Set the exit code when Main exits.
17248
17249         * gc.c: Make sure domain finalisation happens in a subthread.
17250         Re-enable threaded GC, fixing bug 31333 (again).
17251
17252         * environment.c: System.Environment internall calls (so far just
17253         ExitCode is here, the others are still in icall.c)
17254
17255         * appdomain.c (mono_runtime_cleanup): All threads running managed
17256         code should have finished before mono_runtime_cleanup() is
17257         reached, so no need to clean up threads.
17258
17259 2003-01-22  Martin Baulig  <martin@ximian.com>
17260
17261         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
17262         `gpointer func' arguments.      
17263         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
17264         but added `MonoThread *thread' argument.
17265         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
17266
17267         * threads.c (mono_new_thread_init): Added `gpointer func' argument
17268         and pass it to the mono_thread_start_cb callback.
17269         (mono_install_thread_callbacks): New public function to install a
17270         set of callbacks which are set by the debugger.
17271         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
17272
17273 2003-01-22  Martin Baulig  <martin@ximian.com>
17274
17275         * Makefile.am: Install debug-mono-symfile.h.
17276
17277 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
17278
17279         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
17280
17281 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
17282
17283         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
17284         * class.c (mono_ptr_class_get): correctly set access levels of pointers
17285         (mono_array_class_get): correctly set access levels of arrays
17286
17287 2003-01-20      Patrik Torstensson
17288         * image.h (MonoAssemblyName): changed major, minor, build, revision
17289         from signed to unsigned.
17290
17291 2003-01-20  sean kasun <skasun@azstarnet.com>
17292
17293         * reflection.c (load_cattr_value): Now this handles
17294         MONO_TYPE_SZARRAY.  Fixes bug #35629
17295
17296 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
17297
17298         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
17299         integer value
17300
17301 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17302
17303         * decimal.c: fixed bug #26056.
17304
17305 2003-01-17  Martin Baulig  <martin@ximian.com>
17306
17307         * gc.c: Raise an ExecutionEngineException instead of using g_error().
17308
17309 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17310
17311         * exception.[ch]:
17312         (mono_get_exception_type_initialization): new function.
17313
17314         * object.c: throw a TypeInitializationException when an exception is
17315         thrown invoking the class constructor.
17316
17317 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17318
17319         * reflection.c: fixed attribute reading.
17320
17321 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17322
17323         * icall.c:
17324         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
17325         provided, look for the type in the calling assembly and then in
17326         mscorlib; if the assembly name is provided, only try that one.
17327
17328 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17329
17330         * object.c: register the vtable before there is a chance it's
17331         queried again recursively.
17332
17333 2003-01-13  Duncan Mak  <duncan@ximian.com>
17334
17335         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
17336         gc-internal.h. 
17337         
17338 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
17339
17340         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
17341
17342 2003-01-11  Martin Baulig  <martin@ximian.com>
17343
17344         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
17345         this to 20 for the release.
17346
17347 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
17348
17349         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
17350
17351         * loader.c (mono_method_get_marshal_info): bug fix
17352
17353         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
17354         structures with explicit layout
17355
17356 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17357
17358         * profiler.c: made the output more readable (and sorted). 
17359         Added caller information for the allocation profiler.
17360
17361 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
17362
17363         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
17364
17365 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17366
17367         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
17368         to get value types.
17369         
17370 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
17371
17372         * object.c, profiler.h, profiler.c, profiler-private.h:
17373         Added object allocation profiler.
17374
17375 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
17376
17377         * reflection.h, reflection.c: handle global methods.
17378         Compress blob entries.
17379
17380 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
17381
17382         * marshal.c: fix compilation.
17383
17384 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
17385
17386         * loader.c (mono_method_get_marshal_info): impl.
17387
17388         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
17389
17390 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17391
17392         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
17393         for reference types.
17394
17395 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
17396
17397         * loader.c: fixed off by one error in loaded parameter names.
17398
17399 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
17400
17401         * marshal.c (mono_marshal_get_icall_wrapper): like
17402         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
17403         instead of a MonoMethod.
17404
17405 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17406
17407         * decimal.c: fixed bug #36537.
17408
17409 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
17410
17411         * marshal.c: throw a missing method exception if a
17412         P/Invoke method is not found.
17413
17414 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17415
17416         * icall.c: allow a null this for constructors.
17417
17418 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17419
17420         * icall.c: raise the proper exceptions if the arguments to the
17421         internal Invoke are incorrect.
17422
17423 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
17424
17425         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
17426
17427 2003-01-03  Martin Baulig  <martin@ximian.com>
17428
17429         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17430
17431 2002-12-31  Martin Baulig  <martin@ximian.com>
17432
17433         * debug-mono-symfile.c: Completely rewrote the type section.
17434         Instead of using individual malloc()ed fields, we use one big
17435         continuous memory area and offsets into this area.
17436         See the comments in the source code for details.
17437
17438 2002-12-30  Martin Baulig  <martin@ximian.com>
17439
17440         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
17441
17442 2002-12-30  Martin Baulig  <martin@ximian.com>
17443
17444         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
17445         line number table in this data blob instead of using an external
17446         pointer.
17447
17448 2002-12-28  Martin Baulig  <martin@ximian.com>
17449
17450         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
17451
17452 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
17453
17454         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
17455         as a boxed return type.
17456
17457 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
17458
17459         * appdomain.c
17460         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
17461         g_build_filename to properly get separators on the filename created.
17462
17463         * object.h: Small change, introduce MonoMarshalByRefObject to
17464         track the layout of that structure in the C# universe as we make
17465         changes there.
17466
17467 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
17468
17469         * object.c: removed assert to allow static fields on interfaces.
17470         * loader.c: a TypeSpec may be used for any type, not just arrays.
17471
17472 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17473
17474         * class.c, class.h: added mono_class_array_element_size ().
17475         Ignore static methods in interfaces.
17476
17477 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17478
17479         * threads.c: fixed the build under cygwin.
17480
17481 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17482
17483         * reflection.c: handle nullref constants. Allocate keys for
17484         reflection handles with the GC.
17485
17486 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17487
17488         * threads.c, threads.h: added mono_thread_get_abort_signal()
17489         to get a suitable signal for thread abort.
17490
17491 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17492
17493         * metadata.c: fix handling of ExportedType table.
17494
17495 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17496
17497         * icall.c: added WriteWindowsDebugString internal call.
17498
17499 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17500
17501         * reflection.h: added fields to match C# implementation.
17502
17503 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17504
17505         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
17506
17507 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
17508
17509         * gc.h, gc-internal.h: Rename header for GC internal calls to
17510         gc-internal.h from gc.h as to not clash with Boehm GC having its
17511         header installed as <gc.h> in outside include paths.
17512         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
17513         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
17514
17515 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17516
17517         * icall.c: assign minor, build and revision in FillName.
17518
17519 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
17520
17521         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
17522         Added support for running code generated by Reflection.Emit.
17523
17524 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17525
17526         * appdomain.c: check for NULL argument in LoadFrom.
17527
17528 2002-12-10  Dick Porter  <dick@ximian.com>
17529
17530         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
17531
17532 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17533
17534         * appdomain.c: fix buglet when building exe file name.  Handle full
17535         assembly name (needed after latest changes to AssemblyName).
17536         * image.c:
17537         (mono_image_close): free some hashtables.
17538
17539 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
17540
17541         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
17542         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
17543         on some systems (redhat 7.3) 
17544
17545 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
17546
17547         * threads.c: delete the critical section of a sync block,
17548         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
17549
17550 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
17551
17552         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
17553
17554 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17555
17556         * appdomain.[ch]: handle the assembly preload event to try loading the
17557         assemblies using the paths we have in the current domain.
17558
17559         * assembly.[ch]: created an assembly preload hook that is called to try
17560         loading the assembly by other means that the ones provided here.
17561
17562         * domain.c: initialize the domain search path.
17563
17564         From now on, assemblies (TODO: except corlib and System) are loaded
17565         according to these rules when using mono_assembly_load ():
17566
17567                 1. It tries to load the assembly from the ApplicationBase
17568                 of the current domain appending .dll and .exe (TODO: have to
17569                 try loading from name/name.dll and name/name.exe).
17570
17571                 2. It tries the search path specified in PrivateBinPath for the
17572                 current domain (if any).
17573
17574                 3. Previous behavior.
17575
17576 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
17577
17578         * icall.c: implemented GetInterfaceMap() related icall.
17579         * domain.c, loader.h: load MethodInfo in mono_defaults.
17580
17581 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17582
17583         * gc.c: disable the finalizer thread for now, untill all the issues
17584         with it are resolved.
17585
17586 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17587
17588         * string-icalls.c: handle embedded nulls in string ctor when the
17589         length is specified.
17590
17591 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17592
17593         * class.c: look for explicit interface implementation in parent
17594         classes, too.
17595
17596 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
17597
17598         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
17599
17600 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17601
17602         * gc.c: protect handles with a critical section.
17603
17604 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17605
17606         * icall.c:
17607         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
17608         parameters. If no assembly specified, try getting the type from all
17609         the assemblies in the current domain, else, load the assembly and get
17610         the type from it.
17611
17612 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17613
17614         * marshal.c: applied patch from Aleksey Demakov that fixes
17615         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
17616
17617 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17618
17619         * icall.c: fixed get_location.
17620
17621 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
17622
17623         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
17624         declarations to make it work with older gcc. 
17625
17626         * loader.c (mono_get_method): set signature->pinvoke for native calls
17627
17628 2002-11-20  Dick Porter  <dick@ximian.com>
17629
17630         * threads.c (mono_thread_init): Set the main thread's handle
17631
17632 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17633
17634         * gc.c: allow compilation without GC support. Changed to match the
17635         mono coding style.
17636
17637 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17638
17639         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
17640
17641 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
17642
17643         * reflection.c: set a public key token on the core assemblies.
17644
17645 2002-11-18  Dick Porter  <dick@ximian.com>
17646
17647         * threads.c: Split out some thread initialisation so that other
17648         files can set the start callback function.
17649
17650         * gc.c: Run finalisers in a separate thread, to avoid stack
17651         overflow.  Fixes bug 31333.
17652
17653         * appdomain.c: Set up GC finalisation thread.
17654
17655         * reflection.c: 
17656         * object.c: 
17657         * domain.c: Use gc.h macros for GC_malloc
17658         
17659 2002-11-15  Dick Porter  <dick@ximian.com>
17660
17661         * threadpool.c: 
17662         * threads.c:
17663         * appdomain.c: Removed mono_runtime_init_with_attach(),
17664         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
17665         merging the extra parameter with the existing function.  Removed
17666         unneeded code in mono_thread_attach().
17667
17668 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
17669
17670         * image.c (mono_image_loaded_by_guid): a method to get loaded
17671         images by guid. 
17672         (load_metadata_ptrs): we store the guid as string.
17673
17674 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
17675
17676         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
17677
17678         * metadata.c (mono_guid_to_string): imported method form Zoltan
17679         Varga (slightly modified)
17680
17681         * assembly.c (mono_assembly_open): load precompiled code
17682
17683         * loader.h (MonoMethod): we store the method token for use in the
17684         aot compiler. 
17685
17686 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17687
17688         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
17689         the hook function called when an assembly is loaded.
17690         
17691         * domain.c: Modified file.
17692         (mono_domain_assembly_load): removed hash table insertion of assemblies.
17693
17694         Fixes bug #33196.
17695
17696 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
17697
17698         * reflection.c: Map PEFileKind to the value expected by the WinNT
17699         image loader. 
17700
17701 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17702
17703         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
17704         Read until the buffer is filled completely.
17705
17706 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17707
17708         * icall.c: implemented MonoType.InternalGetEvent ().
17709
17710 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17711
17712         * appdomain.c: implemented InitAppDomainSetup. Delayed
17713         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
17714         the entry_assembly.
17715
17716         * assembly.c: base_dir is now an absolute path ending with
17717         G_DIR_SEPARATOR.
17718
17719         * icall.c: modified get_location according to the above changes.
17720
17721         * object.c: init AppDomain.SetupInformation for the default domain after
17722         we have the entry assembly.
17723
17724         * domain.c: when unloading a domain, setup = NULL.
17725
17726 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
17727
17728         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
17729
17730 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
17731
17732         * object.h, object.c: introduced mono_object_get_virtual_method ()
17733         to lookup the method invoked on an object when a callvirt is done on
17734         a method.
17735         * icall.c: make MethodInfo::Invoke() always do a virtual call.
17736
17737 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17738
17739         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
17740         current domain when loaded an assembly and failed to load it.
17741
17742         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
17743
17744 2002-10-31  Dick Porter  <dick@ximian.com>
17745
17746         * icall.c: 
17747         * file-io.h: 
17748         * file-io.c: Return the error status in a parameter, as the
17749         GetLastError() value has long since been blown away if we try and
17750         look it up in a subsequent internal call invocation.  Delete the
17751         GetLastError() internal call, because it's useless.
17752
17753 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
17754
17755         * class.[ch]: added cast_class to fix bug 29517
17756
17757 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
17758
17759         * marshal.c: create valid IL code in the filter clause:
17760         the new JIT is less forgiving:-)
17761
17762 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17763
17764         * icall.c: removed get_property internal call.
17765
17766 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
17767
17768         * appdomain.h domain.c: Added an ID to appdomains.
17769         
17770         * threads.c threads.h icall.c: Implement icall
17771         Thread:GetDomainID(), and remove unused icall 
17772         CurrentThreadDomain_internal.
17773
17774 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17775
17776         * icall.c: Don't recurse through the base types in GetConstructor.
17777         Fixes bug #32063. 
17778
17779 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17780
17781         * mempool.h, mempool.c: added mono_mempool_empty() and
17782         mono_mempool_stats().
17783
17784 2002-10-23  Dick Porter  <dick@ximian.com>
17785
17786         * file-io.c: 
17787         * file-io.h: 
17788         * icall.c: Added MonoIO.GetFileType internal call
17789
17790 2002-10-17  Dick Porter  <dick@ximian.com>
17791
17792         * appdomain.c (mono_runtime_cleanup): Don't signal the async
17793         delegate semaphore before waiting for all threads to finish,
17794         because new threads can also call async delegates.  Fixes bug
17795         32004.
17796
17797         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
17798         of 3 seconds, in case another async job is queued.  (This part is
17799         needed because the bug fix reintroduced the 3s exit lag.)  This
17800         makes the mono_runtime_shutdown flag superfluous.
17801
17802 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17803
17804         * reflection.c: include ehader size in method section headers.
17805         Really check for suplicated modules entries.
17806
17807 2002-10-17  Martin Baulig  <martin@gnome.org>
17808
17809         * debug-mono-symfile.c: Added back support for locals.
17810
17811 2002-10-14  Martin Baulig  <martin@gnome.org>
17812
17813         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
17814         MONO_TYPE_VOID.
17815
17816 2002-10-14  Martin Baulig  <martin@gnome.org>
17817
17818         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
17819         mono_class_get() instead of looking in the class cache. 
17820
17821 2002-10-13  Martin Baulig  <martin@gnome.org>
17822
17823         * debug-mono-symfile.c: Set version number to 28, include the
17824         signature in method names.
17825
17826 2002-10-13  Martin Baulig  <martin@gnome.org>
17827
17828         * debug-mono-symfile.h: Set version number to 27.
17829
17830 2002-10-11  Martin Baulig  <martin@gnome.org>
17831
17832         * gc.c: Don't register/unregister NULL pointers as disappearing links.
17833
17834 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17835
17836         * metadata.c, metadata.h: added helper function to allocate signatures.
17837
17838 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17839
17840         * icall.c: added internal call to get the location of machine.config.
17841
17842 2002-10-08  Martin Baulig  <martin@gnome.org>
17843
17844         * debug-mono-symfile.c: Ignore classes with a pending init for the
17845         moment.
17846
17847 2002-10-03  Dick Porter  <dick@ximian.com>
17848
17849         * threads.c: Freebsd pthread_t is a pointer
17850
17851 2002-10-03  Dick Porter  <dick@ximian.com>
17852
17853         * socket-io.c: Implemented GetHostName_internal
17854
17855 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17856
17857         * mono-config.c:
17858         (mono_config_parse_file): don't leak the text.
17859
17860 2002-10-02  Martin Baulig  <martin@gnome.org>
17861
17862         * debug-mono-symfile.c: Added support for methods.
17863
17864 2002-10-01  Martin Baulig  <martin@gnome.org>
17865
17866         * debug-mono-symfile.c: Don't emit methods and line numbers for
17867         the dynamic symbol file, just write the type table.  We can easily
17868         have an external helper program which creates a symbol file for an
17869         IL file.        
17870
17871 2002-10-01  Dick Porter  <dick@ximian.com>
17872
17873         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
17874         Only add the handle to the cleanup array when we're about to
17875         launch the thread.  Bug 31425 deadlocked when the test was run on
17876         mono under w32.
17877
17878 2002-10-01  Martin Baulig  <martin@gnome.org>
17879
17880         * debug-mono-symfile.c: Added support for properties.
17881
17882 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17883
17884         * reflection.c: unaligned store fix from Mark Crichton
17885         <crichton@gimp.org>.
17886
17887 2002-09-27  Martin Baulig  <martin@gnome.org>
17888
17889         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
17890         New interncall.
17891
17892 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17893
17894         * assembly.h, assembly.c: use a sane API to hook into the assembly
17895         loading process instead of a useless special-purpouse hack
17896         (ngen needs a hook, too, for example).
17897
17898 2002-09-27  Dick Porter  <dick@ximian.com>
17899
17900         * threads.c (mono_thread_init): Call GetCurrentProcess() so
17901         io-layer can set up some process handle info.  Not needed on w32,
17902         but doesn't hurt either.
17903
17904         * process.c: Pass the program name in the second parameter to
17905         CreateProcess, so the path is searched.  Include the working
17906         directory. Implemented process name, process enumeration, and some
17907         process detail internal calls.
17908         
17909         * icall.c: Added internal calls for process lookup, and some
17910         process details
17911
17912 2002-09-26  Martin Baulig  <martin@gnome.org>
17913
17914         * assembly.c (mono_install_open_assembly_hook): New global
17915         function to install a function to be invoked each time a new
17916         assembly is loaded.
17917         (mono_assembly_open): Run this callback function if set.
17918
17919         * debug-mono-symfile.c: Put back line numbers for the dynamic
17920         symbol file and also record the .il file as source file.  This
17921         allows us to install the temporary symbol file as `file.dbg' just
17922         like a compiler-generated one.
17923
17924 2002-09-26  Nick Zigarovich <nick@chemlab.org>
17925
17926         * Corrected typo in gc.c (BOHEM vs BOEHM).
17927
17928 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17929
17930         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
17931         GetProperties. Also avoid calling g_slist_length in GetProperties and
17932         GetMethods.
17933
17934 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17935
17936         * reflection.c: avoid unaligned stores (bug spotted by
17937         Mark Crichton  <crichton@gimp.org>).
17938
17939 2002-09-25  Martin Baulig  <martin@gnome.org>
17940
17941         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
17942         instead of guint64 for addresses and added prologue/epilogue info.
17943
17944 2002-09-25  Martin Baulig  <martin@gnome.org>
17945
17946         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
17947         store line number info.  For the dynamic symbol file, we only need
17948         to provide the JIT generated dynamic line number info for the dynamic
17949         symbol file.
17950
17951 2002-09-25  Martin Baulig  <martin@gnome.org>
17952
17953         * debug-mono-symfile.h: Incremented version number.
17954
17955 2002-09-24  Martin Baulig  <martin@gnome.org>
17956
17957         * class.c (mono_debugger_class_init_func): New global function
17958         pointer variable.
17959         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
17960         call it.
17961
17962         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
17963         function.  This is called via the mono_debugger_class_init_func
17964         hook to add all types to the dynamic type table.
17965         (ves_icall_MonoDebugger_GetType): New interncall to get a class
17966         from its metadata token.
17967
17968         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
17969         New interncall for the debugger.
17970
17971 2002-09-24  Nick Drochak <ndrochak@gol.com>
17972
17973         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
17974         before using it in case it is null.
17975         
17976 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17977
17978         * metadata.c: allow custom modifiers in local var signatures
17979         (bug spotted by Zoltan Varga).
17980
17981 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17982
17983         * class.c: deal with the <Module> class that may have a NULL vtable.
17984         Eliminate warnings.
17985
17986 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17987
17988         * image.c, image.h: more strong name helpers.
17989         * monosn.c: more work: convert pem keys to cryptoapi format.
17990
17991 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17992
17993         * string-icalls.c: speedup IndexOf.
17994
17995 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17996
17997         * icall.c: updates from Zoltan.2.Varga@nokia.com.
17998
17999 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18000
18001         * icall.c: cleanup: use mono_object_domain ().
18002
18003 2002-09-23  Martin Baulig  <martin@gnome.org>
18004
18005         * debug-mono-symfile.c: Improved type support.
18006
18007 2002-09-22  Martin Baulig  <martin@gnome.org>
18008
18009         * debug-mono-symfile.c: Added support for reference types and strings.
18010
18011 2002-09-22  Martin Baulig  <martin@gnome.org>
18012
18013         * debug-mono-symfile.c: Started to work on the type table.
18014
18015 2002-09-21  Martin Baulig  <martin@gnome.org>
18016
18017         * debug-mono-symfile.c: Largely reworked the symbol table format.
18018         The symbol table is now incrementally updated each time a new
18019         method is added.  We're now also using our own magic and version
18020         so that you don't need to recompile all your classes if the
18021         dynamic table changes.
18022         (mono_debug_update_mono_symbol_file): Removed.
18023         (mono_debug_symfile_add_method): New function to add a method.
18024
18025 2002-09-21  Martin Baulig  <martin@gnome.org>
18026
18027         * icall.c
18028         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
18029         New interncall.
18030
18031         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
18032         New interncall to get a method from its metadata token.
18033
18034 2002-09-21  Martin Baulig  <martin@gnome.org>
18035
18036         * debug-mono-symfile.c: Create type table.
18037
18038 2002-09-20  Martin Baulig  <martin@gnome.org>
18039
18040         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
18041
18042 2002-09-20  Martin Baulig  <martin@gnome.org>
18043
18044         * debug-mono-symfile.c: Provide information about params and locals.
18045
18046 2002-09-20  Martin Baulig  <martin@gnome.org>
18047
18048         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
18049         New interncall.
18050
18051         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
18052         interncall to get a method from its metadata token.
18053
18054 2002-09-20  Martin Baulig  <martin@gnome.org>
18055
18056         * debug-mono-symfile.c: Added a few checks for method->header
18057         being non-NULL.  This should never happen, but for the moment
18058         let's use a g_warning() rather than a g_assert().
18059
18060 2002-09-19  Mark Crichton  <crichton@gimp.org>
18061
18062         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
18063         even if support for it isn't present.  Added an #ifdef to fix this.
18064
18065         * socket-io.c: Added checks back for Solaris support.
18066
18067 2002-09-19  Martin Baulig  <martin@gnome.org>
18068
18069         * debug-mono-symfile.c (read_string, write_string): Reflect latest
18070         changes in the symbol file format.
18071
18072 2002-09-18  Martin Baulig  <martin@gnome.org>
18073
18074         * debug-mono-symfile.c: Set version number to 21.
18075
18076 2002-09-18  Dick Porter  <dick@ximian.com>
18077
18078         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
18079         on netbsd.  Fixes bug 30051.
18080
18081 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18082
18083         * reflection.c:
18084         (set_version_from_string): little fix.
18085
18086 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18087
18088         * monosn.c, Makefile.am: added strong name utility.
18089         * reflection.h, reflection.c: implemented delayed signing,
18090         locale, version and hash id assembly attributes.
18091
18092 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18093
18094         * loader.c, metadata.c: load param attributes in signatures.
18095
18096 2002-09-16  Martin Baulig  <martin@gnome.org>
18097
18098         * debug-mono-symfile.c: Added string table with all method names.
18099
18100 2002-09-14  Martin Baulig  <martin@gnome.org>
18101
18102         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
18103         fast method lookup.
18104
18105 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18106
18107         * reflection.c: record the public key token of referenced assemblies.
18108
18109 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18110
18111         * image.c, image.h: added functions to get the strong name and the
18112         public key of an assembly.
18113         * pedump.c: use them.
18114
18115 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
18116
18117         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
18118
18119 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
18120
18121         * marshal.c (mono_marshal_get_managed_wrapper): Added
18122         MONO_TYPE_BOOLEAN 
18123
18124 2002-09-11  Martin Baulig  <martin@gnome.org>
18125
18126         * gc.c: Call GC_unregister_disappearing_link() on all links when
18127         finalizing them, this is necessary to aviod a crash in boehm's
18128         finalize handler.
18129
18130 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18131
18132         * gc.c: handle GetTarget for finalized objects spotted and fixed by
18133         nick@chemlab.org.
18134
18135 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
18136
18137         * icall.c: implemented MonoType::Module.
18138         * reflection.c, reflection.h: mono_module_get_object () from
18139         Tomi Pakarinen <tomi.pakarinen@welho.com>.
18140
18141 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18142
18143         * icall.c: ignore overridden methods in GetMethods ().
18144         Fix for FieldInfo::SetValue().
18145         * object.c: handle float/double in runtime invoke.
18146
18147 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18148
18149         * object.c: allow a constructor to be called again on an object.
18150
18151 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18152
18153         * class.h, class.c: move field layout code to it's own function and
18154         export it. Get an interface id earlier. Move fields in MonoClass
18155         so they are more cache friendly and align the bitfields.
18156         * loader.c: temporary handle get_param_names() for a runtime method.
18157         * reflection.c, reflection.h: more code to handle runtime creation of
18158         types.
18159
18160 2002-09-09  Martin Baulig  <martin@gnome.org>
18161
18162         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
18163         signature with the pinvoke field being set for the actual call.
18164
18165 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18166
18167         * icall.c: removed some unused icalls. Start of map of glib charsets
18168         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
18169
18170 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18171
18172         * debug-helpers.c: break infinite loop (found and fixed by
18173         Holger Arnold <harnold@gmx.de>).
18174
18175 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18176
18177         * icall.c: target may be null in create_delegate.
18178
18179 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18180
18181         * marshal.c: handle a boolean return type.
18182
18183 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18184
18185         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
18186
18187 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18188
18189         * gc.c: fix weakreferences.
18190
18191 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18192
18193         * icall.c: added icall to get default codepage.
18194
18195 2002-09-03  Dick Porter  <dick@ximian.com>
18196
18197         * threads.h: 
18198         * threads.c: Use MonoThread instead of MonoObject where
18199         apropriate.
18200
18201         Store running thread objects in a hash table, so that we have all
18202         the info to hand when waiting for them to finish
18203         (means we don't need OpenThread() any more, so mingw builds should
18204         be fully functional again.)
18205
18206         * verify.c:
18207         * object.h: Added thread ID to MonoThread
18208
18209 2002-09-03  Martin Baulig  <martin@gnome.org>
18210
18211         * icall.c (System.Reflection.Assembly::get_location): New interncall.
18212
18213 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18214
18215         * icall.c: fixed leak in get_temp_path. Thanks lupus.
18216
18217 2002-09-03  Martin Baulig  <martin@gnome.org>
18218
18219         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
18220         argument to store the end address of the disassembled instruction.
18221
18222         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
18223         here from debug-symfile.h.
18224         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
18225         JIT into this struct.
18226         (MonoSymbolFile): Added `char *image_file' field.
18227         (MonoDebugGetMethodFunc): Removed.
18228         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
18229         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
18230         (mono_debug_find_method): New method.
18231
18232         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
18233         create a full symbol file.
18234         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
18235         and static symbol files.
18236         (mono_debug_find_method): The symbol file keeps an internal method hash,
18237         call this to get a MonoDebugMethodInfo from a MonoMethod.
18238
18239         * debug-symfile.[ch]: Removed.
18240
18241 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
18242
18243         * image.c (do_mono_image_open): Remove linker version check.
18244
18245 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
18246
18247         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
18248         wrappers for instance methods.
18249         
18250 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18251
18252         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
18253
18254 2002-08-28  Dick Porter  <dick@ximian.com>
18255
18256         * Makefile.am: Export HOST_CC for w32 builds
18257
18258 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18259
18260         * file-io.c process.c: MonoString are null terminated, no
18261         need for mono_string_to_utf16() anymore.
18262
18263 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18264
18265         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
18266
18267 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
18268
18269         * icall.c, reflection.h: speedup System.MonoType.
18270
18271 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18272
18273         * reflection.c: allow null as the value of a string argument in
18274         custom attributes constructors.
18275
18276 2002-08-27  Martin Baulig  <martin@gnome.org>
18277
18278         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
18279         `trampoline_address' field.
18280
18281 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
18282
18283         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
18284         check (fixes bug #29486) 
18285
18286 2002-08-27  Martin Baulig  <martin@gnome.org>
18287
18288         * debug-mono-symfile.c: Changed the file format in a way that allows us
18289         open it read-only and to use a specially malloced area for all the
18290         dynamic data.  We can now also generate a symbol file on-the-fly if we're
18291         debugging IL code and there is no MCS generated symbol file for it.
18292
18293 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18294
18295         * object.c: added a define for a good string and array
18296         creation speedup (not enabled by default because we need to deal with
18297         the synch stuff).
18298
18299 2002-08-26  Martin Baulig  <martin@gnome.org>
18300
18301         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
18302         function to create a dynamic symbol file.  This is used by the
18303         debugger to create a symbol file for IL code on-the-fly.
18304
18305 2002-08-26  Martin Baulig  <martin@gnome.org>
18306
18307         * loader.c (mono_lookup_pinvoke_call): Include the error message
18308         from g_module_error() in the error message.
18309
18310 2002-08-24  Martin Baulig  <martin@gnome.org>
18311
18312         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
18313         function to update the symbol file.  The symbol file is mmap()ed
18314         writable, but private.  This allows us to install the symbol file
18315         together with the assembly.
18316
18317 2002-08-24  Martin Baulig  <martin@gnome.org>
18318
18319         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
18320         but they can read the new symbol file format which mcs is now creating.
18321
18322         * debug-symfile.c (mono_debug_find_source_location): Moved to
18323         debug-mono-symfile.c; this is now operating on the new symbol file.
18324
18325 2002-08-23  Martin Baulig  <martin@gnome.org>
18326
18327         * debug-helpers.c (mono_method_desc_from_method): New function to get
18328         a MonoMethodDesc from a MonoMethod.
18329
18330 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18331
18332         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
18333         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
18334
18335 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18336
18337         * string-icalls.[ch]: make helper methods static.
18338
18339 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18340
18341         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
18342         types to it and to SetValueInternal.
18343
18344         * object.c: Moved handle_enum label to its proper place. This was the
18345         f... bug! ;-)
18346
18347         This time i compiled mcs and gtk-sharp and they both work.
18348
18349 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18350
18351         * icall.c: reverted partially my previous patch until 
18352         object.c:set_value handles enums correcly.
18353
18354 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18355
18356         * icall.c:
18357         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
18358         (ves_icall_System_Environment_get_MachineName): removed warning when
18359         compiling under cygwin.
18360
18361 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18362
18363         * object.c: fixed field_get_value() for reference types.
18364
18365 2002-08-22  Dick Porter  <dick@ximian.com>
18366
18367         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
18368         Don't free a buffer while it's still needed.  Patch from Jonathan
18369         Liger <Jonathan.liger@wanadoo.fr>
18370
18371 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
18372
18373         * icall.c (ves_icall_System_Environment_get_Platform): Add new
18374         internal call.
18375
18376 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
18377
18378         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
18379         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
18380
18381         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
18382         we call unmanaged code which throws exceptions.
18383
18384 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18385
18386         * appdomain.h: added per-domain entry_assembly.
18387         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
18388         arguments.
18389         * icall.c: Assembly::GetEntryAssembly icall.
18390         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
18391         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
18392
18393 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18394
18395         * appdomain.h, gc.c: added mono_domain_finalize ().
18396
18397 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18398
18399         * object.c:
18400         (mono_print_unhandled_exception): changed g_warning by g_printerr
18401         because g_log has a 1024 characters limit (yeah, i got a big stack
18402         trace). Don't print exception name, that should be in ToString 
18403         returned string.
18404
18405 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18406
18407         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
18408         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
18409
18410 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18411
18412         * object.c:
18413         (mono_print_unhandled_exception): after previous commit, i realized
18414         that MS calls ToString on the exception. I changed this function to
18415         do that. This way we get stack_trace for free.
18416
18417 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18418
18419         * object.c:
18420         (mono_print_unhandled_exception): invoke Message property instead of
18421         getting 'message' field from Exception. Don't allocate memory for
18422         'trace' and 'message' if not needed.
18423
18424 2002-08-18  Dick Porter  <dick@ximian.com>
18425
18426         * unicode.c: Fix asserts to match Encoder.cs checks
18427
18428 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18429
18430         * marshal.c: fix unaligned store issue and a few wrong
18431         opcode argument types.
18432
18433 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18434
18435         * icall.c: added GetUninitializedObjectInternal internal call.
18436
18437 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
18438
18439         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
18440         to the right domain.
18441
18442 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
18443
18444         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
18445
18446         * class.c (class_compute_field_layout): set blittable to false for Strings
18447
18448         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
18449
18450 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18451
18452         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
18453         first chunk of code to create types at runtime. Code to
18454         handle ReflectedType/DeclaringType. Make reflection handles
18455         domain specific.
18456
18457 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
18458
18459         * class.c: set correct name in arrays.
18460
18461 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
18462
18463         * appdomain.c (mono_domain_transfer_object): make it work with
18464         valuetypes. bug fixes.
18465
18466 2002-08-12  Dick Porter  <dick@ximian.com>
18467
18468         * object.h: Rename some parameters to avoid c++ keywords (Patch
18469         from Joseph Wenninger <kde@jowenn.at>)
18470
18471 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
18472
18473         * icall.c: added icall to implement Assembly.GetFile*.
18474
18475 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18476
18477         * reflection.h, reflection.c: code to embed managed resources.
18478
18479 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18480
18481         * class.c: move all the type size stuff into
18482         class_compute_field_layout().
18483
18484 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18485
18486         * class.c: ensure enums have always the correct instance size.
18487         * unicode.c: remove wrong assert.
18488
18489 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18490
18491         * assembly.c: fix mem corruption issue.
18492         * image.h, image.c: added mono_image_get_resource () to access
18493         managed resources.
18494         * icall.c: implemented Assembly.EntryPoint property and some
18495         Managed Resources related internalcalls.
18496
18497
18498 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
18499
18500         * image.c, image.h: impemented mono_image_get_entry_point ().
18501         * appdomain.c: use mono_image_get_entry_point.
18502
18503 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18504
18505         * reflection.c: support the object type argument when loading
18506         custom attributes.
18507
18508 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
18509
18510         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
18511         String as return type.
18512
18513 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
18514
18515         * reflection.c: fix encoding of named args for custom attrs to match
18516         the ms implementation. Read them back when instantiating custom
18517         attributes.
18518
18519 2002-08-02  Radek Doulik  <rodo@ximian.com>
18520
18521         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
18522         by Dietmar as quick fix
18523         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
18524         16 as stack size, used on more places as quick fix before Dietmar
18525         will fix it properly
18526
18527 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
18528
18529         * object.h, object.c: added accessors for fields and properties.
18530
18531 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
18532
18533         * class.c, class.h: made mono_class_get_field_from_name ()
18534         loop on parent types.
18535         Added mono_class_get_property_from_name ().
18536
18537 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18538
18539         * class.c, class.h: move the code to setup the type vtable in its own
18540         function so that it can be reused also for types created at runtime.
18541         Eliminate the "class" identifier from the header file.
18542         * reflection.c: setup the vtable for enums so that we can create
18543         objects for use in SetConstant ().
18544
18545 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
18546
18547         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
18548         instead of the delegate itself as this pointer (bug #28383)
18549
18550 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
18551
18552         * marshal.c (mono_marshal_get_managed_wrapper): added return type
18553         conversions.
18554
18555 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18556
18557         * loader.c: don't set the pinvoke bit on icalls.
18558
18559 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
18560
18561         * debug-helpers.c (mono_method_full_name): only print a number to
18562         indicate wrapper type (so that the output is more readable in traces).
18563
18564 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
18565
18566         * class.c (mono_class_init): include method override patch from Paolo
18567
18568 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
18569
18570         * icall.c: fixed GetTypeCode().
18571
18572 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
18573
18574         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
18575         use real delegate invoke function to make it work with multicast
18576         delegates (fix bug# 28291).
18577
18578 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18579
18580         * object.c: load constant strings.
18581
18582 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18583
18584         * reflection.c: no magic numbers.
18585         * tabledefs.h: security action enum.
18586
18587 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18588
18589         * assembly.c: fix possible memory corruption.
18590
18591 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18592
18593         * reflection.h, reflection.c: added support for linking resources.
18594         * verify.c: check we have an updated corlib.
18595
18596 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
18597
18598         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
18599         string arrays.
18600         (mono_marshal_string_array): null terminate unmanaged string arrays.
18601         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
18602
18603 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18604
18605         * icall.c: Type.GetType () can now return also types from the
18606         calling assembly.
18607
18608 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18609
18610         * loader.h, loader.c: stack walking support.
18611         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
18612         GetCallingAssembly.
18613
18614 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
18615
18616         * marshal.c: added optimisations for blittable types 
18617
18618         * class.c (mono_array_class_get): do not set blittable attribute on arrays
18619         (mono_class_setup_mono_type): set blittable attribute for single
18620         and double.
18621
18622         * marshal.c (mono_string_utf8_to_builder): impl.
18623         (mono_string_builder_to_utf8): impl.
18624         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
18625
18626 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
18627
18628         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
18629         (mono_marshal_get_managed_wrapper): impl. byref types
18630
18631 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18632
18633         * icall.c:
18634         (search_method): don't display debug message. 
18635
18636 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
18637
18638         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
18639
18640 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
18641
18642         * appdomain.c: set the missing filename when throwing exception.
18643
18644 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
18645
18646         * metadata.c (mono_type_size): code cleanup
18647         (mono_type_stack_size): removed some test code
18648
18649 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
18650
18651         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
18652         mono_get_exception_file_not_found now.
18653
18654         * exception.c (mono_exception_from_name_two_strings): New version
18655         that will call a constructor with two string arguments. 
18656         (mono_get_exception_file_not_found): New helper routine, used to
18657         report file-not-found errors.
18658
18659 2002-07-20  Dick Porter  <dick@ximian.com>
18660
18661         * process.h:
18662         * process.c: Pass file handles to CreateProcess
18663         
18664         * icall.c:
18665         * file-io.h:
18666         * file-io.c: Implemented CreatePipe
18667
18668 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
18669
18670         * metadata.c (mono_get_param_info): set alignment for value types
18671
18672 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18673
18674         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
18675         Constify mono_domain_assembly_open().
18676         * loader.c: handle null namespace in icalls.
18677
18678 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
18679
18680         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
18681         (emit_str_to_ptr_conv): marshal object as structs
18682
18683         * metadata.c (mono_type_to_unmanaged): marshal object as structs
18684
18685         * marshal.c (mono_marshal_get_runtime_invoke): support value types
18686
18687 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
18688
18689         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
18690         (mono_marshal_get_native_wrapper): we an now return value types
18691
18692 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18693
18694         * verify.c: more checks implemented.
18695
18696 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
18697
18698         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
18699         (fix bug #27695)
18700         (mono_marshal_get_native_wrapper): allow byref arguments
18701         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
18702         impl. PtrToStringXXX methods
18703         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
18704         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
18705         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
18706         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
18707         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
18708
18709 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18710
18711         * reflection.c: fix buglet in parsing an assembly name.
18712
18713 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
18714
18715         * marshal.c (emit_ptr_to_str_conv): first impl.
18716
18717 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18718
18719         * object.c, class.h: cache the vtable in the class as suggested by
18720         vargaz@freemail.hu (Zoltan Varga).
18721
18722 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18723
18724         * class.h, loader.c: added mono_field_from_token().
18725         * verify.c: first cut of type checking code.
18726
18727 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
18728
18729         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
18730
18731 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
18732
18733         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
18734         (fix bug #27782)
18735         (mono_marshal_get_remoting_invoke): impl.
18736         (mono_delegate_begin_invoke): impl.
18737         (mono_mb_emit_save_args): impl.
18738         (mono_delegate_end_invoke): impl.
18739         (mono_marshal_get_delegate_begin_invoke):
18740         (mono_marshal_get_delegate_end_invoke):
18741         (mono_marshal_get_delegate_invoke): generate a special name for
18742         those methods (including the signature) and associate them whith
18743         the delegate class. 
18744
18745 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
18746
18747         * reflection.[ch]: 
18748         (mono_reflection_type_from_name): now it has a MonoImage parameter
18749         which is used as the default image to search the type in. If the image
18750         is NULL or getting the type from it fails, it defaults to corlib.
18751
18752         * icall.c: changed 1 call to mono_reflection_type_from_name to match
18753         new parameter.
18754
18755 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18756
18757         * reflection.c: update the parameter table index.
18758
18759 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18760
18761         * domain.c: don't include the mark byte in the string hash.
18762
18763 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18764
18765         * icall.cs: icall for Type.GetTypeCode ().
18766         * verify: a couple of fixes and disabled local initialization checks.
18767
18768 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
18769
18770         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
18771
18772         * debug-helpers.c (mono_method_full_name): print the type of the
18773         runtime wrapper
18774
18775         * metadata.c (mono_signature_hash): a hash function for signatures
18776         (mono_signature_hash): better hash algorithm
18777
18778         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
18779
18780         * debug-helpers.c (mono_method_full_name): this can now generate
18781         method names with signatures
18782
18783         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
18784         method dont have this pointers.
18785
18786 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18787
18788         * reflection.c: fixup typebuilder tokens.
18789         * image.c: fix buglet.
18790         * marshal.h: remove whitespace.
18791         * metadata.h, metadata.c: reinstate code that was removed.
18792         * verify.c: handle catch directives and fix another couple of bugs.
18793
18794 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
18795
18796         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
18797         (mono_marshal_get_native_wrapper): make it comp. with the old code
18798         (mono_marshal_get_native_wrapper): support boolean
18799         (mono_marshal_get_managed_wrapper): support more types
18800
18801 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
18802
18803         * class.c (class_compute_field_layout): compute class->blittable attribute.
18804
18805 2002-07-09  Dick Porter  <dick@ximian.com>
18806
18807         * threads.c: Make the thread cleaning up cope with threads that
18808         call ExitThread()
18809
18810 2002-07-08  Radek Doulik  <rodo@ximian.com>
18811
18812         * reflection.c (method_encode_code): use non-translated values to
18813         compute finally_start, this fixes exception handling on ppc, yay!
18814
18815         * decimal.h (struct signscale): fix endianess
18816
18817 2002-07-07  Radek Doulik  <rodo@ximian.com>
18818
18819         * reflection.c: swap box_val and not val
18820
18821 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
18822
18823         * reflection.c, reflection.h: handle full assembly info in type name.
18824         Handle Type arguments when loading custom attributes.
18825         * icall.c: updated to use new mono_reflection_type_from_name () method.
18826
18827 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18828
18829         * loader.c:
18830         (method_from_memberref): also print assembly name when method not found.
18831
18832 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18833
18834         * icall.c:
18835         (ves_icall_TypeGetProperties): fixed bug #27473. 
18836
18837 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18838
18839         * reflection.c: display image name and token when cannot find the
18840         .ctor for an attribute.
18841
18842 2002-07-05  Martin Baulig  <martin@gnome.org>
18843
18844         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18845
18846 2002-07-04  Dick Porter  <dick@ximian.com>
18847
18848         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
18849         compile on mingw.  This will cause mingw builds to not wait for
18850         subthreads to terminate after the main thread does.  I've lodged a
18851         bug with the mingw developers for them to wrap OpenThread().
18852
18853 2002-07-03  Dick Porter  <dick@ximian.com>
18854
18855         * threads.c: Store thread IDs instead of handles, because
18856         GetCurrentThread() returns a pseudohandle and therefore stores
18857         useless values.  mono_thread_cleanup() continues checking the
18858         array of threads until it is empty, to cope with subthreads
18859         spawning new threads after the main thread has finished.
18860
18861         * profiler.h:
18862         * profiler.c:
18863         * profiler-private.h: Pass the thread ID to thread profiler
18864         functions, instead of a handle
18865
18866 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18867
18868         * verify.c: fixes to make it more usable.
18869         * pedump.c: added --verify code to verify IL code in an assembly.
18870
18871 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18872
18873         * reflection.c: turn errors into warnings to allow compiling corlib.
18874
18875 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
18876
18877         * reflection.c: add special cases to compile corlib.
18878
18879 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18880
18881         * reflection.c: handle properties with only a set method.
18882
18883 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18884
18885         * opcodes.h: add enum with opcodes in opval order.
18886
18887 2002-07-01  Dick Porter  <dick@ximian.com>
18888         
18889         * object.h:
18890         * object.c (mono_runtime_run_main): Removed unneeded argument
18891
18892 2002-06-28  Martin Baulig  <martin@gnome.org>
18893
18894         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
18895
18896 2002-06-27  Dick Porter  <dick@ximian.com>
18897
18898         * threads.c: Store the handle in both the parent thread and in the
18899         subthread, to minimise the time between starting a new thread and
18900         storing its ID.
18901
18902 2002-06-26  Dick Porter  <dick@ximian.com>
18903
18904         * appdomain.c (mono_runtime_cleanup): Close the socket library
18905         after all the threads have finished, not before
18906
18907 2002-06-26  Martin Baulig  <martin@gnome.org>
18908
18909         * debug-symfile.c (mono_debug_find_source_location): Added
18910         `guint32 *line_number' argument.  If it's not NULL, store the line number
18911         there and return the file name without the line number.
18912
18913 2002-06-25  Dick Porter  <dick@ximian.com>
18914
18915         * icall.c:
18916         * process.h:
18917         * process.c: Process forking and other support functions
18918
18919 2002-06-25  Dick Porter  <dick@ximian.com>
18920
18921         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
18922         things dont happen when the image is closed.
18923         (mono_image_lookup_resource): Walk the resource section looking
18924         for a particular entry
18925
18926         * cil-coff.h: PE resource section decoding
18927
18928 2002-06-25  Dick Porter  <dick@ximian.com>
18929         
18930         * assembly.h:
18931         * assembly.c: 
18932         (mono_assembly_foreach): Accessor functions to walk the list of
18933         loaded assemblies
18934         (mono_assembly_set_main):
18935         (mono_assembly_get_main): Process methods need to know which
18936         assembly is the "main" one
18937
18938         * object.c (mono_runtime_run_main): Record the main assembly
18939
18940         * debug-helpers.c: Fix typo
18941
18942 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
18943
18944         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
18945         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
18946
18947 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18948
18949         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
18950
18951 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
18952
18953         * image.c (do_mono_image_open): Initialize reference count,
18954         otherwise we leak the MonoImage.
18955
18956 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18957
18958         * reflection.c: small tweak to handle self-hosting.
18959
18960 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
18961
18962         * reflection.c: fix type name parse code.
18963
18964 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18965
18966         * reflection.c: break out of the loop.
18967         * image.c: special case corlib.
18968
18969 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18970
18971         * reflection.c: add all the custom attrs at the end to ensure the
18972         ctors have been properly initialized when the attributes are defined
18973         in the current assembly.
18974
18975 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
18976
18977         * reflection.c: handle correctly multiple-nested types.
18978
18979 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
18980
18981         * row-indexes.h: fix typos.
18982         * reflection.c: adjust for typos and fix method_def_or_ref
18983         encoding in MethodImpl table.
18984
18985 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18986
18987         * reflection.c: fix entry point patching (thanks Serge!).
18988
18989 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
18990
18991         * verify.c: add check for System.Exception
18992
18993 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
18994
18995         * image.c, class.c: minifix for code just c&p'ed.
18996         * reflection.c: warning fix.
18997         * object.h, loader.h, domain.c: load also StringBuilder.
18998
18999 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
19000
19001         * marshal.h, marshal.c: some support code to handle complex marshaling.
19002
19003 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19004
19005         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
19006         Better signatures with vtable error dump.
19007
19008 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
19009
19010         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
19011
19012 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
19013
19014         * icall.c (ves_icall_Type_GetField): impl.
19015
19016 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19017
19018         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
19019         to retrieve a marshal description blob for a field or param.
19020
19021 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
19022
19023         * reflection.h, reflection.c: change order of nested type emission
19024         to avoid table corruption. The NestedTypes table is sorted.
19025         * icall.c: change order of GetConstructor results to workaround mcs bug.
19026
19027 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19028
19029         * reflection.h, reflection.c: handle field and param marshal
19030         information.
19031
19032 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19033
19034         * icall.c, marshal.c marshal.h: more Marshal class implementation.
19035
19036 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19037
19038         * reflection.c: fix call convention.
19039
19040 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19041
19042         * reflection.h, reflection.c: mono_image_get_memberref_token()
19043         takes a type instead of a class, now. Added
19044         mono_image_get_array_token() to create tokens for the special
19045         multi-dim array methods.
19046
19047 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19048
19049         * assembly.c: handle modules (no assembly table). Split
19050         loading references in its own function.
19051         * class.c: handle moduleref resolution scope.
19052         * image.c, image.h: cache module name in image.
19053
19054 2002-06-07  Martin Baulig  <martin@gnome.org>
19055
19056         * reflection.c (mono_image_get_type_info): Only add a class layout entry
19057         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
19058
19059 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
19060
19061         * icall.c: more signature fixes that used uint instead of int.
19062
19063 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19064
19065         * reflection.c: fixed signature of field refs.
19066
19067 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19068
19069         * class.c, reflection.c: handle typerefs of nested types
19070         (both on read and when writing files).
19071
19072 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
19073
19074         * icall.c: fix method signatures that tried to workaround the previous
19075         typo, d'oh!
19076
19077 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19078
19079         * debug-helpers.c: fix typo.
19080
19081 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19082
19083         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
19084         rewrote the PE/COFF writing code (our programs are understood by the
19085         ms runtime, now).
19086
19087 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
19088
19089         * gc.c, gc.h, icall.c: weakreference support.
19090
19091 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19092
19093         * Makefile.am, mono-config.c: use $(sysconfdir).
19094
19095 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19096
19097         * icall.c: changed default precision of Double.ToString() to 15.
19098         Fixed memory leak. Unified with Single.ToString.
19099
19100 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
19101
19102         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
19103
19104 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
19105
19106         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
19107         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
19108         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
19109         and myself.
19110
19111 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19112
19113         * debug-symfile.c, sysmath.c: yet more compilation fixes.
19114
19115 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19116
19117         * reflection.c, socket-io.c: more compilation fixes.
19118
19119 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19120
19121         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
19122         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
19123         unicode.c: warning and compiler compatibility fixes.
19124
19125 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19126
19127         * class.h, metadata.c: fixed warnings/compilation errors.
19128
19129 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
19130
19131         * Makefile.am, mono-config.c, mono-config.h: configuration file
19132         support routines.
19133         * loader.c, loader.h: make Dll mapping configurable at runtime in the
19134         config file. Export methods to insert and lookup mappings.
19135
19136 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
19137
19138         * reflection.c: handle types and boxed objects in custom attr
19139         constructors.
19140
19141 2002-05-30  Martin Baulig  <martin@gnome.org>
19142
19143         * debug-symfile.c
19144         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
19145
19146 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
19147
19148         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
19149         to lookup the implmap row for a P/Invoke method.
19150         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
19151         P/Invoke method from the runtime on an as needed basis.
19152
19153 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
19154
19155         * metadata.c (mono_metadata_parse_signature): impl.
19156
19157 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19158
19159         * class.c: handle .pack directive.
19160
19161 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19162
19163         * object.c: initialize static fields with RVA data.
19164
19165 2002-05-25  Martin Baulig  <martin@gnome.org>
19166
19167         * debug-symfile.c
19168         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
19169
19170 2002-05-24  Martin Baulig  <martin@gnome.org>
19171
19172         * debug-symfile.c
19173         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
19174         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
19175         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
19176
19177 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19178
19179         * object.c: special case string ctros in invoke.
19180         * gc.c: silly whitespace changes.
19181
19182 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
19183
19184         * threadpool.[ch]: impl. a threadpool that can
19185         be used by mint and mono.
19186
19187 2002-05-22  Martin Baulig  <martin@gnome.org>
19188
19189         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
19190         The first argument is now a `MonoReflectionModuleBuilder *', the return
19191         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
19192         `methods' field to get the method builder.  The `token' argument is the
19193         unfixed token.
19194
19195         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
19196         invalid characters instead of g_assert_not_reached()ing.  This seems
19197         to be the behaviour of mscorlib.
19198
19199 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
19200
19201         * object.c (mono_runtime_invoke_array): applied patch from Rachel
19202         Hestilow to fix bug #25104
19203
19204 2002-05-21  Martin Baulig  <martin@gnome.org>
19205
19206         * debug-symfile.c (mono_debug_find_source_location): New function.
19207         Looks up an IL offset in the line number table and returns the source
19208         location as a string.
19209
19210 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19211
19212         * icall.c:
19213         (mono_double_ToStringImpl): changed %f by %g until we have something
19214         better.
19215
19216 2002-05-21  Nick Drochak  <ndrochak@gol.com>
19217
19218         * icall.c : Use different name for Math.Pow's icall.  Needed to check
19219         parameters first in C#.
19220
19221 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19222
19223         * icall.c, reflection.h: added icall to get info about an event.
19224
19225 2002-05-20  Radek Doulik  <rodo@ximian.com>
19226
19227         * object.c (mono_value_box): don't use memcpy for boxing on BIG
19228         endian
19229         (mono_value_box): don't use memcpy for small sizes on
19230         architectures with unaligned access
19231
19232 2002-05-20  Martin Baulig  <martin@gnome.org>
19233
19234         * reflection.c (mono_reflection_setup_internal_class): Don't crash
19235         if `tb->parent == NULL'.
19236         (mono_reflection_create_internal_class): New function.  This is
19237         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
19238         for enum types.
19239
19240         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
19241         New interncall.
19242
19243 2002-05-19  Martin Baulig  <martin@gnome.org>
19244
19245         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
19246         argument to get the length, don't default to the array length.
19247
19248 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
19249
19250         * assembly.c (mono_assembly_setrootdir): New function used to
19251         override the MONO_ASSEMBLIES directory.
19252
19253 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19254
19255         * icall.c: ValueType_GetHashCode() initialize local var.
19256
19257 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19258
19259         * reflection.c: sort custom attributes table.
19260
19261 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19262
19263         * reflection.c: support named args in custom attributes (write support).
19264
19265 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
19266
19267         * reflection.c: fix finally position calculation.
19268
19269 2002-05-15  Radek Doulik  <rodo@ximian.com>
19270
19271         * reflection.c: fixed endianess at many places
19272
19273         * icall.c (ves_icall_InitializeArray): comment out debug msg
19274
19275 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
19276
19277         * object.c (mono_unhandled_exception): new function to handle
19278         unhandled exceptions.
19279         (mono_unhandled_exception): call the UnhandledException event.
19280         (mono_runtime_delegate_invoke): impl.
19281
19282 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
19283
19284         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
19285         returns the RVA, not the direct pointer to the data. Handle the case
19286         when the class size is fixed.
19287
19288 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19289
19290         * reflection.c: fix some endianess issues.
19291
19292 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
19293
19294         * object.c (mono_runtime_invoke): is now able to catch exceptions.
19295
19296         * threads.c (mono_thread_init): added a callback which is invoked
19297         at thread start.
19298
19299 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
19300         
19301         * icall.c: make GetHashCode return non-negative values.
19302
19303 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
19304
19305         * object.c, icall.c, gc.c: revert to address-based hashcode.
19306
19307 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
19308
19309         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
19310
19311 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19312
19313         * icall.c, class.c: special case <Module>.
19314
19315 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
19316
19317         * icall.c: fix bug in GetNow().
19318
19319 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
19320
19321         * object.c (mono_runtime_class_init): make sure that we call all
19322         static class constructors.
19323
19324 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19325
19326         * reflection.c: sort methodsemantics table.
19327
19328 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19329
19330         * reflection.h, reflection.c: honour init locals setting.
19331
19332 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
19333
19334         * icall.c: copied Double ToStringImpl for Single ToStringImpl
19335
19336 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19337
19338         * reflection.c: support ContructorBuilders in attribute blob creation.
19339
19340 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19341
19342         * reflection.c: some changes to build a binary that can be run
19343         directly in windows.
19344
19345 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19346
19347         * loader.c: print a big message when an icall can't be found.
19348
19349 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19350
19351         * string-icalls.c: fix bug 24248.
19352
19353 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
19354
19355         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
19356         icall.c, reflection.h: separate assembly loading by pathname and by
19357         assembly name. Use the MONO_PATH env var to search for assemblies.
19358
19359 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19360
19361         * assembly.c, image.h: add some support for assemblies
19362         with multiple modules.
19363         * class.c, class.h: export mono_class_from_typeref().
19364         * loader.c: remove duplicated code and use mono_class_from_typeref(),
19365         instead.
19366
19367 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19368
19369         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
19370         documentation says (the ECMA one is correct).
19371
19372 2002-05-02  Dick Porter  <dick@ximian.com>
19373
19374         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
19375         Don't name the synchronisation mutex.
19376
19377 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
19378
19379         * rand.c
19380         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
19381         Make the prototypes match.
19382         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
19383         Same.
19384
19385         * icall.c
19386         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
19387         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
19388         all systems have tm.tm_zone, so use strftime() with %Z to print
19389         the timezone abreviation into a temp string.
19390
19391         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
19392         rather than mono_array_addr() on a MonoString on Big Endian
19393         machines.
19394
19395 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
19396
19397         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
19398         fix bug 24041
19399
19400 2002-04-30  Dick Porter  <dick@ximian.com>
19401
19402         * socket-io.c: Cope with SOCKET being an integer rather than a
19403         pointer now.
19404
19405         * threads.c: Added Thread_free_internal, to deal with thread
19406         handle cleanup.  Moved calls to handle_store() and handle_remove()
19407         to start_wrapper(), so each can only be called once.  Allocate
19408         synchronisation blocks with GC_malloc(), and use GC finalisation
19409         to close the handles.
19410
19411         * icall.c: added System.Threading.Thread::Thread_free_internal
19412
19413 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19414
19415         * icall.c: support Environment.Exit, CommandLineArgs().
19416
19417 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19418
19419         * object.c, object.h: added mono_runtime_run_main () and
19420         mono_runtime_get_main_args () for use in System.Environment.
19421
19422 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19423
19424         * gc.c: fix thinko, enable actual finalization since the jit is now
19425         fixed.
19426
19427 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19428
19429         * gc.c, object.c: take into account that an object may be offset wrt the address
19430         returned by GC_malloc().
19431
19432 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
19433
19434         * image.c: handle files without entries in the assembly table (modules).
19435
19436 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
19437
19438         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
19439         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
19440         allowed to be null when it's System.Object class setup.
19441
19442 2002-04-27  Martin Baulig  <martin@gnome.org>
19443
19444         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
19445         if `tb->parent == NULL' rather than crashing.
19446
19447 2002-04-28  Nick Drochak  <ndrochak@gol.com>
19448
19449         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
19450         calling acos() where asin() should have been called.
19451
19452 2002-04-26  Martin Baulig  <martin@gnome.org>
19453
19454         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
19455         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
19456         there's a subdirectory called `System', but we don't want to read that
19457         subdirectory as an assembly.
19458
19459 2002-04-25  Martin Baulig  <martin@gnome.org>
19460
19461         * debug-symfile.c: Reflect latest MonoString changes.
19462
19463 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19464
19465         * rand.c, rand.h: instance method icalls need to have an explicit
19466         this pointer as first argument in the C implementation.
19467
19468 2002-04-25  Nick Drochak <ndrochak@gol.com>
19469
19470         * icall.c: Fix typo in map for GetNonZeroBytes
19471
19472 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
19473
19474         * string-icalls.c : String does now passes unit tests without any 
19475         errors, the following changes has been made:
19476         
19477         Implemented replace methods.
19478         Renaming of methods to (try) follow the standard.
19479         Fixed compare ordinal
19480         Made all memory allocated directly to function instead of via icall function.
19481         Small performance fix in is_in_array function
19482                         
19483  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
19484
19485         c (mono_string_Internal_ctor_charp_int_int):
19486         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
19487         sindex < 0, throw ArgumentOutOfRangeException instead of
19488         ArgumentNullException.
19489
19490         Added new check for length == 0, however
19491         I need to make it return String.Empty from the C code.
19492         
19493         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
19494         that calculate the length for us here.
19495         
19496         (mono_string_Internal_ctor_sbytep_int_int): Replaced
19497         mono_string_new_utf16 with mono_string_new, since value is utf8.
19498
19499 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19500
19501         * object.c: register the object for finalization if needed.
19502         Allocate one more char in the string for the terminating 0 char.
19503
19504 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19505
19506         * class.c, class.h, image.c: check if a type implemenst a destructor.
19507         Use the proper key for array class lookups.
19508         * icall.c: register the icalls in the System.GC class.
19509         * gc.c, gc.h: GC-related functions and icalls.
19510
19511 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19512
19513         * icall.c:
19514         * socket-io.c:
19515         * unicode.c: free some strings gotten from mono_string_to_utf8 and
19516         changed a couple of free () by g_free ().
19517
19518         * decimal.c: one-liner in the comments for decimal2string ().
19519
19520 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
19521
19522         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
19523
19524 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
19525
19526         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
19527         * object.c (mono_runtime_invoke_array) : handle null in params
19528
19529 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
19530
19531         * string-icalls.c: fixed bug in split (one off bug)
19532
19533 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
19534
19535         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
19536         * icalls.c: added String::Equals as internal method
19537
19538 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
19539
19540         * threads.c: fixed bug in the double interlocked functions
19541
19542 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
19543
19544         * threads.c: implemented all of the new interlocked icalls.
19545         * string-icalls.c: fix a bug in insert.
19546         * icalls.c: added the icalls for interlocked, removed old string functions.
19547         
19548 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19549
19550         * loader.c: fix off-by-one error when reading argument names.
19551
19552 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19553
19554         * profiler.c: win32 counter implementation (untested).
19555         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
19556         (the latter needs testing and more complete impl. from win32 folks).
19557
19558 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
19559
19560         * object.c: mono_array_new_full workaround mono_array_class_get
19561         problem.
19562
19563 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19564
19565         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
19566         * object.h (mono_string_chars): Changed casting type.
19567
19568 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19569
19570         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
19571                            method signatures to use gunichar2 instead of gint16.
19572
19573 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
19574
19575         * object.h, object.c: domain-specific versions of mono_object_new and
19576         mono_array_new.
19577
19578 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
19579
19580         * object.c: changed String layout
19581
19582         * string-icalls.c (mono_string_Internal_ctor_chara): added
19583         internal string constructors.
19584
19585 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
19586
19587         * threads.c: pass 'this' to the thread start routine.
19588
19589 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19590
19591         * string-icalls.c: fix IndexOf and LastIndexOf. Now
19592         InternalCompareStr don't call twice mono_string_cmp_char for the last
19593         character. Improved performance in mono_string_cmp_char.
19594
19595 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19596
19597         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
19598         code into its own library: libmonoruntime.
19599
19600 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
19601
19602         * object.h, object.c: changed array format so that szarrays do not
19603         require a bounds structure.
19604         * icall.c, appdomain.c: support for new szarray format.
19605
19606 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
19607
19608         * metadata.c: compare also the retuns type when comparing signatures:
19609         we didn't do this as an optimization since really overloaded methods
19610         must differ also in the arguments, but this doesn't work with
19611         low-level IL code (or when using explicit conversion operators: see
19612         bug#23498 for an example).
19613
19614 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19615
19616         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
19617
19618 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19619
19620         * icall.c: make MonoType::GetElementType its own icall.
19621
19622 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
19623
19624         * icall.c: remove MonoMethod_get_Name().
19625         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
19626         object.
19627
19628 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19629
19630         * string-icalls.c: optimized a few methods.
19631
19632 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
19633
19634         * icall.c: added all new string internal calls
19635         * string-icalls.c: added, new string internal call implementation.
19636         * object.c: added mono_string_new_size for allocating a string a size
19637
19638 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
19639
19640         * object.c (mono_object_isinst): use the same code as in the
19641         optimized x86 version.
19642
19643 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19644
19645         * profiler.c: TSC-based timer code (faster and more accurate).
19646         Not hooked up in configure, yet (set USE_X86TSC to 1).
19647
19648 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
19649
19650         * profiler.c, profiler.h: track time spent compiling methods.
19651         * threads.c: track thread creation/destruction.
19652
19653 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
19654
19655         * profiler.c, profiler.h, profiler-private.h: profiling interface
19656         and sample implementation. Moved here so that it can be used also by
19657         the jit.
19658
19659 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
19660
19661         * reflection.c, reflection.h: keep types and other handles separate in
19662         the hash tables for referred tokens. Add guid for modules.
19663
19664 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19665
19666         * assembly.c: fix bugs found with valgrind.
19667         * metadata.h, metadata.c: added mono_metadata_guid_heap().
19668
19669 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
19670
19671         * threads: added icall support for getting current domain for
19672                    the thread.
19673  
19674 2002-04-13  Martin Baulig  <martin@gnome.org>
19675
19676         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
19677         (MonoDebugVarInfo): Added `index' field for register based addresses.
19678         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
19679         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
19680         `MonoDebugVarInfo *params' and `guint32 this_offset' with
19681         `MonoDebugVarInfo *this_var'.
19682
19683         * debug-symfile.c (relocate_variable): New static function to write
19684         a location description for a local variable or method parameter.
19685
19686 2002-04-12  Martin Baulig  <martin@gnome.org>
19687
19688         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
19689         stack offset and begin/end scope address of a local variable.
19690         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
19691         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
19692         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
19693
19694         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
19695         Added new relocation types for start/end scope of a local variable.
19696
19697 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19698
19699         * object.h: add mono_object_domain() macro.
19700         * reflection.c: handle typespecs.
19701         * icall.c: MonoMethod::get_Name() implementation.
19702
19703 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19704
19705         * icall.c: String::GetHashCode() icall implementation.
19706
19707 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19708
19709         * icall.c: String::IndexOfAny icall.
19710         * object.c, object.h: make array->max_length more useful.
19711         Intrduced mono_object_class() and mono_string_length() macros.
19712
19713 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19714
19715         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
19716         instead of g_unichar_isdigit.
19717
19718 2002-04-11  Nick Drochak  <ndrochak@gol.com>
19719
19720         * icall.c: Implement a simple Double.ToString().
19721
19722 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19723
19724         * appdomain.h: only io-layer.h is supposed to be included.
19725         * icall.c: explicitly import environ. Fix warning.
19726
19727 2002-04-10  Nick Drochak  <ndrochak@gol.com>
19728
19729         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
19730                 return true even if it's not Daylight Savings time.
19731                 Only return false for the case where the function isn't
19732                 implemented for a plaform (read Windows).
19733
19734 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19735
19736         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
19737         data with a mutex.
19738
19739 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
19740
19741         * mempool.c (mono_mempool_alloc): only use g_malloc when
19742         absolutely necessary.
19743
19744 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
19745
19746         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
19747
19748         * class.c (mono_class_vtable): use domain mempool to allocate vtable
19749         (mono_class_proxy_vtable): use domain mempool
19750
19751 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19752
19753         * appdomain.h, appdomain.c: split initialization that requires the
19754         execution engine support into mono_runtime_init().
19755
19756 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
19757
19758         * class.c (mono_class_init): don't include vtable inside MonoClass
19759         to save some memory, gather some statistics.
19760         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
19761
19762 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19763
19764         * icall.c: internalcall implementation for ValueType.Equals().
19765
19766 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
19767
19768         * object.c (mono_message_init): moved 
19769         (mono_runtime_exec_main): new arch. independent impl.
19770         (mono_runtime_invoke_array): new method - like
19771         mono_runtime_invoke, but you can pass an array of objects.
19772         (mono_remoting_invoke): new arch. independent impl.
19773         (mono_message_invoke): new arch. independent impl.
19774         (mono_runtime_class_init): new arch. independent impl.
19775         (mono_runtime_object_init): new arch. independent impl.
19776
19777 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19778
19779         * metadata.c, object.c, reflection.c: documented the exported
19780         functions.
19781
19782 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
19783
19784         * icall.c: simpler code to pass the assembly builder data to corlib.
19785         Implement GetNestedTypes() internalcall.
19786
19787 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19788
19789         * class.c: warn if a type can't be loaded.
19790
19791 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
19792
19793         * image.h: typedef MonoImageOpenStatus
19794         * types.h: removed unused file
19795         
19796 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
19797
19798         * icall.c: Enum_ToObject accepts enum value arguments.
19799
19800 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19801
19802         * class.c: move initialization of properties, events and nested
19803         classes, so that they happen for interfaces, too.
19804
19805 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19806
19807         * icall.c: cleanup some ugly casts in Array_SetValue*.
19808
19809 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19810
19811         * icall.c: the values array fro enums is of the correct type, now.
19812         Implement (correctly) getFullName instead of assQualifiedName for
19813         MonoType.
19814         * reflection.h, reflection.c: added mono_type_get_name ().
19815
19816 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19817
19818         * assembly.c, image.h: for each MonoImage, record from wich assembly
19819         it was loaded.
19820         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
19821         Make Type.Assembly work.
19822
19823 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
19824
19825         * debug-symfile.h: use char* instead of gpointer to avoid
19826         unnecessary casts.
19827
19828         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
19829
19830         * icall.c (ves_icall_InternalExecute): impl. FielSetter
19831         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
19832
19833 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
19834
19835         * icall.c (mono_message_init): impl. (code cleanup)
19836         (ves_icall_InternalExecute): impl. FieldGetter
19837
19838         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
19839         defined we call all (non-static)methods through the vtable. 
19840
19841 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
19842
19843         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
19844         finalizer even though the memory is still referenced (and the chunk of
19845         memory is not freed).
19846
19847 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19848
19849         * assembly.c: fix brokeness.
19850
19851 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
19852
19853         * class.c: kill some warnings. Check explicit interface method
19854         implementation also without considering the namespace.
19855         Load also literal strings in static class data.
19856
19857 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
19858
19859         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
19860         (default_assembly_name_resolver): Make the resolver take the
19861         "base" directory where the assembly was originally defined, so we
19862         can load DLLs that are in the same directory as the assembly that
19863         is being referenced.
19864
19865 2002-03-28  Dick Porter  <dick@ximian.com>
19866
19867         * file-io.h: 
19868         * file-io.c:
19869         * socket-io.c: 
19870         * unicode.h: 
19871         * unicode.c: Warning cleanups
19872
19873 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
19874
19875         * object.h, reflection.h: use the correct type instead of MonoObject.
19876
19877 2002-03-28  Martin Baulig  <martin@gnome.org>
19878
19879         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
19880         (mono_debug_update_symbol_file): Initialize classes if necessary.
19881
19882 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19883
19884         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
19885         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
19886
19887 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
19888
19889         * assembly.h: fix function prototype.
19890         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
19891         * mono-endian.h: use const cast.
19892
19893 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
19894
19895         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
19896
19897 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
19898
19899         * loader.c: don't assert when a typeref can't be loaded, give
19900         a chance to the runtime to trow an exception instead.
19901         * loader.h: fix warning.
19902
19903 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
19904
19905         * class.c (mono_class_proxy_vtable): added proxy support
19906
19907 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
19908
19909         * icall.c: removed last of PAL calls, added System.Environment
19910         * file-io.h, file-io.c: MonoIO implementation
19911         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
19912
19913 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
19914
19915         * appdomain.c: do not use the byte marker in ldstr table lookup.
19916         * debug-helpers.c: allow two ':' to separate class and method name.
19917         * object.c: allocate arrays bounds with the GC, too.
19918         * verify: add a few more checks.
19919
19920 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
19921
19922         * reflection.c: output also literal strings. Allocate parameter data
19923         with GC_malloc() (thanks, Martin, for catching this!).
19924
19925 2002-03-26  Martin Baulig  <martin@gnome.org>
19926
19927         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
19928         include the `this' offset in the `param_offsets'.
19929
19930 2002-03-25  Martin Baulig  <martin@gnome.org>
19931
19932         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
19933         mono_debug_get_class() function to get the classes. Added new
19934         relocation types for arrays and strings.
19935         (mono_debug_get_class): New static function to search in all
19936         referenced assemblies for a metadata token.
19937
19938         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
19939
19940 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
19941
19942         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
19943         hold gc-allocated objects. Make the string heap a stream like the
19944         others. Removed duplicated code when writing stream info.
19945         Added asserts to catch possible buffer overflows. Set the sorted map
19946         for tables that need sorting. Added some documentation.
19947
19948 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
19949
19950         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
19951         for interned strings and vtables.
19952
19953 2002-03-24  Martin Baulig  <martin@gnome.org>
19954
19955         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
19956         it in the array since it was created with g_slist_prepend().
19957
19958 2002-03-24  Martin Baulig  <martin@gnome.org>
19959
19960         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
19961         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
19962         (mono_debug_method_from_token): Renamed to
19963         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
19964         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
19965
19966         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
19967         relocation types.
19968
19969         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
19970
19971 2002-03-24  Martin Baulig  <martin@gnome.org>
19972
19973         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
19974         (mono_debug_method_from_token): New func.
19975
19976         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
19977         New interncall, calls mono_debug_local_type_from_signature().
19978         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
19979         calls mono_debug_method_from_token().
19980
19981 2002-03-23  Martin Baulig  <martin@gnome.org>
19982
19983         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
19984         specifies the number of bytes to be converted, not the array size.
19985         Return the number of chars, not the number of bytes.
19986         (ves_icall_iconv_get_chars): The `byteCount' argument
19987         specifies the number of bytes to be converted, not the array size.
19988
19989 2002-03-23  Martin Baulig  <martin@gnome.org>
19990
19991         * reflection.h (MonoReflectionSigHelper): New type.
19992
19993         * reflection.c (mono_reflection_sighelper_get_signature_local),
19994         (mono_reflection_sighelper_get_signature_local): New functions.
19995
19996         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
19997         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
19998         interncalls.
19999
20000 2002-03-23  Martin Baulig  <martin@gnome.org>
20001
20002         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
20003         is_writeable is set.
20004         (mono_raw_buffer_update): New function to write the modified map
20005         back to disk.
20006
20007         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
20008
20009         * debug-symfile.c (mono_debug_update_symbol_file): Call
20010         mono_raw_buffer_update() when done writing.
20011
20012 2002-03-23  Martin Baulig  <martin@gnome.org>
20013
20014         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
20015
20016         * debug-symfile.c: Added support for arguments and local variables.
20017
20018 2002-03-23  Dick Porter  <dick@ximian.com>
20019
20020         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
20021         protected by ifdefs, hence breaking the w32 build.
20022
20023 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20024
20025         * object.c: implement is_interned() the right way.
20026
20027 2002-03-21  Martin Baulig  <martin@gnome.org>
20028
20029         * debug-symfile.[ch]: New files to handle debugging information
20030         files. There's also support to dynamically update these symbol
20031         files to include machine dependent information.
20032
20033 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
20034
20035         * threads.c (mono_thread_create): new function to create thread
20036         from C
20037
20038 2002-03-20  Martin Baulig  <martin@gnome.org>
20039
20040         * icall.c (ves_icall_InternalInvoke): Create a new object if the
20041         method is a constructor.
20042         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
20043         points to ves_icall_InternalInvoke().
20044
20045 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
20046
20047         * file-io.c: Flush shouldn't throw exceptions.
20048
20049 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
20050
20051         * file-io.c: FileStream flush support; FileSetLength now
20052         restores file pointer.
20053
20054 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
20055
20056         * class.c: set image for pointer classes.
20057
20058 2002/03/19  Nick Drochak <ndrochak@gol.com>
20059
20060         * sysmath.c: Forgot one.
20061
20062 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
20063
20064         * sysmath.c: Avoid redefining existing names.
20065
20066 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
20067
20068         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
20069         handled by runtime as icall rather than dllimport from libm.so
20070         * file-io.c, file-io.h: fixed handle argument type.
20071
20072 2002-03-18  Dick Porter  <dick@ximian.com>
20073
20074         * reflection.c (mono_image_get_type_info): rename interface to
20075         iface, because of "#define interface struct" on windows.
20076
20077 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
20078
20079         * class.c, class.h: rename and export mono_ptr_class_get().
20080         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
20081         * reflection.c, reflection.h, icall.c: better/saner type name
20082         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
20083         method signatures.
20084
20085 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
20086
20087         * class.c (mono_class_init): removed hardcoded GHC_SLOT
20088
20089         * icall.c (ves_icall_InternalInvoke): impl.
20090
20091 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20092
20093         * reflection.c: output the interface map table, too.
20094
20095 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
20096
20097         * class.c (class_compute_field_layout): separate computation of 
20098         static field layout
20099
20100 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
20101
20102         * icall.c: added System.Buffer support.
20103         * file-io.c: moved file icalls from PAL to FileStream.
20104
20105 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
20106
20107         * icall.c (ves_icall_System_Object_GetHashCode): impl.
20108
20109 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
20110
20111         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
20112
20113 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20114
20115         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
20116
20117 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
20118
20119         * debug-helpers.{c,h}: moved here from monograph some useful functions
20120         to locate a method by name/signature in a class or image. Included
20121         also a small and flexible IL disassembler.
20122
20123 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20124
20125         * reflection.c: fixup tokens in methods with small header size, too.
20126
20127 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
20128
20129         * object.c (mono_string_to_utf8): remove assert(!error), instead
20130         print a warning. 
20131
20132 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
20133
20134         * icall.c: update to the new mono_Array_class_get interface.
20135
20136 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
20137
20138         * appdomain.c, object.c: Boehm-GC enable.
20139         * icall.c: make get_data_chunk() support split data requests.
20140         Ensure a class is initialized in more cases. Return only the first
20141         property found in GetProperties() or the compiler gets confused. 
20142         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
20143         * reflection.h, reflection.c: add fixup mechanism for field and method
20144         tokens. Initialize assembly->typeref in a single place. Output
20145         properties after events. Support custom attributes for events, too.
20146         Typo fix for paramter custom attrs.
20147
20148 2002-03-07  Martin Baulig  <martin@gnome.org>
20149
20150         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
20151
20152 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
20153
20154         * class.c (mono_array_class_get): fix. for multi. dim. arrays
20155
20156 2002-03-06  Martin Baulig  <martin@gnome.org>
20157
20158         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
20159         non-zero lower bounds. See testcases #F10-#F13.
20160
20161 2002-03-05  Martin Baulig  <martin@gnome.org>
20162
20163         * exception.c (mono_get_exception_argument_out_of_range): New exception.
20164
20165         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
20166         ves_icall_System_Array_GetValue(), only calculate the absolute array position
20167         here.
20168         (ves_icall_System_Array_SetValue): Likewise.
20169         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
20170         as argument and does the actual work. This function is used when copying a
20171         multi-dimensional array.
20172         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
20173         now do all the widening conversions of value types.
20174         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
20175
20176 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20177
20178         * class.c: remove some magic numbers and use the smbolic names,
20179         instead. Added init_events() to load event info at class init time.
20180         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
20181         and mono_metadata_methods_from_event().
20182         * reflection.h, reflection.c: added support for writing out the evnets
20183         related information.
20184
20185 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
20186
20187         * reflection.h, icall.c: use a different method (GetInterfaces)
20188         to gather interface info and add isbyref, isprimitive and
20189         ispointer to the ves_icall_get_type_info() return value.
20190
20191 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
20192
20193         * class.h: stared adding support for events.
20194         * icall.c: split find_members implementation. Added debug icall to get
20195         the address of an object.
20196         * reflection.c: handle TypeBuilders in mono_type_get_object().
20197
20198 2002-03-01  Martin Baulig  <martin@gnome.org>
20199
20200         * icall.c (ves_icall_System_Array_GetLength): This must throw an
20201         ArgumentOutOfRangeException(), not an ArgumentException().
20202         (ves_icall_System_Array_GetLowerBound): Likewise.
20203         (ves_icall_System_Array_GetValue): Improved argument checking.
20204         (ves_icall_System_Array_SetValue): Improved argument checking.
20205
20206 2002-03-01  Martin Baulig  <martin@gnome.org>
20207
20208         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
20209         called with invalid arguments rather than just dying with g_assert().
20210         (ves_icall_System_Array_SetValue): Likewise.
20211         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
20212         raise a NotImplementedException instead.
20213         (ves_icall_System_Array_GetLength): Added argument checking.
20214         (ves_icall_System_Array_GetLowerBound): Added argument checking.
20215
20216 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
20217
20218         * object.h (mono_assert): new macros mono_assert and
20219         mono_assert_not_reached
20220
20221 2002-02-28  Martin Baulig  <martin@gnome.org>
20222
20223         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
20224         and "System::String::IsInterned" to "System::String::_IsInterned".
20225
20226 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
20227
20228         * icall.c: remove hacks for typebuilder. Added icall to create a
20229         modified type from a tybebuilder.
20230         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
20231         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
20232         to create a backing MonoClass for a TypeBuilder.
20233
20234 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20235
20236         * class.c, class.h: more refactoring of class init.
20237         Export mono_class_setup_mono_type() and mono_class_setup_parent().
20238
20239 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
20240
20241         * marshal.c, marshal.h: start of marshaling interface.
20242
20243 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20244
20245         * icall.c: fix order in assembly qualified name icall.
20246
20247 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20248
20249         * class.c: do not free str, since we store it in the hash table.
20250         * reflection.h: add label field to MonoILExceptionInfo.
20251         * reflection.c: handle references to more than one assembly. Handle
20252         case when there isn't a module created in the assembly.
20253
20254 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
20255
20256         * class.c: Fix typo. Start refactoring of class init code.
20257
20258 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
20259
20260         * appdomain.c: exit with 1 on error.
20261         * class.c: we already have the name in MonoClassField.
20262         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
20263         MonoStreamHeader instead of an offset of image->raw_metadata.
20264
20265 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
20266
20267         * appdomain.c (mono_init): Be even more descriptive about the error.
20268
20269 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
20270
20271         * appdomain.c: give the user an informative message when corlib can't
20272         be loaded.
20273
20274 2002-02-26  Martin Baulig  <martin@gnome.org>
20275
20276         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
20277         New icall to get the time zone data.
20278
20279 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20280
20281         * reflection.c: set virtual and raw size of section correctly.
20282         * threads.c: transfer domain information to newly created threads.
20283
20284 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20285
20286         * class.c: when instancing a class in a domain, load the default
20287         vaules for static fields from the constant table. Fix System.Enum to
20288         not be an enum.
20289         * icall.c: implement Object::GetType() internalcall. Implemented
20290         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
20291         Fixed checking of binding flags in find_members().
20292         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
20293         * reflection.c: handle enumerations when writing to the constant
20294         table. Use a different object cache for types.
20295
20296
20297 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
20298
20299         * object.c (mono_object_isinst): fix for arrays
20300
20301         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
20302
20303 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20304
20305         * object.c: don't use mprotect ()  and fix intern pool hash table
20306         lookup for big endian systems.
20307
20308 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20309
20310         * icall.c: change type_is_subtype_of () signature.
20311
20312 2002-02-21  Mark Crichton  <crichton@gimp.org>
20313
20314         * rand.c, rand.h: Added random number generator for
20315         System.Security.Cryptography classes.
20316
20317         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
20318
20319         * icall.c: Added System.Security.Cryptography calls.
20320
20321 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20322
20323         * class.c, icall.c, metadata.c: better support for pointer types.
20324         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
20325         * reflection.c: Add support for getting custom attrs for properties
20326         and simplify some code.
20327
20328 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
20329
20330         * icall.c: change getToken () and add custom attribute GetBlob()helper
20331         method.
20332         * reflection.h: add custom attrs array to the reflection builder structures.
20333         * reflection.c: encode and emit custom attributes for all the relevant
20334         reflection objects. Cache fieldref and methodref tokens. Change
20335         mono_image_create_token() interface to take a MonoDynamicAssembly.
20336         More complete custom attributes decoder. Load custom attributes for
20337         Assembly, Field, Method and Constructor objects, too. Make the
20338         returned array an Attribute[] one, not object[]. Added
20339         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
20340         custom attribute constructor.
20341
20342 2002-02-20  Dick Porter  <dick@ximian.com>
20343
20344         * icall.c:
20345         * rawbuffer.c:
20346         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
20347         problem code out for now).
20348
20349 2002-02-19  Radek Doulik  <rodo@ximian.com>
20350
20351         * object.c (mono_ldstr): use hash table to avoid multiple swapping
20352
20353 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
20354
20355         * icall.c: register the GetCustomAttributes method.
20356         * object.c, object.h: add mono_string_new_len ().
20357         * reflection.h, reflection.c: added mono_runtime_invoke(),
20358         mono_install_runtime_invoke(). Added
20359         mono_reflection_get_custom_attrs () to load custom attributes and
20360         create the attribute objects.
20361
20362 2002-02-19  Dick Porter  <dick@ximian.com>
20363         * threads-dummy-types.c:
20364         * threads-dummy-types.h:
20365         * threads-dummy.c:
20366         * threads-dummy.h:
20367         * threads-pthread-types.c:
20368         * threads-pthread-types.h:
20369         * threads-pthread.c:
20370         * threads-pthread.h:  Deleted obsolete files
20371
20372 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
20373
20374         * class.c (mono_class_vtable): runtime init the class when we
20375         allocate static class data.
20376
20377         * icall.c (ves_icall_System_Array_SetValue): check for null values.
20378
20379         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
20380         and String - but we will need generic marshalling support in the
20381         future. 
20382         (mono_init): set the domain name in a ms compatible way
20383
20384         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
20385         String[].
20386
20387 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
20388
20389         * object.c (mono_array_clone): use alloca() instead of g_malloc  
20390         for sizes
20391
20392         * appdomain.c (mono_domain_unload): impl.
20393
20394 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20395
20396         * appdomain.c, object.c: fix intern pool implementation.
20397         * class.c: fix alignment code.
20398
20399 2002-02-16  Radek Doulik  <rodo@ximian.com>
20400
20401         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
20402         and s2 > s1, just copy lower bytes to be compatible with little
20403         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
20404         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
20405
20406         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
20407         force big_endian to be 1 for big endian machines 
20408         (ves_icall_iconv_new_decoder): ditto
20409
20410 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
20411
20412         * socket-io.c (convert_sockopt_level_and_name): If the system
20413         doesn't define SOL_IP or SOL_TCP, get them by hand using
20414         getprotobyname() and caching the values (because this could be a
20415         slow operation).
20416         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
20417         Use the appropriate struct when the system does support it. Ie,
20418         not all systems have struct ip_mreqn so use struct ip_mreq when
20419         appropriate.
20420
20421 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
20422
20423         * reflection.c: handle finally clauses.
20424
20425 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
20426
20427         * socket-io.c: use g_snprintf() instead of snprintf.
20428
20429 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
20430
20431         * reflection.c (mono_param_get_objects): Cast second argument to
20432         mono_method_get_param_names to a const char** to silence the
20433         compiler warning.
20434
20435         * appdomain.c (mono_domain_assembly_open): Put parens around the
20436         truth statement in the for-loop.
20437
20438         * unicode.c (iconv_convert): Got rid of a compiler warning about
20439         int i being unused when the system has a new iconv.
20440         (iconv_get_length): Same.
20441
20442         * image.c (load_class_names): Cast the second argument to
20443         g_hash_table_insert() to char* to hush compiler warnings about the
20444         arg being a const.
20445         (mono_image_open): Same here.
20446
20447         * socket-io.c: Don't conditionally include sys/filio.h or
20448         sys/sockio.h here anymore since we now get them from
20449         io-layer/io-layer.h
20450         (inet_pton): If the system doesn't support inet_aton, implement
20451         using inet_addr and also #define INADDR_NONE if it isn't defined
20452         by the system.
20453
20454 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20455
20456         * metadata.c, metadata.h: added function to get packing and size info
20457         of a typedef.
20458         * reflection.h, reflection.c: handle field RVA data. Save info about
20459         the table layout if needed. Assign typedef indexes to all the types
20460         before dumping the info about them to avoid forward reference problems.
20461
20462 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
20463
20464         * socket-io.c (convert_sockopt_level_and_name): ifdef
20465         SO_ACCEPTCONN because it is not defined on my system (old debian)
20466
20467 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20468
20469         * opcode.c: use stddef.h to get NULL.
20470
20471 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
20472
20473         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
20474         for FIONBIO, FIONREAD and SIOCATMARK.
20475         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
20476         define INADDR_NONE and besides, inet_addr() is deprecated and
20477         should not be used. Use inet_pton() instead - it also has the
20478         added bonus that it can easily handle IPv6 addresses as well.
20479         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
20480
20481 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
20482
20483         * decimal.c: remove _MSC_VER conditional.
20484
20485 2002-02-13  Dick Porter  <dick@ximian.com>
20486
20487         * socket-io.c: 
20488         * icall.c: Internal calls for Blocking, Select, Shutdown,
20489         GetSocketOption and SetSocketOption
20490
20491 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20492
20493         * assembly.cs: better resolver: use it instead of some kludgy
20494         code.
20495
20496 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
20497
20498         * reflection.c: the best way to speed-up the compiler is to avoid
20499         infinite loops.
20500
20501 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
20502
20503         * class.c (mono_class_vtable): changed the object layout
20504         (obj->vtable->class). 
20505         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
20506
20507 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20508
20509         * assembly.c: look for assemblies in the assembly dir, too.
20510
20511 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20512
20513         * class.c: fix thinko in mono_class_from_type().
20514
20515 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20516
20517         * exception.h, exception.c: added TypeLoadException.
20518         * object.h, object.c: added mono_array_clone ().
20519         * icall.c: handle throwOnError in AssemblyGetType().
20520         Added Array.Clone().
20521         * opcode.h, opcode.c: use a single value for the opcode val.
20522         Compile fix for non-gcc compilers.
20523
20524 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
20525
20526         * opcodes.c, opcodes.h: export interesting info about opcodes.
20527
20528 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
20529
20530         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
20531         icalls. 
20532
20533         * class.c (class_compute_field_layout): set element_class for enums
20534         (mono_class_create_from_typedef): set element_class for normal classes
20535
20536         * icall.c (ves_icall_System_Enum_get_value): impl.
20537
20538         * class.c (mono_class_create_from_typedef): do not set valuetype
20539         flag for System.ValueType and System.Enum
20540
20541 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
20542
20543         * unicode.c (iconv_convert): fix big endian problem.
20544
20545 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20546
20547         * class.c: add asserts if we are ever going to scribble over memory.
20548         * socket-io.c: not all systems have AF_IRDA defined.
20549
20550 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
20551
20552         * class.c (class_compute_field_layout): do not consider static
20553         fields to compute alignment
20554
20555 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
20556
20557         * appdomain.c (mono_appdomain_get): impl.
20558         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
20559
20560 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
20561
20562         * icall.c: ignore "file://" prefix when loading an assembly.
20563
20564 2002-01-23  Dick Porter  <dick@ximian.com>
20565
20566         * socket-io.c:
20567         * icall.c:
20568         * Makefile.am: Added socket support
20569
20570 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
20571
20572         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
20573         code back.  This should return the assemblies that are loaded by
20574         the runtime on behalf of an application domain. 
20575
20576         The current implementation is still broken, it just returns every
20577         assembly loaded, but until we get real applications domain this
20578         will do.
20579
20580 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
20581
20582         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
20583         AppDomain object.
20584
20585 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
20586
20587         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
20588         the mono_class_from_name lookup.
20589         (ves_icall_get_parameter_info): ditto.
20590         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
20591         method.
20592         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
20593
20594 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20595
20596         * class.c: load also nested classes on class init.
20597         System.ValueType instance methods gets passed boxed
20598         values, unless methods in derived classed that get a pointer to the
20599         data.
20600         * icall.c: use better name parsing code in GetType().
20601         * image.c, image.h: add mono_image_loaded ().
20602         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
20603         * reflection.c, reflection.h: added mono_reflection_parse_type().
20604
20605 2002-01-22  Veronica De Santis <veron78@interfree.it>
20606
20607         * icall.c : Added mapping of internal calls for Manual and Auto reset events
20608         * threads.c : Added the implementation of internal calls for events
20609         * threads.h : Added prototypes of internal calls for events
20610         
20611 2002-01-21  Radek Doulik  <rodo@ximian.com>
20612
20613         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
20614
20615 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
20616
20617         * class.c (mono_class_init): set min_align to 1 (instead of 0)
20618         (mono_class_value_size): use min_align
20619
20620 2002-01-20  Dick Porter  <dick@ximian.com>
20621
20622         * threads.h:
20623         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
20624         so it compiles on w32.
20625
20626 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
20627
20628         * metadata.c (mono_type_stack_size): impl.
20629
20630         * class.c (mono_class_get_field): impl. memberref token
20631
20632 2002-01-16 Veronica De Santis <veron78@@interfree.it>
20633
20634         * icall.h : Added the internal calls mapping for CreateMutex_internal
20635                     and ReleaseMutex_internal.
20636         * threads.h : Added the prototype of mutexes internal calls.
20637         * threads.c : Added the implementations of mutexes internal calls.
20638
20639 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
20640
20641         * metaparse.h: removed unused file.
20642         * reflection.c, reflection.h: added stream_data_align () function 
20643         to align data in streams and keep stream aligned. Add support for
20644         exception support in method headers.
20645
20646 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
20647
20648         * unicode.c: make iconv_convert () return the number of bytess written
20649         in the output buffer.
20650
20651 2002-01-15  Dick Porter  <dick@ximian.com>
20652         * threads.c: Make the runtime's idea of infinite timeouts coincide
20653         with the class library's
20654
20655         Fix a particularly egregious bug in mono_thread_cleanup(). That
20656         code was so utterly bogus it must have been written on a Monday.
20657
20658 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
20659
20660         * reflection.h: add subtypes field to TypeBuilder.
20661         * reflection.c: encode constants for literal fields.
20662         Handle subtypes. Fix user string token (and add a zero byte)
20663         at the end.
20664         
20665 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
20666
20667         * class.c (mono_class_init): bug fix: assign slot numbers for
20668         abstract methods.
20669
20670 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20671
20672         * reflection.c: don't try to output a code RVA for abstract methods.
20673         Small fixes for method header format. Output parameter info to the
20674         ParamDef table. Save method overriding info to MethodImpl table.
20675         Fix property support. Allow typedef.extends to be a type in the
20676         building assembly.
20677         * verify.c: fix off-by-one error.
20678
20679 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
20680
20681         * class.c: fix mono_class_from_mono_type () for szarray types.
20682         Remove unused cache check in mono_class_from_type_spec().
20683         * icall.c: *type_from_name () functions handle simple arrays and byref.
20684         * reflection.c: handle byref and szarray types. Handle methods without
20685         body (gets P/Invoke compilation working). Handle types and fields in
20686         get_token ().
20687         * reflection.h: add rank to MonoTypeInfo.
20688
20689 2002-01-10  Dick Porter  <dick@ximian.com>
20690
20691         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
20692         internal calls
20693
20694 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
20695
20696         * icall.c: initialize class in type_from_handle ().
20697         Loop also in parent classes for get_method ().
20698         * reflection.c: properly encode class and valuetype types.
20699         Start on encoding TypeBuilder types. Handle fieldrefs.
20700         Use correct length when registering a user string.
20701         Handle ConstructorBuilder and MonoMethod in get_token ().
20702         Make mono_type_get_object () aware of cached types.
20703         * object.c: back out change to mono_string_new ().
20704
20705 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
20706         * object.c: mono_string_new should return a NULL when the string 
20707         passed in is NULL -- not try to deference it.
20708         
20709 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
20710
20711         * icall.c: hack to make IsSubType work for TypeBuilders.
20712         * reflection.c: emit constructors before methods.
20713         Retrieve param names in mono_param_get_objects().
20714
20715 2002/01/05  Nick Drochak  <ndrochak@gol.com>
20716
20717         * Makefile.am: fix list of headers and sources so automake 1.5
20718         doesn't complain. Removed \# at end of list.
20719
20720 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
20721
20722         * reflection.c: get token for a method ref. Set return type of
20723         constructor to void.
20724         * loader.c: debug message.
20725         * class.c: typo fix.
20726
20727 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
20728
20729         * icall.c: fix array init with rank > 1. FindMembers
20730         loops in parent class as well.
20731         * image.c: do not insert nested types in name cache.
20732         * reflection.c: warning fix.
20733         * reflection.h: add override method (for interface impl).
20734
20735 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
20736
20737         * metadata.c: fix customattr decoding.
20738
20739 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
20740
20741         * rawbuffer.cs: Added native Win32 implementation, avoids using
20742         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
20743
20744 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
20745
20746         * class.c: make the low-level routines handle the cache.
20747
20748 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
20749
20750         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
20751
20752 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
20753
20754         * class.c: fix mono_array_element_size() for objects.
20755         * class.h, class.c: add properties to MonoClass and load them
20756         at init time.
20757         * icall.c: check with isinst() when assigning a value to an array
20758         instead of requiring the classes to match exactly.
20759         Implemented icall for System.Type::GetType().
20760         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
20761         enums. Handle bindingflags when looking for methods and fields.
20762         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
20763         and mono_metadata_methods_from_property().
20764         * reflection.h, reflection.c: added structures for propreties,
20765         parameters and enums. Implemented mono_property_get_object() and
20766         mono_param_get_objects().
20767
20768 2001-12-18  Dick Porter  <dick@ximian.com>
20769
20770         * file-io.c: Use mono_string_to_utf16() instead of
20771         mono_string_chars()
20772
20773         * object.c: Added mono_string_to_utf16(), which copies the non
20774         NULL-terminated MonoString into a new double-null-terminated
20775         buffer.
20776
20777 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
20778
20779         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
20780
20781 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
20782
20783         * file-io.c: raise exceptions if handle is invalid.
20784
20785 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
20786
20787         * assembly.c: yet another check for mscorlib.
20788         * class.c, class.h: load nesting info for classes.
20789         * icall.c: many new functions to support the Reflection classes.
20790         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
20791         * reflection.h, reflection.c: mono_image_create_token(),
20792         mono_assembly_get_object(), mono_type_get_object(),
20793         mono_method_get_object(), mono_field_get_object(): methods to return
20794         objects that parallel the C representation of assemblies, types,
20795         methods, fields.
20796
20797 2001-12-11  Dick Porter  <dick@ximian.com>
20798
20799         * icall.c:
20800         * file-io.c: Internal calls for file IO.
20801
20802 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
20803
20804         * tabledefs.h: missing FileAttributes.
20805         * verify.h, verify.c: use is_valid_string () to simplify and check for
20806         valid strings more correctly. Fix warnings and speeling.
20807         Check more tables: Filed, File, ModuleRef, StandAloneSig.
20808         Check code: branches, maxstack, method calls.
20809
20810 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
20811
20812         * object.c (mono_object_allocate): removed static, so that the jit
20813         can allocate value types.
20814
20815         * icall.c (ves_icall_System_DateTime_GetNow): impl.
20816
20817 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20818
20819         * class.c: init enum types right away and register the
20820         token->MonoClass map in mono_class_create_from_typedef ().
20821         * verify.h, verify.c: first cut of the verifier.
20822         * pedump.c: add --verify switch to verify metadata tables.
20823         * tabledefs.h: add some missing enums.
20824
20825 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
20826
20827         * class.c (mono_install_runtime_class_init): impl.
20828         (mono_class_init): renamed mono_class_metadata_init to
20829         mono_class_init, also removed the metadata_inited flag
20830
20831         * object.c (mono_object_isinst): use faster algorithm
20832
20833 2001-11-30  Radek Doulik  <rodo@ximian.com>
20834
20835         * mono-endian.h: reverted last change
20836         added function prototypes
20837
20838         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
20839         add mono-endian.c back
20840
20841         * mono-endian.c: returned back, as Paolo pointed out, it's needed
20842         for unaligned access, I've mistaked it with endianess. I am
20843         sorry.
20844         (mono_read16): fix reverted endianess
20845         (mono_read64): ditto
20846         (mono_read32): ditto
20847
20848 2001-11-30  Dick Porter  <dick@ximian.com>
20849
20850         * exception.c: Implement mono_exception_from_name()
20851
20852 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20853
20854         * metadata.h, metadata.c: remove params_size and locals_size and their
20855         calculation from the metadata code: they are only usefult to the
20856         interp.
20857
20858 2001-11-29  Radek Doulik  <rodo@ximian.com>
20859
20860         * object.c (mono_ldstr): swap bytes here, it's probably not the
20861         best place, but works for me now, I'll redo it once I know mono
20862         better, also note that I add PROT_WRITE and don't reset back, also
20863         note that it's only affects big endians, so x86 should be OK
20864
20865         * mono-endian.h (read16): use just glib macros for both endians
20866
20867         * mono-endian.c: removed as glib macros are used in in
20868         mono-endian.h so we don't need to care about endianess for read
20869         macros as glib does that for us already
20870
20871 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
20872
20873         * class.h, class.h: take minimum alignment into consideration so
20874         that the fields of a class remain aligned also when in an array.
20875
20876 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
20877
20878         * loader.h, loader.c: add mono_method_get_param_names().
20879         * class.c: 0-init class fields.
20880
20881 2001-11-26  Dick Porter  <dick@ximian.com>
20882
20883         * icall.c:
20884         * threads-types.h:
20885         * threads.c: New file that handles System.Threading on all platforms
20886
20887         * object.c: 
20888         * object.h: Remove the synchronisation struct from MonoObject,
20889         replace it with a pointer that gets initialised on demand
20890
20891         * Makefile.am: Replace all the system-specific threading code with
20892         a single file that uses the new wrapper library
20893
20894 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
20895
20896         * class.c, class.h: add mono_install_trampoline() so that the runtime
20897         can register a function to create a trampoline: removes the ugly
20898         requirement that a runtime needed to export arch_create_jit_trampoline.
20899         * object.h, object.c: added mono_install_handler() so that the runtime
20900         can install an handler for exceptions generated in C code (with
20901         mono_raise_exception()). Added C struct for System.Delegate.
20902         * pedump.c: removed arch_create_jit_trampoline.
20903         * reflection.c: some cleanups to allow registering user strings and
20904         later getting a token for methodrefs and fieldrefs before the assembly
20905         is built.
20906         * row-indexes.h: updates and fixes from the new ECMA specs.
20907
20908 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
20909
20910         * class.h, class.c: add enum_basetype field to MonoClass.
20911         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
20912         to get index in the constant table reated to a field, param or
20913         property.
20914         * reflection.h, reflection.c: handle constructors. Set public-key and
20915         version number of the built assembly to 0.
20916         * row-indexes.h: update from new ECMA spec.
20917
20918 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
20919
20920         * class.h, class.c: add a max_interface_id to MonoClass.
20921         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
20922         since it's used to do that. Added mono_type_type_from_obj().
20923         Make GetType() return NULL instead of segfaulting if the type was not
20924         found. Handle simple arrays in assQualifiedName.
20925         * object.h: add a struct to represent an Exception.
20926         * reflection.c: output call convention in method signature.
20927         Add code to support P/Invoke methods and fixed offsets for fields.
20928
20929 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
20930
20931         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
20932         the value.
20933         * icall.c: use mono_array_addr instead of array->vector: fixes the
20934         reflection image writing.
20935         * reflection.c: init call convention byte to 0 in method signature.
20936         Encode the property signature. Don't output property-related methods
20937         twice. Really process the properties for a type (don't cast a field to
20938         a property, my mom always told me that).
20939         Fix 64 bit issues in pointer alignment in a different and more
20940         readable way.
20941
20942 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
20943
20944         * loader.h: Removed type class from MonoDefaults, added monotype
20945
20946         * loader.c: Loaded MonoType, removed loading of Type
20947
20948         * icall.c (my_mono_new_object): Now returns a System.MonoType,
20949         and fills in System.Type._impl with a RuntimeTypeHandle rather
20950         than the actual MonoClass *
20951
20952         (ves_icall_type_from_handle): change from type_class to
20953         monotype_class
20954
20955         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
20956         implemented
20957
20958         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
20959         implemented
20960
20961         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
20962
20963         (ves_icall_System_Reflection_Assembly_GetType): implemented
20964
20965         (ves_icall_System_MonoType_assQualifiedName): implemented
20966
20967         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
20968
20969 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
20970
20971         * assembly.c (mono_assembly_open): Implement a cache for the
20972         assemblies. 
20973
20974         (mono_assembly_close): only destroy the assembly when the last
20975         reference is gone.
20976         
20977 2001-11-09  Dick Porter  <dick@ximian.com>
20978
20979         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
20980
20981 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
20982
20983         * class.c (mono_class_metadata_init): bug fix: compute the right slot
20984
20985 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
20986
20987         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
20988         from Martin Weindel.
20989         * object.h: add mono_string_chars ().
20990
20991 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
20992
20993         * reflection.c (build_compressed_metadata): Eliminates warnings
20994         and uses 64-bit clean code.
20995
20996         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
20997         (mono_type_equal): Change signature to eliminate warnings.
20998
20999 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
21000
21001         * icall.c, loader.c: remove the internalcall array constructors.
21002         Changes to match the new MonoArray structure.
21003         * object.h, object.c: an array object doesn't allocate an extra
21004         vector. Add mono_array_new_full () to create jagged arrays easily.
21005
21006 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
21007
21008         * metadata.h, metadata.c: add mono_metadata_field_info () to
21009         retreive all the info about a field from vairous tables.
21010         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
21011         * class.h, class.c: augment MonoClassField with more info.
21012         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
21013         policy and load a field's RVA if needed.
21014
21015 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
21016
21017         * class.c (mono_class_metadata_init): create a trampoline for all
21018         virtual functions instead of actually compiling them.
21019
21020 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
21021
21022         * class.h, class.c: include name in MonoClassField.
21023         * class.c: fix fundamental type of System.Object and System.String.
21024         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
21025         tokens in ldtoken.
21026         * icall.c: remove internalcalls for the Reflection stuff that is now
21027         done in C# code.
21028         * loader.c: mono_field_from_memberref () implementation.
21029         * mono-endian.c: thinko (s/struct/union/g).
21030         * object.c, object.h: make the mono_string_* prototypes actually use
21031         MonoString instead of MonoObject.
21032         * reflection.c, reflection.h: updates for changes in the reflection
21033         code in corlib: we use C structures that map to the actual C# classes.
21034         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
21035         fat method header if needed and use the info from the ILGenerator for
21036         methods. Handle fields in types. Misc fixes.
21037
21038 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
21039
21040         * class.c (mono_class_metadata_init): bug fix: always allocate
21041         space for static class data
21042
21043 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
21044
21045         * class.c (mono_compute_relative_numbering): use relative
21046         numbering to support fast runtime type checks.
21047
21048 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
21049
21050         * class.c (mono_class_create_from_typeref): added debugging output
21051         to print class name when MonoDummy is returned instead of real class
21052
21053 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
21054
21055         * class.c (mono_class_metadata_init): interface offset table now
21056         contains pointers into the vtable - this is more efficient for the jit
21057
21058 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
21059
21060         * class.c (mono_class_metadata_init): use a temporary vtable (the
21061         old algorithm only worked for the interpreter, but not for the jit)
21062
21063 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
21064
21065         * loader.c (method_from_memberref): use mono_class_get to get the
21066         class of an array instead of using System.Array directly.
21067         (mono_get_method): also add MEMBERREF methods to the method cache
21068         which usefull for arrays.
21069
21070 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
21071
21072         * pedump.c (arch_compile_method): added to compute vtable entry
21073
21074         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
21075         number of interfaces.
21076         
21077         * class.h: merged MonoArrayClass into MonoClass
21078
21079         * class.c (mono_class_create_from_typedef): compute the vtable size and
21080         allocate space to include the vtable inside MonoClass
21081         (mono_class_metadata_init): initialize the vtable
21082
21083 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
21084
21085         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
21086         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
21087         * image.c: endian fixes by Laurent Rioux.
21088         * object.h, object.c: rename MonoStringObject to MonoString and
21089         MonoArrayObject to MonoArray. Change some function names to conform to
21090         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
21091         guint16* as first argument, so don't use char*.
21092         Provide macros to do the interesting things on arrays in a portable way.
21093         * threads-pthread.c: updates for the API changes and #include <sched.h>
21094         (required for sched_yield()).
21095         * icall.c: updates for the API changes above.
21096         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
21097         platforms that need them.
21098
21099 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
21100
21101         * class.c: set the correct type for all the fundamental
21102         type when loading the class.
21103
21104 2001-10-05  Dick Porter  <dick@ximian.com>
21105
21106         * threads-pthread.c (pthread_mutex_timedlock): Simple
21107         compatibility version for C libraries that lack this call.
21108
21109 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21110
21111         * class.c: MonoTypes stored in MonoClass are stored as
21112         fundamental MonoTypes when the class represents a
21113         fundamental type (System.Int32, ...).
21114         The TypeHandle return by ldtoken is a MonoType*.
21115         * icall.c: ves_icall_get_data_chunk () write out all the
21116         PE/COFF stuff. Implement ves_icall_define_method (),
21117         ves_icall_set_method_body (), ves_icall_type_from_handle ().
21118         * image.c: properly skip unknown streams.
21119         * loader.h, loader.c: add type_class to mono_defaults.
21120         * metadata.c, metadata.h: export compute_size () as
21121         mono_metadata_compute_size () with a better interface.
21122         Typo and C&P fixes.
21123         * pedump.c: don't try to print the entry point RVA if there is no entry point.
21124         * reflection.c, reflection.h: many cleanups, fixes, output method
21125         signatures and headers, typedef and typeref info, compress the metadata
21126         tables, output all the heap streams, cli header etc.
21127         * row-indexes.h: typo fixes.
21128
21129 2001-10-04  Dick Porter  <dick@ximian.com>
21130
21131         * object.h: Add a synchronisation mutex struct to MonoObject
21132
21133         * object.c (mono_new_object): Initialise the object
21134         synchronisation mutexes
21135
21136         * icall.c: System.Threading.Monitor internal calls
21137         
21138         * threads-pthread.h:
21139         * threads-pthread.c: System.Threading.Monitor internal calls
21140
21141         * threads-types.h: New file, includes the system-specific thread
21142         structures
21143         
21144         * threads-pthread-types.h:
21145         * threads-pthread-types.c: New files, handle pthread-specific
21146         synchronisation types
21147
21148         * threads-dummy-types.h: 
21149         * threads-dummy-types.c: New files of dummy support for
21150         thread-specific types
21151
21152         * metadata.c:
21153         * image.c:
21154         * pedump.c: include mono-endian.h not endian.h
21155         
21156         * Makefile.am: More threads files.
21157         Name mono-endian.h not endian.h
21158
21159 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
21160
21161         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
21162         stuff and implement a few more bits.
21163         * icall.c: a field needs to be dereferenced twice. Do not use the same
21164         name for two variables in the same scope.
21165         * image.c, image.h: cleanups.
21166
21167 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
21168
21169         * class.c (mono_class_metadata_init): bug fix: compute the right size
21170
21171 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
21172
21173         * icall.c: implemented some of the Reflection internalcalls.
21174         * image.c, image.h: start writing out the PE/COFF image.
21175         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
21176         that does the reverse than decode_blob_size ().
21177         * object.c: use mono_metadata_encode_value (). Move here
21178         temporary implementation of mono_string_to_utf8 ().
21179         * rawbuffer.c: make malloc_map static.
21180
21181 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21182
21183         * metadata.c: fix type comparison for arrays.
21184         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
21185         Added a couple of new classes to monodefaults.
21186         * icall.c: added a couple of Reflection-related internalcalls.
21187         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
21188         Added a byval_arg MonoType to MonoClass.
21189
21190 2001-09-28  Dick Porter  <dick@ximian.com>
21191
21192         * icall.c:
21193         * threads-pthread.h: 
21194         * threads-pthread.c: Implemented internal calls for
21195         LocalDataStoreSlot operations.  Applied mutexes around all shared
21196         data.  Reworked the thread creation and Start() operations to
21197         avoid a race condition.
21198         
21199         * threads-dummy.h:
21200         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
21201
21202 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
21203
21204         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
21205
21206 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
21207
21208         * class.c, loader.c: warn and return NULL instead of erroring out.
21209         * icall.c: added System.AppDomain::getCurDomain().
21210         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
21211
21212 2001-09-25  Dick Porter  <dick@ximian.com>
21213
21214         * threads-pthread.h:
21215         * threads-pthread.c: Implemented timed thread joining and added
21216         System.Threading.Thread::Join_internal internal call
21217
21218         * icall.c: Added System.Threading.Thread::Join_internal internal call
21219
21220         * threads-dummy.h:
21221         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
21222
21223 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
21224
21225         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
21226         mono_string_intern () to implement the semantics of the ldstr opcode
21227         and the interning of System.Strings.
21228         * icall.c: provide hooks to make String::IsIntern and String::Intern
21229         internalcalls.
21230
21231 2001-09-23  Dick Porter  <dick@ximian.com>
21232
21233         * threads-dummy.c: 
21234         * threads-dummy.h: New files of dummy threading routines
21235
21236         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
21237         support code based on system specifics
21238
21239         Rename PTHREAD_LIBS to THREAD_LIBS
21240         
21241 2001-09-23  Dick Porter  <dick@ximian.com>
21242
21243         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
21244         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
21245         internal calls.
21246         (mono_thread_init): Set up a Thread object instance to return when
21247         the main thread calls Thread.CurrentThread
21248         (mono_thread_cleanup): Wait for all subthreads to exit
21249
21250         * icall.c: New internal calls for System.Threading.Thread::Sleep
21251         (including Schedule) and CurrentThread
21252
21253         * threads.h: New file, to insulate thread-specific stuff from the
21254         rest of the code
21255
21256 2001-09-21  Dick Porter  <dick@ximian.com>
21257
21258         * threads-pthread.h: 
21259         * threads-pthread.c: New file, for handling pthreads-style
21260         threading support.  Start() now starts a new thread and executes
21261         the ThreadStart delegate instance.
21262
21263         * icall.c: Added the internalcall for
21264         System.Threading.Thread::Start_internal
21265
21266         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
21267
21268 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
21269
21270         * loader.c: work around the different signatures for delegates
21271         constructors csc generates in compiled code vs the ones compiled in mscorlib.
21272
21273 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21274
21275         * class.h, class.c: add mono_class_get_field_from_name ().
21276         * *: Fix C comments and other ANSI C issues.
21277
21278 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
21279
21280         * endian.h, assembly.c: fix some endianness issues.
21281
21282 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
21283
21284         * loader.h, load.c: add delegate_class to mono_defaults.
21285         Handle runtime provided methods in mono_get_method ().
21286
21287 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
21288
21289         * loader.c (mono_get_method): use pinvoke for internal call
21290
21291         * icall.c: use pinvoke for internal call
21292
21293         * loader.c (method_from_memberref): set the method name
21294
21295 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
21296
21297         * metadata.c: help the compiler generate better code for
21298         mono_class_from_mono_type ().
21299
21300 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
21301
21302         * class.c (mono_class_metadata_init): delayed computing of the
21303         class size to mono_class_metadata_init ()
21304
21305 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
21306
21307         * class.c, class.h: add an interfaces member to MonoClass.
21308         * image.c, image.h: add assembly_name field to MonoImage
21309         from the assembly table.
21310         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
21311
21312 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21313
21314         * class.c: Handle Array in mono_class_from_mono_type ().
21315         * metadata.c, pedump.c: some endian fixes.
21316
21317 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
21318
21319         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
21320         * metadata.c: fix small problem introduced with the latest commit.
21321
21322 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
21323
21324         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
21325         We don't need a MonoMetadata pointer anymore to compare signatures in
21326         mono_metadata_signature_equal (), update callers.
21327         Reduced memory usage an number of allocations for MonoMethodHeader and
21328         MonoMethodSignature.
21329
21330 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
21331
21332         * metadata.c: added compare for szarray.
21333
21334 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
21335
21336         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
21337         and add a couple more types to it and mono_defaults. Give an hint on
21338         classes that need implementing in our corlib and are referenced
21339         in mscorlib.
21340
21341 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
21342
21343         * class.h, class.c: keep track if a class is also an Enum.
21344         * loader.c: Implement a couple more types for use in libffi
21345         marshalling. Gives better diagnostics when failing to dlopen
21346         a library. Set method->klass for P/Invoke methods, too.
21347
21348 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
21349
21350         * class.c, class.h: add a MonoType this_arg to MonoClass that
21351         represents a pointer to an object of the class' type that
21352         can be used by the interpreter and later the type cache.
21353         Add best guess alignment info for valuetype objects.
21354
21355 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
21356
21357         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
21358         into MonoType: one less level of indirection and allocation and
21359         simplifies quite a bit of code. Added cache for MonoTypes that are
21360         used frequently, so that we don't need to allocate them all the time.
21361
21362 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
21363
21364         * class.c (mono_class_create_from_typedef): System.Enum is also a
21365         value type, although it does not derive from System.ValueType
21366         (maybe a bug in the ms compiler?)
21367
21368         * metadata.c (mono_type_size): return the right size for value types
21369
21370         * loader.c (mono_get_method): only initialize method header if not abstract
21371
21372         * class.c (mono_class_from_mono_type): use mono_default values. 
21373
21374 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
21375
21376         * *: use MonoClass pointers instead of <type_tokens>
21377         
21378         * class.h: new flag: metadata_inited.
21379
21380         * class.c (mono_class_metadata_init): impl.
21381         (mono_class_instance_size): impl.
21382         (mono_class_data_size): impl.
21383
21384 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
21385
21386         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
21387         MonoClass now has the name and name_space fields. 
21388         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
21389         mono_get_method () takes and optional MonoClass as argument.
21390         Removed mono_typedef_from_name() and added mono_class_token_from_name()
21391         instead that takes advantage of a map from class names to typedef
21392         tokens in MonoImage.
21393
21394 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
21395
21396         * metadata.c: zero is not a valid alignment boundary.
21397         Merge MONO_TYPE_VOID in default decoding code.
21398
21399 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
21400
21401         * image.h: merged MonoMetadata into MonoImage
21402
21403         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
21404         identify the type of elements.
21405
21406 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
21407
21408         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
21409         * cil-coff.h: split MonoMSDOSHeader and add size info.
21410         * image.c: add some consistency checks.
21411         * metadata.c: fix row size computation: one programmer
21412         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
21413         add explanation for the locator routine.
21414         Fix decoding of size in method header.
21415         
21416 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
21417
21418         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
21419         (g_concat_dir_and_file): Bring g_concat_dir_and_file
21420         function from gnome-libs.  This uses the right path separator
21421         based on the OS, and also works around a bug in some systems where
21422         a double slash is not allowed. 
21423         (default_assembly_name_resolver): Use g_concat_dir_and_file
21424         (mono_assembly_open): ditto.
21425
21426 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
21427
21428         * metadata.c (mono_metadata_signature_equal): impl.
21429
21430         * *: void is now a realy MonoType (instead of using NULL)
21431         
21432         * metadata.c (do_mono_metadata_parse_type): use
21433         mono_metadata_parse_type to parse void value.
21434
21435 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
21436
21437         * metadata.c, metadata.h: in the signature and method header store
21438         only the space required for holding the loca vars and incoming arguments.
21439
21440 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
21441
21442         * metadata.c (do_mono_metadata_parse_type): treat void like any
21443         other type (instead of assigning NULL);
21444
21445 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
21446
21447         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
21448
21449 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
21450
21451         * image.c (do_mono_image_open): added a cache for arrays.
21452
21453 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21454
21455         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
21456         decode a single column from a row in a metadata table and changes
21457         to take advantage of it in the typedef locator (gives a nice speed up).
21458         Store offset info for function params.
21459
21460 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
21461
21462         * image.h (MONO_IMAGE_IS_CORLIB): removed 
21463
21464 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
21465
21466         * assembly.c: how could mono_assembly_close () had ever worked?
21467         * metadata.c, metadata.h: provide offset info for local vars.
21468         Implement mono_type_size () to take care of alignment as well
21469         as size (it was mono_field_type_size in cli/class.c before).
21470
21471 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
21472
21473         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
21474
21475         * assembly.h (CORLIB_NAME): set to corlib.dll
21476
21477         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
21478
21479 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
21480
21481         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
21482         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
21483         tokentype.h: massive namespace cleanup.
21484
21485 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
21486
21487         * metadata.h, metadata.c: decode exception clauses when parsing method header.
21488
21489 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
21490
21491         * metadata.c (mono_metadata_free_type): added check for type !=
21492         NULL (void) before calling mono_metadata_free_type()
21493
21494 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
21495
21496         * metadata.h, row_indexes.h: added header with enumerations to use
21497         to index in the columns from tables in metadata and to decode coded
21498         tokens: we should start using this instead of embedding magic numbers
21499         all over the code.
21500
21501 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
21502
21503         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
21504         Move metadata_t info from cli_image_info_t to MonoImage, where
21505         it's easily accessible. Changed all the uses accordingly.
21506         Added the method and class caches to MonoImage.
21507         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
21508         and mono_metadata_decode_value () signature to be more consistent
21509         with the other parse functions (and simplify code). Taken advantage
21510         of zero-length array allocation with GCC. Removed reduntant (and
21511         wrong) MonoFieldType struct and use MonoParam instead. Changed
21512         mono_metadata_parse_field_type () to use common code for parsing.
21513         Added mono_metadata_typedef_from_field () and
21514         mono_metadata_typedef_from_method () to lookup a typedef index from a
21515         field or method token.
21516         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
21517
21518 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
21519
21520         * metadata.c (mono_metadata_parse_field_type): Implement. 
21521         (do_mono_metadata_parse_type): Split engine from
21522         mono_metadata_parse_type, so that we can create smaller structures
21523         for things that just have one pointer to the MonoType (look at
21524         the MonoFieldType)
21525
21526 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
21527
21528         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
21529         as Jan Gray found out, it is incorrect. 
21530
21531 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
21532
21533         * assembly.c: Implement asssembly loading.  This loads an image
21534         and loads all the referenced assemblies.  Come to think of it, we
21535         could always do lazy loading of the assemblies. 
21536
21537         * image.c (mono_image_open): Keep loaded images in a hashtable.
21538
21539         * image.h (MonoImage): Add reference count.
21540
21541 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
21542
21543         * assembly.c (mono_assembly_open): Keep track of the file name in
21544         case the assembly has no ASSEMBLY table.
21545
21546         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
21547         from get.c here.
21548
21549 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
21550
21551         * metadata.c, metadata.h: decode local vars in method header
21552         parse function. Change callers accordingly.
21553
21554 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
21555
21556         * metadata.h, cil-coff.h: protect against multiple inclusion.
21557         Added some new structures to hold information decoded from metadata:
21558         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
21559         and relevant decoding/free functions.
21560         * metadata.c: implement decoding functions. Add warning for out of bounds
21561         index in mono_metadata_locate(). Implement mono_get_method () to retreive
21562         all the info about a method signature and invocation. Remove check on
21563         uninitialized local var in parse_mh() and fix memory leak.
21564
21565 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
21566
21567         * metadata.h: More macros.
21568
21569         * tokentype.h: New file.
21570
21571 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
21572
21573         * assembly.c: added a consistency check and initialize
21574         some structures with g_new0().
21575         * metadata.c: fixed a couple more bugs in table size computation
21576         and add other checks for out-of bound access to metadata.
21577
21578 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
21579
21580         * metatada.c: fix bugs computing table sizes. Spew a
21581         warning when index in string heap is out of bounds.
21582
21583 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
21584
21585         * metadata.h: Add a couple of macros to manipulate tokens. 
21586
21587 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
21588
21589         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
21590         cli_section_tables).
21591
21592 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
21593
21594         * metadata.c (mono_metadata_user_string): New function, provides
21595         access to the UserString heap. 
21596
21597 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
21598
21599         * metadata.c: Add inline documentation.
21600
21601 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
21602
21603         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
21604         files. 
21605
21606 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
21607
21608         * typeattr.h: New file, TypeAttribute flags. 
21609
21610 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
21611
21612         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
21613         mono_assembly_ensure_section): Section loading code.
21614         (load_section_tables): Load the sections.
21615
21616         * mono/metadata/metadata.c (mono_metadata_locate_token,
21617         mono_metadata_locate): Functions to locate the information
21618         definition given a token or a table and an index.
21619         (mono_metadata_compute_table_bases): New.
21620         (compute_size): New function to compute the sizes of the various
21621         tables.
21622
21623         * mono/metadata/metadata.h: Finish listing the different index
21624         types. 
21625
21626         * mono/metadata/pedump.c: Improve to dump new information.
21627
21628 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
21629
21630         * mono/metadata/metadata.c: Entered all the tables matching
21631         Beta2. 
21632
21633         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
21634
21635
21636