2004-09-30 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
1 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
2
3         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
4
5         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
6
7         * marshal.c: Fix warnings.
8
9 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
10
11         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12         attempting to marshal the delegate_trampoline as the method_addr.
13         This patch has a static hashtable of marshalled delegates so that 
14         we can map delegate_trampoline addresses back to delegates.  This
15         allows a delegate passed to managed code to be passed back into native
16         code.  Fixes #67039
17
18 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
19
20         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
21
22         * reflection.c (method_encode_code): Align method headers properly.
23         Fixes #66025.
24
25 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
26
27         * marshal.c: In the runtime invoke wrapper, reset the abort
28         exception if it is cached. This avoids the automatic rethrowal of 
29         the exception after the catch of the wrapper. Also check for pending
30         interruptions before calling the managed method. This is done using
31         the new method emit_thread_force_interrupt_checkpoint, since the
32         normal checkpoint method is ignored when running the invoke wrapper.
33         * object.c: If the abort exception is rethrown, set the abort_exc
34         field of the thread, so it will be rethrown aftere every catch.
35         * threadpool.c: Only run an interruption checkpoint if what has been
36         requested is a stop of the thread (aborts will be ignored).
37         * threads.c: By default, a thread will now never be interrumped while
38         running the runtime invoke wrapper (this ensures that runtime_invoke
39         will always return to the caller if an exception pointer is provided).
40         There is a new special method mono_thread_force_interruption_checkpoint()
41         to force an interruption checkpoint even if running a protected
42         wrapper, which is used by the same runtime invoke wrapper to do a check
43         at a safe point.
44
45 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
46
47         * object.c, object-internals.h: Implemented mono_release_type_locks,
48         which releases the cctor locks held by a thread.
49         * threads.c, threads.h: In thread_cleanup, release cctor locks held
50         by a thread. Added mono_thread_exit() method to be used to safely stop
51         a thread.
52
53 2004-09-28  Raja R Harinath  <rharinath@novell.com>
54
55         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
56         Move null check before dereference.  Avoid indexing beyond the end
57         of the 'modules' array.
58
59 2004-09-28  Raja R Harinath  <rharinath@novell.com>
60
61         * metadata-internals.h (MonoImage): Add module_count field.
62         * image.c (load_modules): Set image->module_count.
63         (mono_image_load_file_for_image): Use image->module_count.
64         * reflection.c (mono_image_load_module): Append to image->modules array 
65         of dynamic assembly.
66         (mono_module_get_object): Fix loop to actually increment index.
67         Use image->module_count.
68         * assembly.c (mono_assembly_load_references): Use image->module_count.
69         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
70         Likewise.
71
72 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
73
74         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
75         Avoid assert on generic types.
76
77 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
78
79         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
80
81         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
82
83         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
84         function to convert a MarshalSpec structure to its managed counterpart.
85
86         * reflection.c: Fix warnings.
87         
88         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
89         field.
90
91         * icall.c (mono_create_icall_signature): Fix build.
92
93 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
94
95         * icall.c: Add MakePointType icall.
96
97         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
98         warnings.
99
100 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
101
102         * threadpool.c: reuse allocated slots in the queue.
103
104 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
105
106         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
107
108         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
109
110         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
111         previous change.
112
113         * tabledefs.h: Add constants for pinvoke attributes BestFit and
114         ThrowOnUnmappableChar.
115
116         * icall.c (ves_icall_Type_GetPacking): New icall.
117
118 2004-09-24  Martin Baulig  <martin@ximian.com>
119
120         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
121
122 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
123
124         * appdomain.c:
125         (mono_domain_set): allow setting a domain that is being unloaded.
126         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
127         being unloaded.
128
129 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
130
131         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
132         the GetCustomAttributes icall.
133
134 2004-09-23  Martin Baulig  <martin@ximian.com>
135
136         * object-internals.h (MonoReflectionGenericParam): Replaced
137         'has_ctor_constraint', `has_reference_type' and `has_value_type'
138         with `guint32 attrs'.
139
140 2004-09-23  Martin Baulig  <martin@ximian.com>
141
142         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
143
144 2004-09-23  Martin Baulig  <martin@ximian.com>
145
146         * object-internals.h (GenericParameterAttributes): New enum.
147
148 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
149
150         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
151         
152         * class.c (init_events): Fill out event->other field.
153
154         * class.c: Fix warnings.
155
156         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
157
158 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
159
160         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
161         walk which doesn't supply the IL offset.
162
163 2004-09-22  Martin Baulig  <martin@ximian.com>
164
165         * reflection.c (mono_reflection_setup_internal_class): If we're
166         System.ValueType, System.Object or System.Enum, set
167         `klass->instance_size' and create the vtable.
168         (mono_reflection_create_internal_class): If we're an enum type,
169         get the base class from our current corlib.
170
171 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
172
173         * reflection.h (MonoResolveTokenError): New type.
174
175         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
176         icall.
177
178         * icall.c: Add an 'error' argument to the ResolveToken icalls.
179
180 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
181
182         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
183         Support also calling constructors, but only for already allocated objects.
184
185 2004-09-17  Geoff Norton <gnorton@customerdna.com>
186
187         * reflection.c (type_get_qualified_name): If the klass is null
188         return the typename to avoid a NullRefEx.
189         (encode_cattr_value): Get the qualified name of the boxed type,
190         not the underlying enumtype.  Fixes #62984.
191
192 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
193
194         * marshal.c: Fix problems with previous checkin.
195
196 2004-09-21    <vargaz@freemail.hu>
197
198         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
199         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
200
201         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
202
203 2004-09-21  Geoff Norton <gnorton@customerdna.com>
204
205         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
206         should only return a type for pointers, arrays, and passbyref types.
207         Fixes bug #63841.
208
209 2004-09-21  Martin Baulig  <martin@ximian.com>
210
211         * domain.c (mono_debugger_check_runtime_version): New public
212         function.
213
214         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
215
216 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
217
218         * reflection.c: Added missing sort to the declarative security 
219         attributes table. MS implementation stops seeing the attributes if the
220         token number regress in the table (as shown by ildasm and permview).
221
222 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
223
224         * object-internals.h (MonoReflectionModule): Add 'token' field.
225         
226         * reflection.c (mono_reflection_get_token): Add support for Module
227         and Assembly.
228         (mono_module_get_object): Set 'token' field.
229         (mono_module_file_get_object): Set 'token' field.
230
231         * icall.c: Add new Assembly and Module icalls.
232
233         * appdomain.c: Bump corlib version.
234
235 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
236
237         * loader.h loader.c class.h class.c: Add helper functions for obtaining
238         tokens of metadata objects.
239
240         * reflection.h reflection.c (mono_reflection_get_token): New function
241         to obtain the token of a metadata object.
242
243         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
244
245 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
246
247         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
248         
249         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
250
251 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
252
253         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
254         * object-internals.h: Added 3 MonoArray* members to MonoReflection
255         AssemblyBuilder to access the permissions set in the class lib.
256         * reflection.c: Added security attributes encoding step in 
257         mono_image_build_metadata.
258         * tabledefs.h: Added new security actions defined in 2.0:
259         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
260
261 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
262
263         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
264         macro parameter.
265
266 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
267  
268         * locales.c: nullify the ICU_collator member of CompareInfo when it is
269           finalized. There where random SIGSEVs at program termination, when
270           an object being finalized was trying to do a string comparison and
271           the current culture was already finalized.
272  
273 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
274
275         * threads.c: call thread_cleanup before finishing the thread if we get
276         there.
277
278 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
279
280         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
281         assemblies from the parent. Fixes #65665.
282
283 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
284
285         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
286         modifiers.
287
288 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
289
290         * reflection.h: add prototype for mono_get_dbnull_object
291         * reflection.c: add prototypes for get_default_param_value_blobs 
292         and mono_get_object_from_blob for fussier compilers
293
294 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
295  
296         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
297         false deadlock checks in class initialization.
298  
299 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
300
301         * image.c (mono_image_addref): Fix comment.
302
303         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
304         possible.
305
306 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
307
308         * reflection.c (mono_param_get_objects): Modified to return
309         ParameterInfo.DefaultValue object.
310
311         (get_default_param_value_blobs):
312         (mono_get_object_from_blob):
313         (mono_get_dbnull_object): New helper routines. 
314
315         * object.c (mono_get_constant_value_from_blob): New helper routine
316         carved out from get_default_field_value ()
317
318         * object-internals.h (mono_get_constant_value_from_blob): Added
319         function declaration.
320
321 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
322
323         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
324         referenced assemblies. Fixes #62135.
325
326         * exception.h exception.c (mono_get_exception_file_not_found2): New
327         helper function.
328
329 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
330
331         * class.h class.c: Add mono_type_get_underlying_type ().
332
333 2004-09-09  Geoff Norton <gnorton@customerndna.com>
334
335         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
336         Fix GetTypes() to support dynamically created assemblies.
337
338 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
339
340         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
341         
342         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
343         previous patch.
344
345         * reflection.h reflection.c loader.c: Allow dynamic construction of
346         pinvoke methods. Fixes #65571.
347         
348         * reflection.c (mono_reflection_get_type): Revert previous change since
349         it causes regressions.
350
351 2004-09-08  Martin Baulig  <martin@ximian.com>
352
353         * class.c (class_compute_field_layout): Don't call
354         mono_class_layout_fields() for open generic instances.
355
356 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
357         * threads.c appdomain.c: fix typo in GC macro
358
359 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
360
361         * threads.c: don't call mono_thread_detach() in start_wrapper(),
362         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
363
364 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
365
366         * image.c (mono_image_close): Applied patch from 
367         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
368         assembly is loaded multiple times from data.
369         
370         * image.c (mono_image_open): Fix warning.
371
372 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
373
374         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
375         once. Fixes #58334.
376         
377         * reflection.c (mono_reflection_create_runtime_class): Initialize
378         klass->nested_classes. Fixes #61224.
379
380 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
381
382         * threads.c: sched_yield() on exit, to allow threads to quit.
383
384 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
385
386         * object.c (mono_unhandled_exception): Remove leftover debug code.
387
388 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
389
390         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
391
392 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
393
394         * marshal.c (emit_marshal_array): Really null terminate string arrays.
395         
396         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
397
398 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
399
400         * marshal.c (emit_marshal_array): Null terminate string arrays.
401         
402         * marshal.c (raise_auto_layout_exception): Fix warning.
403
404         * reflection.c (mono_param_get_objects): Initialize the default value
405         with DBNull.Value, not null. Fixes #62123.
406
407 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
408
409         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
410         throw an exception with a cute explanation.
411
412 2004-09-06  Dick Porter  <dick@ximian.com>
413
414         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
415         Close the new process's thread handle, as we don't use it.  The
416         handle stays around forever otherwise.
417
418 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
419
420         * object.c (arith_overflow): Fix warning.
421
422         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
423         calling conventions in method refs. Fixes #65352.
424
425         * reflection.c: Fix warnings.
426
427 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
428
429         * icall.c: Add a new icall for Array.Clear
430
431 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
432
433         * object.c: When allocating an array, we have to throw
434         an overflow exception if any of the lengths are < 0.
435
436 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
437
438         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
439         properly. Also move implementation of string array marshalling to 
440         managed code. Fixes #42316.
441
442 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
443
444         * assembly.c: provide more information when loading an assembly fails.
445
446 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
447
448         * filewatcher.c: don't expect the development fam package to be
449         installed.
450
451 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
452
453         * marshal.c: Make a copy of the signature cookie since it will be
454         freed by the caller.
455         
456         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
457
458         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
459
460         * metadata.c (mono_metadata_free_marshal_spec): New function to free
461         marshal specs.
462
463         * marshal.c: More refactoring.
464         
465         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
466         smaller functions.
467
468 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
469
470         * object.c: In mono_message_invoke, fill the output parameter array after
471           calling the managed method (it was done before the call). This fixes
472           bug #59299.
473
474 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
475
476         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
477         as well.
478
479 2004-09-02  Martin Baulig  <martin@ximian.com>
480
481         * class.c (mono_class_instance_size): Don't allow generic type
482         definitions or open generic instances.
483         (mono_class_array_element_size): If we're a value type, call
484         mono_class_instance_size() on the original class.
485
486         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
487         handle generic instances.
488
489         * mono-debug-debugger.c (write_type): Handle generic instances
490         like classes.
491
492 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
493
494         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
495         the allocation request fails. Fixes #65089.
496
497         * object.c (mono_runtime_free_method): Do not call mono_free_method.
498         
499         * object.c (mono_runtime_free_method): New function to free a dynamic
500         method.
501
502         * marshal.c (mono_delegate_free_ftnptr): New function to free the
503         delegate trampoline.
504
505         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
506         with hasthis as dynamic,
507
508         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
509
510         * domain.c (mono_jit_info_table_remove): New function to remove an
511         entry from the jit info table.
512
513         * class-internals.h (MonoMethod): Add 'dynamic' field.
514
515         * loader.c: Fix warnings.
516
517 2004-09-01  Martin Baulig  <martin@ximian.com>
518
519         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
520         instead of mono_debugger_lock() because the latter one is a no-op
521         unless running in the debugger.
522
523 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
524
525         * class.c (class_compute_field_layout): Classes with auto-layout or
526         reference fields are not blittable.
527         
528 2004-09-01  Dick Porter  <dick@ximian.com>
529
530         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
531         mono_image_get_filename() to get the assembly location.
532
533         * icall.c:
534         * metadata.h: Fix compile warnings
535
536 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
537
538         * class.c (class_compute_field_layout): System.Object is blittable.
539
540         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
541         as in/out. Fixes #59909.
542
543 2004-09-01  Martin Baulig  <martin@ximian.com>
544
545         * metadata.h (MONO_TYPE_ISREFERENCE): Call
546         mono_metadata_generic_inst_is_valuetype() if we're a generic
547         instance to check whether our underlying type is a reference type.
548
549 2004-09-01  Martin Baulig  <martin@ximian.com>
550
551         * metadata.c (mono_type_size): If we're a generic instance, call
552         mono_class_value_size() for value types.
553
554 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
555
556         * marshal.c: Implement more custom marshalling functionality. Fixes
557         #64915.
558
559 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
560
561         * mono-debug.c, debug-mono-symfile.c: add some locking love.
562
563 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
564
565         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
566
567         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
568
569         * icall.c: Fix some warnings.
570
571         * threads.c (abort_appdomain_thread): Fix unref errors.
572         (mono_thread_current): Fix THREAD_DEBUG define.
573
574 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
575
576         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
577
578         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
579
580 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
581
582         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
583         string arrays.
584
585 2004-08-28  Martin Baulig  <martin@ximian.com>
586
587         * metadata.c
588         (mono_metadata_generic_inst_is_valuetype): New public function.
589
590         * metadata.h (MONO_TYPE_ISSTRUCT): Call
591         mono_metadata_generic_inst_is_valuetype() if we're a generic
592         instance to check whether our underlying type is a valuetype.
593
594 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
595
596         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
597         #63768.
598
599 2004-08-25  Martin Baulig  <martin@ximian.com>
600
601         * loader.c (mono_get_method_from_token): Abstract methods can also
602         be generic and thus have type parameters.
603
604         * metadata-internals.h
605         (MonoDynamicImage): Added `GPtrArray *gen_params'.
606
607         * reflection.c (mono_image_get_generic_param_info): Don't create a
608         metadata row, just add an entry to the `gen_params' array.
609         (build_compressed_metadata): Sort the `gen_params' array and then
610         actually create the metadata.
611
612 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
613
614         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
615
616 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
617
618         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
619
620 2004-08-24  Martin Baulig  <martin@ximian.com>
621
622         * class.cs (mono_class_is_subclass_of): Like an interface, a
623         generic instance also derives from System.Object.
624
625 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
626
627         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
628         custom modifiers to be in any order. Fixes #61990.
629
630 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
631
632         * object.c: Register mono_object_new_fast icall.
633         
634         * object.c (mono_class_get_allocation_ftn): Return to calling
635         mono_object_new_fast, since it seems faster to compute the object 
636         size in unmanaged code than passing it as a parameter.
637
638         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
639
640         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
641         this function with Boehm as the oom handler, so we don't have to check
642         the result of GC_malloc.
643
644         * object.c: Remove checks for oom.
645
646         * object.h object.c (mono_class_get_allocation_ftn): New function to
647         return the icall which can be used to allocate an instance of a given
648         class. 
649
650         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
651
652         * class-internals.h: Add 'enabled' field.
653
654 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
655
656         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
657
658 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
659         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
660         value 0x0010.
661
662 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
663
664         * appdomain.c: use the Tls function for appdomain too,
665         at Zoltan's request. Actually return in mono_context_get
666
667         * appdomain.c, profiler.c, threads.c: use __thread
668
669 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
670
671         * appdomain.c threads.c: Call GC_CreateThread on windows.
672
673         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
674         multiple libraries since this don't work on windows.
675
676 2004-08-18  Martin Baulig  <martin@ximian.com>
677
678         * class-internals.h
679         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
680         MonoMethodHeader.
681
682         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
683         MonoMethodNormal since we also need it for abstract and interface
684         methods.
685
686         * reflection.c
687         (build_compressed_metadata): Sort the GenericParam table.
688         (mono_image_create_token): Added `gboolean create_methodspec'
689         argument; this is false when generating a MethodImpl token.
690         (reflection_methodbuilder_to_mono_method): Abstract and interface
691         methods may also have generic parameters.
692
693 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
694
695         * appdomain.c: thread local alloc
696
697 2004-08-17  Martin Baulig  <martin@ximian.com>
698
699         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
700
701         * icall.c
702         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
703         argument.
704
705         * class.c (mono_type_get_full_name): New public function.
706         (mono_type_get_name): Don't include the type arguments.
707
708 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
709
710         * Makefile.am: Build static versions of libmetadata and libmonoruntime
711         for inclusion into the mono executable.
712
713 2004-08-16  Martin Baulig  <martin@ximian.com>
714
715         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
716         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
717
718 2004-08-14  Martin Baulig  <martin@ximian.com>
719
720         * class.c (dup_type): Also copy the `byref' field.
721
722 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
723
724         * reflection.c (create_dynamic_mono_image): Revert the last change 
725         since it breaks bootstrap.
726
727 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
728
729         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
730
731         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
732         not free them with g_free.
733
734 2004-08-11  Martin Baulig  <martin@ximian.com>
735
736         * reflection.c (mono_reflection_setup_internal_class): Also call
737         mono_class_setup_mono_type() if we already have a `tb->type.type'.
738
739 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
740
741         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
742         called during default (first) AppDomain creation. Keep track of
743         Evidence when loading assemblies.
744
745 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
746
747         * opcodes.c, opcodes.h: reduce runtime relocations.
748
749 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
750
751         * culture-info.h, locales.c: fixes and chages to sue the new
752         optimized format of the locale data.
753         * culture-info-tables.h: regenerated.
754
755 2004-08-06  Geoff Norton <gnorton@customerdna.com>
756         
757         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
758
759 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
760
761         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
762         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
763         * domain-internals.h: icall declaration.
764         * icall.c: icall registration.
765         * object-internals.h: New fields in MonoAssembly for CAS.
766
767 2004-08-05  Duncan Mak  <duncan@ximian.com>
768
769         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
770         CEE_LDELEM_ANY.
771
772 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
773
774         * reflection.c: fix to deal with object[] arrays in custom ctors
775         (bug #62550).
776
777 2004-08-05  Martin Baulig  <martin@ximian.com>
778
779         * class.c (mono_class_array_element_size): Added support for
780         generic instances and correctly handle "recursive" types.
781
782 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
783
784         * assembly.c: Fix warnings.
785
786 2004-08-04  Martin Baulig  <martin@ximian.com>
787
788         * class.c
789         (mono_type_get_name_recurse): Added `gboolean include_arity'
790         argument specifying whether or not we should include the generic
791         arity in the type name.
792         (_mono_type_get_name): New static function.
793         (mono_class_setup_vtable): If we're a generic instance, don't
794         include the generic arity in the names of explicit method
795         implementations.        
796
797 2004-08-03  Martin Baulig  <martin@ximian.com>
798
799         * class.c (mono_type_get_name_recurse): Enclose the generic type
800         arguments in `<', '>'.
801
802 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
803
804         * gc.c: make GC warning messages use the trace API, they are just
805         noise to most of the users.
806
807 2004-08-03  Martin Baulig  <martin@ximian.com>
808
809         * debug-mono-symfile.c (read_string): Correctly read the string.
810
811 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
812
813         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
814         
815         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
816         icalls.
817         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
818
819 2004-07-30  Martin Baulig  <martin@ximian.com>
820
821         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
822         Reflect latest symbol writer changes.   
823
824 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
825
826         * object.c: always create an object if null is passed
827         to Invoke() where a valuetype is expected.
828
829 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
830
831         * marshal.c (mono_marshal_init): make managed
832         signatures match native ones better for 64bits.
833
834 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
835
836         * appdomain.c: hack to build correctly the private bin path on windows.
837         Fixes bug #61991.
838
839 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
840
841         * assembly.c: Load mscorlib from the correct framework directory
842           (mono/<version>/mscorlib.dll).
843         * appdomain.h: Added prototypes for new functions.
844         * internals.h: Added some prototypes.
845         * domain.c: When initializing the runtime, get from the executable and
846           the configuration files the runtime version that the app supports.
847           Added support methods for reading app.exe.config. Added list of versions
848           supported by the JIT. Added two new methods: mono_init_from_assembly,
849           which initializes the runtime and determines the required version from
850           the provided exe file, and mono_init_version, which initializes
851           the runtime using the provided version.
852         * icall.c: Get machine.config from version-specific directory.
853         * reflection.c: When generating an image, embed the version number
854           of the current runtime.
855
856 2004-07-28  Dick Porter  <dick@ximian.com>
857
858         * socket-io.c
859         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
860         returned sockaddr size before creating the remote address object.
861         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
862         61608.
863
864 2004-07-28  Dick Porter  <dick@ximian.com>
865
866         * locales.c (string_invariant_compare_char): Fix invariant char
867         compares between upper and lower cases.  Fixes bug 61458.
868
869 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
870         
871         * marshal.c: actually cache stelem.ref wrappers.
872         
873 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
874
875         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
876         sections and remove the mono_cli_rva_map () function.
877
878 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
879
880         * debug-mono-symfile.c: fix one more endianess issue, from a patch
881         by Geoff Norton (<gnorton@customerdna.com>).
882
883 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
884
885         * class.c: fix class loads for pointer types (typeof(int) !=
886         typeof(int*)).
887
888 2004-07-27  Martin Baulig  <martin@ximian.com>
889
890         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
891         reading the debugging information from an external ".mdb" file.
892
893 2004-07-24  Martin Baulig  <martin@ximian.com>
894
895         * reflection.c (mono_image_get_type_info): Only write a class
896         layout entry if we actually have a size or a packing size.
897
898 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
899
900         * reflection.c (type_get_fully_qualified_name): 
901         insert cast to get type checking of ?: with non-gcc compilers
902
903 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
904
905         * rand.c: use g_getenv for both lookups of
906         MONO_EGD_SOCKET
907
908 2004-07-17  Martin Baulig  <martin@ximian.com>
909
910         * reflection.c (mono_reflection_bind_generic_method_parameters):
911         Set `gmethod->reflection_info'.
912
913 2004-07-17  Martin Baulig  <martin@ximian.com>
914
915         * class.c (mono_class_create_from_typedef): Insert the newly
916         created class into the hash table before computing the interfaces
917         since we could be called recursively.
918
919 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
920
921         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
922         function to implement stelem.ref in managed code
923         * class-internals.h, debug-helpers.c: a new wrapper type
924         for the above.
925
926 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
927
928         * gc.c: allow GC handles to work even when no GC is compiled in.
929         Fix part of bug #61134 (GetAddrOfPinnedObject).
930
931 2004-07-13  Peter Williams  <peter@newton.cx>
932  
933         * process.c (complete_path): Make sure we don't attempt to execute
934         directories.
935  
936 2004-07-12  Geoff Norton <gnorton@customerdna.com>
937
938         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
939           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
940           and will add/subtract the hour if needed
941
942 2004-07-12  Martin Baulig  <martin@ximian.com>
943
944         * reflection.c (mono_field_get_object): If we have
945         `field->generic_info', take the attributes from
946         `field->generic_info->generic_type'.    
947
948 2004-07-12  Martin Baulig  <martin@ximian.com>
949
950         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
951         This function must be called before initializing the runtime.
952         (mono_debug_init_1): New function; call this after initializing
953         the runtime, but before loading the assembly.  It tells the
954         debugger to load corlib and the builtin types.
955
956         * mono-debug-debugger.c: Did some larger changes in the debugging
957         code; support recursive class declarations, make sure we actually
958         add all classes.
959
960 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
961
962         * debug-helpers.c: undo my previous patch and fixed the real issue in
963         ../mini/exceptions-x86.c
964
965 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
966
967         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
968         when no HOME env. variable was set and a NullRef was thrown in a .cctor
969         called from other .cctors.
970
971 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
972
973         * loader.c: Removed the mono_loader_wine_init hack now that we are
974         doing a managed version of Windows.Forms.
975
976 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
977
978         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
979         threadpool.c, threads.c: remove static data from rootset.
980
981 2004-07-09  Dick Porter  <dick@ximian.com>
982
983         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
984         Don't do any more processing if the matched length was 0.  It was
985         increasing the size of the string before.  Fixes bug 61167.
986
987 2004-07-09  Dick Porter  <dick@ximian.com>
988
989         * socket-io.h:
990         * socket-io.c
991         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
992         Add support for SO_PEERCRED if its available.
993
994 2004-07-09  Peter Bartok <pbartok@novell.com>
995         * loader.c: winelib.exe.so error message is now only displayed if
996         MONO_DEBUG is set. To help us avoid questions when people are trying
997         out the new Managed.Windows.Forms.
998
999 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
1000
1001         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
1002         for isinst and castclass wrappers.
1003
1004         * class-internals.h icall.c: Move registration and lookup of JIT icalls
1005         to libmetadata from the JIT, so they could be used by the marshalling
1006         code and the interpreter.
1007
1008         * marshal.c: Register marshalling related JIT icalls here instead of
1009         in mini.c. Use CEE_MONO_ICALL instead of the family of 
1010         CEE_MONO_PROC<x> opcodes to call marshalling functions.
1011
1012         * metadata.h: Remove unneeded marshalling conversions.
1013
1014         * opcodes.c: Update for new opcodes.
1015         
1016 2004-07-08  Martin Baulig  <martin@ximian.com>
1017
1018         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
1019         (mono_debug_get_domain_data): Make this function static.
1020
1021 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
1022
1023         * gc.c, object.h: add nice GC handle API for embedders.
1024
1025 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
1026
1027         * reflection.c: more changes for the new api
1028
1029         * object.c: When we reflect on a field w/ a constant value, it
1030         will not have a memory location, so we must access metadata. Also,
1031         allow easier reading of strings so that we can read them from
1032         the constant data.
1033
1034         * class.c (mono_class_layout_fields): no need for literal fields here.
1035
1036         * class-internals.h: api changes for const fields
1037
1038         * icall.c (ves_icall_get_enum_info): use new apis for const fields
1039
1040 2004-07-06  Martin Baulig  <martin@ximian.com>
1041
1042         * mono-debug.h: Increment version number to 44.
1043
1044         * mono-debug.c (mono_debug_add_wrapper): The second argument is
1045         now a gpointer, rewrote this whole method.
1046
1047         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
1048         function.  Add information about the wrapper in a new "misc table".
1049
1050         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
1051         for the new misc table.
1052
1053 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
1054
1055         * metadata-internals.h image.c: Add a cache for helper signatures.
1056
1057         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
1058
1059 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
1060
1061         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
1062         delegates from a delegate. Fixes #61033.
1063         
1064         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
1065         marshalling of stringbuilder arrays. Fixes #59900.
1066
1067 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
1068
1069         * icall.c: Add EnumBuilder:setup_enum_type icall.
1070
1071 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
1072
1073         * icall.c: Added a new icall for the property version of
1074         OffsetOfStringData.
1075
1076 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
1077
1078         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
1079         it has a constant size across platforms.
1080
1081         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
1082         stack trace.
1083
1084 2004-06-29  Martin Baulig  <martin@ximian.com>
1085
1086         * mono-debug.c (mono_debug_add_method): Protect the whole function
1087         in mono_debugger_lock(), not just parts of it.
1088
1089 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
1090
1091         * reflection.c: make sure padding bytes in heaps are zeroed.
1092
1093 2004-06-24  David Waite  <mass@akuma.org>
1094
1095         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
1096         image.c, loader.c, locales.c, marshal.c, metadata.c,
1097         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
1098         string-icalls.c, threads.c: change to C90-style comments from C99 /
1099         C++ -style
1100
1101 2004-06-24  Dick Porter  <dick@ximian.com>
1102
1103         * threads.c
1104         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
1105         return createdNew.  Fixes bug 60412.
1106
1107         * threads-types.h: 
1108         * icall.c: Add createdNew parameter to CreateMutex icall
1109
1110 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
1111
1112         * reflection.c, object-internals.h: save default value in params.
1113
1114 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1115
1116         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
1117         no need to build a new path combining that with the application base.
1118         Fixes bug #60442.
1119
1120 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
1121
1122         * reflection.c: fixed minor standard compliance issues.
1123
1124 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
1125
1126         * reflection.c: fixed issue with encoding some custom attributes
1127         (arrays in properties and fields, bug #60411).
1128
1129 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1130
1131         * reflection.c: fix start address when copying the public key token.
1132
1133 2004-06-23  Martin Baulig  <martin@ximian.com>
1134
1135         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
1136         the `exc' object in a static object to put it into the GC's root set.
1137
1138 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
1139
1140         * reflection.c: make mono_reflection_setup_internal_class ()
1141         callable a second time to setup a new parent class.
1142
1143 2004-06-23  Dick Porter  <dick@ximian.com>
1144
1145         * threads.c: Check for WAIT_IO_COMPLETION return values.
1146
1147 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
1148
1149         * appdomain.c: Removed the g_free on the public key token. Now copy 
1150         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
1151         * assembly.c: Added public key token string value when loading 
1152         assemblies. Fix bug #60439.
1153         * icall.c: Added missing informations (like public key) in 
1154         GetReferencedAssemblies. Fix #60519.
1155         * image.h: Changed definition for public key token from const char*
1156         public_tok_value to guchar public_key_token [17];
1157         * reflection.c: Updated for changes to public key token.
1158
1159 2004-06-22  Lluis Sanchez Gual
1160
1161         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
1162         for the field in base classes.
1163
1164 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
1165
1166         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
1167         mark headers as not supported, they are installed only for use by the
1168         debugger.
1169
1170 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
1171
1172         * *.c, *.h: avoid namespace pollution in public headers.
1173
1174 2004-06-21  Martin Baulig  <martin@ximian.com>
1175
1176         * exception.c (mono_get_exception_security): It's in
1177         "System.Security", not in "System".
1178
1179         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
1180         the exception classes.
1181
1182 2004-06-21  Martin Baulig  <martin@ximian.com>
1183
1184         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
1185         Protect the exception object from being finalized.
1186
1187 2004-06-21  Martin Baulig  <martin@ximian.com>
1188
1189         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
1190         public function.
1191
1192 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
1193
1194         * reflection.c: Load the assembly in mono_reflection_type_from_name,
1195         if it was not loaded before. Fix parts of #60439.
1196
1197 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
1198
1199         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
1200         code that was broken since Ben's change: wrappers are now
1201         dependent on the method signature only again.
1202
1203 2004-06-21  Martin Baulig  <martin@ximian.com>
1204
1205         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
1206         added interface support.
1207
1208 2004-06-21  Martin Baulig  <martin@ximian.com>
1209
1210         * class.c (mono_vtable_get_static_field_data): New public method.
1211
1212 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
1213
1214         * filewatcher.c : Windows build fix to be compliant with API changes.
1215
1216 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
1217
1218         * class.h, class.c: more accessors.
1219         * metadata.h, metadata.c: prepare for hiding MonoType and
1220         MonoMethodSignature: people should use the accessors from now on
1221         outside of the tree.
1222
1223 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
1224
1225         * *.c, *.h: more API cleanups.
1226
1227 2004-06-18  Jackson Harper  <jackson@ximian.com>
1228
1229         * assembly.c: Trace loading assemblies.
1230         * loader.c: Trace loading native libraries.
1231         * mono-config.c: Trace loading config files.
1232         
1233 2004-06-18  Dick Porter  <dick@ximian.com>
1234
1235         * locales.c: Tell ICU the lengths of strings, it can cope with
1236         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
1237
1238 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
1239
1240         * image.c: swapped name/filename;
1241
1242 2004-06-18  Martin Baulig  <martin@ximian.com>
1243
1244         * mono-debug-debugger.c (write_class): Write the parent class at
1245         the end of the header.
1246
1247 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
1248
1249         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
1250
1251 2004-06-17  Raja R Harinath  <rharinath@novell.com>
1252
1253         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
1254         (bundle_obj): New conditional define.
1255         (BUILT_SOURCES): Remove.
1256         ($(bundle_srcs)): Make parallel-make safe.
1257         (libmonoruntime_la_LIBADD): Make unconditional.
1258         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
1259         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
1260
1261 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
1262
1263         * culture-info-tables.h: It was inconsistent with the latest
1264           supp info files.
1265
1266 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
1267
1268         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
1269         be loaded.
1270
1271         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
1272         with gcc 2.95.
1273
1274 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
1275
1276         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
1277         cleaned up public header threads.h.
1278
1279 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
1280
1281         * Makefile.am, *.c, *.h: more API cleanups.
1282
1283 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
1284
1285         * Makefile.am: removed monosn from compilation.
1286         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
1287         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
1288         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
1289         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
1290         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
1291         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
1292
1293 2004-06-15  Jackson Harper  <jackson@ximian.com>
1294
1295         * assembly.c: Make locales lower case when searching the GAC for
1296         assemblies. gacutil will always make locales lowercase when
1297         installing so this effectively makes them case insensitive.
1298         
1299 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
1300
1301         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
1302         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
1303           parameter which allows to choose whether the wait can be interrupted or 
1304           not. Also added the method mono_monitor_enter(), which locks the monitor
1305           using an infinite wait and without allowing interruption.
1306           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
1307           interrupted.
1308         * object.h: Added new fields in MonoThread. suspend_event holds the event
1309           used to susped/resume the thread. synch_lock is the lock object to use for
1310           modifying the thread state.
1311         * threads.c: Use the new synch_lock object for locking, instead of "this",
1312           which can generate deadlocks.
1313           Moved thread state change in Thread.Sleep and Thread.Join from managed
1314           to unmanaged code. This avoids a deadlock when the thread was suspended
1315           just after acquiring the thread lock.
1316           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
1317           Implemented Thread.Suspend using an event instead of ThreadSuspend,
1318           which is not fully implemented in the io-layer.
1319         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
1320
1321 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
1322
1323         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
1324         threads-types.h: more API cleanups.
1325
1326 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
1327
1328         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
1329         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
1330         threadpool.c, threads.c: first pass at the exported API cleanup.
1331
1332 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
1333
1334         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
1335
1336 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1337
1338         * icall.c: added internalGetHome.
1339
1340 2004-06-14  Dick Porter  <dick@ximian.com>
1341
1342         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
1343         possible to return successfully when '.' or '..' were the only
1344         entries in a directory, but were skipped.  The MonoIOStat was not
1345         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
1346         Fixes bug 59574.
1347
1348 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
1349
1350         * reflection.c: make binaries run on .Net 1.1 by default.
1351
1352 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1353
1354         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
1355
1356 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
1357
1358         * marshal.c: keep track of struct size with explicit layout
1359         (bug #59979).
1360
1361 2004-06-12  Martin Baulig  <martin@ximian.com>
1362
1363         * mono-debug-debugger.c: Comment out a debugging g_message().
1364
1365 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
1366
1367         * reflection.c, reflection.h: do not free custom attrs that are cached.
1368         * icall.c: use braces to make code clearer.
1369
1370 2004-06-11  Martin Baulig  <martin@ximian.com>
1371
1372         * class.h (MonoInflatedField): New type.
1373         (MonoClassField): Replaced `MonoType *generic_type' with
1374         `MonoInflatedField *generic_info'.
1375
1376         * icall.c
1377         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
1378
1379 2004-06-11  Martin Baulig  <martin@ximian.com>
1380
1381         * reflection.c (mono_image_create_method_token): Correctly encode
1382         varargs methods.
1383
1384 2004-06-11  Martin Baulig  <martin@ximian.com>
1385
1386         * metadata.c (mono_metadata_parse_method_signature): When parsing
1387         a MethodDef which has VarArgs, also set sentinelpos if we don't
1388         have any parameters.
1389
1390 2004-06-11  Martin Baulig  <martin@ximian.com>
1391
1392         * verify.c (mono_method_verify): In CEE_CALL, use
1393         mono_method_get_signature() to get the method's signature, unless
1394         we're a PInvoke method.
1395
1396 2004-06-10  Jackson Harper  <jackson@ximian.com>
1397
1398         * assembly.c: Use <path>/lib/mono/gac for the extra paths
1399         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
1400         logical name as the supplied path is just a prefix to the gac not
1401         the direct path to it.
1402         
1403 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
1404
1405         * reflection.c: make the token for a created method match
1406         the token of the MethodBuilder it was created from
1407         (IKVM requires this behaviour now).
1408
1409 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
1410
1411         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
1412         reflection.c, socket-io.c: leak fixes.
1413
1414 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
1415
1416         * icall.c: handle sentinel pos in vararg methods in position different
1417         from 0.
1418
1419 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1420
1421         * culture-info-tables.h: freshly generated.
1422
1423 2004-06-09  Martin Baulig  <martin@ximian.com>
1424
1425         * loader.c (mono_get_method_constrained): Call `mono_class_init
1426         (constrained_class)'.   
1427
1428 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
1429
1430         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
1431         any methods. Fixes #59629.
1432
1433 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1434
1435         * culture-info-tables.h: reflecting locale-builder updates.
1436
1437 2004-06-08  Dick Porter  <dick@ximian.com>
1438
1439         * object.h:
1440         * locales.c: Fixed compile warnings, including a real bug in
1441         CompareInfo_internal_compare.
1442         
1443 2004-06-08  Dick Porter  <dick@ximian.com>
1444
1445         * locales.c
1446         (ves_icall_System_Globalization_CompareInfo_internal_index):
1447         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1448         Double-check the resuls of usearches, because ICU currently
1449         ignores most of the collator settings here.  Fixes bug 59720.
1450         
1451 2004-06-08  Dick Porter  <dick@ximian.com>
1452
1453         * locales.c
1454         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1455         Fix memory leak and segfault-causing typo.  No idea how this one
1456         lasted so long without being noticed.
1457
1458 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
1459
1460         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
1461         any methods. Fixes #59629.
1462
1463 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1464
1465         * assembly.c:
1466         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
1467         own the critical section before). Removed dead code (that's done
1468         in the preload hook).
1469
1470         (mono_assembly_load_with_partial_name): call the preload hook.
1471
1472 2004-06-08  Martin Baulig  <martin@ximian.com>
1473
1474         * metadata.c (mono_metadata_signature_alloc): Default
1475         `sentinelpos' to -1.
1476
1477         * reflection.c (mono_image_get_array_token): Likewise.
1478
1479 2004-06-08  Martin Baulig  <martin@ximian.com>
1480
1481         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
1482
1483         * metadata.c (mono_metadata_parse_method_signature): When parsing
1484         a MethodDef which has VarArgs, set sentinelpos.
1485
1486         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
1487         `gint16' since we're using -1 for non-varargs methods.
1488
1489         * reflection.c
1490         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
1491         (method_encode_signature): Added varargs support.
1492         (method_builder_encode_signature): Likewise.
1493         (mono_image_get_varargs_method_token): New static method.
1494         (mono_image_create_method_token): New public method; this is
1495         called via an icall instead of mono_image_create_token() when
1496         calling a varargs method.       
1497
1498 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
1499
1500         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
1501
1502 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1503
1504         * culture-info-tables.h : Reflecting the latest locale-builder that
1505           fixed empty array representation ({} to {0}).
1506
1507 2004-06-07  Jackson Harper  <jackson@ximian.com>
1508
1509         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
1510         looking up extra gac paths. This allows MONO_GAC_PATH to act
1511         exactly like a prefix.
1512         
1513 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
1514
1515         * reflection.c (mono_reflection_type_from_name): Make a copy of the
1516         type name before modifying it. Fixes #59405.
1517
1518 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
1519
1520         * culture-info.h: added fields for "all datetime patterns".
1521         * locales.c: (  ves_icall_System_Globalization_CultureInfo
1522           _construct_datetime_format ()): fill xxx_patterns fields.
1523         * object.h: added fields for "all datetime patterns" to
1524           MonoDateTimeFormatInfo.
1525         * culture-info-tables.h: reflecting locale-builder updates.
1526
1527 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
1528
1529         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
1530         the event has no add and remove methods. Fixes #59629.
1531
1532 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
1533
1534         * object.c: Fixed possible integer overflow when allocating large
1535         strings.
1536
1537 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
1538
1539         * culture-info-tables.h: reflecting locale-builder updates.
1540
1541 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
1542
1543         * culture-info-tables.h: reflecting locale-builder updates.
1544
1545 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
1546
1547         * culture-info-tables.h: reflecting locale-builder updates.
1548
1549 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
1550
1551         * threads.c: Made Thread.Sleep abortable.
1552
1553 2004-06-02  Martin Baulig  <martin@ximian.com>
1554
1555         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
1556
1557         * debug-mono-symfile.h: Bumped symbol file version number to 37.
1558
1559 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
1560
1561         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
1562
1563 2004-05-30  Jackson Harper  <jackson@ximian.com>
1564
1565         * reflection.c: Do not hardcode assembly versions or public key
1566         tokens anymore. All of this except the corlib section was dead
1567         code anyways.
1568         
1569 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
1570
1571         * object.c (mono_runtime_invoke_array): Automatically create boxed
1572         objects for byref valuetypes if needed. Fixes #59300.
1573         
1574         * object.c (mono_method_return_message_restore): Handle 
1575         MONO_TYPE_OBJECT as well.
1576
1577 2004-05-28  Jackson Harper  <jackson@ximian.com>
1578
1579         * reflection.c: The modified type encoding was causing build
1580         problems. Reverted for now.
1581         
1582 2004-05-28  Jackson Harper  <jackson@ximian.com>
1583
1584         * reflection.c/h: Take an assembly ref so that we dont create
1585         fully qualified names when encoding types in the same assembly as
1586         the custom attribute being emitted.
1587         * appdomain.c: Increment version number.
1588         
1589 2004-05-26  Duncan Mak  <duncan@ximian.com>
1590
1591         * icall.c
1592         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1593         Set the full version number (major, minor, build, revision).
1594
1595 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
1596
1597         * marshal.c (emit_struct_conv): increment src/dst after blit
1598         (mono_marshal_get_managed_wrapper,
1599         mono_marshal_get_native_wrapper): make sure we have marshalling
1600         info before marshalling params (info computation affects
1601         blittable)
1602
1603         * class.c (class_compute_field_layout): correctly deal with
1604         blittable
1605         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
1606         value types (as per what windows dows by default)
1607         (mono_class_setup_mono_type): System.ValueType is blittable
1608         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
1609         blittable
1610
1611         * marshal.c (mono_marshal_load_type_info): flag types  as
1612         non-blittable if the native layout doesn't match the managed
1613         layout
1614
1615 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1616
1617         * appdomain.c: don't add stuff in the private search path that is
1618         above the application base. If application base is not set, there's
1619         no private search path.
1620
1621 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
1622
1623         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
1624         byref struct arguments in native->managed marshalling.
1625
1626 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
1627
1628         * marshal.c (mono_marshal_get_runtime_invoke): correctly
1629         cache methods using signature (special case for methods
1630         that are value type or string class)
1631         
1632         * image.c (mono_image_close): clean up allocated GSList's
1633         in runtime_invoke_cache.
1634
1635 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1636
1637         * mono-config.c: set the correct path for mono_cfg_dir on windows when
1638         there's no MONO_CFG_DIR environment variable defined.
1639
1640 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1641
1642         * threads.c: windows version must be >= 0x0500 to include OpenThread.
1643
1644 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
1645
1646         * threadpool.c: Really wait for 500ms after the async call, even if the wait
1647           is interrumped.
1648         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
1649           before waiting for it, and call CloseHandle after the wait to unref it.
1650           This will make sure that handles are not disposed too early.
1651
1652 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1653
1654         * appdomain.c:
1655         * appdomain.h:
1656         * icall.c: removed
1657         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
1658         needed now.
1659
1660         * object.c: se the application_base only for the domain that runs
1661         Main. Fixes bug #59216,
1662
1663 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1664
1665         * appdomain.c:
1666         * object.c: only the domain in which Main is run have
1667         SetupInformation.ConfigurationFile set, so moved a few lines from
1668         appdomain.c to object.c.
1669
1670 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1671
1672         * appdomain.c: we tried to load [name].(dll|exe), but according
1673         to bug #57710, we must also try [culture]/[name].(dll|exe) and
1674         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
1675         There's a test case attached to bug #58922.
1676
1677 2004-05-27  Dick Porter  <dick@ximian.com>
1678
1679         * icall.c:
1680         * file-io.c: Implemented icalls for locking and unlocking regions
1681         in a file.
1682         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
1683         FALSE on error (fixes both compiler warning and real bug.)
1684
1685 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
1686
1687         * culture-info-tables.h: reflecting locale-builder updates.
1688
1689           (Added missing ChangeLog entry for 05/26)
1690
1691 2004-05-27  Jackson Harper  <jackson@ximian.com>
1692
1693         * locales.c: Fix some cut and paste errors.
1694         
1695 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1696
1697         * mono-config.c: set the correct path for config. directory on windows.
1698
1699 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1700
1701         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
1702           on win32.
1703
1704 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1705
1706         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
1707         from pinvoke functions.
1708         
1709         * marshal.c (mono_ftnptr_to_delegate): Implement this.
1710
1711 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
1712
1713         * culture-info-tables.h: reflecting locale-builder updates.
1714
1715 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
1716
1717         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
1718         #59086.
1719
1720 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
1721
1722         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
1723         * icall.c: Modified icalls for RNG.
1724         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
1725         Windows (CryptoAPI).
1726
1727 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1728
1729         * locales.c: Fix build.
1730
1731 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
1732
1733         * culture-info-tables.h: reflecting locale-builder updates.
1734
1735 2004-05-25  Jackson Harper  <jackson@ximian.com>
1736
1737         * locales.c: When creating the current culture use the $LANGs
1738         specific culture. So DateTimeFormat and NumberFormat entries are created.
1739         
1740 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
1741
1742         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
1743         a char array as parameter.
1744
1745 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
1746
1747         * image.c: In mono_image_open(), always use an absolute path name to
1748           look for already loaded images.
1749
1750 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
1751
1752         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
1753         missing in the windows build (like older cygwin include files).
1754
1755 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
1756
1757         * icall.c: Fixed check for possible integer overflow in Buffer_
1758         BlockCopy icall. Replaced comments style // by /* */.
1759
1760 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
1761
1762         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
1763         
1764         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
1765         check after MONO_VTADDR. Fixes pinvoke2.exe.
1766
1767         * marshal.h marshal.c metadata.h: Add beginnings of support for
1768         ftnptr -> delegate marshalling.
1769
1770 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
1771
1772         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
1773         * threads.c: Fix warnings.
1774
1775 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
1776
1777         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
1778         * icall.c: Registered icalls for Suspend and Resume.
1779         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
1780           Thread.Abort.
1781         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
1782         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
1783         * process.c: Use WaitForSingleObjectEx.
1784         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
1785           checkpoints.
1786         * threads.c, threads.h: Make use of new Ex wait methods. Improved
1787           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
1788           for Suspend and Resume. Added new mono_thread_stop, used for stoping
1789           background threads. Added basic support for Abort in Windows.
1790           Start new threads using a managed delegate invoke wrapper. This wrapper
1791           has an interruption checkpoint that is needed since an interruption
1792           can be requested before the thread leaves the unmanaged code that starts 
1793           the thread.
1794         * marshal.c: Added interruption checkpoint after every native call, and
1795           also before managed calls for wrappers called from unmanaged code to
1796           go into managed code.
1797         * object.h: Added new field in MonoThread to keep track of interruption
1798           requests.
1799
1800 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
1801
1802         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
1803         calls.
1804
1805 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1806
1807         * appdomain.c:
1808         * assembly.c:
1809         * gc.c:
1810         * locales.c:
1811         * mono-config.c:
1812         * rand.c: getenv -> g_getenv (windows!)
1813
1814         * process.c: complete_path is also used on non-windows platforms.
1815
1816 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1817
1818         * icall.c: new signature for Process_Start.
1819
1820         * process.[ch]: new signature for Process_Start. If we're on windows
1821         and UseShellExecute is false, we have to search for the program by
1822         ourselves if we don't get a full path.
1823
1824 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
1825
1826         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
1827         marshalling and call CleanUpNativeData if needed. Fixes #58646.
1828
1829 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1830
1831         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
1832         Fixes bug #58373.
1833
1834 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1835
1836         * process.c: use double quotes to quote program name and arguments on
1837         windows. Fixes bug #58575.
1838
1839 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1840
1841         * file-io.c: don't return "." and ".." when using windows Find*File.
1842
1843 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
1844
1845         * marshal.c: Don't pass wrappers to message init because method 
1846         addressed used to lookup metadata. part of remoting[2|3] fix.
1847
1848 2004-05-15  Jackson Harper  <jackson@ximian.com>
1849
1850         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
1851         path is essentially the same as MONO_PATH except that it points to
1852         GACs instead of lib directories.
1853         * loader.h: The user gac is gone so we dont need function to
1854         enable/disable it.
1855         * mono-config.c: user gac option is now gone.
1856         
1857 2004-05-15  Jackson Harper  <jackson@ximian.com>
1858
1859         * culture-info.h: Make defines more consistent, add calendar data
1860         to the culture info table.
1861         * culture-info-tables.h: Add basic calendar data. Basically
1862         everyone gets default gregorian until all the data is
1863         updated.
1864         * locales.c: Use the new consistent defines. Set calendar data for
1865         culture info objects.
1866         * object.h: add a field for calendar data to CultureInfo
1867         
1868 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
1869
1870         * image.c: image->runtime_invoke_cache is keyed on signatures now.
1871         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
1872         a signature.
1873         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
1874         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
1875         an extra param that is the pointer of the method to invoke. The IL for
1876         the invoke method is no longer specific to the method, but to the
1877         signature of the method. Thus, we can share the same code for multiple
1878         methods. This reduces the number of methods that have to be compiled.
1879
1880 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
1881
1882         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
1883
1884         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1885
1886         * icall.c: Optimize Buffer.BlockCopy.
1887
1888 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1889
1890         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
1891         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
1892         quote). Changed them to "MMMM yyyy".
1893
1894 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
1895
1896         * rand.c
1897         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
1898
1899 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
1900
1901         * reflection.h: Updated after changes to managed structures.
1902
1903         * appdomain.c: Bump corlib version.
1904
1905 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1906
1907         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
1908         windows.
1909
1910 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1911
1912         * Makefile.am: link to ../os/libmonoos.la on windows.
1913
1914         * assembly.c:
1915                 -If MONO_DEBUG, warn about non-existing directories in
1916                 MONO_PATH.
1917                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
1918                 compile time variable.
1919                 -Removed init_default_path and call mono_set_rootdir from
1920                 libmonoos.a instead (windows only).
1921
1922         * assembly.h: declare mono_assembly_getrootdir().
1923
1924         * domain.c:
1925         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
1926
1927         * loader.c: s/getenv/g_getenv/
1928
1929 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
1930
1931         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
1932
1933         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
1934
1935         * metadata.h: Add new marshalling conversions.
1936
1937         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
1938         function.
1939
1940         * reflection.c (mono_reflection_get_type): Lookup the type in all
1941         modules of a multi-module assembly. Fixes #58291.
1942
1943 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
1944
1945         * threads.c: Before aborting a background, set the StopRequested
1946         state.  This avoids throwing the Abort exception.
1947         In mono_thread_manage, don't continue with the shutdown until all
1948         aborted threads have actually stopped.
1949
1950 2004-05-10  Jackson Harper  <jackson@ximian.com>
1951
1952         * locales.c: Remove the modifier from culture names.
1953         
1954 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1955
1956         * Makefile.am: monosn is not installed any more. It has been deprecated
1957         in favor of sn.
1958
1959 2004-05-07  Jackson Harper  <jackson@ximian.com>
1960
1961         * locales.c
1962         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
1963         Fix array construction, add bailout if the length is 0.
1964
1965 2004-05-07  Dick Porter  <dick@ximian.com>
1966
1967         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
1968         machine doesn't have a DNS entry.  Patch by Urs Muff
1969         (umuff@quark.com), fixes bug 57928.
1970
1971 2004-05-06  Jackson Harper  <jackson@ximian.com>
1972
1973         * reflection.c: Handle null PublicTokens properly. alloc mem for
1974         assembly names culture so we dont crash when freeing it.
1975         
1976 2004-05-06  Jackson Harper  <jackson@ximian.com>
1977
1978         * assembly.c: Check the usergac when loading with partial names.
1979         
1980 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
1981
1982         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
1983         does nothing for now (not required for Linux/Windows) but the class
1984         library can call it (and a newer or modified runtime could need it).
1985         * icall.c: Registred icall.
1986
1987 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1988
1989         * loader.c: prints a message on module loading error we set MONO_DEBUG
1990         environment variable.
1991
1992 2004-05-05  Jackson Harper  <jackson@ximian.com>
1993
1994         * appdomain.c: Handle PublicKeyToken=null properly.
1995         
1996 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
1997
1998         * environment.c|h: Added icall ves_icall_System_Environment_
1999         GetOSVersionString to get the current OS version as a string.
2000         * icall.c: Registred icall.
2001
2002 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
2003
2004         * object.c: in mono_object_get_virtual_method(), take into account that
2005         non-virtual methods don't have a slot in the vtable. Check needed when
2006         the object is a proxy.
2007
2008 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
2009
2010         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
2011         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
2012
2013         * object.c (mono_class_compute_gc_descriptor): Fix warning.
2014
2015         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
2016         passed when a valuetype is expected.
2017
2018         * object.c (mono_unhandled_exception): Only set the exit code if the
2019         exception happens in the main thread. Fixes thread5.exe.
2020
2021         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
2022         invalid names. Fixes #58047.
2023
2024 2004-05-03  Jackson Harper  <jackson@ximian.com>
2025
2026         * assembly.c: This line was committed accidently and is unneeded.
2027         
2028 2004-05-03  Jackson Harper  <jackson@ximian.com>
2029
2030         * icall.c: Add new icall for Assembly::LoadWithPartialName
2031         * assembly.c/.h: new function that probes the GAC to load partial
2032         assembly names by Paolo Molaro.
2033         
2034 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2035
2036         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
2037         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
2038         (type_get_fully_qualified_name): Added PublicKeyToken when building a
2039         full type name.
2040
2041 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2042
2043         * appdomain.c: fixed check for 'neutral' culture and removed warning.
2044         * reflection.c: fix bug when parsing a full type name and Version is not
2045         the last thing in the string.
2046
2047 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
2048
2049         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
2050         crashes when it is freed.
2051
2052 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2053
2054         * assembly.c: print the compat warning to stderr.
2055
2056 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
2057
2058         * assembly.c (mono_assembly_load_references): Add a compatibility
2059         hack to run old applications that might be still referencing the
2060         3300-based assemblies, only do this for System.xxx.
2061
2062 2004-05-01  Jackson Harper  <jackson@ximian.com>
2063
2064         * appdomain.c: If the culture is neutral we set it to "".
2065         
2066 2004-04-29  Jackson Harper  <jackson@ximian.com>
2067
2068         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
2069
2070 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
2071  
2072         * string-icalls.c: added low overhead function for copying chars
2073         * icall.c: added needed icall for the above function
2074  
2075 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2076
2077         * icall.c: fix return value of get_global_assembly_cache.  Implemented
2078         Environment.GetLogicalDrives.
2079
2080 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
2081
2082         * rand.c: try and talk to egd or prngd
2083         for random bytes if opening devices fail.
2084
2085 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
2086
2087         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
2088         alignment for the type using the native alignment of its members 
2089         instead of using klass->min_align.
2090
2091         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
2092
2093 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2094
2095         * file-io.c:
2096         * socket-io.c: added check for sys/aio.h.
2097
2098 2004-04-28  Dick Porter  <dick@ximian.com>
2099
2100         * threads.c: Don't abort a thread thats already aborting, when
2101         terminating everything.
2102
2103 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2104
2105         * icall.c: added 2 new async calls for Socket.
2106
2107         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
2108         IO on *nix systems.
2109
2110         * threadpool.c: removed unused variable.
2111
2112 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
2113
2114         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
2115
2116 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
2117
2118         * locales.c: put back string_invariant_tolower () and
2119         string_invariant_toupper ().
2120
2121 2004-04-26 David Waite <mass@akuma.org>
2122
2123         * file-io.h:
2124         * socket-io.h:
2125         * threads.h:
2126         * unicode.h: remove comma from end of enumeration declarations
2127
2128 2004-04-26 David Waite <mass@akuma.org>
2129
2130         * debug-mono-symfile.h:
2131         * decimal.c:
2132         * mono_debug.h:
2133         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
2134
2135
2136 2004-04-26  Jackson Harper  <jackson@ximian.com>
2137
2138         * appdomain.c: Increment version number.
2139         
2140 2004-04-26  Jackson Harper  <jackson@ximian.com>
2141
2142         * appdomain.c: Set assembly references public token value when
2143         PublicKeyToken is specified, not the hash_value. Free public token
2144         values when free assembly name data. Previously the public key
2145         token was hex decoded, however we are using hex encoded public key
2146         tokens, so this is not neccasary.
2147         * assembly.c: Lookup assemblies in the gac if their public token
2148         value is set. Add function to allow enabling user gac
2149         lookups. Specify whether or not the assembly was loaded from the
2150         GAC. Compare full assembly names when checking the cache for
2151         assemblies (Temporarily disabled see comment in code). Remove
2152         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
2153         specifies trace-loader they get extra info to stdout on the
2154         loading of assemblies.
2155         * image.h: Add a field for an assembly references public token
2156         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
2157         whether an assembly has been loaded from the GAC.
2158         * image.c: Remove a corlib -> mscorlib name mapping.
2159         * loader.h: Add function to enable/disable the user gac.
2160         * mono-config.c: Check if the usergac is enabled in the config
2161         file.
2162         * icall.c: New icall to determine whether or not an assembly has
2163         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
2164         * tabldefs.h: Add constant for assemblyref flag that specifies a
2165         full public key is used instead of a public token.
2166         * reflection.c: Remove mscorlib -> corlib mappings. Set
2167         PublicTokenValue instead of hash value. This value is a hex
2168         string so it does not need to be expanded.
2169
2170 2004-04-26  Martin Baulig  <martin@ximian.com>
2171
2172         * mono-debug-debugger.c (mono_debugger_initialize): Set
2173         `mono_debugger_initialized' before calling mono_debug_lock().
2174
2175 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
2176
2177         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
2178           InternalToUpper/InternalToLower.
2179         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
2180           removed invariant culture shortcut.  This is now done in managed code.
2181         * locales.c: (string_invariant_toupper/tolower) removed.
2182
2183 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2184
2185         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
2186         Added Poll internal call.
2187
2188         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
2189         call for Poll. Select was too heavy for polling a single socket.
2190
2191         * threadpool.[ch]: added mono_threadpool_cleanup.
2192         * threads.c: use it. Don't use Thread_Abort on windows.
2193
2194 2004-04-23  Martin Baulig  <martin@ximian.com>
2195
2196         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
2197
2198 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
2199
2200         * icall.c: Registred new icalls for key pair protection and added an
2201         icall for Environment.GetFolderPath on Windows.
2202         * security.c|h: Added new icalls for key pair protection.
2203
2204 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2205
2206         * socket-io.c: don't display the non-supported family warning for known
2207         families. Now this is not displayed on windows when checking support
2208         for IPv4/IPv6.
2209
2210 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2211
2212         * class.c: don't display the layout warning for static fields.
2213
2214 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
2215
2216         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
2217         * locales.c, locales.h: Added new icalls for culture-specific
2218         Char.ToLower and Char.ToUpper.
2219
2220 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2221
2222         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
2223         by David Waite.
2224
2225 2004-04-20  Martin Baulig  <martin@ximian.com>
2226
2227         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
2228         of the type name before passing it to mono_reflection_type_from_name().
2229
2230 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
2231
2232         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
2233         encodings here. Fixes #56965.
2234
2235 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
2236
2237         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
2238         fix test on strstr result not that I can see anything that
2239         relies on the result.
2240
2241 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
2242
2243         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
2244         Fixes #57081.
2245
2246         * marshal.c (mono_marshal_get_string_encoding): New helper function.
2247
2248         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
2249         function to determine which marshalling to use for strings. Fixes
2250         #56965.
2251
2252         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
2253
2254         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
2255
2256 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
2257
2258         * icall.c: #include mono-config.h
2259
2260 2004-04-15  Jackson Harper  <jackson@ximian.com>
2261
2262         * culture-info-tables.h: Fix date formats for en-US culture.
2263         
2264 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
2265
2266         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
2267         ThreadPool.SetMinThreads.
2268         * threadpool.c: Implemented ThreadPool.GetMinThreads and
2269         ThreadPool.SetMinThreads.
2270
2271 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
2272
2273         * mono-config.c: also load the .config file in the directory
2274         where the assembly was found.
2275
2276 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
2277
2278         * assembly.c: load per-assembly config files.
2279         * icall.c: decrapified code to get the config dir and moved to
2280         mono-config.c.
2281         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
2282         per-assembly config files. When doing a dll map lookup give precedence
2283         to the per-assembly data.
2284
2285 2004-04-14  Martin Baulig  <martin@ximian.com>
2286
2287         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
2288         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
2289         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
2290
2291         * mono-debugger-debugger.c: While the debugger is locked, remember
2292         whether the symbol tables have changes and send one single
2293         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
2294
2295 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
2296
2297         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
2298
2299         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
2300         function.
2301
2302         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
2303         account when marshalling string arrays. Fixes #56965.
2304
2305 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
2306
2307         * icall.c: Add new icalls mapping for security.
2308         * security.c|h: Add internal calls for WindowsIdentity,
2309         WindowsImpersonationContext and WindowsPrincipal.
2310
2311 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
2312
2313         * class.c: Added comment to ensure the System.MonoDummy class
2314         is removed when no longer necessary
2315
2316 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
2317
2318         * appdomain.c: Pass arguments to the bootstraping exceptions to
2319         minimize JITed methods at boot
2320
2321         * metadata.c (mono_exception_from_name_two_strings): Allow for the
2322         second string to be null.
2323
2324         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
2325         Change the protocol to minimize the JIT methods at startup.  Now
2326         it Returns the internal codepage, if the value of "int_code_page"
2327         is 1 at entry, and we can not compute a suitable code page
2328         number, returns the code page as a string.
2329
2330 2004-04-13  Jackson Harper  <jackson@ximian.com>
2331
2332         * culture-info-tables.h: Fix number of decimal digits for all
2333         english locales.
2334
2335 2004-04-13  Jackson Harper  <jackson@ximian.com>
2336
2337         * icall.c: Clairfy out of sync error message. It is not always
2338         your corlib that is out of sync.
2339
2340 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
2341
2342         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
2343         properties when only the set accessor is overriden. Fixes #55874.
2344
2345 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
2346
2347         * assembly.c (mono_assembly_load_references): Make this thread safe.
2348         Fixes #56327.
2349
2350 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
2351
2352         * monosn.c: Add missing initialization calls.
2353
2354 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
2355
2356         * locales.c:
2357         ves_icall_System_Globalization_CultureInfo_construct_number_format
2358         Fix g_assert so it compiles on fussier compilers re int/ptr
2359         mismatch
2360
2361 2004-04-08  Dick Porter  <dick@ximian.com>
2362
2363         * socket-io.h:
2364         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
2365         53992.  Also rearrange the code so that the internal calls return
2366         an error value and exceptions are thrown from managed code.
2367
2368         * icall.c: Add type info to the socket icalls.
2369
2370 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2371
2372         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
2373         owes me a beer.
2374
2375 2004-04-07  Martin Baulig  <martin@ximian.com>
2376
2377         * class.c (mono_class_from_generic_parameter): Don't default
2378         `klass->parent' to `mono_defaults.object_type'.
2379
2380 2004-04-07  Martin Baulig  <martin@ximian.com>
2381
2382         * reflection.c (mono_reflection_initialize_generic_parameter): Set
2383         `param->pklass->reflection_info'.       
2384
2385 2004-04-07  Jackson Harper  <jackson@ximian.com>
2386
2387         * culture-info-tables.h: Fix date separator symbol.
2388         
2389 2004-04-07  Martin Baulig  <martin@ximian.com>
2390
2391         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
2392         from System.Type to System.MonoType.
2393
2394 2004-04-07  Martin Baulig  <martin@ximian.com>
2395
2396         * reflection.h
2397         (MonoReflectionGenericParam): Added `has_reference_type' and
2398         `has_value_type' fields.
2399
2400         * reflection.c (mono_image_get_generic_param_info): Encode the
2401         correct flags if we have the `class' or `struct' constraint.
2402
2403 2004-04-07  Martin Baulig  <martin@ximian.com>
2404
2405         * reflection.h
2406         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
2407
2408 2004-04-07  Jackson Harper  <jackson@ximian.com>
2409
2410         * appdomain.c: Revert extra patches, just wanted to bump the
2411         version number.
2412         
2413 2004-04-07  Jackson Harper  <jackson@ximian.com>
2414
2415         * Makefile.am: Add culture-info private headers.
2416         * icall.c: Add new icalls for contructing locales.
2417         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
2418         * locales.h: Declare new culture info construction methods.
2419         * object.h: Add new fields used to avoid the CultureMap to
2420         MonoCultureInfo.
2421         * culture-info.h: Definition of structs used in the culture info
2422         tables.
2423         * culture-info-tables.h: Autogenerated tables that contain culture
2424         info data. This file was generated with the locale-builder tool.
2425         * appdomain.c: Incement corlib version number.
2426         
2427 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
2428
2429         * appdomain.c: (mono_runtime_init) move mono_thread_init
2430         to before mono_object_new calls so critical sections
2431         are initialized before use.
2432
2433 2004-04-07  Martin Baulig  <martin@ximian.com>
2434
2435         * icall.c
2436         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
2437         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
2438         (ves_icall_MonoGenericParam_initialize): Removed.
2439         (monogenericparam_icalls): Removed.
2440         (generictypeparambuilder_icalls): Added new table for
2441         System.Reflection.Emit.GenericTypeParameterBuilder.
2442
2443         * reflection.c
2444         (mono_reflection_define_generic_parameter): Removed.
2445         (mono_reflection_initialize_generic_parameter): This is now called
2446         from GenericTypeParameterBuilder's .ctor.
2447
2448 2004-04-06  Martin Baulig  <martin@ximian.com>
2449
2450         * class.c (mono_class_init): Don't inflate nested classes in a
2451         generic instance.
2452         (mono_type_get_name_recurse): Include the generic arguments for
2453         generic instances and generic type declarations.
2454         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
2455         (_mono_class_get_instantiation_name): Removed.
2456         (mono_class_create_generic): Always use `gklass->name' as our name.
2457
2458         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
2459
2460         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
2461         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
2462         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
2463         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
2464         closed generic methods here.
2465
2466         * reflection.c
2467         (mono_reflection_generic_inst_get_nested_types): Removed.
2468         (inflate_mono_method): Copy the generic parameters from the
2469         MonoMethodHeader into out MonoGenericMethod.
2470
2471 2004-04-06  Martin Baulig  <martin@ximian.com>
2472
2473         * row-indexes.h
2474         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
2475
2476         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
2477
2478         * reflection.c (build_compressed_metadata): If we have any entries
2479         in the GenericParam, MethodSpec or GenericParamConstraint tables,
2480         set the header version to 1.1.
2481
2482 2004-04-06  Martin Baulig  <martin@ximian.com>
2483
2484         * class.c (mono_class_init): If we're a generic instance,
2485         initialize our nested classes, too.
2486         (_mono_class_get_instantiation_name): Deal with the new `!%d'
2487         suffix. 
2488
2489 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2490
2491         * process.c: quote the argument passed to the shell on windows.
2492
2493 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
2494
2495         * threads.c (mono_alloc_special_static_data): Allow this to be
2496         called during startup.
2497
2498 2004-04-02  Martin Baulig  <martin@ximian.com>
2499
2500         * icall.c
2501         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
2502
2503 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
2504
2505         * icall.c: Fix build.
2506
2507 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
2508
2509         * Makefile.am: Added security.c|h.
2510         * icall.c: Added icall for get_UserName;
2511         * security.c: New file for security related icalls. Added function
2512         get_UserName for System.Environment (fix #56144).
2513         * security.h: New. Header file for security.c
2514
2515 2004-04-02  Dick Porter  <dick@ximian.com>
2516
2517         * icall.c: Deleted the icalls that were obsoleted some time ago
2518         by the ICU string code, and which were mixed into the icall
2519         rearranging.  Fixes bug 55969.
2520
2521         * string-icalls.h: 
2522         * string-icalls.c: Deleted the code that those icalls reference.
2523
2524 2004-04-01  Martin Baulig  <martin@ximian.com>
2525
2526         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
2527
2528         * class.c (mono_class_from_generic_parameter): Don't set 
2529         TYPE_ATTRIBUTE_INTERFACE.
2530         (my_mono_class_from_generic_parameter): Likewise.
2531
2532 2004-04-01  Martin Baulig  <martin@ximian.com>
2533
2534         * loader.c (find_method): Added an optional `MonoClass *ic'
2535         argument to search in a specific interface.
2536         (mono_get_method_constrained): New public function.
2537
2538 2004-04-01  Martin Baulig  <martin@ximian.com>
2539
2540         * reflection.c (mono_image_get_generic_field_token): Use the
2541         `handleref' cache here.
2542
2543 2004-04-01  Martin Baulig  <martin@ximian.com>
2544
2545         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
2546
2547         * reflection.c (create_generic_typespec): Use the `typespec' hash
2548         here, not the `typeref' one.    
2549
2550 2004-04-01  Martin Baulig  <martin@ximian.com>
2551
2552         * class.c (mono_class_inflate_generic_type): Moved the
2553         functionality into a new static inflate_generic_type() which
2554         returns NULL if it didn't do anything.  Only increment the
2555         `mono_stats.inflated_type_count' if we actually inflated
2556         something.
2557         (mono_class_get_full): Check the classes type to see whether we
2558         need to inflate it; also inflate MONO_TYPE_(M)VAR.
2559
2560 2004-04-01  Jackson Harper  <jackson@ximian.com>
2561
2562         * reflection.c: Set culture for assembly references.
2563         
2564 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
2565
2566         * reflection.[ch], icall.[ch], Fix support for pinning variables.
2567
2568 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2569
2570         * assembly.c:
2571         (do_mono_assembly_open): the critical section also covers
2572         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
2573
2574 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2575
2576         * threads.c:
2577         (mono_manage_threads): abort the background threads when finishing.
2578         Fixes bug #47232.
2579
2580 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2581
2582         * gc.c: only close the done_event handle if there was no timeout.
2583         C-ified comments.
2584
2585 2004-03-30  Martin Baulig  <martin@ximian.com>
2586
2587         * icall.c (icall_entries): It's called "System.Activator", not
2588         "System.Activation".    
2589
2590 2004-03-30  Martin Baulig  <martin@ximian.com>
2591
2592         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
2593         (mono_class_create_from_typespec): Likewise.
2594
2595 2004-03-30  Martin Baulig  <martin@ximian.com>
2596
2597         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
2598         `has_ctor_constraint' and `initialized'.
2599
2600 2004-03-30  Martin Baulig  <martin@ximian.com>
2601
2602         * reflection.c (encode_new_constraint): New static function to add
2603         the constructor constraint attribute to a type parameter.
2604         (encode_constraints): Call encode_new_constraint() if necessary.
2605
2606         * reflection.h
2607         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
2608
2609         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
2610         
2611 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
2612
2613         * reflection.c, icall.c: add support for pinning variables. 
2614
2615 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
2616
2617         * marshal.c (mono_marshal_get_managed_wrapper):
2618         init bool local with zero rather than null.
2619
2620 2004-03-29  Martin Baulig  <martin@ximian.com>
2621
2622         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
2623         the "official" behavior here.
2624         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
2625
2626 2004-03-29  Martin Baulig  <martin@ximian.com>
2627
2628         * icall.c: Reflect latest API changes.
2629
2630 2004-03-29  Martin Baulig  <martin@ximian.com>
2631
2632         * loader.c (mono_get_method_from_token): Also call
2633         mono_metadata_load_generic_params () for abstract and interface
2634         methods; replace the type arguments in the method signature with
2635         the ones which are loaded from the metadata.
2636
2637 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
2638
2639         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
2640         of the lock is not the current thread. MS.NET don't do it, in spite of
2641         what the documentation says. See bug #56157.
2642
2643 2004-03-28  Martin Baulig  <martin@ximian.com>
2644
2645         * class.c (mono_class_init): Don't call init_properties() and
2646         init_events() for generic instances; set `prop->parent' when
2647         inflating properties.
2648
2649         * reflection.c (mono_generic_inst_get_object): Call
2650         `mono_class_init (ginst->klass)'.
2651         (mono_type_get_object): Only create a MonoGenericInst if your
2652         generic type is a TypeBuilder.
2653         (do_mono_reflection_bind_generic_parameters): Only set
2654         `ginst->is_dynamic' if our generic type is a TypeBuilder.
2655
2656 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
2657
2658         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
2659         Fixes #56091.
2660
2661 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2662
2663         * icall.c: added Kill_internal icall.
2664         * process.[ch]: added Kill_internal icall.
2665
2666 2004-03-25  Martin Baulig  <martin@ximian.com>
2667
2668         * class.h (MonoStats): Added `generic_instance_count',
2669         `inflated_method_count', `inflated_type_count' and
2670         `generics_metadata_size'.       
2671
2672 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2673
2674         * reflection.c: no warnings now.
2675
2676 2004-03-25  Martin Baulig  <martin@ximian.com>
2677
2678         * class.c (mono_class_get_full): New public function; does a
2679         mono_class_get(), but also takes a `MonoGenericContext *'.
2680
2681         * loader.c (mono_field_from_memberref): Renamed to
2682         `field_from_memberref', made static and added `MonoGenericContext *'
2683         argument.
2684         (mono_field_from_token): Added `MonoGenericInst *' argument.
2685         (method_from_memberef): Likewise.
2686         (mono_get_method_from_token): Likewise.
2687         (mono_get_method_full): New public function; does a
2688         mono_get_method(), but also takes a `MonoGenericContext *'.
2689
2690         * verify.c (mono_method_verify): Get the method's generic context
2691         and pass it to mono_field_from_token(), mono_get_method_full() and
2692         mono_class_get_full().
2693
2694 2004-03-25  Martin Baulig  <martin@ximian.com>
2695
2696         * class.c (mono_class_inflate_generic_type): Take a
2697         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
2698         `MonoGenericMethod *'.
2699
2700 2004-03-25  Martin Baulig  <martin@ximian.com>
2701
2702         * loader.h (MonoMethodInflated): Store the MonoGenericContext
2703         instead of the MonoGenericMethod here.
2704
2705 2004-03-25  Martin Baulig  <martin@ximian.com>
2706
2707         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
2708         each time we create a new MonoGenericInst, we also create a new
2709         context which points back to us.
2710
2711         * class.c (inflate_method): Use `ginst->context' instead of
2712         creating a new context.
2713
2714         * loader.c (method_from_memberref): Use
2715         `klass->generic_inst->context' instead of creating a new context.
2716
2717 2004-03-25  Martin Baulig  <martin@ximian.com>
2718
2719         * class.h (MonoGenericContext): New struct.
2720         (MonoGenericMethod): Removed `generic_inst'.
2721
2722         * class.c (mono_class_inflate_generic_method): Take a
2723         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
2724
2725 2004-03-25  Martin Baulig  <martin@ximian.com>
2726
2727         * loader.h (MonoMethodInflated): New typedef.
2728
2729         * metadata.h (MonoMethodSignature): Removed `gen_method', make
2730         `generic_param_count' consume just 30 bits, added `is_inflated'
2731         and `has_type_parameters' flags (one bit each).
2732
2733         * class.c (mono_class_inflate_generic_method): Create a
2734         MonoMethodInflated instead of a MonoMethodNormal and set
2735         `is_inflated' in the method signature.
2736
2737         * class.h (MonoGenericMethod): Removed `generic_method'.
2738
2739 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
2740
2741         * image.c: Make sure the name of a MonoImage is always an absolute path.
2742           This fixes bug #54415.
2743
2744 2004-03-24  Martin Baulig  <martin@ximian.com>
2745
2746         * class.c (mono_class_setup_vtable): If we're a generic instance,
2747         use our generic type's vtable size.
2748
2749 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
2750
2751         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
2752         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
2753         problems.
2754
2755 2004-03-23  Martin Baulig  <martin@ximian.com>
2756
2757         * class.h (MonoDynamicGenericInst): Added `int count_events' and
2758         `MonoEvent *events'.
2759
2760         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
2761         (typebuilder_icalls): Added "get_event_info"; calls
2762         mono_reflection_event_builder_get_event_info(). 
2763
2764         * reflection.c (mono_reflection_generic_inst_initialize): Added
2765         `MonoArray *events'.
2766         (mono_reflection_event_builder_get_event_info): New function.
2767
2768 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
2769
2770         * object.h: add mono_type_initialization_init
2771
2772         * object.c (mono_runtime_class_init): 
2773         implement class constructor synchronization rules
2774         to cope with threading issues.  
2775         add mono_type_initialization_init
2776
2777         * appdomain.c (mono_runtime_init): call 
2778         mono_type_initialization_init
2779
2780         * class.h: removing initializing field from MonoVTable
2781
2782 2004-03-23  Martin Baulig  <martin@ximian.com>
2783
2784         * class.c (my_mono_class_from_generic_parameter): Use
2785         `param->name' if it's not NULL. 
2786
2787 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
2788
2789         * class.c: do not insert non-virtual methods in the vtable.
2790         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
2791         that means the method is non-virtual. This never would have
2792         happened before.
2793
2794 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
2795
2796         * profiler.c: Added lock for accessing coverage_hash.
2797
2798 2004-03-22  Martin Baulig  <martin@ximian.com>
2799
2800         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
2801         `method->method->signature->generic_param_count != 0' to make it
2802         work for interface methods.
2803
2804 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2805
2806         * process.c: quote the string passed to the shell using g_shell_quote.
2807
2808 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2809
2810         * threads.c:
2811         (mono_threads_manage): don't remove the finalizer thread and self
2812         from the threads hash table so that mono_thread_manage can be called
2813         more than once.
2814
2815 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2816
2817         * process.c: quote the arguments when UseShellExecute is true. Fixes
2818         bug #55790.
2819
2820 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2821
2822         * threads.c: set mono_thread_detach as a cleanup routine for every
2823         thread. This way it's always executed upon thread termination, either
2824         aborted or finished normally. No more xsp hangs!
2825
2826 2004-03-17  Martin Baulig  <martin@ximian.com>
2827
2828         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
2829         `int count_nested' and a `MonoType **nested'.
2830
2831         * reflection.c (mono_reflection_bind_generic_parameters): Moved
2832         most of the functionality into a new static
2833         do_mono_reflection_bind_generic_parameters() and don't take a
2834         `MonoType *nested_in' argument any more.  Don't compute nested
2835         types here.
2836         (mono_reflection_generic_inst_get_nested_types): New public method
2837         to get nested types.
2838
2839         * class.c (mono_class_create_generic): Set `klass->nested_in' if
2840         we're a nested class.
2841
2842         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
2843         mono_reflection_generic_inst_get_nested_types() to compute the
2844         nested types.
2845
2846 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2847
2848         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
2849         descriptive error message under windows.
2850         
2851 2004-03-17  Martin Baulig  <martin@ximian.com>
2852
2853         * class.c (dup_type): Added `const MonoType *original' argument;
2854         copy the attrs from the original type.
2855
2856 2004-03-17  Martin Baulig  <martin@ximian.com>
2857
2858         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
2859         `m->generic_inst_cache' here.
2860
2861 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
2862
2863         * exception.h exception.c: Add stack_overflow_exception.
2864
2865 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2866
2867         * threadpool.c:
2868         (overlapped_callback): call SetEvent *after* invoking the callback.
2869         No need to call CloseHandle.
2870
2871 2004-03-16  Martin Baulig  <martin@ximian.com>
2872
2873         * reflection.c (mono_image_get_fieldref_token): Take a
2874         `MonoReflectionField *' instead of a `MonoClassField *' and a
2875         `MonoClass *'; store the `MonoReflectionField *' in the hash.
2876
2877 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2878
2879         * appdomain.c: don't add the culture to the filename we're looking for
2880         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
2881
2882 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2883
2884         * locales.c: don't ignore symbols when doing case insensitive compares.
2885         Thanks Dick! Fixes bug #54046.
2886
2887         * threads.c: surround 'threads' usage with enter/leave in
2888         mono_thread_manage.
2889
2890 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
2891
2892         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
2893         implicitly marshalled as [Out]. Fixes #55450.
2894
2895         (mono_marshal_get_runtime_invoke): Zero out the result if there is
2896         an exception.
2897
2898 2004-03-16  Martin Baulig  <martin@ximian.com>
2899
2900         * class.c (mono_class_from_generic_parameter): Use the actual
2901         parameter name. 
2902
2903 2004-03-16  Martin Baulig  <martin@ximian.com>
2904
2905         * reflection.c (type_get_signature_size): New static function.
2906         Compues the size of the type in a method signature.
2907         (method_get_signature_size): New static function; calls
2908         type_get_signature_size() to compute the actual size of the
2909         method's signature.
2910         (method_encode_signature): Use method_get_signature_size() to get
2911         the signature's size rather than using `nparams * 10'.
2912
2913 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2914
2915         * file-io.h: define here WapiOverlapped on windows. I don't want the
2916         regular OVERLAPPED one.
2917
2918         * file-io.c:
2919         * threadpool.c: somehow, BindIoCompletionCallback is not found.
2920         Disabling AIO on windows.
2921
2922 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2923
2924         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
2925         bug #55385.
2926
2927 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2928
2929         * appdomain.c: upgraded corlib version.
2930
2931         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
2932         and BeginWrite. Allow opening files for asynchrnous operations.
2933
2934         * file-io.h: new struct that maps FileStreamAsyncResult.
2935         * icall.c: added new icalls.
2936         * process.[ch]: support setting child process environment variables
2937         and use the SHELL or COMSPEC when UseShellExecute is true.
2938
2939         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
2940         callback for async. IO is here and also BindHandle.
2941
2942         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
2943         from here.
2944
2945 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
2946
2947         * reflection.c (create_custom_attr): Allow len == 0.
2948
2949         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
2950         computation on big-endian machines.
2951
2952 2004-03-13  Martin Baulig  <martin@ximian.com>
2953
2954         * class.h (MonoGenericInst): Added `int count_ifaces'.
2955
2956         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
2957         `ginst->count_ifaces' instead `klass->interface_count' since we
2958         may get called before the vtable is created.
2959
2960         * loader.c (mono_method_get_param_names): If we're a generic
2961         instance, return and don't initialize the class.
2962
2963         * reflection.c (mono_reflection_setup_generic_class): Don't call
2964         ensure_runtime_vtable().
2965         (mono_reflection_bind_generic_parameters): Set
2966         `ginst->count_ifaces'.
2967
2968 2004-03-11  Jackson Harper <jackson@ximian.com>
2969
2970         * icall.c:
2971         * unicode.c:
2972         * unicode.h: Remove unused System.Char icalls.
2973         
2974 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
2975
2976         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
2977         code when we P/Invoke the first library in Windows.Forms, instead
2978         of when we first open the assembly.
2979
2980         * assembly.c: Drop the lookup from here.
2981
2982 2004-03-10  Martin Baulig  <martin@ximian.com>
2983
2984         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
2985         class for properties, fields and events.  Finally fixes #54945.
2986
2987 2004-03-10  Martin Baulig  <martin@ximian.com>
2988
2989         * metadata.c (mono_metadata_class_equal): New static function;
2990         checks whether two generic instances or two generic parameters are
2991         equal.
2992         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
2993         compare classes.        
2994
2995 2004-03-10  Martin Baulig  <martin@ximian.com>
2996
2997         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
2998
2999         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
3000         argument and write it into the `reflection_info' field.
3001
3002         * icall.c
3003         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
3004         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
3005
3006 2004-03-09  Jackson Harper  <jackson@ximian.com>
3007
3008         * char-conversions.h: use 8 bits for numeric data its all we need
3009         * icall.c: numeric data is only 8 bits now.
3010
3011 2004-03-09  Martin Baulig  <martin@ximian.com>
3012
3013         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
3014
3015         * class.c (init_properties, init_events): Initialize the new
3016         `parent' field.
3017
3018         * reflection.c (typebuilder_setup_properties): Likewise.
3019         (typebuilder_setup_events): Likewise.
3020
3021         * reflection.h (MonoEventInfo): Replaced `parent with
3022         `declaring_type' and `reflected_type'.
3023
3024         * icall.c (ves_icall_get_property_info): Distinguish between
3025         declaring and reflected type.
3026         (ves_icall_get_event_info): Likewise.
3027
3028 2004-03-09  Martin Baulig  <martin@ximian.com>
3029
3030         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
3031         (ves_icall_Type_GetField): Correctly set field->klass.
3032
3033 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
3034
3035         * loader.h: Fix warning.
3036
3037 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
3038
3039         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
3040         library routine if present.  Notice that it will still continue
3041         executing even if its missing, for those working on the Gtk#
3042         edition of Windows.Forms.
3043
3044         * assembly.c (do_mono_assembly_open): If loading the
3045         System.Windows.Forms call mono_loader_wini_init.
3046
3047 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
3048
3049         * class.h: Added MonoRemoteClass struct.
3050         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
3051         function for MonoStrings.
3052         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
3053         Added internal call for getting the proxy type.
3054         * marshal.c: Get the type of transparent proxies from its remote_class.
3055         Added methods that generate the IL for type checks and casts:
3056         mono_marshal_get_isinst, mono_marshal_get_castclass, 
3057         mono_marshal_get_proxy_cancast.
3058         * marshal.h: Declaration of the previous new methods.
3059         * object.c: Added new moethods for creating and updating MonoRemoteClass
3060         instances: mono_remote_class, mono_upgrade_remote_class, 
3061         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
3062         * verify.c: FIx transparent_proxy_fields layout.
3063         * appdomain.c: Bump corlib version.
3064
3065 2004-03-04  Jackson Harper  <jackson@ximian.com>
3066
3067         * icall.c: Add icall to access char conversion tables.
3068         * char-conversions.h: Character conversion tables.
3069         * Makefile.am: Add char-conversions.h private header file.
3070         
3071 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
3072
3073         * appdomain.c (unload_thread_main): Increase unloading timeout to
3074         10 sec as a temporary workaround for Nant problems.
3075
3076 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
3077
3078         * gc.c: Add checks for GC_enable and GC_disable.
3079
3080         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
3081         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
3082         (bug #54988).
3083         
3084 2004-02-27  Martin Baulig  <martin@ximian.com>
3085
3086         * reflection.c (mono_reflection_bind_generic_parameters): Take a
3087         `MonoReflectionType *' instead of a `MonoType *'.
3088
3089 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
3090
3091         * gc.c (run_finalize): Avoid finalizing the object representing the
3092         finalizer thread.
3093         (finalizer_thread): Fix warning.
3094
3095 2004-02-25  Martin Baulig  <martin@ximian.com>
3096
3097         * class.c (_mono_class_get_instantiation_name): Added `int offset'
3098         argument for nested types.
3099         (mono_class_create_generic): Added support for nested generictypes.
3100
3101         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
3102         `GList *nested'.
3103
3104         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
3105
3106         * reflection.c (method_encode_signature): Increase the minimum
3107         value of `size' from 10 to 11.
3108         (mono_reflection_bind_generic_parameters): Take `int type_argc'
3109         and `MonoType **types' arguments instead of the `MonoArray
3110         *types'; added `MonoType *nested_in'.  Recursively instantiate
3111         nested classes. 
3112
3113 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
3114
3115         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
3116         stack_overflow_ex members which are used by exception handling.
3117
3118         * appdomain.c (mono_runtime_init): Initialize the new members.
3119
3120         * gc.c (mono_gc_enable): New helper function.
3121         * gc.c (mono_gc_disable): New helper function.
3122
3123 2004-02-23  Martin Baulig  <martin@ximian.com>
3124
3125         * icall.c: I must have been really stupid - make it actually work
3126         this time ;-)
3127
3128 2004-02-23  Martin Baulig  <martin@ximian.com>
3129
3130         * loader.c (method_from_memberref): Only inflate the method if
3131         it's in another klass.
3132
3133 2004-02-23  Martin Baulig  <martin@ximian.com>
3134
3135         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
3136         (mono_class_init): If we're a generic instance and an interface,
3137         compute `class->interface_id'; also create `class->interfaces'
3138         here and inflate them.
3139
3140         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
3141         `ginst->is_open'.
3142         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
3143
3144         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
3145
3146 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
3147
3148         * reflection.c (method_encode_code): Improved the error message
3149         generated by the exception.
3150
3151 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3152
3153         * icall.c: Martin did not do what he said in the ChangeLog for
3154         2004-02-18, but put back the changes for properties and events.
3155         Commenting those changes out again and adding comment to bug #54518.
3156         
3157         * process.c: removed warning.
3158
3159 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
3160
3161         * marshal.c (emit_struct_conv): Print an error message instead of
3162         asserting when a type does not have the StructLayout attribute.
3163
3164 2004-02-20  Martin Baulig  <martin@ximian.com>
3165
3166         * reflection.c (mono_type_get_object): Also use the cache for
3167         generic instances.
3168         (mono_reflection_bind_generic_parameters): Always compute
3169         `ginst->ifaces'.        
3170
3171 2004-02-20  Martin Baulig  <martin@ximian.com>
3172
3173         * class.h (MonoGenericMethod): Removed `klass'.
3174
3175         * class.c (mono_class_inflate_generic_method): Added `MonoClass
3176         *klass' argument.
3177
3178 2004-02-20  Martin Baulig  <martin@ximian.com>
3179
3180         * reflection.c (method_encode_methodspec): Actually use the
3181         uninflated signature for the memberref.
3182
3183 2004-02-20  Martin Baulig  <martin@ximian.com>
3184
3185         * class.h (MonoGenericMethod): Removed `declaring'.
3186
3187         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
3188         is NULL, compute it here.
3189
3190 2004-02-20  Martin Baulig  <martin@ximian.com>
3191
3192         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
3193
3194         * metadata.c (mono_metadata_generic_inst_hash): New method.
3195         (mono_metadata_generic_inst_equal): New method.
3196
3197         * reflection.c (mono_reflection_bind_generic_parameters): Use the
3198         `klass->image->generic_inst_cache' cache to avoid creating
3199         duplicate MonoGenericInst's.
3200
3201         * class.c (mono_class_inflate_generic_type): Use the cache.
3202
3203 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
3204
3205         * object.c: fixed gc descriptor calculation for embedded valuetypes.
3206
3207 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3208
3209         * icall.c: added Socket.WSAIoctl icall.
3210
3211         * socket-io.[ch]: implemented
3212         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
3213
3214 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
3215
3216         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
3217
3218 2004-02-18  Urs C Muff  <umuff@quark.com>
3219
3220         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
3221         this work on PPC and other big-endian architectures.
3222
3223         * debug-mono-symfile.h: Prepended the names of all the `guint32'
3224         fields with an underscore to make sure they're only accessed by
3225         the read32() macro.
3226
3227 2004-02-18  Martin Baulig  <martin@ximian.com>
3228
3229         * icall.c: Put the klass->refclass changes back for methods and
3230         fields, but not for properties and events.  We're currently not
3231         distinguishing between DeclaringType and ReflectedType for
3232         properties and events, that's what caused the regressions.
3233
3234 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3235
3236         * object.c:
3237         (mono_async_result_new): the handle can be NULL.
3238
3239         * threadpool.c: Use an event instead of a semaphore, don't initialize
3240         it until needed. This saves quite a few semaphores from being created
3241         when using the threadpool.
3242
3243 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
3244
3245         * object.c (mono_string_is_interned_lookup): Fix interning of long
3246         strings. Fixes #54473.
3247
3248         * domain.c (ldstr_equal): Optimize if the two strings are equal.
3249
3250         * icall.c: Revert the klass->refclass changes since they introduce
3251         regressions (bug #54518).
3252
3253 2004-02-18  Martin Baulig  <martin@ximian.com>
3254
3255         * class.c (mono_class_init): If we're a generic instance and don't
3256         come from a TypeBuilder, inflate our members here.
3257         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
3258         (mono_class_create_generic): New public method.
3259         (mono_class_initialize_generic): Removed.
3260         (get_instantiation_name): Renamed to
3261         _mono_class_get_instantiation_name() and made it public.
3262
3263 2004-02-18  Martin Baulig  <martin@ximian.com>
3264
3265         * class.c (mono_class_inflate_generic_type): Clear the new
3266         instance's `nginst->klass' when inflating a generic instance.
3267         (mono_class_is_subclass_of): Added (basic) support for generic
3268         instances.
3269
3270 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
3271
3272         * appdomain.h, domain.c: use a MonoCodeManager instead of a
3273         MonoMempool to hold compiled native code.
3274
3275 2004-02-17  Martin Baulig  <martin@ximian.com>
3276
3277         * class.h (MonoDynamicGenericInst): Added `count_properties' and
3278         `properties'.
3279
3280         * reflection.c (mono_reflection_generic_inst_initialize): Added
3281         `MonoArray *properties' argument.
3282
3283         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
3284
3285 2004-02-17  Martin Baulig  <martin@ximian.com>
3286
3287         * icall.c (ves_icall_Type_GetFields): Renamed to
3288         ves_icall_Type_GetFields_internal() and added a
3289         `MonoReflectionType *rtype' argument; pass it to
3290         mono_field_get_object() to set the field's "reflected" type.
3291         (ves_icall_Type_GetConstructors): Likewise.
3292         (ves_icall_Type_GetEvents): Likewise.
3293         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
3294         argument; pass it to mono_method_get_object() to set the method's
3295         "reflected" type.       
3296
3297 2004-02-17  Martin Baulig  <martin@ximian.com>
3298
3299         * class.h (MonoDynamicGenericInst): New type.
3300         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
3301
3302         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
3303         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
3304         (ves_icall_MonoGenericInst_GetFields): New interncall.
3305
3306         * class.c (mono_class_from_generic): Don't call
3307         mono_class_initialize_generic() if this is a dynamic instance;
3308         ie. it's being created from a TypeBuilder.
3309         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
3310         `class->byval_arg.type'.
3311
3312         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
3313         to `inflate_method' and made static.
3314         (mono_reflection_inflate_field): Removed.
3315         (mono_reflection_generic_inst_initialize): New public method.
3316
3317         * reflection.h (MonoReflectionGenericInst): Removed `methods',
3318         `ctors' and `fields'; added `initialized'.
3319
3320 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
3321
3322         * debug-helpers.c (mono_method_full_name): Fix output for empty
3323         namespaces.
3324
3325 2004-02-12  Martin Baulig  <martin@ximian.com>
3326
3327         * class.h (MonoClassField): Added `MonoType *generic_type'.
3328
3329         * reflection.c (mono_image_get_fieldref_token): Added support for
3330         instantiated generic types.
3331         (field_encode_inflated_field): Removed.
3332         (mono_image_get_inflated_field_token): Removed.
3333         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
3334
3335         * reflection.h (MonoReflectionInflatedField): Removed.
3336
3337 2004-02-12  Martin Baulig  <martin@ximian.com>
3338
3339         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
3340         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
3341
3342         * reflection.c (mono_image_get_methodspec_token): Take a
3343         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
3344         (mono_image_create_token): Check whether we have a
3345         `method->signature->gen_method' and call
3346         mono_image_get_methodspec_token() if appropriate.
3347         (inflated_method_get_object): Removed.
3348         (mono_reflection_bind_generic_method_parameters): Return a
3349         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
3350         (mono_reflection_inflate_method_or_ctor): Likewise.
3351
3352         * reflection.h (MonoReflectionInflatedMethod): Removed.
3353
3354 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
3355
3356         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
3357         for custom valuetype marshalling.
3358
3359         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
3360
3361 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3362
3363         * icall.c: fixed WSAGetLastError_internal name.
3364
3365 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
3366
3367         * threads.c (mono_thread_attach): Allow this to be called multiple
3368         times for a thread.
3369         
3370         * threads.c (build_wait_tids): Do not wait for ourselves.
3371
3372         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
3373         appdomain list is empty.
3374
3375         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
3376         memory returned by mono_string_builder_to_utf16, since it points into
3377         managed memory. Thanks to Bernie Solomon for noticing this.
3378
3379         * icall.c: Add AppDomainSetup icalls.
3380
3381         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
3382
3383         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
3384         types.
3385
3386         * reflection.c (reflection_methodbuilder_to_mono_method): Save
3387         custom attributes to the method_aux struct. Also fix array indexes etc.
3388
3389         * loader.c (mono_method_get_param_names): Make dynamic case work again.
3390         
3391 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
3392
3393         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
3394         (both static and runtime) and reduce startup time.
3395
3396 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
3397
3398         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
3399         AsAny marshalling conversion instead of crashing.
3400
3401         * marshal.c: Fix warnings.
3402
3403 2004-02-09  Martin Baulig  <martin@ximian.com>
3404
3405         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
3406
3407         * reflection.h (MonoReflectionInflatedMethod): Removed the
3408         `declaring' field, it's now in the unmanaged MonoGenericMethod.
3409
3410         * reflection.c (method_encode_methodspec): Removed the `method'
3411         argument; we get it from `gmethod->declaring'.
3412         (inflated_method_get_object): Removed the `declaring' argument.
3413
3414 2004-02-09  Martin Baulig  <martin@ximian.com>
3415
3416         * class.h (MonoGenericMethod): New type.
3417         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
3418         `generic_method'.
3419
3420         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
3421         a `MonoGenericMethod *gen_method' one.
3422
3423         * class.c (mono_class_inflate_generic_type): Take an additional
3424         `MonoGenericMethod * argument.  This is only non-NULL if we're
3425         inflating types for a generic method.   
3426         (mono_class_inflate_generic_signature): Renamed to
3427         inflate_generic_signature() and made static; take a
3428         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3429         (inflate_generic_header): Take a `MonoGenericMethod *' argument
3430         instead of a `MonoGenericInst *' one.
3431         (mono_class_inflate_generic_method): Likewise.
3432
3433         * reflection.c (encode_generic_method_sig): Take a
3434         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3435         (method_encode_methodspec): Likewise.
3436         (inflated_method_get_object): Likewise. 
3437
3438         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
3439         field with a `MonoGenericMethod *gmethod' one.  
3440
3441 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
3442
3443         * class.h (mono_class_has_parent): add parens to expansion
3444         so you can ! this.
3445
3446 2004-02-08  Martin Baulig  <martin@ximian.com>
3447
3448         * image.h (MonoImage): Removed `generics_cache'.
3449
3450         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
3451         instead of a `MonoType *' argument; removed the `inflate_methods'
3452         argument.  Don't inflate methods here.
3453
3454         * loader.c (find_method): If it's a generic instance, call
3455         mono_class_init() on the `sclass->generic_inst->generic_type'.
3456
3457         * metadata.c (mono_type_size): Make this work on uninitialized
3458         generic instances; call it on the `ginst->generic_type's class.
3459
3460         * reflection.c (mono_reflection_bind_generic_parameters): Call
3461         mono_class_from_generic() to create the `ginst->klass'.
3462
3463 2004-02-08  Martin Baulig  <martin@ximian.com>
3464
3465         * class.h (MonoClass): Changed type of `generic_inst' from
3466         `MonoType *' to `MonoGenericInst *'.
3467
3468 2004-02-08  Martin Baulig  <martin@ximian.com>
3469
3470         * icall.c (ves_icall_Type_BindGenericParameters): Just call
3471         mono_type_get_object(), this is now creating a `MonoGenericInst'
3472         for MONO_TYPE_GENERICINST.
3473         (ves_icall_MonoGenericInst_GetParentType): Likewise.
3474         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3475
3476         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
3477         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
3478         (inflated_method_get_object): Added `MonoClass *refclass' argument.
3479         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
3480         and reflected type.
3481
3482         * reflection.h (MonoReflectionInflatedMethod): Removed
3483         `declaring_type' and `reflected_type'.
3484
3485 2004-02-08  Martin Baulig  <martin@ximian.com>
3486
3487         * class.h (MonoGenericInst): Added `MonoType *parent' and
3488         `MonoType **ifaces'.
3489
3490         * reflection.h (MonoReflectionGenericInst): Removed `klass',
3491         `parent' and `interfaces'.
3492
3493         * reflection.c (mono_reflection_bind_generic_parameters): Take a
3494         `MonoType *' argument and return a `MonoType *'.
3495
3496         * icall.c
3497         (ves_icall_MonoGenericInst_GetParentType): New interncall.
3498         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
3499
3500 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
3501
3502         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
3503         valuetype marshalling.
3504
3505 2004-02-06  Martin Baulig  <martin@ximian.com>
3506
3507         * class.c
3508         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
3509         (my_mono_class_from_generic_parameter): Likewise.
3510
3511 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
3512
3513         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
3514         contents of the symbol files lazily.
3515
3516         * object.h (MonoThread): Add 'name' and 'name_len' fields.
3517
3518         * threads.h threads.c icall.c: New icalls for getting and setting the
3519         threads name.
3520
3521 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
3522
3523         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
3524         Raise an exception when the domain is not found.
3525
3526 2004-02-03  Martin Baulig  <martin@ximian.com>
3527
3528         * reflection.c (mono_image_get_methodspec_token): Use the
3529         uninflated signature; fixes gen-33.
3530
3531 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
3532
3533         * gc.c threads.c: Make the finalizer thread a normal managed thread so
3534         the finalizer code can use thread functionality.
3535
3536         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
3537         the finalizer thread.
3538
3539         * threads.c: Make some functions more robust.
3540
3541         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
3542
3543         * metadata.h: Add new marshalling conventions.
3544
3545         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
3546         stringbuilder marshalling. Fixes #53700.
3547
3548         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
3549
3550         * reflection.c (mono_image_get_type_info): Save declarative security
3551         info.
3552
3553         * reflection.c (mono_image_get_field_info): Handle uninitialized 
3554         unmanaged fields as well.
3555
3556         * appdomain.c: Bump corlib version.
3557
3558 2004-02-01  Martin Baulig  <martin@ximian.com>
3559
3560         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
3561         method type arguments.  
3562
3563 2004-01-30  Duncan Mak  <duncan@ximian.com>
3564
3565         * marshal.h: Add prototype for
3566         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
3567         and
3568         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
3569         fix the build.
3570
3571 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
3572
3573         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
3574         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
3575
3576 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
3577
3578         * marshal.c (mono_marshal_get_native_wrapper): Add support for
3579         custom marshalling of valuetypes.
3580
3581         * marshal.c: Fix some warnings.
3582
3583 2004-01-29  Martin Baulig  <martin@ximian.com>
3584
3585         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
3586         for generic method parameters.
3587
3588         * reflection.c (method_encode_methodspec): Write the uninflated
3589         signature into the methodspec table.
3590         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
3591         is always the uninflated method.
3592         (reflection_methodbuilder_to_mono_method): Copy the generic
3593         parameters from the MethodBuilder into `header->gen_params'.
3594
3595 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
3596
3597         * class.c (mono_class_from_generic_parameter): Fix warning.
3598
3599 2004-01-27  Martin Baulig  <martin@ximian.com>
3600
3601         * class.c (mono_class_from_generic_parameter): Don't create
3602         `klass->methods' here.  
3603
3604 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
3605
3606         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
3607         extension since it does not work with libraries named lib<FOO>.dll.so.
3608
3609 2004-01-25  Martin Baulig  <martin@ximian.com>
3610
3611         * class.c (mono_class_inflate_generic_type): Added support for
3612         MONO_TYPE_GENERICINST.
3613
3614         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
3615         inflate methods on open constructed types.      
3616
3617 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3618
3619         * object.c: fire ProcessExit event in the root AppDomain after running
3620         Main. Fixes bug #53299.
3621
3622 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
3623
3624         * socket-io.c: include the new socket-wrappers.h header.
3625         Use the wrappers instead of the unix socket functions to make the code
3626         more clear.
3627
3628 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
3629
3630         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
3631
3632         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3633         Fixes #22532.
3634
3635 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
3636
3637         * reflection.c (mono_image_create_pefile): Handle the case when the
3638         entry point is not a MethodBuilder.
3639
3640         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3641         field to ReflectionMethod since it is not allways a builder.
3642
3643         * reflection.c (type_get_fully_qualified_name): New helper function to
3644         return the fully qualified name of a type.
3645
3646         * reflection.c (encode_marshal_blob): Always emit the fully qualified
3647         type name for custom marshallers.
3648
3649         * reflection.c (mono_marshal_spec_from_builder): Ditto.
3650
3651         * class.c (mono_class_setup_vtable): If a parent class already 
3652         implements an interface, use the implementing methods from that class.
3653         Fixes #53148.
3654
3655 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3656
3657         * threadpool.c: just return instead of ExitThread to allow for thread
3658         clean up earlier.
3659
3660 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
3661
3662         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
3663         when closing resource modules.
3664
3665         * reflection.c (mono_image_create_pefile): Handle the case when the
3666         entry point is not a MethodBuilder.
3667
3668         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3669         field to ReflectionMethod since it is not allways a builder.
3670
3671 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
3672
3673         * marshal.c (mono_marshal_get_managed_wrapper): 
3674         mono_marshal_alloc takes native int so CONV_I
3675         the arg for 64bits.
3676
3677 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
3678
3679         * reflection.c (fixup_cattrs): New function to fixup the methoddef
3680         tokens in the cattr table. Fixes #53108.
3681
3682 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3683
3684         * loader.c: don't trim ".dll" before looking up in the config file.
3685         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
3686
3687 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
3688
3689         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
3690         Return the module which contains the resource as well.
3691         (ves_icall_System_Reflection_Module_Close): New icall.
3692
3693         * appdomain.c: Bump corlib version number.
3694
3695         * image.c (mono_image_addref): New public function.
3696
3697         * assembly.c: Call mono_image_addref.
3698
3699         * reflection.c (mono_module_get_object): Increase reference count of 
3700         the image.
3701
3702         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3703         Fixes #22532.
3704
3705         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
3706         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
3707         proper exceptions on DllImport problems.
3708
3709 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
3710
3711         * class.c, metadata.c: eliminate CSIZE macro.
3712
3713 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
3714
3715         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
3716         * object.h: Added async_callback field in MonoAsyncResult.
3717         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
3718         * verify.c: Added async_callback in MonoAsyncResult layout.
3719
3720 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
3721
3722         * reflection.c (mono_reflection_get_custom_attrs): Add support
3723         for Modules.
3724
3725 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
3726
3727         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
3728         marshalling.
3729         (mono_marshal_method_from_wrapper): Add null pointer check.
3730
3731 2004-01-16  Martin Baulig  <martin@ximian.com>
3732
3733         * debug-mono-symfile.h: Set version number to 36 and reflect
3734         latest symbol writer changes.
3735
3736 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
3737
3738         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
3739         multi-dimensional arrays.
3740         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
3741         (mono_class_from_mono_type): Use bounded_array_class_get.
3742         
3743         * class.c (mono_bounded_array_class_get): New function which takes
3744         a 'bounded' bool argument to distinguish vectors from one dimensional
3745         arrays.
3746
3747         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
3748         bounded_array_class_get if the array has bounds.
3749
3750         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
3751         Search modules loaded using AssemblyBuilder:AddModule as well.
3752
3753 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3754
3755         * appdomain.c: increased corlib version.
3756         * filewatcher.c: removed g_print.
3757         * icall.c:
3758         (get_property_info): only allocate what is actually requested.
3759         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
3760
3761 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3762
3763         * Makefile.am: added filewatcher.[ch]
3764         * filewatcher.[ch]: FileSystemWatcher runtime support.
3765         * icall.c: added new FSW icalls.
3766
3767 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3768
3769         * string-icalls.c: fix stringbuilder regression as suggested by
3770         Iain McCoy <iain@mccoy.id.au>.
3771
3772 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
3773
3774         * process.c (process_read_stringtable_block): Recognize '007f' as
3775         a language neutral stringtable block.
3776
3777 2004-01-12  Patrik Torstensson
3778
3779         * object.h (MonoStringBuilder) : Changed layout to support our
3780         new stringbuilder class.
3781         * marshal.c: Change marshalling to support the new layout of 
3782         string builder.
3783         * appdomain.c: increased version number because new layout of
3784         string builder.
3785
3786 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
3787
3788         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
3789         assembly name as an string instead of an AssemblyName, since it is
3790         easier to extract info from it.
3791
3792         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
3793         the culture subdirectories too. Fixes #52231.
3794
3795 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3796
3797         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
3798         It takes 2 new parameters with an optional name for the method to look
3799         for and case ignoring info.
3800
3801         * threadpool.c: removed unused variable.
3802
3803 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3804
3805         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
3806         It takes 2 new parameters with an optional name for the property to look
3807         for and case ignoring info.
3808         Fixes bug #52753.
3809
3810 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
3811
3812         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
3813         Fix #52451.
3814
3815 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3816
3817         * appdomain.c:
3818         * assembly.c: escape the uri before passing it to g_filename_from_uri.
3819         Fixes bug #52630.
3820
3821 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
3822
3823         * reflection.c: Add support for more than one unmanaged resource.
3824
3825         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
3826         in field->def_value, as done in all other cases.
3827
3828         * reflection.c (mono_reflection_get_custom_attrs): Add support for
3829         TypeBuilders.
3830
3831         * reflection.c (mono_reflection_create_runtime_class): Remove 
3832         errorneous assignment to klass->element_class, since it is already
3833         done in mono_reflection_setup_internal_class.
3834
3835 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3836
3837         * gc.c: added missing LeaveCriticalSection.
3838         * icall.c: indented a couple of lines.
3839         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
3840         if we call EndInvoke inside a callback. Fixes bug #52601.
3841
3842 2004-01-07  Martin Baulig  <martin@ximian.com>
3843
3844         * mono-debug-debugger.h
3845         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
3846
3847 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
3848
3849         * appdomain.c: Use messages in NotImplementedException.
3850
3851         * exception.c (mono_get_exception_not_implemented): Now this takes
3852         a message argument.
3853
3854         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
3855         exception instead of g_asserting an aborting when something is not
3856         implemented.
3857
3858         Add some inline docs.
3859
3860 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
3861
3862         * reflection.h: Update after changes to object layout.
3863
3864         * reflection.c: Implement saving of unmanaged aka win32 resources.
3865
3866         * appdomain.c: Bump version number.
3867
3868         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
3869         Handle missing domains gracefully.
3870
3871 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
3872
3873         * file-io.c : On Windows, there are much more invalid_path_chars.
3874
3875 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
3876
3877         * class.h, object.c: prepare for GetType () speedup.
3878
3879 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
3880
3881         * profiler.c: workaround for --profile null reference exception on
3882           cygwin. Patch by Patrik Torstensson.
3883
3884 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
3885
3886         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
3887         make work for unaligned access.
3888
3889 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
3890
3891         * class.c: small cleanup (class->fields [i] -> field).
3892         * image.c: check address of metadata is valid.
3893
3894 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
3895
3896         * assembly.h assembly.c (mono_assembly_loaded): New public function to
3897         search the list of loaded assemblies.
3898
3899         * reflection.c (mono_reflection_type_from_name): Use 
3900         mono_assembly_loaded instead of mono_image_loaded.
3901
3902         * reflection.c: Fix warnings.
3903
3904 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
3905
3906         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
3907         is dynamic. This is needed since an assembly can contain both dynamic and
3908         non-dynamic images.
3909
3910         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
3911         assembly->dynamic.
3912
3913         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
3914
3915         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
3916         to store modules loaded using AddModule.
3917
3918         * reflection.c (mono_image_fill_file_table): Generalize this so it works
3919         on Modules.
3920
3921         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
3922
3923         * reflection.c (mono_image_fill_export_table_from_module): New function to
3924         fill out the EXPORTEDTYPES table from a module.
3925
3926         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
3927         into a separate function. Also handle loaded non-dynamic modules.
3928
3929         * reflection.c (mono_image_basic_init): Fix memory allocation.
3930
3931         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3932
3933         * assembly.c (mono_assembly_load_references): Make this public.
3934
3935 2003-12-19  Martin Baulig  <martin@ximian.com>
3936
3937         * class.c (mono_class_initialize_generic): Made this static, take
3938         a `MonoGenericInst *' instead of a `MonoClass *'.
3939         (mono_class_from_generic): Call mono_class_initialize_generic()
3940         unless we're already initialized or being called from
3941         do_mono_metadata_parse_generic_inst().
3942
3943         * class.h (MonoGenericInst): Added `initialized' and
3944         `init_pending' flags.
3945
3946         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
3947         `mono_class_init (gklass)' or mono_class_initialize_generic()
3948         here; set `generic_inst->init_pending' while parsing the
3949         `type_argv'.
3950
3951 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
3952
3953         * locales.c: include string.h for memxxx prototypes
3954
3955 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
3956
3957         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
3958         constructor when accessing literal fields.
3959
3960 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
3961
3962         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3963
3964         * reflection.c (assembly_add_resource_manifest): New function to fill
3965         the MANIFESTRESOURCE table.
3966
3967         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
3968
3969         * reflection.h: Update to changes in class layout.
3970
3971         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
3972         Reenable call to mono_runtime_is_shutting_down ().
3973
3974         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
3975         determine if the runtime is shutting down.
3976
3977 2003-12-16  Jackson Harper <jackson@ximian.com>
3978
3979         * icall.c: comment out call to mono_runtime_is_shutting_down to
3980         fix build.
3981         
3982 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
3983
3984         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
3985         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
3986
3987 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
3988
3989         * reflection.c: move definition of swap_with_size
3990         to before its first call
3991
3992 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
3993
3994         * appdomain.c (mono_runtime_is_shutting_down): New public function.
3995
3996         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
3997         icall.
3998
3999         * object.c: Fix warnings.
4000
4001         * icall.c (ves_icall_Type_Get...): Only consider inherited static
4002         members if FlattenHierarchy is set.
4003
4004         * reflection.c (mono_image_add_decl_security): New function to emit
4005         declarative security.
4006
4007         * reflection.h reflection.c: Add support for declarative security.
4008
4009         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
4010         
4011 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
4012
4013         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
4014         
4015         * appdomain.c verify.c: Moved corlib version checking into its own
4016         function in appdomain.c since it needs to create vtables etc.
4017
4018 2003-12-13  Patrik Torstensson <p@rxc.se>
4019
4020         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
4021         instead of unwrapped server.
4022
4023 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
4024
4025         * verify.c (check_corlib): Fix field index.
4026
4027 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
4028
4029         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
4030         GetGacPath icall.
4031
4032 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
4033
4034         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
4035         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
4036         cope with sizeof(size_t) != sizeof(guint32).
4037
4038 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4039
4040         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
4041         in case of failure.
4042
4043 2003-12-10  Mark Crichton <crichton@gimp.org>
4044
4045         * icall.c: removed the GetNonZeroBytes.  We now handle this case
4046         in managed code.
4047
4048         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
4049
4050 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
4051
4052         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
4053         marked as deleted.
4054
4055 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
4056
4057         * verify.c (check_corlib): Handle the case when the version field is 
4058         initialized by a static constructor.
4059
4060 2003-12-08  Patrik Torstensson  <p@rxc.se>
4061
4062     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
4063
4064 2003-12-08  Martin Baulig  <martin@ximian.com>
4065
4066         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
4067         a MonoReflectionGenericParameter, also take the parameter index
4068         and name as arguments.
4069         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
4070         (ves_icall_MonoGenericParam_initialize): New interncall.
4071         (ves_icall_Type_make_byref_type): New interncall.
4072
4073         * reflection.h (MonoReflectionGenericParam): Derive from
4074         MonoReflectionType, not just from MonoObject.  Added `refobj' and
4075         `index' fields.
4076
4077         * reflection.c (mono_reflection_define_generic_parameter): Create
4078         and return a new MonoReflectionGenericParam; don't initialize the
4079         constraints here.
4080         (mono_reflection_initialize_generic_parameter): New public method;
4081         initializes the constraints and creates the `param->pklass'.
4082
4083 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
4084
4085         * reflection.h reflection.c: Use the new fields 'num_types', 
4086         'num_fields' and 'num_methods' to track the number of types etc.
4087
4088         * verify.c (check_corlib): Check corlib version number.
4089
4090 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
4091
4092         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
4093         function works on all methods.
4094
4095 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
4096
4097         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
4098         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
4099         the custom_type_info flag of the transparent proxy.
4100         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
4101         objects that supports IRemotingTypeInfo.
4102         * object.h: Added custom_type_info field in transparent proxy.
4103
4104 2003-12-06  Martin Baulig  <martin@ximian.com>
4105
4106         * class.c (mono_class_create_from_generic): Removed.
4107         (mono_class_from_generic): Check `ginst->klass' before doing
4108         anything else.  This is important to fully support "recursive"
4109         generic types.
4110
4111         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
4112         empty `generic_inst->klass' before doing anything else.
4113
4114 2003-12-06  Dick Porter  <dick@ximian.com>
4115
4116         * verify.c: 
4117         * object.h:
4118         * icall.c:
4119         * locales.c: Use C structs to access class fields.  Don't do a
4120         conversion between MonoString and UChar because both are
4121         platform-endian UTF-16.  Compare now takes startindex and count
4122         parameters.  Add a char overload for IndexOf.  Speed up the
4123         invariant string IndexOf.
4124
4125 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
4126
4127         * Makefile.am (monosn_LDADD): Fix parallel build.
4128
4129 2003-12-04  Martin Baulig  <martin@ximian.com>
4130
4131         * icall.c
4132         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4133         (ves_icall_Type_make_array_type): New interncall.       
4134
4135 2003-12-04  Martin Baulig  <martin@ximian.com>
4136
4137         * locales.c: also change it in the !HAVE_ICU case.
4138
4139 2003-12-04  Dick Porter  <dick@ximian.com>
4140
4141         * icall.c:
4142         * locales.c: construct_compareinfo is now in CompareInfo, not
4143         CultureInfo.
4144
4145 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
4146
4147         * image.c (mono_image_load_file_for_image): Cache loaded images in the
4148         image->files array.
4149
4150         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
4151         table as well.
4152
4153         * assembly.c (mono_assembly_load_references): Only load references
4154         once.
4155
4156         * class.c (mono_class_from_name): Avoid linear search of the 
4157         EXPORTEDTYPE table.
4158
4159         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
4160
4161 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
4162
4163         * image.h (MonoImage): Add 'field_cache' field.
4164
4165         * loader.c (mono_field_from_token): Cache field lookups.
4166         
4167         * reflection.c (mono_module_get_object): Fix name property.
4168
4169         * icall.c (ves_icall_get_enum_info): Update after changes to 
4170         mono_metadata_get_constant_index ().
4171
4172         * icall.c: Get rid of get_type_info icall, use a separate icall for
4173         each type property to avoid needless memory allocations. Fixes #51514.
4174
4175         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
4176         to avoid needless binary searches.
4177
4178         * class.c (class_compute_field_layout): Move the initialization of
4179         field->def_value to mono_class_vtable ().
4180
4181         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
4182         non-corlib types.
4183
4184         * object.c (mono_object_allocate): Make it inline.
4185
4186         * object.c (mono_object_allocate_spec): Make it inline.
4187         
4188 2003-12-02  Dick Porter  <dick@ximian.com>
4189
4190         * locales.c (create_NumberFormat): NumberFormatInfo construction.
4191         Patch by Mohammad DAMT (mdamt@cdl2000.com).
4192
4193 2003-12-01  Dick Porter  <dick@ximian.com>
4194
4195         * threads.c: Fix signature and call in CreateMutex and
4196         CreateEvent.
4197
4198 2003-12-01  Dick Porter  <dick@ximian.com>
4199
4200         * icall.c: 
4201         * locales.c: Implement string compares and searching
4202
4203         * object.h: Add extra Thread field
4204
4205 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
4206
4207         * reflection.c (fixup_method): Add support for MonoCMethod.
4208
4209 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
4210
4211         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
4212
4213         * reflection.c (assembly_name_to_aname): Allow extra characters in
4214         assembly names. Fixes #51468.
4215
4216 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
4217
4218         * exception.c (mono_exception_from_name_domain): New helper function.
4219
4220         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
4221         exception object in the correct domain.
4222
4223         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
4224         formatting + make a copy a the input data.
4225
4226         * loader.c (mono_get_method_from_token): Methods which contain
4227         native code do not have entries in the ImplMap.
4228
4229         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
4230         Thanks to Gonzalo for spotting this.
4231         
4232         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
4233         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
4234
4235         * assembly.h (mono_assembly_load_from): Split the second part of 
4236         assembly loading into a new public function.
4237
4238         * exception.h (mono_get_exception_bad_image_format): New function.
4239
4240 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
4241
4242         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
4243         Enumerate all modules inside a dynamic assembly. Fixes #51293.
4244         
4245         * icall.c: Add new icall for creating dynamic methods.
4246
4247         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
4248
4249         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
4250
4251         * reflection.c (mono_reflection_create_dynamic_method): New icall to
4252         create a dynamic method.
4253
4254         * reflection.c (resolve_object): New helper function.
4255
4256         * reflection.c: Generalize ReflectionMethodBuilder and the functions
4257         which manipulate it so they can also work on dynamic methods.
4258
4259         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
4260         creating the MonoReflectionMethodAux structure if it is not needed.
4261         
4262         * reflection.h verify.c: Update after changes to object layout.
4263
4264         * reflection.c (method_builder_encode_signature): Fix compilation on
4265         gcc 2.95.x.
4266
4267 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
4268
4269         * appdomain.h: Added support for context static fields. Added static_data
4270           field to MonoAppContext and renamed thread_static_fields to a more
4271           generic special_static_fields in MonoAppDomain, since it can now contain
4272           context static fields.
4273         * domain.c: Updated hashtable name.
4274         * object.c: Replaced field_is_thread_static() for a more generic
4275           field_is_special_static() which also checks for context static attribute.
4276           In mono_class_vtable(), added support for static context fields.
4277         * threads.c: Changed methods that manage thread static fields to more
4278           generic methods so they can be reused both for thread and context static
4279           data.
4280         * threads.h: Declared some new methods.
4281
4282 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
4283
4284         * reflection.h: Update after changes to the managed types.
4285
4286         * reflection.c (encode_custom_modifiers): New helper function.
4287
4288         * reflection.c (method_encode_signature): Emit custom modifiers.
4289
4290         * reflection.c (field_encode_signature): Emit custom modifiers.
4291
4292 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
4293
4294         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
4295
4296         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
4297         implementation.
4298
4299         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
4300         icall.
4301
4302         * object.c (mono_field_get_value_object): New function.
4303
4304         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
4305         specific.
4306
4307 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
4308
4309         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
4310         return a preallocated out-of-memory exception instance.
4311
4312         * object.c (out_of_memory): Use the new function.
4313
4314         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
4315         flag is before the custom modifiers. Fixes #49802.
4316
4317 2003-11-16  Martin Baulig  <martin@ximian.com>
4318
4319         * class.c (mono_class_is_open_constructed_type): Implemented the
4320         MONO_TYPE_GENERICINST case.
4321
4322 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
4323
4324         * assembly.c (mono_assembly_fill_assembly_name): New function to
4325         fill out the MonoAssemblyName structure.
4326         (mono_assembly_open): Use the new function.
4327
4328         * icall.c (fill_reflection_assembly_name): New helper function.
4329
4330         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
4331         new function.
4332
4333         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
4334
4335 2003-11-15  Martin Baulig  <martin@ximian.com>
4336
4337         * class.c (mono_class_is_open_constructed_type): New public
4338         function; checks whether a type is an open constructed type,
4339         ie. whether it still contains type parameters.
4340         (mono_class_inflate_generic_type): If we're a type parameter and
4341         the inflated type is also a MONO_TYPE_(M)VAR, return the original
4342         type.
4343
4344         * class.h (MonoGenericInst): Added `guint32 is_open'.
4345
4346         * loader.c (method_from_methodspec): Check whether we're an open
4347         or closed constructed type and set `ginst->is_open'.
4348
4349         * reflection.c (mono_reflection_bind_generic_parameters): Check
4350         whether we're an open or closed constructed type and set
4351         `ginst->is_open'.
4352         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
4353         from open constructed types.
4354
4355 2003-11-15  Martin Baulig  <martin@ximian.com>
4356
4357         * reflection.c (mono_reflection_bind_generic_parameters): If we're
4358         a generic instance (instead of a generic type declaration) with
4359         unbound generic parameters, bind them to our actual types.
4360
4361 2003-11-14  Martin Baulig  <martin@ximian.com>
4362
4363         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
4364
4365         * reflection.c (mono_reflection_bind_generic_parameters): If we're
4366         an interface type, populate `res->interfaces' with instantiated
4367         versions of all the interfaces we inherit.
4368
4369 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
4370
4371         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
4372         when MONO_PATH is set but doesn't contain the install dir.
4373
4374 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4375
4376         * icall.c:
4377         (ves_icall_Type_GetInterfaces): don't return an interface twice when
4378         it's also implemented in base classes. Fixes bug #50927.
4379
4380 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
4381
4382         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
4383         if this method is called from a finalizer. Fixes #50913.
4384
4385 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
4386
4387         * threads.c: Implement VolatileRead/VolatileWrite
4388
4389         * icall.c: Add new icalls for VolatileRead/VolatileWrite
4390
4391 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4392
4393         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
4394         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
4395         2.95.3.
4396
4397         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
4398         from Peter Ross (pro@missioncriticalit.com).
4399         
4400 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
4401
4402         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
4403
4404 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4405
4406         * assembly.c (mono_assembly_load_references): Disable check because it
4407         triggers on older corlibs which lots of people have.
4408
4409 2003-11-12  Jackson Harper  <jackson@ximian.com>
4410
4411         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
4412         load corlib.dll if mscorlib.dll is not found.
4413         * assembly.h: Remove corlib name define.
4414         * class.c:
4415         * domain.c:
4416         * image.c: Change corlib name to mscorlib.
4417         
4418 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
4419
4420         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
4421
4422 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
4423
4424         * appdomain.h: Added loader_optimization here to sync with the C#
4425         code, and add disallow_binding_redirects field.
4426
4427 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
4428
4429         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
4430
4431         * reflection.c (mono_image_build_metadata): Fix crash on modules
4432         with no types.
4433
4434         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
4435
4436         * icall.c (ves_icall_get_method_info): Return callingConvention as
4437         well.
4438
4439         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
4440         namespaces from the EXPORTEDTYPE table as well.
4441
4442         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
4443         from all modules inside the assembly.
4444         
4445 2003-11-11  Martin Baulig  <martin@ximian.com>
4446
4447         * reflection.c (mono_reflection_bind_generic_parameters): Make
4448         this work for interfaces.
4449
4450 2003-11-11  Martin Baulig  <martin@ximian.com>
4451
4452         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
4453
4454 2003-11-11  Martin Baulig  <martin@ximian.com>
4455
4456         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
4457         "MonoInflatedMethod" and "MonoInflatedCtor".
4458
4459 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
4460
4461         * reflection.c (resolution_scope_from_image): Use the assembly table
4462         from the manifest module, since other modules don't have it.
4463
4464         * debug-helpers.c (mono_type_full_name): New helper function.
4465
4466         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
4467
4468         * image.c (mono_image_load_file_for_image): New public function which
4469         is a replacement for the load_file_for_image in class.c.
4470
4471         * assembly.c (mono_assembly_load_module): A wrapper for the function
4472         above which does assembly association and reference loading too.
4473
4474         * class.c (mono_class_from_name): Call mono_assembly_load_module.
4475
4476 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4477
4478         * appdomain.c: not all of the attributes for the full assembly name
4479         are required and the order doesn't matter. Fixes bug #50787.
4480
4481 2003-11-10  Dick Porter  <dick@ximian.com>
4482
4483         * locales.c: Use platform-endian UTF16
4484
4485 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
4486
4487         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4488         
4489 2003-11-10  Martin Baulig  <martin@ximian.com>
4490
4491         * metadata.c
4492         (mono_metadata_load_generic_params): Make this actually work.
4493
4494         * reflection.c (mono_reflection_bind_generic_parameters): If our
4495         parent is a generic instance, pass all the `types' to it, no
4496         matter whether it has the same number of type parameters or not.
4497
4498 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
4499
4500         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4501
4502         * assembly.c (mono_assembly_load_references): Move the image<->assembly
4503         assignment code to this function so it gets called recursively for all
4504         modules.
4505
4506         * image.c (load_modules): Remove the assembly assignment since it is
4507         now done by mono_assembly_load_references.
4508         
4509         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
4510         Add 'module' argument.
4511         (mono_module_get_types): New helper function.
4512         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
4513
4514 2003-11-08  Martin Baulig  <martin@ximian.com>
4515
4516         * class.c (mono_class_inflate_generic_method): Interface method
4517         don't have a header.
4518
4519         * reflection.c (mono_image_get_methodspec_token): Take an
4520         additional `MonoGenericInst *' argument instead of reading it from
4521         the header; this is necessary to support interfaces.
4522         (mono_image_create_token): Pass the `MonoGenericInst *' from the
4523         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
4524         (inflated_method_get_object): Take an additional `MonoGenericInst *'
4525         argument.
4526
4527         * reflection.h (MonoReflectionInflatedMethod): Added
4528         `MonoGenericInst *ginst'.
4529
4530 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
4531
4532         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
4533
4534 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
4535
4536         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
4537
4538 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
4539
4540         * reflection.c 
4541         (reflection_methodbuilder_from_method_builder):
4542         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
4543         initialize a ReflectionMethodBuilder structure.
4544         (mono_image_get_methodbuilder_token):
4545         (mono_image_get_ctorbuilder_token): New functions to emit memberref
4546         tokens which point to types in another module inside the same assembly.
4547
4548         * reflection.c: Use the new helper functions.
4549         
4550         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
4551
4552         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
4553         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
4554
4555         * reflection.c (resolution_scope_from_image): Emit a moduleref if
4556         neccesary.
4557
4558         * reflection.c (mono_image_build_metadata): Emit metadata only for the
4559         current module. Emit the manifest only for the main module.
4560
4561         * reflection.c (mono_image_create_token): Add assertion when a 
4562         memberref needs to be created.
4563
4564         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
4565
4566         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
4567         larger buffer for the custom attribute blob. Fixes #50637.
4568         
4569 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4570
4571         * threadpool.c: notify listener on async processing handles after
4572         invoking the async callback. Thanks to Zoltan.
4573
4574 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4575
4576         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
4577         avoid code duplication.
4578
4579         * reflection.h (MonoDynamicImage): New type which is currently unused,
4580         but will be used through the ref.emit code in place of 
4581         MonoDynamicAssembly.
4582
4583         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4584         object layout.
4585
4586         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
4587         a MonoDynamicImage instead of just a MonoImage.
4588         
4589         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
4590         icalls to ModuleBuilder but keep their semantics, so they will work
4591         with moduleb->assemblyb. This will change later.
4592         
4593 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4594
4595         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4596         object layout.
4597
4598         * reflection.c (mono_image_build_metadata): Avoid creation of a default
4599         main module, since it is now done by the managed code.
4600
4601 2003-11-03  Martin Baulig  <martin@ximian.com>
4602
4603         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
4604         `ginst->klass' here.
4605         (method_encode_methodspec): Don't use the `ginst->generic_method's
4606         klass if it's a generic instance, use `ginst->klass' in this case.
4607
4608 2003-11-03  Martin Baulig  <martin@ximian.com>
4609
4610         * reflection.c (mono_image_get_generic_method_param_info):
4611         Removed, use mono_image_get_generic_param_info() instead.
4612         (mono_image_get_type_info): Write the GenericParam table before
4613         the Method table.  This is neccessary because in the GenericParam
4614         table, type parameters of the class (ie. '!0' etc.) must come
4615         before the ones from its generic methods (ie. '!!0' etc).
4616
4617 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
4618
4619         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
4620
4621 2003-11-02  Martin Baulig  <martin@ximian.com>
4622
4623         * reflection.c (create_generic_typespec): Take a
4624         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
4625         the generic parameters from it.
4626
4627 2003-11-02  Martin Baulig  <martin@ximian.com>
4628
4629         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
4630         instead of a `MonoClassField *' since we just need the type.
4631         (create_generic_typespec): New static function.  Creates a
4632         TypeSpec token for a generic type declaration.
4633         (mono_image_get_generic_field_token): New static function.
4634         (mono_image_create_token): If we're a FieldBuilder in a generic
4635         type declaration, call mono_image_get_generic_field_token() to get
4636         the token.
4637
4638 2003-11-02  Martin Baulig  <martin@ximian.com>
4639
4640         * reflection.h
4641         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
4642         `MonoReflectionGenericInst *declaring_type' and
4643         `MonoReflectionGenericInst *reflected_type' fields.
4644
4645         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
4646         `MonoReflectionGenericInst *declaring_type' and a
4647         `MonoReflectionGenericInst *reflected_type' argument instead of a
4648         single `MonoReflectionGenericInst *type' one.  Set
4649         `res->declaring_type' and `res->reflected_type' from them.
4650         (mono_reflection_inflate_field): Likewise.      
4651
4652 2003-11-02  Martin Baulig  <martin@ximian.com>
4653
4654         * class.c (mono_class_setup_vtable): Don't store generic methods
4655         in the vtable.  
4656
4657 2003-11-02  Martin Baulig  <martin@ximian.com>
4658
4659         * reflection.h (MonoReflectionGenericInst): Added
4660         `MonoReflectionType *declaring_type'.
4661
4662         * reflection.c (mono_reflection_bind_generic_parameters): Use
4663         `if (tb->parent)' instead of `klass->parent'.
4664
4665 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
4666
4667         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
4668         with an empty ASSEMBLY table.
4669
4670         * reflection.c (mono_image_build_metadata): Avoid using the same loop
4671         variable in the inner and outer loops.
4672
4673 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
4674
4675         * metadata.h (mono_metadata_make_token): Put parentheses around macro
4676         argument.
4677
4678         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
4679         
4680         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
4681         icalls. Instead, do everything in managed code. This is needed since
4682         it is hard to restore the original domain etc. in unmanaged code in the
4683         presence of undeniable exceptions.
4684
4685         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
4686         New icalls to push and pop appdomain refs.
4687
4688 2003-10-31  Martin Baulig  <martin@ximian.com>
4689
4690         * class.c (inflate_generic_type): Renamed to
4691         mono_class_inflate_generic_type() and made it public.
4692
4693         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
4694         New interncall.
4695
4696         * loader.c (mono_field_from_memberref): Also set the retklass for
4697         typespecs.
4698
4699         * fielder.c (mono_image_get_inflated_field_token): New static
4700         method; creates a metadata token for an inflated field.
4701         (mono_image_create_token, fixup_method): Added support for
4702         "MonoInflatedField".
4703         (fieldbuilder_to_mono_class_field): New static function.
4704         (mono_reflection_inflate_field): New public function.
4705
4706         * reflection.h
4707         (MonoReflectionGenericInst): Added `MonoArray *fields'.
4708         (MonoReflectionInflatedField): New typedef.     
4709
4710 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
4711
4712         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
4713         for Solaris and other platforms without s6_addr16
4714
4715 2003-10-30  Martin Baulig  <martin@ximian.com>
4716
4717         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
4718         argument instead of two.
4719         (mono_class_inflate_generic_signature): Likewise.
4720         (inflate_generic_header): Likewise.
4721         (mono_class_inflate_generic_method): Likewise.  In addition, if
4722         `ginst->klass' is set, it becomes the new `method->klass'.
4723
4724         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
4725         field.
4726
4727         * reflection.c (encode_generic_method_sig): Write a 0xa as the
4728         first byte. [FIXME]
4729         (method_encode_methodspec): If we have generic parameters, create
4730         a MethodSpec instead of a MethodRef.
4731         (fixup_method): Added support for "MonoInflatedMethod" and
4732         "MonoInflatedCtor".
4733         (mono_image_create_token): Added support for "MonoInflatedMethod"
4734         and "MonoInflatedCtor".
4735         (inflated_method_get_object): New static function; returns a
4736         managed "System.Reflection.MonoInflatedMethod" object.
4737         (mono_reflection_bind_generic_method_parameters): Return a
4738         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
4739         (mono_reflection_inflate_method_or_ctor): Likewise.
4740         (mono_image_get_generic_method_param_info): Initialize unused
4741         fields to zero.
4742         (mono_image_get_generic_param_info): Likewise.
4743
4744         * reflection.h (MonoReflectionInflatedMethod): New public
4745         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
4746         "S.R.MonoInflatedCtor" classes.
4747
4748         * loader.c (method_from_memberref): If we're a TypeSpec and it
4749         resolves to a generic instance, inflate the method.
4750
4751 2003-10-28  Dick Porter  <dick@ximian.com>
4752
4753         * object.c (mono_runtime_run_main): Convert command-line arguments
4754         into utf8, falling back to the user's locale encoding to do so.
4755
4756 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
4757
4758         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
4759         at this time.
4760
4761         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
4762
4763         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
4764         up icalls at method definition time. Partially fixes #33569.
4765
4766 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
4767
4768         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
4769         marshalling of arrays. Fixes #50116.
4770
4771         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
4772
4773         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
4774         points to a vtable in the dying appdomain.
4775
4776         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
4777         listeners into unmanaged code inside the lock.
4778
4779         * object.c (mono_class_vtable): Turn off typed allocation in non-root
4780         domains and add some comments.
4781
4782 2003-10-25  Martin Baulig  <martin@ximian.com>
4783
4784         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
4785
4786         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
4787
4788         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
4789         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
4790         currently parsing.  Create the generic class and store it in
4791         `generic_inst->klass' before parsing the type arguments.  This is
4792         required to support "recursive" definitions; see mcs/tests/gen-23.cs
4793         for an example.
4794         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
4795         to support recursive typespec entries.
4796
4797         * class.c (mono_class_setup_parent): If our parent is a generic
4798         instance, we may get called before it has its name set.
4799         (mono_class_from_generic): Splitted into
4800         mono_class_create_from_generic() and mono_class_initialize_generic().
4801
4802 2003-10-25  Martin Baulig  <martin@ximian.com>
4803
4804         * icall.c (ves_icall_Type_BindGenericParameters): Return a
4805         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
4806         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
4807         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
4808
4809         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
4810         (create_typespec): Likewise.
4811         (mono_reflection_bind_generic_parameters): Return a
4812         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
4813         (mono_reflection_inflate_method_or_ctor): New public function.
4814
4815         * reflection.h (MonoReflectionGenericInst): New typedef.        
4816
4817 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
4818
4819         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
4820         inside the domain lock. Fixes #49993.
4821         
4822         * object.c (mono_class_vtable): When typed allocation is used, 
4823         allocate vtables in the GC heap instead of in the mempool, since the
4824         vtables contain GC descriptors which are used by the collector even
4825         after the domain owning the mempool is unloaded.
4826
4827         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
4828
4829         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
4830         reflect what it does. Also invalidate mempools instead of freeing
4831         them if a define is set.
4832
4833         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
4834         of the appdomain.
4835         
4836         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
4837         hold the finalizable objects in this domain.
4838
4839         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
4840         appdomain.
4841
4842         * appdomain.c (mono_domain_set): New function to set the current
4843         appdomain, but only if it is not being unloaded.
4844
4845         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
4846         appdomain which is being unloaded.
4847         
4848         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
4849         unloading of the root appdomain.
4850
4851         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
4852         icall to execute a method in another appdomain. Intended as a 
4853         replacement for InternalSetDomain, which can confuse the code 
4854         generation in the JIT.
4855
4856         * appdomain.c (mono_domain_is_unloading): New function to determine
4857         whenever an appdomain is unloading.
4858
4859         * appdomain.c (mono_domain_unload): New function to correctly unload
4860         an appdomain.
4861
4862         * assembly.c (mono_assembly_load_references): Check that an assembly
4863         does not references itself.
4864
4865         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
4866         domain manually, it asks the finalizer thread to do it, then waits for
4867         the result. Also added a timeout.
4868
4869         * icall.c: Register the new icalls.
4870
4871         * threads.h threads.c: Export the mono_gc_stop_world and 
4872         mono_gc_start_world functions.
4873         
4874         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
4875         function to fill out the mempool with 0x2a.
4876
4877 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
4878
4879         * reflection.h (MonoReflectionMethodAux): New structure to store
4880         information which is rarely used, thus is not in the MonoMethod
4881         structure.
4882
4883         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
4884         store the aux info.
4885
4886         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
4887         and marshalling info into the aux structure.
4888
4889         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
4890         from the aux structure.
4891
4892         * loader.c (mono_method_get_param_names): Retrieve the param names from
4893         the aux structure.
4894         
4895 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
4896
4897         * exception.h exception.c: Add AppDomainUnloadedException && fix 
4898         warning.
4899
4900 2003-10-21  Dick Porter  <dick@ximian.com>
4901
4902         * socket-io.c
4903         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
4904         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
4905
4906 2003-10-21  Martin Baulig  <martin@ximian.com>
4907
4908         * reflection.c (mono_reflection_bind_generic_parameters):
4909         `klass->parent' is NULL for interfaces.
4910
4911 2003-10-21  Martin Baulig  <martin@ximian.com>
4912
4913         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4914
4915 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
4916
4917         * exception.c (mono_exception_from_name_msg): New helper function for
4918         creating exceptions and initializing their message field.
4919
4920         * exception.c: Simplify functions using the new helper.
4921
4922         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
4923         New function.
4924
4925         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
4926         mono_raise_exception, since otherwise gcc doesn't generate the function
4927         epilog for raise_exception, confusing the stack unwinding in the JIT.
4928         Fixes #45043.
4929
4930         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
4931         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
4932         Fixes #49499.
4933
4934 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4935
4936         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
4937         utf8.
4938
4939 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
4940
4941         * icall.c: Removed GetUninitializedObject method because
4942           AllocateUninitializedClassInstance does the same.
4943
4944 2003-10-18  Martin Baulig  <martin@ximian.com>
4945
4946         * class.c (inflate_generic_signature): Renamed to
4947         mono_class_inflate_generic_signature() and made it public.
4948         (my_mono_class_from_generic_parameter): New static function; if we
4949         don't already have the generic parameter's MonoClass, create a
4950         very simple one which is just used internally in the runtime and
4951         not passed back to managed code.
4952
4953         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
4954
4955         * metadata.h (MonoMethodSignature): Moved the
4956         `MonoGenericParam *gen_params' to the MonoMethodHeader.
4957         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
4958
4959         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
4960         ves_icall_MonoMethod_GetGenericArguments(); this is now an
4961         interncall on the MonoMethod class, not on MethodInfo.
4962         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
4963         calling mono_reflection_bind_generic_method_parameters() directly.
4964
4965         * loader.c (mono_method_get_signature): If this is a MethodSpec;
4966         return the already computed `method->signature'.
4967         (method_from_methodspec): New static function to load a method
4968         from a MethodSpec entry.
4969         (mono_get_method_from_token): Call the new method_from_methodspec()
4970         for MethodSpec tokens.  
4971         (mono_get_method_from_token): If we're a generic method, load the
4972         type parameters.
4973
4974         * reflection.c (mono_image_get_memberref_token): Allow
4975         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
4976         table.
4977         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
4978         (mono_image_create_token): First check whether it's a generic
4979         method (so we'd need to create a MethodSpec), then do the other
4980         two alternatives.
4981         (mono_reflection_bind_generic_method_parameters): Return a
4982         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
4983         called directly from the interncall.
4984
4985 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
4986
4987         * reflection.c (load_public_key): Move loading of the public key
4988         into managed code.
4989
4990         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
4991
4992         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
4993         fields.
4994
4995         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
4996         culture, hash_alg and public_key. Fixes #49555.
4997
4998 2003-10-17  Martin Baulig  <martin@ximian.com>
4999
5000         * class.h (MonoGenericInst): Moved this declaration here and added
5001         `MonoMethod *generic_method'.
5002
5003         * icall.c
5004         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
5005         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
5006
5007         * metadata.c (mono_metadata_type_equal): Two types of
5008         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
5009         index; ie. don't compare the address of the `MonoGenericParam'
5010         structure.
5011         (mono_metadata_load_generic_params): Removed the `MonoMethod
5012         *method' argument.
5013
5014         * metadata.h (MonoGenericInst): Moved declaration to class.h.
5015         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
5016
5017         * reflection.c (method_encode_signature): Encode the number of
5018         generic parameters.
5019         (encode_generic_method_sig): New static function.
5020         (method_encode_methodspec): New static function; creates an entry
5021         in the MethodSpec table for a generic method.
5022         (mono_image_get_methodspec_token): New static function.
5023         (mono_image_create_token): Call mono_image_get_methodspec_token()
5024         for generic methods.
5025         (mono_reflection_bind_generic_method_parameters): New public
5026         function.  Instantiates a generic method.
5027
5028 2003-10-16  Martin Baulig  <martin@ximian.com>
5029
5030         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
5031         *gen_params' here from MonoMethodHeader.
5032
5033         * metadata.c (mono_metadata_parse_method_signature): If we have
5034         generic parameters, initialize `method->gen_params' and then set
5035         the correct `type->data.generic_param' in all the parameters.
5036
5037 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
5038
5039         * threads.c (mono_threads_get_default_stacksize): New function to 
5040         return the default stacksize.
5041
5042         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
5043         termination of the finalizer thread, since the previous method had
5044         race conditions. Fixes #49628.
5045
5046         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
5047         as for the other managed threads.
5048
5049 2003-10-16  Martin Baulig  <martin@ximian.com>
5050
5051         * class.c (inflate_generic_signature): Copy `generic_param_count'
5052         and `gen_params'.
5053
5054         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
5055         New interncall.
5056
5057         * metadata.c (mono_metadata_parse_method_signature): Actually set
5058         the `method->generic_param_count' here.
5059         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
5060
5061 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
5062
5063         * object.h: Add a new field to TypedRef to simplify the implementation
5064         of the REFANY opcodes in the JIT.
5065
5066         * icall.c: Make use of the new field.
5067
5068         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
5069         dynamically.
5070
5071 2003-10-15  Martin Baulig  <martin@ximian.com>
5072
5073         * class.c (mono_class_from_gen_param): Renamed to
5074         mono_class_from_generic_parameter() and moved most of the
5075         functionality from mono_reflection_define_generic_parameter()
5076         here; ie. we create a "real" class here.
5077         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
5078         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
5079         previously been called.
5080
5081         * class.h (MonoGenericParam): Moved the declaration of this struct
5082         here from metadata.h and added `MonoMethod *method'.
5083
5084         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
5085         interncall.
5086
5087         * loader.c (mono_get_method_from_token): If we have any generic
5088         parameters, call mono_metadata_load_generic_params() to read them
5089         from the MONO_TABLE_GENERICPAR.
5090
5091         * metadata.c (mono_metadata_load_generic_params): Added
5092         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
5093
5094         * metadata.h (MonoMethodSignature): Replaced
5095         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
5096         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
5097
5098         * reflection.c (mono_reflection_define_generic_parameter): Moved
5099         most of the functionality into the new
5100         mono_class_from_generic_parameter(); set the `method' field if
5101         we're a method parameter.       
5102
5103 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
5104
5105         * marshal.c (emit_struct_conv): if native size is 0
5106         emit no code.
5107
5108 2003-10-14  Martin Baulig  <martin@ximian.com>
5109
5110         * icall.c: The generics API has changed in the spec since it was
5111         added to System.Type; these modifications make it match the spec
5112         again.
5113         (ves_icall_Type_GetGenericParameters): Renamed to
5114         `ves_icall_Type_GetGenericArguments'.
5115         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
5116         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
5117         `ves_icall_MonoType_get_HasGenericArguments'.
5118         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
5119         `ves_icall_MonoType_get_IsGenericParameter'.
5120         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
5121         this is no interncall anymore.
5122         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
5123         `ves_icall_TypeBuilder_get_IsGenericParameter'.
5124
5125 2003-10-14  Martin Baulig  <martin@ximian.com>
5126
5127         * reflection.c (mono_reflection_bind_generic_parameters): Also
5128         inflate generic methods if we're reading the class from IL.
5129
5130 2003-10-13  Martin Baulig  <martin@ximian.com>
5131
5132         * reflection.c (mono_reflection_define_generic_parameter): This
5133         method isn't called directly from the icall anymore; take a
5134         `MonoReflectionAssemblyBuilder *' so we can use this for type and
5135         method generic parameters.
5136         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
5137         (method_builder_encode_signature): Encode generic parameters.
5138         (mono_image_get_method_info): Write generic params to the
5139         MONO_TABLE_GENERICPARAM table.
5140
5141         * reflection.h (MonoReflectionMethodBuilder): Added
5142         `MonoArray *generic_params'.
5143
5144         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
5145
5146         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
5147         wrapper for mono_reflection_define_generic_parameter().
5148         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
5149
5150 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
5151
5152         * marshal.h: Add missing function to fix build.
5153
5154         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
5155         the SetLastError pinvoke attribute.
5156
5157         * marshal.c (mono_marshal_set_last_error): New helper function called
5158         by the generated code.
5159         
5160         * marshal.c (mono_mb_emit_branch): New helper function.
5161
5162         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
5163
5164         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
5165         classes as parameters and return values of delegates. Fixes #29256. 
5166
5167 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
5168
5169         * locales.c: use gint32 in non HAVE_ICU case
5170
5171 2003-10-11  Martin Baulig  <martin@ximian.com>
5172
5173         * mono-debug.c (mono_debug_add_method): Added a workaround for
5174         bug #48591.
5175
5176 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
5177
5178         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
5179         delegates passed to native code must use the STDCALL calling 
5180         convention. Fixes #35987.
5181
5182 2003-10-10  Martin Baulig  <martin@ximian.com>
5183
5184         * class.c (inflate_generic_type): If we're inflating for a generic
5185         type instance (and not for a generic method), return
5186         MONO_TYPE_MVAR unchanged.
5187
5188 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5189
5190         * string-icalls.c: Join ignores null strings in the source array.
5191         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
5192         * threads.c: GetAvailableTheads is slightly more accurate.
5193
5194 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
5195
5196         * threads.h threads.c : add mono_threads_set_default_stacksize
5197         and pass default to CreateThread calls.
5198
5199 2003-10-09  Dick Porter  <dick@ximian.com>
5200
5201         * icall.c:
5202         * locales.h:
5203         * locales.c: Internal calls for constructing CultureInfo and
5204         related objects from libicu (if its available.)
5205
5206 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
5207
5208         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
5209
5210 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5211
5212         * threadpool.c: added an argument to async_invoke_thread that is the
5213         item to process, pass the MonoAsyncResult to the thread start function
5214         when creating a new thread. This way we don't need to acquire any lock
5215         when we're creating a new thread. Readded a semaphore for faster
5216         response times (instead of that Sleep i added).
5217
5218 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
5219
5220         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
5221         get daylight change dates better on Windows, fix handling
5222         of platforms without tm_gmtoff.
5223
5224 2003-10-06  Martin Baulig  <martin@ximian.com>
5225
5226         * class.c (inflate_generic_method): Renamed to
5227         mono_class_inflate_generic_method() and made public.
5228         (mono_class_init): Don't inflate the generic methods here.
5229         (mono_class_from_generic): Added `gboolean inflate_methods'
5230         argument.  Inflate the methods here.
5231
5232         * loader.c (mono_method_get_param_names): Ignore instances of
5233         generic types for the moment.
5234
5235         * reflection.c (fixup_method): Added support for inflated methods.
5236         (mono_image_create_token): Use mono_image_get_methodref_token()
5237         for inflated methods.
5238         (mono_custom_attrs_from_param): Ignore instances of generic types
5239         for the moment.
5240         (mono_reflection_bind_generic_parameters): New public function.
5241         Moved all the functionality from
5242         ves_icall_Type_BindGenericParameters() here and added support for
5243         dynamic types.
5244         (mono_reflection_define_generic_parameter): Initialize
5245         `klass->methods' here.
5246
5247         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
5248         functionality into mono_reflection_define_generic_parameter().
5249         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
5250         TypeBuilder, return that TypeBuilder.
5251
5252 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5253
5254         * appdomain.c: removed mono_delegate_semaphore.
5255
5256         * threadpool.c:
5257         (mono_thread_pool_add): moved hash table creation inside and the thread 
5258         creation outside of the critical region.
5259         (mono_thread_pool_finish): removed obsolete code.
5260         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
5261         continue or exit the thread depending on the queue.
5262
5263 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
5264
5265         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
5266         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
5267         handle more bool marshalling options
5268
5269 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
5270
5271         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
5272         arrays of structs. Also add a more descriptive error message when
5273         a structure member is marshalled as LPArray.
5274
5275 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
5276
5277         * marshal.c (mono_marshal_get_native_wrapper): Add support for
5278         marshalling arrays of complex types. Fixes #29098. Also remove an
5279         usused and incomplete function.
5280
5281 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
5282
5283         * gc.c: report heap_size - free_bytes as total memory allocated
5284         (bug#49362).
5285
5286 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
5287
5288         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
5289         fix timezone handling problems on Windows.
5290         
5291         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
5292         asserts when the year is outside the range handled by ms the functions.
5293
5294         * class.c (setup_interface_offsets): If the class is an interface,
5295         fill out its interface_offsets slot.
5296
5297 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5298
5299         * threadpool.c: mark threadpool threads as background.
5300
5301 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
5302
5303         * decimal.c - define DECINLINE to nothing if not using GCC
5304
5305 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
5306
5307         * assembly.c: More refcount fixes.
5308
5309 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5310
5311         * string-icalls.c: if we're not trimming, return the same string.
5312         When not splitting, don't create a new string.
5313
5314 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5315
5316         * image.c:
5317         (mono_image_open): increment the ref_count inside the critical section.
5318
5319 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
5320
5321         * image.c (mono_image_open): Fix reference counting bug.
5322
5323 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
5324
5325         * marshal.c (mono_marshal_type_size) struct alignment changed for 
5326         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
5327         64bits. Avoid leak in mono_marshal_get_native_wrapper when
5328         mono_lookup_pinvoke_call throws.        
5329
5330 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
5331
5332         * reflection.c (mono_reflection_parse_type): Fix #49114.
5333
5334         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
5335         temporary workaround for cygwin header problem.
5336
5337         * object.c (mono_object_isinst): Synchronize this with the code
5338         generated by the JIT for casts.
5339
5340 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
5341
5342         * reflection.c (encode_type): Fix #38332.
5343
5344 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
5345
5346         * marshal.c (mono_marshal_method_from_wrapper): New function to return
5347         the original method from the wrapper method.
5348
5349 2003-09-25  Martin Baulig  <martin@ximian.com>
5350
5351         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
5352         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
5353         (ves_icall_Type_get_IsGenericInstance): New interncall.
5354
5355 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
5356
5357         * object.c: fix cast warning in big endian code.
5358
5359 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
5360
5361         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
5362         
5363 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5364
5365         * assembly.c: don't call check_env from mono_assembly_load. It's
5366         already done once in mono_assemblies_init and may cause headaches when
5367         multiple threads are loading assemblies.
5368
5369 2003-09-19  Martin Baulig  <martin@ximian.com>
5370
5371         * reflection.c (mono_reflection_define_generic_parameter): Don't
5372         allocate `klass->methods', set `klass->flags' to
5373         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
5374
5375 2003-09-18  Martin Baulig  <martin@ximian.com>
5376
5377         * class.c (mono_class_init): Don't create `class->methods' if it's
5378         already initialized.
5379
5380         * metadata.c (mono_metadata_load_generic_params): Make this
5381         actually work.
5382
5383         * reflection.c (mono_reflection_define_generic_parameter): Set
5384         parent class and interfaces from the constraints.
5385
5386         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
5387         to keep this struct in sync with the declaration in TypeBuilder.cs.
5388
5389 2003-09-17  Martin Baulig  <martin@ximian.com>
5390
5391         * metadata.h (MonoType): Replaced the data's `int type_param'
5392         field with `MonoGenericParam *generic_param'.
5393         (MonoGenericParam): Added `MonoClass *klass'.
5394
5395         * class.c (mono_class_from_gen_param): Removed the
5396         `MonoImage *image' and `int type_num' arguments.
5397
5398         * metadata.c (mono_metadata_parse_generic_param): New static
5399         method; creates a MonoGenericParam which just contains the index.
5400         (do_mono_metadata_parse_type): Call
5401         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
5402         MONO_TYPE_MVAR.
5403
5404         * reflection.c (mono_image_typedef_or_ref): Generic type
5405         parameters may be in the same assembly, but never use a typedef
5406         for them.
5407         (mono_reflection_define_generic_parameter): We're now creating a
5408         "real" class for the type parameter; it's now safe to call
5409         mono_class_from_mono_type() on the class'es type, it'll do the
5410         right thing.
5411
5412 2003-09-16  Martin Baulig  <martin@ximian.com>
5413
5414         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
5415         `symfile->range_entry_size' and `symfile->class_entry_size' here;
5416         the `symfile' data structure must be fully initialized before it
5417         gets added to the table.
5418
5419 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
5420
5421         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
5422
5423         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
5424         class init trampolines.
5425
5426 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
5427
5428         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
5429         to the built-in profiler to turn off time and allocation profiling
5430         respectively.
5431
5432 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
5433
5434         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
5435         g_direct_equal.
5436
5437         * debug-helpers.c (mono_method_full_name): Print the wrapper type
5438         in human readable form.
5439
5440 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
5441
5442         * reflection.c icall.c: Fixed warnings.
5443
5444         * image.c (load_class_names): Use a temporary hash table to hold the
5445         namespaces in order to avoid doing many string comparisons.
5446
5447         * image.h: Fix typo.
5448
5449         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
5450         Pass NULL instead of g_direct_equal to the GHashTable constructor 
5451         since the NULL case is short-circuited inside g_hash_table_lookup, 
5452         leading to better performance.  
5453
5454         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
5455         obtain the first custom attribute for a given index. Depends on the
5456         CustomAttribute table being sorted by the parent field.
5457
5458         * reflection.c (mono_custom_attrs_from_index): Use the new function 
5459         for better performance.
5460
5461 2003-09-07  Martin Baulig  <martin@ximian.com>
5462
5463         * class.c (mono_class_init): If we're a generic instance, inflate
5464         all our methods instead of loading them from the image.
5465         (mono_class_from_generic): Set `class->methods = gklass->methods'.
5466
5467 2003-09-07  Martin Baulig  <martin@ximian.com>
5468
5469         * mono-debug-debugger.c: Added support for constructors.
5470
5471 2003-09-06  Martin Baulig  <martin@ximian.com>
5472
5473         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
5474         New interncall.
5475
5476         * reflection.c (mono_reflection_setup_generic_class): Call
5477         ensure_runtime_vtable() to create the vtable.
5478
5479 2003-09-05  Martin Baulig  <martin@ximian.com>
5480
5481         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
5482         MONO_TYPE_MVAR.
5483
5484 2003-09-04  Martin Baulig  <martin@ximian.com>
5485
5486         * reflection.c (mono_reflection_define_generic_parameter): Generic
5487         parameters start with zero.
5488
5489 2003-09-04  Martin Baulig  <martin@ximian.com>
5490
5491         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
5492
5493         * reflection.h (MonoReflectionGenericParam): New typedef.
5494         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
5495         the generic parameters from the managed TypeBuilder.
5496
5497         * reflection.c (mono_reflection_define_generic_parameter): New function.
5498         (mono_reflection_create_runtime_class): Encode generic parameters.
5499         (mono_reflection_setup_generic_class): New function; this is
5500         called after adding adding all generic params to the TypeBuilder.
5501         (encode_type): Added MONO_TYPE_VAR.
5502
5503 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
5504
5505         * class.h class.c (mono_class_needs_cctor_run): Moved this method
5506         here from the JIT.
5507
5508         * assembly.h assembly.c: Moved the AOT loading code into an assembly
5509         load hook.
5510
5511 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
5512
5513         * reflection.h reflection.c class.h class.c: Delete duplicate 
5514         definition of mono_type_get_name () from reflection.c and export the
5515         one in class.c.
5516
5517         * class.c: Class loading fixes from Bernie Solomon 
5518         (bernard@ugsolutions.com).
5519
5520         * reflection.c: Endianness fixes from Bernie Solomon 
5521         (bernard@ugsolutions.com).
5522         
5523 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
5524
5525         * assembly.h assembly.c: Define a file format version for AOT
5526         libraries.
5527         
5528         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
5529
5530         * appdomain.h (MonoJitInfo): New field to determine whenever the
5531         code is domain neutral.
5532         
5533 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
5534
5535         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
5536
5537 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
5538
5539         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
5540         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
5541         Avoid caching the result since strings must be domain specific. Fixes
5542         #48050.
5543
5544 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
5545
5546         * marshal.c (mono_marshal_init): Make this callable multiple times
5547         since it is hard to find a correct place to call it.
5548
5549         * object.c (mono_runtime_class_init): Execute static constructors in
5550         the correct appdomain.
5551
5552         * image.c (build_guid_table): Handle the case when multiple images have
5553         the same GUID.
5554
5555 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5556
5557         * icall.c: added a couple of icalls for System.Web.
5558
5559 2003-08-28  Martin Baulig  <martin@ximian.com>
5560
5561         * icall.c (ves_icall_Type_BindGenericParameters): Use
5562         `klass->generic_inst' instead of `&klass->byval_arg' in the
5563         mono_type_get_object() call.  The returned type must be
5564         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
5565
5566 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
5567
5568         * NOTES: New file.
5569
5570         * object.c (mono_class_proxy_vtable): Make it thread safe.
5571
5572         * pedump.c: Fix warning.
5573
5574         * object.c appdomain.h: Get rid of metadata_section. 
5575         It is no longer needed and it was causing deadlocks with domain->lock.
5576
5577         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
5578
5579 2003-08-26  Martin Baulig  <martin@ximian.com>
5580
5581         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
5582
5583 2003-08-26  Martin Baulig  <martin@ximian.com>
5584
5585         * pedump.c (main): Call mono_metadata_init(),
5586         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
5587         and mono_loader_init().
5588
5589 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
5590
5591         * loader.h: Add missing include to fix build.
5592
5593         * image.h: mono_image_load_references is no more.
5594
5595         * assembly.c: Reworked assembly loading to make it really thread safe.
5596         After these changes, the assembly returned by mono_assembly_open is
5597         fully initialized, i.e. all its references assemblies are loaded.
5598
5599         * assembly.c (mono_image_load_references): Renamed to 
5600         mono_assembly_load_references, and made private, since clients no
5601         longer need to call it.
5602
5603         * class.c: Removed calls to mono_assembly_load_references, since it was
5604         a source of deadlocks.
5605
5606         * loader.h loader.c class.h class.c: Protect data structures using a 
5607         new lock, the loader lock.
5608
5609         * class.c (mono_class_setup_vtable): Create temporary hash tables and
5610         GPtrArrays only when needed.
5611
5612         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
5613         into empty structures by mcs. Fixes pinvoke7.cs.
5614         
5615         * domain.c (mono_init): Call a new initialization function.
5616
5617         * appdomain.c (mono_runtime_init): Call the new initializer function
5618         of the marshal module.
5619
5620         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
5621         inserted into empty structures by mcs. Fixes pinvoke7.cs.
5622
5623         * marshal.h marshal.c: Added locks around the wrapper caches to make
5624         this module thread safe.
5625
5626         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
5627         this argument. Fixes pinvoke1.exe.
5628
5629 2003-08-25  Lluis Sanchez <lluis@ximian.com>
5630
5631         * object.h: Added call_type field to MonoMethodMessage and the corresponding
5632         enumeration of values. Removed fields to store remote call output values in
5633         MonoAsyncResult. Not needed any more.
5634         * object.c: Initialize call_type and async_result fields in mono_message_init.
5635         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
5636         dispatching the message.
5637         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
5638         async call to finish. To do it use a message with EndInvoke call type.
5639
5640 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
5641
5642         * loader.h loader.c (mono_method_hash_marhal_info): New function which
5643         determines whenever a method has marshalling info.
5644
5645 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5646
5647         * assembly.c: fix the build on windows.
5648
5649 2003-08-22 Lluis Sanchez <lluis@ximian.com>
5650
5651         * object.cs: Fixed bug #47785.
5652
5653 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
5654
5655         * string-icalls.c (StringReplace): If their are no occurances of
5656         the old string found return a reference to the supplied
5657         string. This saves some memory and matches MS behavoir.
5658         
5659 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5660
5661         * socket-io.c: fixed compilation for systems that define AF_INET6
5662         and don't define SOL_IP/SOL_IPV6.
5663
5664 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
5665
5666         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
5667         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
5668
5669         * rawbuffer.c rawbuffer.h: Make this module thread safe.
5670
5671         * domain.c: Make this module thread safe.
5672
5673         * domain.c (mono_init): Call new initialization function.
5674
5675         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
5676         reference types too. Fixes #38812.
5677
5678         * image.c (mono_image_init): Fixed warnings.
5679
5680         * class.c (mono_class_from_typeref): Handle assembly load failure
5681         correctly.
5682
5683         * appdomain.c (add_assemblies_to_domain): Handle the case when
5684         the references of an assembly are not yet loaded.
5685
5686         * metadata.c image.c assembly.c: Moved initialization of global
5687         variables to a separate function called at startup since lazy 
5688         initialization of these variables is not thread safe.
5689         
5690         * image.c assembly.c: Made this module thread safe by adding locks in 
5691         the appropriate places.
5692
5693         * domain.c (mono_init): Call the new initialization functions of the
5694         three modules.
5695
5696 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
5697
5698         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
5699           make a direct call. It is proxy's work to make the call asynchronous.
5700           mono_delegate_end_invoke(): If the targe is a proxy, just collect
5701           the return values.
5702         * object.cs: mono_method_call_message_new(): read AsyncResult and
5703           state object from parameters list, if this info is requested.
5704         * object.h: Added fields to store remote call output values in
5705           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
5706
5707 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5708
5709         * object.h: add needed fields to MonoThread.
5710         * threads.c, threads.h: allow registering a function to cleanup data
5711         allocated per thread by the JIT.
5712
5713 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5714
5715         * loader.h: portability fix by Bernie Solomon
5716         * <bernard@ugsolutions.com>.
5717
5718 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
5719
5720         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
5721         return a MonoArray. This simplifies the code and also ensures that
5722         the cache allways contains an object reference as a value.
5723
5724         * icall.c (ves_icall_get_parameter_info): Simplified using the new
5725         function.
5726
5727 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5728
5729         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
5730         fixes a problem with byte ordering when getting the address family for
5731         a socket.
5732
5733 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
5734
5735         * .cvsignore: Added monosn.
5736
5737         * reflection.h reflection.c loader.c: Added support for parameter
5738         marshalling to dynamically created types. Fixes #47295.
5739
5740 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
5741
5742         * rand.c: remove useless warnings.
5743
5744 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5745
5746         * class.c: implemented ldtoken for methods and fieldrefs.
5747
5748 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5749
5750         * threadpool.c: when mono_async_invoke was called, no one took care of
5751         monitoring the queue. So if the method invoked took some time and we
5752         got new async invoke requests after 500 ms (the thread created waited
5753         that long in WaitForSingleObject), the new async invoke was not called
5754         until the previous one finished.
5755
5756         This is fixed now. Thanks to Totte for helping with it.
5757
5758 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5759
5760         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
5761
5762 2003-08-11  Martin Baulig  <martin@ximian.com>
5763
5764         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
5765
5766 2003-08-06  Martin Baulig  <martin@ximian.com>
5767
5768         * mono-debug-debugger.c: Added support for static fields,
5769         properties and methods.
5770
5771 2003-08-06  Martin Baulig  <martin@ximian.com>
5772
5773         * mono-debug-debugger.c: Don't store the MonoString's vtable to
5774         make this work for applications with multiple application domains.
5775
5776 2003-08-04  Martin Baulig  <martin@ximian.com>
5777
5778         * mono-debug-debugger.c: Completely reworked the type support; the
5779         most important thing is that we're now just using one single
5780         `MonoType' instance per type.
5781
5782 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
5783
5784         * mono-endian.h, mono-endian.c, icall.c: Added icall
5785         ves_icall_System_Double_AssertEndianity to assert double word endianity
5786         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
5787
5788 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5789
5790         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
5791         support, icalls and fixes.
5792
5793 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
5794
5795         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
5796         classes that are a punctuation character in .NET is not the same a
5797         g_unichar_ispunct.
5798
5799 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5800
5801         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
5802
5803 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
5804
5805         * icall.c: Add new MemCopy internalcall.
5806         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
5807         Simplified code; It is not necessary to handle all the cases here,
5808         as the C# code takes care of it.  Only handle the case of the name
5809         resource embedded into the assembly.
5810
5811         Changed signature to return the data pointer and the size of the
5812         data. 
5813
5814 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
5815
5816         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
5817         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
5818
5819 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
5820
5821         * socket-io.c: ignore EINTR error in select.
5822
5823 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5824
5825         * class.h, class.c: removed unused subclasses field in MonoClass.
5826
5827 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
5828
5829         * icall.c: improve fix of get_base_definition(). If the parent class
5830           doesn't have the mehod, look at the parent of the parent.
5831         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
5832           to check if a parameter is an in or out parameter
5833           (PARAM_ATTRIBUTE_IN is not set by default).
5834           mono_method_return_message_restore(): Use mono_class_value_size to
5835           get the size of a value type. mono_type_stack_size (parameterType)
5836           does not return the correct value if parameterType is byRef.
5837           mono_load_remote_field(), mono_load_remote_field_new(),
5838           mono_store_remote_field(), mono_store_remote_field_new():
5839           raise exception if the remote call returns an exception.
5840
5841 2003-07-28  Martin Baulig  <martin@ximian.com>
5842
5843         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
5844         method.  This is a wrapper around mono_runtime_invoke() which
5845         boxes the instance object if neccessary.
5846
5847 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5848
5849         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
5850         metadata.h, row-indexes.h, verify.c: first cut of generics support.
5851
5852 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5853
5854         * icall.c: disable mcs bug workaround.
5855
5856 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
5857
5858         * object.c (mono_runtime_class_init): Take the metadata_section
5859         mutex before obtaining the domain mutex.
5860
5861         * appdomain.h: Added definition of metadata_section mutex here. 
5862
5863         * object.c: define metadata_mutex here.
5864
5865 2003-07-24  Ravi Pratap  <ravi@ximian.com>
5866
5867         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
5868         fixed.
5869
5870 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
5871
5872         * reflection.c: Fix bug #46669
5873
5874 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5875
5876         * exception.c:
5877         * exception.h:
5878         * icall.c:
5879         * object.h: fill in the type name for TypeLoadException.
5880
5881 2003-07-23  Ravi Pratap  <ravi@ximian.com>
5882
5883         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
5884         relationship between TypeBuilders while compiling corlib) and bug
5885         45993 (Array types returned from the runtime while compiling
5886         corlib were from the loaded corlib).
5887
5888 2003-07-22  Martin Baulig  <martin@ximian.com>
5889
5890         * mono-debug-debugger.c: Reworked the type support a bit more;
5891         distinguish between types and classes.
5892
5893 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
5894
5895         * icall.c: add IsArrayImpl icall.
5896
5897 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
5898
5899         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
5900         initializing real_size only once. Also fix bug #46602.
5901
5902 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
5903
5904         * object.c: Renamed mono_metadata_section to metadata_section.
5905
5906 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
5907
5908         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
5909           empty array if the type is an array. Fixed.
5910           ves_icall_MonoMethod_get_base_definition: if the base method
5911           is abstract, get the MethodInfo from the list of methods of
5912           the class.
5913         * reflection.c: ParameterInfo.PositionImpl should be zero-based
5914           and it was 1-based. Fixed in mono_param_get_objects.
5915
5916 2003-07-20  Martin Baulig  <martin@ximian.com>
5917
5918         * mono-debug.h: Set version number to 31.
5919         (mono_debug_init): Added `MonoDomain *' argument.
5920
5921         * mono-debug-debugger.c: Reworked the type support; explicitly
5922         tell the debugger about builtin types; pass the `klass' address to
5923         the debugger.
5924
5925 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
5926
5927         * image.c: Allow new metadata tables to be loaded without a
5928         warning. Also update the warning message to give the new constant value.
5929                 
5930 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5931
5932         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
5933         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
5934         array type representation changes.
5935
5936 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5937
5938         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
5939         on Environment.Exit () call.
5940
5941 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5942
5943         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
5944         requires a matching corlib.
5945
5946 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
5947
5948         * Changelog: My editor decided to add a CR to each line. Sorry about that.
5949           Committed again without the CRs.
5950         
5951 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
5952
5953         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
5954           getting it from the "this" socket instance. Did not work
5955           if the socket is a subclass of Socket.
5956           Also fixed bug #35371.
5957
5958 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5959
5960         * metadata.c: fixed size for TypedByRef.
5961         * loader.c: when searching for a method, consider the vararg amrker.
5962         * unicode.c, decimal.c: constify some arrays.
5963
5964 2003-07-15  Dick Porter  <dick@ximian.com>
5965
5966         * socket-io.c: Fixed compilation for gcc < 3.2.
5967
5968         Fixed compilation for machines that don't have AF_INET6 (thanks to
5969         Bernie Solomon <bernard@ugsolutions.com> for that part.)
5970
5971         Fixed compile warnings.
5972         
5973         Fixed formatting and line endings.
5974
5975 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
5976
5977         * socket-io.h:
5978         * socket-io.c: Added IPv6 support.
5979
5980 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
5981
5982         * class.c (mono_class_is_assignable_from): New function to implement
5983         the is_assignable_from logic. Used by mono_object_isinst, 
5984         Type::IsAssignableFrom () and the interpreter.
5985
5986         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
5987         Object, even interfaces.
5988         
5989         * object.c (mono_object_isinst): Implement in terms of 
5990         is_assignable_from.
5991
5992         * icall.c (ves_icall_type_is_assignable_from): New icall.
5993
5994 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
5995
5996         * domain.c (foreach_domain): fix compiler warning.
5997
5998 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
5999
6000         * image.c (load_metadata_ptrs): use g_strndup because strndup is
6001         not available on all plattforms
6002
6003 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
6004
6005         * image.h image.c: Store the metadata version string in MonoImage.
6006         * icall.c: New icall to retrieve the image version.
6007         * reflection.c (create_dynamic_image): Fill in the image version field
6008         * reflection.c (build_compressed_metadata): Use the image version
6009         from the image structure.
6010
6011 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6012
6013         * appdomain.c: modified comment.
6014         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
6015         That will be its last iteration when mono_gc_cleanup is called from
6016         mono_runtime_cleanup and before the domain is unloaded.
6017
6018         Fixes bug #45962.
6019
6020 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
6021
6022         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
6023         attributes.
6024
6025 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
6026
6027         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
6028         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
6029         Bernie Solomon <bernard@ugsolutions.com>.
6030
6031 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
6032
6033         * object.c, object.h: provide mono_object_new_fast() for faster
6034         allocation in some special cases.
6035
6036 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
6037
6038         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
6039         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
6040
6041 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
6042
6043         * threadpool.c: fix leaks.
6044
6045 2003-07-01  Dick Porter  <dick@ximian.com>
6046
6047         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
6048         using MonoGHashTables.  Fixes threadpool bug posted to list.
6049
6050 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
6051
6052         * image.h, image.c: added support to load an assembly from a byte array.
6053         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
6054         assembly bundle support.
6055
6056 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
6057
6058         * threadpool.c (mono_thread_pool_add): keep a reference to the
6059         AsyncResult to prevent GC
6060
6061 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6062
6063         * class.c: leak fix.
6064
6065 2003-06-25  Dick Porter  <dick@ximian.com>
6066
6067         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
6068         for the async object, the WaitHandle object will close the handle.
6069         Fixes bug 45321.
6070
6071 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
6072
6073         * class.c: in mono_array_class_get (), lookup from the hash with the
6074         same type we insert: this works around a bug in
6075         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
6076         lluis. The real fix will have to wait for after the release.
6077
6078 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6079
6080         * icall.c: fix memory leak when getting type members.
6081
6082 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
6083
6084         * reflection.c: added more pubtoken special cases.
6085
6086 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
6087
6088         * class.c: handle field offset correctly when class size
6089         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
6090
6091 2003-06-20  Martin Baulig  <martin@ximian.com>
6092
6093         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
6094         *image' field.
6095
6096 2003-06-20  Martin Baulig  <martin@ximian.com>
6097
6098         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
6099
6100 2003-06-20  Martin Baulig  <martin@ximian.com>
6101
6102         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
6103         just distinguish between variables in registers and variables at
6104         an offset relative to a register.
6105
6106 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6107
6108         * icall.c: #ifdef out latest changes until mcs is fixed.
6109
6110 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
6111
6112         * icall.c: return members in metadata order.
6113
6114 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
6115
6116         * icall.c: avoid infinite loop in GetTimeZoneData.
6117
6118 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
6119
6120         * icall.c: added Marshal.Prelink/All icalls.
6121
6122 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
6123
6124         * object.c, object.h: fix warnings and do some overflow checking
6125         when creating arrays.
6126
6127 2003-06-17  Dick Porter  <dick@ximian.com>
6128
6129         * file-io.h:
6130         * file-io.c: File attributes need to be tweaked slightly when
6131         passed from the managed to the w32 world.
6132
6133 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
6134         * profiler.h profiler-private.h profiler.c: Rework last patch
6135         based on suggestion by Paolo.
6136         
6137 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
6138
6139         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
6140         instruction level coverage data collection.
6141         * profiler.h profiler.c (: Added new callback function which can be
6142         used by the profiler to limit which functions should have coverage
6143         instrumentation.
6144         * profiler.c (mono_profiler_load): Call g_module_build_path to
6145         generate the file name of the profiler library.
6146
6147 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
6148
6149         * profiler.c, profiler.h, profiler-private.h: added basic block 
6150         coverage profiling API.
6151
6152 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
6153
6154         * reflection.c (mono_reflection_create_runtime_class): Add support
6155         for events in dynamically generated code.
6156
6157         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
6158         not allocated.
6159
6160 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
6161
6162         * icall.c: when getting timezone info, return reasonable values if we
6163         can't get the actual data.
6164
6165 2003-06-14  Dick Porter  <dick@ximian.com>
6166
6167         * threads.c (start_wrapper): Remove the reference to the thread
6168         object in the TLS data, so the thread object can be finalized.
6169         This won't be reached if the thread threw an uncaught exception,
6170         so those thread handles will stay referenced :-( (This is due to
6171         missing support for scanning thread-specific data in the Boehm GC
6172         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
6173
6174 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
6175
6176         * reflection.c: ensure streams and tables are first allocated with
6177         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
6178
6179 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
6180
6181         * icall.c: fixed GetElementType for byrefs (bug# 44792).
6182
6183 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
6184
6185         * reflection.c (mono_reflection_create_runtime_class): Add support for
6186         properties to dynamically created classes.
6187         * reflection.c: Fix a few places where non-MonoObjects were inserted
6188         into the tokens hashtable.
6189
6190 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6191
6192         * object.c: some support to handle out of memory exceptions.
6193
6194 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
6195
6196         * marshal.c (mono_marshal_get_native_wrapper): support reference
6197         return types
6198
6199 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
6200
6201         * object.h, object.c: more portability stuff from Bernie Solomon.
6202         Unexport mono_object_allocate(). Added mono_object_unbox ().
6203         Set exitcode when an unhandled exception is thrown.
6204
6205 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
6206
6207         * marshal.c (mono_marshal_get_native_wrapper): use custom
6208         marshaler for return types.
6209
6210 2003-06-10  Dick Porter  <dick@ximian.com>
6211
6212         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
6213         ip_mreq is available
6214
6215 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
6216
6217         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
6218         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
6219         by Bernie Solomon <bernard@ugsolutions.com>.
6220
6221 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
6222
6223         * gc.c (mono_gc_init): Avoid error message on shutdown when
6224         GC_DONT_GC=1 is used.
6225
6226         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
6227         New icall to return the GUID of a module.
6228
6229 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
6230
6231         * class.c: ensure instance size always includes the parent's size
6232         even whem class size is set explicitly (fixes bug#44294).
6233
6234 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6235
6236         * profiler.h, profiler.c: made the simple profiler thread-safe,
6237         get more accurate timing info. Allow the loading of an
6238         externally-developed profiler module.
6239
6240 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
6241
6242         * marshal.c (mono_marshal_get_native_wrapper): improved
6243         class/byref arguments.
6244         (mono_marshal_get_native_wrapper): better string marshaling support.
6245
6246 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
6247
6248         * class.c: ensure .pack and .size are handled correctly and
6249         simplified layout of static fields.
6250
6251 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
6252
6253         * appdomain.c
6254         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
6255
6256         * loader.c (mono_lookup_pinvoke_call): look for modules in the
6257         current directory (fix bug 44008)
6258
6259 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
6260
6261         * marshal.c (mono_marshal_get_native_wrapper): started support for
6262         custom marshalers.
6263         (mono_delegate_to_ftnptr): consider marshalling specifications
6264
6265 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
6266
6267         * reflection.c, reflection.h: emit custom marshal info.
6268
6269 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6270
6271         * object.c: free the GError.
6272         * icall.c: added CloseEvent_internal.
6273         * threads.[ch]:
6274         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
6275         call.
6276
6277 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
6278
6279         * loader.c (mono_method_get_signature): Add support for dynamic
6280         assemblies.
6281
6282 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
6283
6284         * reflection.c: fixed bug #43905.
6285
6286 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
6287
6288         * class.c, domain.c, icall.c, metadata.h, object.h: support for
6289         handling TypedReference and ArgIterator.
6290         * loader.c, loader.h: added function to get signature at call site.
6291
6292 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6293
6294         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
6295         data readonly. Buglets and warning fixes. Some MethodSpec support.
6296
6297 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
6298
6299         * class.h, class.c, object.c: remove relative numbering support.
6300
6301 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
6302
6303         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
6304         free the string, until we get a chance to fix Gtk#
6305
6306 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6307
6308         * marshal.c: revert last patch.
6309
6310 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
6311
6312         * icall.c: updates for new mono_class_vtable() not calling
6313         the type constructor anymore.
6314
6315 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6316
6317         * object.h, object.c: separate vtable creation from type
6318         initialization. Make running the .cctor thread safe.
6319
6320 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
6321
6322         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
6323
6324 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
6325
6326         * loader.c (mono_get_method): consider calling convention
6327
6328 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
6329
6330         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
6331         to return the invisible global type for a module.
6332
6333         * reflection.c (mono_image_build_metadata): Emit global fields too.
6334
6335 2003-05-20  Peter Williams  <peterw@ximian.com>
6336
6337         * loader.c (mono_lookup_internal_call): Add a few newlines.
6338
6339 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
6340
6341         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
6342         literal strings.
6343
6344         * appdomain.c (set_domain_search_path): Recalculate search path when
6345         AppDomainSetup.PrivateBinPath changes.
6346
6347         * object.c (mono_class_compute_gc_descriptor): It turns out some
6348         parts of the class libs (like System.Thread) holds pointers to
6349         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
6350         to treat native int a pointer type here.
6351         
6352 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
6353
6354         * appdomain.h, domain.c: add hashtable for jump target resolution.
6355
6356 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
6357
6358         * reflection.h reflection.c icall.c: Added new icalls 
6359         GetManifestResourceInfoInternal, GetModulesInternal and support
6360         infrastructure.
6361
6362 2003-05-16  Dick Porter  <dick@ximian.com>
6363
6364         * icall.c:
6365         * file-io.h:
6366         * file-io.c: Implement System.IO.MonoIO::GetTempPath
6367
6368 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
6369
6370         * object.c: mono_store_remote_field: little fix to previous patch.
6371
6372 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
6373
6374         * class.c: add constructors to array classes.
6375         * icall.c: special case array construction for InternalInvoke (),
6376
6377 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
6378
6379         * class.h class.c reflection.c object.c: Added support for field
6380         defaults in dynamically generated classes.
6381
6382 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
6383
6384         * reflection.c: properly encode charset for ddlimport.
6385
6386 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
6387
6388         * threads.c: allow compiling without GC.
6389
6390 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6391
6392         * appdomain.h, object.c, object.h, threads.c, threads.h: added
6393         handling of thread static data.
6394
6395 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6396
6397         * reflection.h, reflection.c: added mono_custom_attrs_free ().
6398
6399 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
6400
6401         * class.c (mono_array_class_get): always set the serializable flags
6402         (mono_array_class_get): always set the SEALED attribute for array types
6403
6404 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
6405
6406         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
6407         attributes (fix for bug 42021).
6408
6409 2003-05-12  Dick Porter  <dick@ximian.com>
6410
6411         * gc.c: Don't run finalizers when the finalizer thread is
6412         finishing up, because the default domain has already been
6413         destroyed.
6414
6415 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
6416
6417         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
6418         value is null, we should throw an exception.   This is slightly
6419         different than the other conventions used for the constructor.
6420
6421 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6422
6423         * socket-io.c: fixed windows build.
6424
6425 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6426
6427         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
6428
6429 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
6430
6431         * object.c (mono_string_new_wrapper): Compatibility fix for MS
6432         compilers.
6433
6434 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
6435
6436         * class.c (mono_class_layout_fields): Add experimental GC aware
6437         auto layout facility. Requires class library changes to work correctly.
6438
6439         (mono_class_setup_vtable): Avoid overriding explicit interface
6440         method implementations. Fixes iface3.exe test.
6441
6442         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
6443         object reference.
6444         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
6445         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
6446
6447         * metadata.h: Add new type classification macro which determines
6448         whenever the type holds an object reference.
6449
6450 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
6451
6452         * marshal.c (mono_marshal_get_native_wrapper): cleanups
6453
6454 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
6455
6456         * gc.c (finalizer_thread): Work around a GC bug.
6457
6458 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
6459
6460         * marshal.c (emit_struct_conv): allow unions
6461
6462         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
6463
6464 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
6465
6466         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
6467
6468 2003-05-06  Martin Baulig  <martin@ximian.com>
6469
6470         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
6471
6472 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6473
6474         * socket-io.c:
6475         (Select_internal): allow NULLs, don't create arrays if not needed.
6476         Coupled with Socket.cs changes.
6477
6478         * threadpool.c:
6479         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
6480         register a finalizer for it that will close the semaphore handle. This
6481         fixes the leak and make Lupus' test run with > 4080 loops.
6482
6483 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
6484
6485         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
6486         Jerome Laban (bug #42287)
6487
6488 2003-05-02  Martin Baulig  <martin@ximian.com>
6489
6490         * debug-mono-symfile.h
6491         (MonoSymbolFile): Moved declaration into mono-debug.h.
6492         (MonoDebugMethodJitInfo): Likewise.
6493         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
6494         argument.
6495         (_mono_debug_address_from_il_offset): Take a
6496         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
6497
6498         * mono-debug.h
6499         (MonoDebugDomainData): New struct.
6500         (mono_debug_get_domain_data): New function.
6501         (mono_debug_add_method): Take an additional `MonoDomain *'
6502         argument.
6503         (mono_debug_source_location_from_address): Likewise.
6504         (mono_debug_il_offset_from_address): Likewise.
6505         (mono_debug_address_from_il_offset): Likewise.
6506
6507 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
6508
6509         * reflection.c: one more check for null type in custom attrs.
6510
6511 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6512
6513         * reflection.c: avoid warning (comparison is always false due to limited
6514         range of data type).
6515
6516 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6517
6518         * icall.c: throw an exception in Type.GetField if the argument 'name'
6519         is NULL.
6520
6521 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
6522
6523         * reflection.c: fixed handling of enums in named arguments to custom
6524         attributes (bug #42123).
6525
6526 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6527
6528         * reflection.c: use the right array element type and handle
6529         a null for a Type argument, too.
6530
6531 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
6532
6533         * reflection.c: handle arrays as arguments to custom attributes.
6534
6535 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
6536
6537         * reflection.c: handle a string value in a custom attr
6538         ctor that takes an object.
6539
6540 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
6541
6542         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
6543         (fix bug #42063)
6544
6545 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
6546
6547         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
6548
6549 2003-04-27  Martin Baulig  <martin@ximian.com>
6550
6551         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
6552         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
6553         MONO_DEBUGGER_EVENT_BREAKPOINT.
6554         (mono_breakpoint_trampoline_code): Removed.
6555         (mono_debugger_event_handler): The last argument is now a
6556         `guint32'.
6557         (mono_debugger_insert_breakpoint_full): Removed the
6558         `use_trampoline' argument.
6559         (mono_debugger_method_has_breakpoint): Likewise.
6560         (mono_debugger_trampoline_breakpoint_callback): Renamed to
6561         mono_debugger_breakpoint_callback(); take the method and
6562         breakpoint number as arguments.
6563
6564 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6565
6566         * metadata.c: fix off by one when loading parameters attributes.
6567
6568 2003-04-24  Martin Baulig  <martin@ximian.com>
6569
6570         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
6571
6572 2003-04-24  Martin Baulig  <martin@ximian.com>
6573
6574         * mono-debug-debugger.c: Moved all code which interacts with the
6575         Mono Debugger here.
6576
6577         * debug-mono-symfile.c: This code now just deals with the symbol
6578         file itself, the debugger code is now in mono-debug-debugger.c.
6579
6580 2003-04-23  Martin Baulig  <martin@ximian.com>
6581
6582         * mono-debug.c (mono_debug_source_location_from_il_offset):
6583         New method; like mono_debug_source_location_from_address(), but
6584         takes an IL offset instead of a machine address.
6585
6586 2003-04-23  Martin Baulig  <martin@ximian.com>
6587
6588         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
6589         `line' field; this is now computed by the debugger.
6590
6591 2003-04-23  Martin Baulig  <martin@ximian.com>
6592
6593         * mono-debug.[ch]: New files.  This is the new debugging interface.
6594
6595         * mono-debug-debugger.[ch]: New files.  Moved all code which
6596         interacts with the Mono Debugger here.
6597
6598 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
6599
6600         * domain.c (mono_init): initialize mono_defaults.monitor_class
6601
6602 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
6603
6604         * reflection.c (method_encode_code): Add a spicy exception to help
6605         future compiler authors.
6606
6607 2003-04-21  Martin Baulig  <martin@ximian.com>
6608
6609         * icall.c
6610         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6611         Make this work with relative pathnames; g_filename_to_uri() needs
6612         an absolute filename.
6613
6614 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
6615
6616         * icall.c: Track name changes in Object and ValueType.
6617
6618 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
6619
6620         * metadata.c (mono_type_stack_size): size should be a multiple of
6621         sizeof (gpointer)
6622
6623 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6624
6625         * gc.c:
6626         (internal_domain_finalize): moved into mono_domain_finalize. No need
6627         to create another thread because the finalizers will be run in the
6628         finalizer thread.
6629         
6630         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
6631         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
6632         to be run (MS does this too).
6633
6634 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
6635
6636         * object.c (mono_class_compute_gc_descriptor): Update comment.
6637
6638         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
6639
6640         * image.h: Add synchronized wrapper cache.
6641
6642         * image.c (do_mono_image_open): Initialize cache.
6643
6644         * reflection.c (create_dynamic_mono_image): Initialize cache.
6645
6646 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6647
6648         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
6649         ves_icall_System_Buffer_ByteLengthInternal.
6650
6651 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6652
6653         * reflection.c: setup klass->nested_in earlier. Allow
6654         a dash in the assembly name.
6655
6656 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
6657
6658         * metadata.c (mono_type_to_unmanaged): dont access
6659         type->data.klass for MONO_TYPE_OBJECT
6660         (mono_type_to_unmanaged): consider System.Delegate class
6661
6662 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
6663
6664         * class.c: just setup supertypes in the proper place instead of
6665         initializing the full element class for arrays.
6666
6667 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6668
6669         * class.c: ensure the element class of arrays is initialized.
6670         Setup the supertype info for array classes, too.
6671
6672 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
6673
6674         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
6675
6676 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6677
6678         * Makefile.am: re-added -m option when running cygpath. This way,
6679         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
6680         separator.
6681         * mono-config.c: same codepath for locating mono config file for WIN32
6682         and the rest.
6683         * assembly.c: if mono_assembly_setrootdir is called, don't override
6684         the value set.
6685
6686 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6687
6688         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
6689         MONO_ASSEMBLIES variable.
6690
6691 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
6692
6693         * icall.c: added Assembly::GetNamespaces() icall.
6694
6695 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6696
6697         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
6698
6699 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
6700
6701         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
6702         * object.c: fixed bug in the construction of vtable for proxies
6703
6704 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
6705
6706         * object.c (mono_array_new): Mark mono_array_new as an icall.
6707
6708 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6709
6710         * class.c: fixed test for public method when overriding interfaces.
6711         Closes bug #40970.
6712
6713 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6714
6715         * appdomain.h, domain.c: added mono_domain_foreach() to
6716         be able to access the currently loaded appdomains.
6717         * object.c: make string interning work across sppdomains.
6718         Mark some functions for use as icalls.
6719
6720 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
6721
6722         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
6723
6724         * reflection.h reflection.c: Allocate long living data using 
6725         GC_MALLOC_ATOMIC so the collector does not need to scan it.
6726
6727         * reflection.c: Double the allocation size in streams instead of
6728         increasing it, to prevent unneccesary copying on large assemblies.
6729         
6730         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
6731         creation if the assembly does not have the Run flag set.
6732
6733 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6734
6735         * class.h: avoid the C++ keywords in header files (Jerome Laban
6736         spotted and fixed this).
6737
6738 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6739
6740         * object.c:
6741         (mono_unhandled_exception): fill in the arguments for the
6742         UnhandledException event. Only trigger that event for the default
6743         domain (as MS does).
6744
6745 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
6746
6747         * object.c: Improve typed allocation stuff based on suggestions from
6748         Paolo. Also turn it on if the GC library supports it.
6749
6750 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
6751
6752         * object.c object.h class.h: Added experimental typed allocation
6753         facility using the interfaces in gc_gcj.h.
6754
6755         * os/gc_wrapper.h: Added new include files.
6756         
6757 2003-04-03  Martin Baulig  <martin@ximian.com>
6758
6759         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
6760         which is not yet enabled by default.
6761
6762         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
6763         functions.
6764         (mono_gc_lock, mono_gc_unlock): New static functions.
6765
6766         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
6767         functions; stop/start the world for the garbage collector.  This
6768         is using the windows API; we need to complete the SuspendThread()/
6769         ResumeThread() implementation in the io-layer to make this work on Unix.
6770         (mono_gc_push_all_stacks): New public function; tells the garbage
6771         collector about the stack pointers from all managed threads.
6772
6773 2003-04-03  Martin Baulig  <martin@ximian.com>
6774
6775         * object.h (MonoThread): Added `gpointer stack_ptr'.
6776
6777         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
6778
6779 2003-04-03  Martin Baulig  <martin@ximian.com>
6780
6781         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
6782
6783 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
6784
6785         * reflection.c (typebuilder_setup_fields): Initialize field.first and
6786         field.last.
6787
6788 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
6789
6790         * loader.c (mono_lookup_internal_call): Report the corlib that is
6791         out of sync.
6792
6793 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
6794
6795         * icall.c (ves_icall_type_GetTypeCode): fixed check for
6796         System.DBNull (it's class not valuetype).
6797
6798 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6799
6800         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
6801         if the array method was already assigned a token (fixes bug#40646).
6802
6803 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
6804
6805         * reflection.c (mono_reflection_get_type): Attempt type resolve even
6806         if no assembly is given.
6807
6808 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
6809
6810         * metadata.h: Added the new tables.
6811
6812         * row-indexes.h: Added definitions for new tables.
6813
6814         * metadata.c: Add schemas for new tables, and add support for
6815         computing the sizes of them.
6816
6817         * class.c: Update for handling the new type cases.
6818
6819 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
6820
6821         * metadata.h (MONO_TYPE_IS_VOID): new macro
6822
6823 2003-03-31  Martin Baulig  <martin@ximian.com>
6824
6825         * threads.h (MonoThreadCallbacks): Added `thread_created'.
6826
6827         * threads.c (mono_thread_new_init): Call `thread_created' in the
6828         mono_thread_callbacks.
6829
6830 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
6831
6832         * loader.h: added marshalbyrefobject_class to mono_defaults
6833         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
6834         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
6835           generation of output parameters.
6836           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
6837         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
6838           contextbound and the target object belongs to the context of the caller.
6839         * object.h: added context and unwrapped_server variables in MonoRealProxy.
6840         * object.c: Implemented support for interfaces and abstract classes
6841           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
6842           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
6843
6844 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
6845
6846         * class.h class.c (mono_class_is_subclass_of): New function.
6847         
6848         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
6849         routines for most common case (calls from ArrayList::ToArray).
6850
6851         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
6852         routine so programs which call Environment::Exit() can be profiled.
6853
6854         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
6855         Added MONO_ARCH_SAVE_REGS.
6856
6857         * icall.c (ves_icall_type_is_subtype_of): Use new function.
6858
6859 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
6860
6861         * blob.h: Add a couple of new MonoType types definitions.
6862
6863         * tabledefs.h: Add a couple of new call convs.
6864
6865 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
6866
6867         * reflection.h (MonoReflectionDynamicAssembly): track changes in
6868         the layout of the class.
6869
6870         * reflection.c (alloc_table): double the size on overflow to avoid
6871         unnecessary copying.
6872
6873         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
6874         avoid filling out metadata tables and blobs. Also set mb->ilgen to
6875         null so it can be garbage collected.
6876         
6877 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
6878
6879         * reflection.c (mono_reflection_get_type): Return the resolved type
6880         only if it is in the assembly we searched.
6881
6882         * reflection.c (ensure_runtime_vtable): Initialize method slots.
6883
6884         * class.c (mono_class_setup_vtable): Set the slot of the overriding
6885         method.
6886
6887 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6888
6889         * appdomain.c:
6890         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
6891         the right one is 'file:///blah', but MS allows it.
6892         * assembly.c:
6893         (mono_assembly_open): allow 'file://blah'
6894
6895         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
6896
6897 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
6898
6899         * socket-io.c: fixes bug #40310.
6900
6901 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
6902
6903         * reflection.c (mono_reflection_parse_type): handle deeply nested
6904         types correctly.
6905
6906         * reflection.c (mono_image_create_token): Use unique token values
6907         since they will be put into a hash table.
6908
6909         * class.c (mono_class_setup_vtable): If a method occurs in more than
6910         one place in the vtable, and it gets overriden, then change the
6911         other occurances too.
6912
6913         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
6914         object as return type.
6915
6916 2003-03-22  Pedro Martínez Juliá  <yoros@wanadoo.es>
6917
6918         * icall.c: Deleted "ToString" implementation for double and float
6919         because they are full implemented in managed code.
6920
6921 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6922
6923         * reflection.c, reflection.h: implemented and exported functions
6924         to retrieve info about custom attributes.
6925
6926 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6927
6928         * appdomain.c: moved Uri handling to assembly.c
6929         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
6930         work when using a file Uri in *nix and windows.
6931
6932         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
6933         GetReferencedAssemblies.
6934
6935 2003-03-18  Dick Porter  <dick@ximian.com>
6936
6937         * icall.c: Rename a couple of internal calls
6938
6939         * threads.c: Set the thread state to Stopped when a thread exits.
6940         Fixes bug 39377.
6941
6942 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
6943
6944         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6945         New icall.
6946
6947         * object.c (mono_class_vtable): fix warning.
6948
6949 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
6950
6951         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
6952
6953         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
6954         memory.
6955         (method_encode_clauses): Create exception info structures in the right
6956         order.
6957         (mono_reflection_setup_internal_class): Initialize supertypes field.
6958
6959         * class.c object.c: Handle interfaces which implement other interfaces 
6960         correctly.
6961
6962         * class.h class.c: Move the supertypes array initialization code into 
6963         a separate function so it can be used for dynamic types too. Also call
6964         it earlier, in mono_class_init(), since it can be used before the
6965         type is initialized.
6966
6967 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6968
6969         * Makefile.am:
6970         * assembly.c:
6971         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
6972
6973         * appdomain.c:
6974         * appdomain.h:
6975         * marshal.c:
6976         * object.c: remove warnings.
6977
6978 2003-03-13  Martin Baulig  <martin@ximian.com>
6979
6980         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
6981         (MonoDebugLexicalBlockEntry): New types.
6982
6983         * debug-mono-symfile.c
6984         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
6985
6986 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6987
6988         * process.c: ret can be any non-zero value accroding to MS doc.
6989
6990 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
6991
6992         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
6993         fixing a warning for a miss-used prototype, would have cause
6994         random memory corruption.
6995
6996 2003-03-07  Martin Baulig  <martin@ximian.com>
6997
6998         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
6999         getting really annoying ....
7000
7001 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
7002
7003         * reflection.c (fixup_method): added support for array methods.
7004
7005 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
7006
7007         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
7008         (pointed out by Michael Adams).
7009
7010 2003-03-04  Dick Porter  <dick@ximian.com>
7011
7012         * icall.c: Temporarily reverted the Double and Single ToString()
7013         change, because it broke nunit.
7014
7015 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
7016
7017         * object.h, threads.h: make include files compatible with C++
7018         (patch by Jerome Laban <jlaban@wanadoo.fr>).
7019
7020 2003-03-04  Pedro Martínez Juliá  <yoros@wanadoo.es>
7021
7022         * icall.c: Erased ToString helper functions for Double and Single.
7023         Now, that implementations ar all in managed code (Double and Single
7024         Formatters).
7025
7026 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
7027
7028         * appdomain.c: Added method for initializing the default context of
7029         a domain. Added internal call for getting the default context.
7030         * appdomain.h: Added context variable in MonoDomain struct.
7031         * domain.c: mono_domain_set also sets the default context of the domain
7032         * icall.c: Mapped internal method InternalGetDefaultContext.
7033         * object.c: mono_object_get_virtual_method returns always a remoting
7034         wrapper if the object is a transparent proxy.
7035         mono_runtime_invoke_array: when creating an object by calling the
7036         constructor, if the created object is a proxy, then the constructor should
7037         be called using the a remoting wrapper.
7038
7039 2003-03-03  Dick Porter  <dick@ximian.com>
7040
7041         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
7042         variable so it compiles on solaris.  Problem spotted by
7043         Christopher Taylor <ct@cs.clemson.edu>
7044
7045 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7046
7047         * appdomain.c:
7048         (get_info_from_assembly_name): don't leak value.
7049
7050         * icall.c:
7051         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
7052         result.
7053
7054 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
7055
7056         * assembly.c: export mono_image_load_references ().
7057         * class.c: handle function pointers. mono_class_from_name() now
7058         supports nested type names directly.
7059
7060 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
7061
7062         * reflection.h reflection.c: Encode already created dynamic methods 
7063         and fields correctly as a DEF instead of a REF.
7064
7065         * reflection.c: Get rid of the force_ref argument to 
7066         mono_image_typedef_or_ref since it was wrong in the first place.
7067
7068         * string-icalls.c: add error checking to string constructors according
7069         to the MSDN docs.
7070
7071         * reflection.c: Emit types in the order their TypeBuilders were 
7072         created. Previously, a new table index was assigned to each type before
7073         the tables were emitted. This was wrong because the signature blob
7074         might already refer to a type by its original table index.
7075
7076 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
7077
7078         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
7079         change.
7080         
7081 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7082
7083         * Makefile.am: make assemblies dir have \ instead of / on windows.
7084
7085 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
7086
7087         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
7088         iterate over the NESTEDCLASS table using a linear search since the
7089         table is not guaranteed to be sorted by the secondary key.
7090
7091         * class.c (mono_class_create_from_typedef): fixed up call to
7092         mono_metadata_nesting_typedef.
7093         
7094 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
7095
7096         * marshal.c (mono_string_to_byvalstr): clear the memory as
7097         suggested by Jerome Laban <jlaban@wanadoo.fr>
7098
7099 2003-02-26  Dick Porter  <dick@ximian.com>
7100
7101         * process.c: Cope with padding in .rsrc blocks
7102
7103 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
7104
7105         * metadata.h: reverted the filter_len change, it breaks reflection
7106         
7107 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
7108
7109         * metadata.h: added a new field to store the filter_len
7110         
7111
7112 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
7113
7114         * reflection.c: handle custom attributes for types and members
7115         created with Reflection.Emit (bug#38422).
7116
7117 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
7118
7119         * reflection.c: define RTSpecialName automatically for constructors for
7120         compatibility with MS.NET.
7121
7122         * reflection.c (mono_reflection_create_runtime_class): initialize
7123         nested_in field of dynamically created classes.
7124
7125 2003-02-22  Martin Baulig  <martin@ximian.com>
7126
7127         * debug-mono-symfile.h: Incremented version number.
7128
7129 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
7130
7131         * object.h icall.c process.c: fix warnings.
7132
7133 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
7134
7135         * appdomain.h appdomain.c:
7136         (mono_domain_try_type_resolve): split the 
7137         name_or_tb argument into a name and a tb argument.
7138         (mono_domain_has_type_resolve): new function to check whenever the
7139         application has registered a TypeResolve event handler.
7140         
7141         * icall.c reflection.h reflection.c: move the type resolve logic into
7142         mono_reflection_get_type () so it will be invoked when 
7143         Assembly::GetType () is called.
7144
7145         * reflection.c:
7146         (mono_reflection_get_type): renamed to get_type_internal.
7147         (mono_reflection_get_type): fixed type name generation so it works 
7148         for nested types too.
7149         (mono_reflection_get_type): call has_type_resolve () to avoid the 
7150         costly type name generation if there is no resolve event handler.
7151
7152 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7153
7154         * class.c, image.c: load exported types from file references.
7155
7156 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
7157
7158         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
7159           used to cache the managed methods used to create proxies and make 
7160           remote invocation of methods.
7161         * class.h: Added in MonoVTable a flag to indicate that a class needs 
7162           to be remotely created.
7163         * object.c: Modified the method mono_class_vtable(). It now initializes 
7164           the remote flag of the vtable. Modified mono_object_new_specific(), 
7165           so now it checks the remote flag.
7166         * icall.c: Added a couple of internal methods, one for enabling instance 
7167           creation interception for a type, and one for creating objects bypassing
7168           the remote check.
7169
7170 2003-02-18  Martin Baulig  <martin@ximian.com>
7171
7172         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
7173         New interncall to get a method's metadata token.
7174
7175         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
7176         New interncall for the debugger.
7177
7178 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
7179
7180         * class.c (mono_class_setup_vtable): allocate supertype array
7181
7182 2003-02-18  Martin Baulig  <martin@ximian.com>
7183
7184         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
7185
7186 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7187
7188         * reflection.c:
7189         (assembly_name_to_aname): jump over unknown properties (i've found
7190         something like: 'type, assembly, version=xxx, custom=null, public...',
7191         so now will ignore custom=null and still get the rest of the values).
7192
7193 2003-02-17  Dick Porter  <dick@ximian.com>
7194
7195         * threads.c: Have Thread.Start() wait for a semaphore to signal
7196         that the thread has set up all its local data.  This fixes bug
7197         34323, where Abort() raced the new thread's TLS data.
7198
7199         Also removes the handle_store() call from start_wrapper, because
7200         threads are now always created suspended and there is no longer a
7201         race between the parent and child threads to store the info.
7202
7203 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
7204
7205         * image.c: explain the #- heap issue in a message, hopefully
7206         avoiding FAQs on mono-list.
7207
7208 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7209
7210         * icall.c:
7211         (GetEntryAssembly): if the domain has not invoked
7212         AppDomain.ExecuteAssembly yet, return the assembly of the default
7213         AppDomain.
7214
7215 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
7216
7217         * class.c (mono_ldtoken): make it work in dynamic assemblies.
7218
7219 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
7220
7221         * metadata.c, reflection.c: simple speedup to type hash
7222         and equals code.
7223
7224 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
7225
7226         * image.c, image.h, class.c, assembly.c: move module loading
7227         to MonoImage. When loading metadata, consider alignemnet from
7228         the start of metadata, not from the metadata address in memory.
7229
7230 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
7231
7232         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
7233         AssemblyBuilder objects. Factored out custom attribute creation into
7234         a separate function.
7235         (create_custom_attr): new function to create custom attributes.
7236
7237 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
7238
7239         * Makefile.am: Got tired of typing the full pathname to pedump.
7240         Until there is another option, am installing this.
7241
7242 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
7243
7244         * class.c (class_compute_field_layout): always set field->parent 
7245         (mono_ldtoken): use mono_defaults.fieldhandle_class;
7246
7247 2003-02-11  Dick Porter  <dick@ximian.com>
7248
7249         * threads-types.h:
7250         * monitor.c: Rewrote Monitor, making lock much faster and
7251         Pulse/Wait work as specified.  Also uses much fewer handles, and only
7252         creates them as needed.
7253
7254         * exception.c: Added SynchronizationLockException
7255
7256         * threads.c: Deleted old Monitor implementation.  The new one is
7257         in a new file.
7258
7259 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
7260
7261         * class.c: handled TypedReference type code. Set the correct size for
7262         class data. Setup interface_offsets for interface classes, too.
7263
7264 2003-02-09  Martin Baulig  <martin@ximian.com>
7265
7266         * debug-mono-symfile.h: Reflect latest symbol writer changes.
7267
7268 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
7269
7270         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
7271         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
7272         * object.c: fixed mono_object_get_virtual_method () for interfaces.
7273         * verify.c: check for code that runs after the end of the method.
7274
7275 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
7276
7277         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
7278         "System.Math::Round2".
7279         * sysmath.h: Added Floor, Round and Round2 definitions.
7280         * sysmath.c: Modified certain functions that were not 100% compliant
7281         with MS.NET (math precision) and added the implementation of Floor,
7282         Round and Round2.
7283
7284 2003-02-07  Martin Baulig  <martin@ximian.com>
7285
7286         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
7287
7288 2003-02-07  Martin Baulig  <martin@ximian.com>
7289
7290         * debug-mono-symfile.c: Reflected latest symwriter changes.
7291         (mono_debug_create_mono_symbol_file): Removed.
7292         (mono_debug_open_mono_symbol_file): Take an argument which
7293         specifies whether to create a dynamic symbol file.
7294
7295 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
7296
7297         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
7298
7299 2003-02-05  Martin Baulig  <martin@ximian.com>
7300
7301         * reflection.c (mono_image_build_metadata): Make this public,
7302         protect it against being called multiple times, don't create
7303         resources and don't build the compressed metadata here.
7304         (mono_image_create_pefile): Do this here.
7305
7306         * icall.c
7307         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
7308
7309 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7310
7311         * socket-io.c: fixed bug #36322.
7312
7313 2003-02-06  Piers Haken <piersh@friskit.com>
7314
7315         * appdomain.[ch]:
7316         * class.h:
7317         * debug-mono-symfile.c:
7318         * icall.c:
7319         * loader.c:
7320         * mono-config.c:
7321         * monosn.c:
7322         * reflection.c:
7323         * socket-io.c: warning cleanups
7324
7325 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
7326
7327         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
7328         function. works like remoting invoke, but does a check for the Proxy first.
7329
7330 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
7331
7332         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
7333
7334 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
7335
7336         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
7337         array of pointers.
7338         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
7339         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
7340
7341         * object.c (mono_store_remote_field_new): used by the new jit
7342         instead of mono_store_remote_field
7343         (mono_load_remote_field_new): used by the new jit
7344         instead of mono_load_remote_field
7345
7346 2003-02-05  Patrik Torstensson
7347
7348         * appdomain.c: changed unload to take the domain id instead
7349         of domain
7350         
7351         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
7352
7353
7354 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7355
7356         * appdomain.c: don't look for assemblies in ApplicationBase if
7357         PrivateBinPathProbe is set.
7358
7359 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7360
7361         * object.c: make the first argument in main_args contain the absolute
7362         path to the assembly. Fixes bug #37511.
7363
7364 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7365
7366         * icall.c: get correct UTC offset for countries not using daylight
7367         time saving. Fixes bug #30030.
7368
7369 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7370
7371         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
7372         and 1 are the family).
7373
7374 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
7375
7376         * icall.c (ves_icall_InternalExecute): removed wrong assertion
7377
7378         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
7379
7380 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
7381
7382         * reflection.c: added support for SignatureHelper tokens, which is
7383         needed by the Calli opcode.
7384
7385         * reflection.h: track changes to SignatureHelper class.
7386
7387         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
7388
7389 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7390
7391         * appdomain.c: fixed loading assemblies from PrivateBinPath.
7392
7393 2003-02-03  Patrik Torstensson
7394         * appdomain.[c|h], domain.c : 
7395          - Added support for getting a domain via domain id
7396          - Support for setting and getting domain from System.AppDomain 
7397            (used in cross appdomain channel)
7398          - Added support for get/set for a MonoAppContext on a thread 
7399            (Context class in System.Runtime.Remoting.Contexts),
7400          - Removed hack in Get/SetData and ExecuteAssembly.
7401         
7402         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
7403         the managed world to get control when a proxy is created.
7404
7405         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
7406         
7407 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
7408
7409         * icall.c
7410         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
7411         Populate the codebase field as well.
7412
7413 2003-02-02  Martin Baulig  <martin@ximian.com>
7414
7415         * debug-mono-symfile.c
7416         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
7417         (mono_debug_symfile_add_method): Allow interncalls.
7418
7419 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7420
7421         * icall.c: throw parse exception if strtod fails or the string is empty.
7422
7423 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
7424
7425         * marshal.c: handle object type separately from defined
7426         class types.
7427
7428 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
7429
7430         * marshal.c: handle NATIVE_LPSTR for strings when it's
7431         explicitly specified.
7432
7433 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
7434
7435         * reflection.c, reflection.h, icall.c: setup the reflection
7436         handle cache for ModuleBuilders and AssemblyBuilders.
7437
7438 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
7439
7440         * reflection.c (reflection_methodbuilder_to_mono_method): set
7441         pinvoke flag
7442
7443 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7444
7445         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
7446
7447 2003-01-29  Dick Porter  <dick@ximian.com>
7448
7449         * threads.c: No need for the fake_thread kludge now that Thread
7450         doesn't run a class constructor
7451         
7452 2003-01-29  Dick Porter  <dick@ximian.com>
7453
7454         * threads.c: Use g_direct_hash instead of the rather bogus
7455         g_int_hash
7456
7457 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
7458
7459         * marshal.c (mono_marshal_get_native_wrapper): add check for null
7460         (fix pinvoke12.exe)
7461         (mono_marshal_get_struct_to_ptr): generate valid IL code
7462         (mono_marshal_get_ptr_to_struct): generate valid IL code
7463         (*): correctly set sig->pinvoke, we need to memdup the signature
7464         to do that
7465
7466 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7467
7468         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
7469         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
7470
7471 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7472
7473         * profiler.c: provide more callers information.
7474
7475 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
7476
7477         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
7478
7479         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
7480
7481         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
7482
7483 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7484
7485         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
7486         exception instead of going into an infinite loop on dates which it 
7487         can't yet handle.
7488
7489         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
7490         out-of-range exception if needed.
7491
7492         * class.c (mono_class_setup_vtable): allow a virtual method to provide
7493         an implementation for an interface method and to override an inherited
7494         method at the same time. 
7495         Imagine a scenario when a virtual method is used to override a
7496         virtual abstract method in a parent class, and this same method 
7497         provides an implementation for an method inherited from an interface. 
7498         In this case, the interface resolution code will set im->slot, which 
7499         means that the virtual method override pass will skip this method 
7500         which means a pointer to the abstract method inherited from the parent
7501         will remain in the vtable of this non-abstract class.
7502
7503         * class.c: (mono_class_setup_vtable): continue search for a real 
7504         method if only an abstract method is found.     
7505
7506 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7507
7508         * reflection.c: add size to encoding for ByValStr and ByValArray
7509         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
7510
7511 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7512
7513         * class.c (mono_class_setup_vtable): pass the override info as an
7514         argument.
7515
7516         * class.c (mono_class_setup_vtable): set the slot of overriding methods
7517         correctly.
7518         
7519         * reflection.c (ensure_runtime_vtable); add support for method 
7520         overrides.
7521         
7522 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7523
7524         * reflection.c (resolution_scope_from_image): Hack to work to work with
7525         dynamic assemblies.
7526
7527         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
7528         added a 'force_ref' argument to force this function to allways return 
7529         a TypeRef. This is needed by mono_image_get_memberref_token ().
7530         
7531 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7532
7533         * reflection.c (mono_image_get_type_info): interfaces really don't have
7534         a parent.
7535
7536         * reflection.c (mono_image_basic_init): fill out missing fields of
7537         image structure.
7538
7539         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
7540         dynamic assemblies. This is required so dynamic assemblies show up in
7541         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
7542         Type::GetType() etc. This is consistent with MS behaviour.
7543
7544         * image.c image.h reflection.c: add newly created classes to the name 
7545         cache so mono_class_get () will find them.      
7546
7547 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
7548
7549         First part of changes to get IKVM.NET running under mono.
7550         
7551         * appdomain.h, appdomain.c: added new function 
7552         mono_domain_try_type_resolve() which will emit TypeResolve events. 
7553         This function will call AppDomain::DoTypeResolve to do the actual work.
7554
7555         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
7556         moved existing code dealing with dynamic tokens to a new function 
7557         called mono_reflection_lookup_dynamic_token (). This function will 
7558         raise TypeResolve events when appropriate. Since reflection.c is not 
7559         part of libmetadata, a new hook function called 
7560         mono_lookup_dynamic_token() is added to class.c which will call this.
7561
7562         * assembly.h assembly.c: make the invoke_load_hook function public,
7563         so it can be called for dynamic assemblies.
7564
7565         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
7566
7567         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
7568         type isn't found.
7569
7570         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
7571         MonoGHashTable, since it contains pointers to objects which the GC 
7572         needs to track.
7573
7574         * assembly.c (search_loaded): remove unused variable.
7575         
7576 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
7577
7578         * object.c: fixed issue exposed by gcc-generated IL programs
7579         that use RVA data for pointers.
7580
7581 2003-01-25  Martin Baulig  <martin@ximian.com>
7582
7583         * threads.c (start_wrapper): Moved the initialization of
7584         `start_func' above the mono_new_thread_init() call to which we
7585         pass it as argument.
7586
7587 2003-01-24  Martin Baulig  <martin@ximian.com>
7588
7589         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
7590         the MonoThread pointer.
7591
7592 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
7593
7594         * icall.c: Rename `PowImpl' to Pow.
7595
7596 2003-01-23  Dick Porter  <dick@ximian.com>
7597
7598         * threads.c (start_wrapper): Create a Thread object if needed, so
7599         the Main() thread can do the class initialisation in a subthread
7600         that has been set up to allow managed code execution.
7601
7602         Pass the thread ID instead of the MonoThread pointer to the thread
7603         start and attach callbacks.  This change is required, because the
7604         jit thread start callback must be called _before_ the Thread
7605         object can be created.
7606         
7607         (mono_thread_init): Removed much object creation code that is no
7608         longer needed.  No managed code is called from here now.
7609
7610         * object.c (mono_runtime_exec_managed_code): Create a subthread
7611         for Main, and call back to the runtime to use it.
7612         Set the exit code when Main exits.
7613
7614         * gc.c: Make sure domain finalisation happens in a subthread.
7615         Re-enable threaded GC, fixing bug 31333 (again).
7616
7617         * environment.c: System.Environment internall calls (so far just
7618         ExitCode is here, the others are still in icall.c)
7619
7620         * appdomain.c (mono_runtime_cleanup): All threads running managed
7621         code should have finished before mono_runtime_cleanup() is
7622         reached, so no need to clean up threads.
7623
7624 2003-01-22  Martin Baulig  <martin@ximian.com>
7625
7626         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
7627         `gpointer func' arguments.      
7628         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
7629         but added `MonoThread *thread' argument.
7630         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
7631
7632         * threads.c (mono_new_thread_init): Added `gpointer func' argument
7633         and pass it to the mono_thread_start_cb callback.
7634         (mono_install_thread_callbacks): New public function to install a
7635         set of callbacks which are set by the debugger.
7636         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
7637
7638 2003-01-22  Martin Baulig  <martin@ximian.com>
7639
7640         * Makefile.am: Install debug-mono-symfile.h.
7641
7642 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
7643
7644         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
7645
7646 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
7647
7648         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
7649         * class.c (mono_ptr_class_get): correctly set access levels of pointers
7650         (mono_array_class_get): correctly set access levels of arrays
7651
7652 2003-01-20      Patrik Torstensson
7653         * image.h (MonoAssemblyName): changed major, minor, build, revision
7654         from signed to unsigned.
7655
7656 2003-01-20  sean kasun <skasun@azstarnet.com>
7657
7658         * reflection.c (load_cattr_value): Now this handles
7659         MONO_TYPE_SZARRAY.  Fixes bug #35629
7660
7661 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
7662
7663         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
7664         integer value
7665
7666 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7667
7668         * decimal.c: fixed bug #26056.
7669
7670 2003-01-17  Martin Baulig  <martin@ximian.com>
7671
7672         * gc.c: Raise an ExecutionEngineException instead of using g_error().
7673
7674 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7675
7676         * exception.[ch]:
7677         (mono_get_exception_type_initialization): new function.
7678
7679         * object.c: throw a TypeInitializationException when an exception is
7680         thrown invoking the class constructor.
7681
7682 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7683
7684         * reflection.c: fixed attribute reading.
7685
7686 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7687
7688         * icall.c:
7689         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
7690         provided, look for the type in the calling assembly and then in
7691         mscorlib; if the assembly name is provided, only try that one.
7692
7693 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
7694
7695         * object.c: register the vtable before there is a chance it's
7696         queried again recursively.
7697
7698 2003-01-13  Duncan Mak  <duncan@ximian.com>
7699
7700         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
7701         gc-internal.h. 
7702         
7703 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
7704
7705         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
7706
7707 2003-01-11  Martin Baulig  <martin@ximian.com>
7708
7709         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
7710         this to 20 for the release.
7711
7712 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
7713
7714         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
7715
7716         * loader.c (mono_method_get_marshal_info): bug fix
7717
7718         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
7719         structures with explicit layout
7720
7721 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7722
7723         * profiler.c: made the output more readable (and sorted). 
7724         Added caller information for the allocation profiler.
7725
7726 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
7727
7728         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
7729
7730 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7731
7732         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
7733         to get value types.
7734         
7735 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
7736
7737         * object.c, profiler.h, profiler.c, profiler-private.h:
7738         Added object allocation profiler.
7739
7740 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
7741
7742         * reflection.h, reflection.c: handle global methods.
7743         Compress blob entries.
7744
7745 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
7746
7747         * marshal.c: fix compilation.
7748
7749 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
7750
7751         * loader.c (mono_method_get_marshal_info): impl.
7752
7753         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
7754
7755 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7756
7757         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
7758         for reference types.
7759
7760 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
7761
7762         * loader.c: fixed off by one error in loaded parameter names.
7763
7764 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
7765
7766         * marshal.c (mono_marshal_get_icall_wrapper): like
7767         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
7768         instead of a MonoMethod.
7769
7770 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7771
7772         * decimal.c: fixed bug #36537.
7773
7774 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
7775
7776         * marshal.c: throw a missing method exception if a
7777         P/Invoke method is not found.
7778
7779 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7780
7781         * icall.c: allow a null this for constructors.
7782
7783 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
7784
7785         * icall.c: raise the proper exceptions if the arguments to the
7786         internal Invoke are incorrect.
7787
7788 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
7789
7790         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
7791
7792 2003-01-03  Martin Baulig  <martin@ximian.com>
7793
7794         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7795
7796 2002-12-31  Martin Baulig  <martin@ximian.com>
7797
7798         * debug-mono-symfile.c: Completely rewrote the type section.
7799         Instead of using individual malloc()ed fields, we use one big
7800         continuous memory area and offsets into this area.
7801         See the comments in the source code for details.
7802
7803 2002-12-30  Martin Baulig  <martin@ximian.com>
7804
7805         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
7806
7807 2002-12-30  Martin Baulig  <martin@ximian.com>
7808
7809         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
7810         line number table in this data blob instead of using an external
7811         pointer.
7812
7813 2002-12-28  Martin Baulig  <martin@ximian.com>
7814
7815         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7816
7817 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
7818
7819         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
7820         as a boxed return type.
7821
7822 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
7823
7824         * appdomain.c
7825         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
7826         g_build_filename to properly get separators on the filename created.
7827
7828         * object.h: Small change, introduce MonoMarshalByRefObject to
7829         track the layout of that structure in the C# universe as we make
7830         changes there.
7831
7832 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
7833
7834         * object.c: removed assert to allow static fields on interfaces.
7835         * loader.c: a TypeSpec may be used for any type, not just arrays.
7836
7837 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7838
7839         * class.c, class.h: added mono_class_array_element_size ().
7840         Ignore static methods in interfaces.
7841
7842 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7843
7844         * threads.c: fixed the build under cygwin.
7845
7846 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
7847
7848         * reflection.c: handle nullref constants. Allocate keys for
7849         reflection handles with the GC.
7850
7851 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7852
7853         * threads.c, threads.h: added mono_thread_get_abort_signal()
7854         to get a suitable signal for thread abort.
7855
7856 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7857
7858         * metadata.c: fix handling of ExportedType table.
7859
7860 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7861
7862         * icall.c: added WriteWindowsDebugString internal call.
7863
7864 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7865
7866         * reflection.h: added fields to match C# implementation.
7867
7868 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7869
7870         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
7871
7872 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
7873
7874         * gc.h, gc-internal.h: Rename header for GC internal calls to
7875         gc-internal.h from gc.h as to not clash with Boehm GC having its
7876         header installed as <gc.h> in outside include paths.
7877         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
7878         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
7879
7880 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7881
7882         * icall.c: assign minor, build and revision in FillName.
7883
7884 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
7885
7886         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
7887         Added support for running code generated by Reflection.Emit.
7888
7889 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7890
7891         * appdomain.c: check for NULL argument in LoadFrom.
7892
7893 2002-12-10  Dick Porter  <dick@ximian.com>
7894
7895         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
7896
7897 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7898
7899         * appdomain.c: fix buglet when building exe file name.  Handle full
7900         assembly name (needed after latest changes to AssemblyName).
7901         * image.c:
7902         (mono_image_close): free some hashtables.
7903
7904 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
7905
7906         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
7907         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
7908         on some systems (redhat 7.3) 
7909
7910 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
7911
7912         * threads.c: delete the critical section of a sync block,
7913         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
7914
7915 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
7916
7917         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
7918
7919 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7920
7921         * appdomain.[ch]: handle the assembly preload event to try loading the
7922         assemblies using the paths we have in the current domain.
7923
7924         * assembly.[ch]: created an assembly preload hook that is called to try
7925         loading the assembly by other means that the ones provided here.
7926
7927         * domain.c: initialize the domain search path.
7928
7929         From now on, assemblies (TODO: except corlib and System) are loaded
7930         according to these rules when using mono_assembly_load ():
7931
7932                 1. It tries to load the assembly from the ApplicationBase
7933                 of the current domain appending .dll and .exe (TODO: have to
7934                 try loading from name/name.dll and name/name.exe).
7935
7936                 2. It tries the search path specified in PrivateBinPath for the
7937                 current domain (if any).
7938
7939                 3. Previous behavior.
7940
7941 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
7942
7943         * icall.c: implemented GetInterfaceMap() related icall.
7944         * domain.c, loader.h: load MethodInfo in mono_defaults.
7945
7946 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7947
7948         * gc.c: disable the finalizer thread for now, untill all the issues
7949         with it are resolved.
7950
7951 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7952
7953         * string-icalls.c: handle embedded nulls in string ctor when the
7954         length is specified.
7955
7956 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7957
7958         * class.c: look for explicit interface implementation in parent
7959         classes, too.
7960
7961 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
7962
7963         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
7964
7965 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7966
7967         * gc.c: protect handles with a critical section.
7968
7969 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7970
7971         * icall.c:
7972         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
7973         parameters. If no assembly specified, try getting the type from all
7974         the assemblies in the current domain, else, load the assembly and get
7975         the type from it.
7976
7977 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7978
7979         * marshal.c: applied patch from Aleksey Demakov that fixes
7980         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
7981
7982 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7983
7984         * icall.c: fixed get_location.
7985
7986 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
7987
7988         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
7989         declarations to make it work with older gcc. 
7990
7991         * loader.c (mono_get_method): set signature->pinvoke for native calls
7992
7993 2002-11-20  Dick Porter  <dick@ximian.com>
7994
7995         * threads.c (mono_thread_init): Set the main thread's handle
7996
7997 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7998
7999         * gc.c: allow compilation without GC support. Changed to match the
8000         mono coding style.
8001
8002 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8003
8004         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
8005
8006 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
8007
8008         * reflection.c: set a public key token on the core assemblies.
8009
8010 2002-11-18  Dick Porter  <dick@ximian.com>
8011
8012         * threads.c: Split out some thread initialisation so that other
8013         files can set the start callback function.
8014
8015         * gc.c: Run finalisers in a separate thread, to avoid stack
8016         overflow.  Fixes bug 31333.
8017
8018         * appdomain.c: Set up GC finalisation thread.
8019
8020         * reflection.c: 
8021         * object.c: 
8022         * domain.c: Use gc.h macros for GC_malloc
8023         
8024 2002-11-15  Dick Porter  <dick@ximian.com>
8025
8026         * threadpool.c: 
8027         * threads.c:
8028         * appdomain.c: Removed mono_runtime_init_with_attach(),
8029         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
8030         merging the extra parameter with the existing function.  Removed
8031         unneeded code in mono_thread_attach().
8032
8033 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
8034
8035         * image.c (mono_image_loaded_by_guid): a method to get loaded
8036         images by guid. 
8037         (load_metadata_ptrs): we store the guid as string.
8038
8039 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
8040
8041         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
8042
8043         * metadata.c (mono_guid_to_string): imported method form Zoltan
8044         Varga (slightly modified)
8045
8046         * assembly.c (mono_assembly_open): load precompiled code
8047
8048         * loader.h (MonoMethod): we store the method token for use in the
8049         aot compiler. 
8050
8051 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8052
8053         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
8054         the hook function called when an assembly is loaded.
8055         
8056         * domain.c: Modified file.
8057         (mono_domain_assembly_load): removed hash table insertion of assemblies.
8058
8059         Fixes bug #33196.
8060
8061 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
8062
8063         * reflection.c: Map PEFileKind to the value expected by the WinNT
8064         image loader. 
8065
8066 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8067
8068         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
8069         Read until the buffer is filled completely.
8070
8071 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8072
8073         * icall.c: implemented MonoType.InternalGetEvent ().
8074
8075 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8076
8077         * appdomain.c: implemented InitAppDomainSetup. Delayed
8078         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
8079         the entry_assembly.
8080
8081         * assembly.c: base_dir is now an absolute path ending with
8082         G_DIR_SEPARATOR.
8083
8084         * icall.c: modified get_location according to the above changes.
8085
8086         * object.c: init AppDomain.SetupInformation for the default domain after
8087         we have the entry assembly.
8088
8089         * domain.c: when unloading a domain, setup = NULL.
8090
8091 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
8092
8093         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
8094
8095 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
8096
8097         * object.h, object.c: introduced mono_object_get_virtual_method ()
8098         to lookup the method invoked on an object when a callvirt is done on
8099         a method.
8100         * icall.c: make MethodInfo::Invoke() always do a virtual call.
8101
8102 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8103
8104         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
8105         current domain when loaded an assembly and failed to load it.
8106
8107         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
8108
8109 2002-10-31  Dick Porter  <dick@ximian.com>
8110
8111         * icall.c: 
8112         * file-io.h: 
8113         * file-io.c: Return the error status in a parameter, as the
8114         GetLastError() value has long since been blown away if we try and
8115         look it up in a subsequent internal call invocation.  Delete the
8116         GetLastError() internal call, because it's useless.
8117
8118 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
8119
8120         * class.[ch]: added cast_class to fix bug 29517
8121
8122 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
8123
8124         * marshal.c: create valid IL code in the filter clause:
8125         the new JIT is less forgiving:-)
8126
8127 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8128
8129         * icall.c: removed get_property internal call.
8130
8131 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
8132
8133         * appdomain.h domain.c: Added an ID to appdomains.
8134         
8135         * threads.c threads.h icall.c: Implement icall
8136         Thread:GetDomainID(), and remove unused icall 
8137         CurrentThreadDomain_internal.
8138
8139 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8140
8141         * icall.c: Don't recurse through the base types in GetConstructor.
8142         Fixes bug #32063. 
8143
8144 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
8145
8146         * mempool.h, mempool.c: added mono_mempool_empty() and
8147         mono_mempool_stats().
8148
8149 2002-10-23  Dick Porter  <dick@ximian.com>
8150
8151         * file-io.c: 
8152         * file-io.h: 
8153         * icall.c: Added MonoIO.GetFileType internal call
8154
8155 2002-10-17  Dick Porter  <dick@ximian.com>
8156
8157         * appdomain.c (mono_runtime_cleanup): Don't signal the async
8158         delegate semaphore before waiting for all threads to finish,
8159         because new threads can also call async delegates.  Fixes bug
8160         32004.
8161
8162         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
8163         of 3 seconds, in case another async job is queued.  (This part is
8164         needed because the bug fix reintroduced the 3s exit lag.)  This
8165         makes the mono_runtime_shutdown flag superfluous.
8166
8167 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
8168
8169         * reflection.c: include ehader size in method section headers.
8170         Really check for suplicated modules entries.
8171
8172 2002-10-17  Martin Baulig  <martin@gnome.org>
8173
8174         * debug-mono-symfile.c: Added back support for locals.
8175
8176 2002-10-14  Martin Baulig  <martin@gnome.org>
8177
8178         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
8179         MONO_TYPE_VOID.
8180
8181 2002-10-14  Martin Baulig  <martin@gnome.org>
8182
8183         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
8184         mono_class_get() instead of looking in the class cache. 
8185
8186 2002-10-13  Martin Baulig  <martin@gnome.org>
8187
8188         * debug-mono-symfile.c: Set version number to 28, include the
8189         signature in method names.
8190
8191 2002-10-13  Martin Baulig  <martin@gnome.org>
8192
8193         * debug-mono-symfile.h: Set version number to 27.
8194
8195 2002-10-11  Martin Baulig  <martin@gnome.org>
8196
8197         * gc.c: Don't register/unregister NULL pointers as disappearing links.
8198
8199 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8200
8201         * metadata.c, metadata.h: added helper function to allocate signatures.
8202
8203 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8204
8205         * icall.c: added internal call to get the location of machine.config.
8206
8207 2002-10-08  Martin Baulig  <martin@gnome.org>
8208
8209         * debug-mono-symfile.c: Ignore classes with a pending init for the
8210         moment.
8211
8212 2002-10-03  Dick Porter  <dick@ximian.com>
8213
8214         * threads.c: Freebsd pthread_t is a pointer
8215
8216 2002-10-03  Dick Porter  <dick@ximian.com>
8217
8218         * socket-io.c: Implemented GetHostName_internal
8219
8220 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8221
8222         * mono-config.c:
8223         (mono_config_parse_file): don't leak the text.
8224
8225 2002-10-02  Martin Baulig  <martin@gnome.org>
8226
8227         * debug-mono-symfile.c: Added support for methods.
8228
8229 2002-10-01  Martin Baulig  <martin@gnome.org>
8230
8231         * debug-mono-symfile.c: Don't emit methods and line numbers for
8232         the dynamic symbol file, just write the type table.  We can easily
8233         have an external helper program which creates a symbol file for an
8234         IL file.        
8235
8236 2002-10-01  Dick Porter  <dick@ximian.com>
8237
8238         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
8239         Only add the handle to the cleanup array when we're about to
8240         launch the thread.  Bug 31425 deadlocked when the test was run on
8241         mono under w32.
8242
8243 2002-10-01  Martin Baulig  <martin@gnome.org>
8244
8245         * debug-mono-symfile.c: Added support for properties.
8246
8247 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8248
8249         * reflection.c: unaligned store fix from Mark Crichton
8250         <crichton@gimp.org>.
8251
8252 2002-09-27  Martin Baulig  <martin@gnome.org>
8253
8254         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
8255         New interncall.
8256
8257 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
8258
8259         * assembly.h, assembly.c: use a sane API to hook into the assembly
8260         loading process instead of a useless special-purpouse hack
8261         (ngen needs a hook, too, for example).
8262
8263 2002-09-27  Dick Porter  <dick@ximian.com>
8264
8265         * threads.c (mono_thread_init): Call GetCurrentProcess() so
8266         io-layer can set up some process handle info.  Not needed on w32,
8267         but doesn't hurt either.
8268
8269         * process.c: Pass the program name in the second parameter to
8270         CreateProcess, so the path is searched.  Include the working
8271         directory. Implemented process name, process enumeration, and some
8272         process detail internal calls.
8273         
8274         * icall.c: Added internal calls for process lookup, and some
8275         process details
8276
8277 2002-09-26  Martin Baulig  <martin@gnome.org>
8278
8279         * assembly.c (mono_install_open_assembly_hook): New global
8280         function to install a function to be invoked each time a new
8281         assembly is loaded.
8282         (mono_assembly_open): Run this callback function if set.
8283
8284         * debug-mono-symfile.c: Put back line numbers for the dynamic
8285         symbol file and also record the .il file as source file.  This
8286         allows us to install the temporary symbol file as `file.dbg' just
8287         like a compiler-generated one.
8288
8289 2002-09-26  Nick Zigarovich <nick@chemlab.org>
8290
8291         * Corrected typo in gc.c (BOHEM vs BOEHM).
8292
8293 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8294
8295         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
8296         GetProperties. Also avoid calling g_slist_length in GetProperties and
8297         GetMethods.
8298
8299 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8300
8301         * reflection.c: avoid unaligned stores (bug spotted by
8302         Mark Crichton  <crichton@gimp.org>).
8303
8304 2002-09-25  Martin Baulig  <martin@gnome.org>
8305
8306         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
8307         instead of guint64 for addresses and added prologue/epilogue info.
8308
8309 2002-09-25  Martin Baulig  <martin@gnome.org>
8310
8311         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
8312         store line number info.  For the dynamic symbol file, we only need
8313         to provide the JIT generated dynamic line number info for the dynamic
8314         symbol file.
8315
8316 2002-09-25  Martin Baulig  <martin@gnome.org>
8317
8318         * debug-mono-symfile.h: Incremented version number.
8319
8320 2002-09-24  Martin Baulig  <martin@gnome.org>
8321
8322         * class.c (mono_debugger_class_init_func): New global function
8323         pointer variable.
8324         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
8325         call it.
8326
8327         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
8328         function.  This is called via the mono_debugger_class_init_func
8329         hook to add all types to the dynamic type table.
8330         (ves_icall_MonoDebugger_GetType): New interncall to get a class
8331         from its metadata token.
8332
8333         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
8334         New interncall for the debugger.
8335
8336 2002-09-24  Nick Drochak <ndrochak@gol.com>
8337
8338         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
8339         before using it in case it is null.
8340         
8341 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8342
8343         * metadata.c: allow custom modifiers in local var signatures
8344         (bug spotted by Zoltan Varga).
8345
8346 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8347
8348         * class.c: deal with the <Module> class that may have a NULL vtable.
8349         Eliminate warnings.
8350
8351 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8352
8353         * image.c, image.h: more strong name helpers.
8354         * monosn.c: more work: convert pem keys to cryptoapi format.
8355
8356 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8357
8358         * string-icalls.c: speedup IndexOf.
8359
8360 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8361
8362         * icall.c: updates from Zoltan.2.Varga@nokia.com.
8363
8364 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8365
8366         * icall.c: cleanup: use mono_object_domain ().
8367
8368 2002-09-23  Martin Baulig  <martin@gnome.org>
8369
8370         * debug-mono-symfile.c: Improved type support.
8371
8372 2002-09-22  Martin Baulig  <martin@gnome.org>
8373
8374         * debug-mono-symfile.c: Added support for reference types and strings.
8375
8376 2002-09-22  Martin Baulig  <martin@gnome.org>
8377
8378         * debug-mono-symfile.c: Started to work on the type table.
8379
8380 2002-09-21  Martin Baulig  <martin@gnome.org>
8381
8382         * debug-mono-symfile.c: Largely reworked the symbol table format.
8383         The symbol table is now incrementally updated each time a new
8384         method is added.  We're now also using our own magic and version
8385         so that you don't need to recompile all your classes if the
8386         dynamic table changes.
8387         (mono_debug_update_mono_symbol_file): Removed.
8388         (mono_debug_symfile_add_method): New function to add a method.
8389
8390 2002-09-21  Martin Baulig  <martin@gnome.org>
8391
8392         * icall.c
8393         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
8394         New interncall.
8395
8396         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
8397         New interncall to get a method from its metadata token.
8398
8399 2002-09-21  Martin Baulig  <martin@gnome.org>
8400
8401         * debug-mono-symfile.c: Create type table.
8402
8403 2002-09-20  Martin Baulig  <martin@gnome.org>
8404
8405         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
8406
8407 2002-09-20  Martin Baulig  <martin@gnome.org>
8408
8409         * debug-mono-symfile.c: Provide information about params and locals.
8410
8411 2002-09-20  Martin Baulig  <martin@gnome.org>
8412
8413         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
8414         New interncall.
8415
8416         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
8417         interncall to get a method from its metadata token.
8418
8419 2002-09-20  Martin Baulig  <martin@gnome.org>
8420
8421         * debug-mono-symfile.c: Added a few checks for method->header
8422         being non-NULL.  This should never happen, but for the moment
8423         let's use a g_warning() rather than a g_assert().
8424
8425 2002-09-19  Mark Crichton  <crichton@gimp.org>
8426
8427         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
8428         even if support for it isn't present.  Added an #ifdef to fix this.
8429
8430         * socket-io.c: Added checks back for Solaris support.
8431
8432 2002-09-19  Martin Baulig  <martin@gnome.org>
8433
8434         * debug-mono-symfile.c (read_string, write_string): Reflect latest
8435         changes in the symbol file format.
8436
8437 2002-09-18  Martin Baulig  <martin@gnome.org>
8438
8439         * debug-mono-symfile.c: Set version number to 21.
8440
8441 2002-09-18  Dick Porter  <dick@ximian.com>
8442
8443         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
8444         on netbsd.  Fixes bug 30051.
8445
8446 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8447
8448         * reflection.c:
8449         (set_version_from_string): little fix.
8450
8451 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8452
8453         * monosn.c, Makefile.am: added strong name utility.
8454         * reflection.h, reflection.c: implemented delayed signing,
8455         locale, version and hash id assembly attributes.
8456
8457 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8458
8459         * loader.c, metadata.c: load param attributes in signatures.
8460
8461 2002-09-16  Martin Baulig  <martin@gnome.org>
8462
8463         * debug-mono-symfile.c: Added string table with all method names.
8464
8465 2002-09-14  Martin Baulig  <martin@gnome.org>
8466
8467         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
8468         fast method lookup.
8469
8470 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8471
8472         * reflection.c: record the public key token of referenced assemblies.
8473
8474 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8475
8476         * image.c, image.h: added functions to get the strong name and the
8477         public key of an assembly.
8478         * pedump.c: use them.
8479
8480 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
8481
8482         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
8483
8484 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
8485
8486         * marshal.c (mono_marshal_get_managed_wrapper): Added
8487         MONO_TYPE_BOOLEAN 
8488
8489 2002-09-11  Martin Baulig  <martin@gnome.org>
8490
8491         * gc.c: Call GC_unregister_disappearing_link() on all links when
8492         finalizing them, this is necessary to aviod a crash in boehm's
8493         finalize handler.
8494
8495 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8496
8497         * gc.c: handle GetTarget for finalized objects spotted and fixed by
8498         nick@chemlab.org.
8499
8500 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8501
8502         * icall.c: implemented MonoType::Module.
8503         * reflection.c, reflection.h: mono_module_get_object () from
8504         Tomi Pakarinen <tomi.pakarinen@welho.com>.
8505
8506 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8507
8508         * icall.c: ignore overridden methods in GetMethods ().
8509         Fix for FieldInfo::SetValue().
8510         * object.c: handle float/double in runtime invoke.
8511
8512 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8513
8514         * object.c: allow a constructor to be called again on an object.
8515
8516 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8517
8518         * class.h, class.c: move field layout code to it's own function and
8519         export it. Get an interface id earlier. Move fields in MonoClass
8520         so they are more cache friendly and align the bitfields.
8521         * loader.c: temporary handle get_param_names() for a runtime method.
8522         * reflection.c, reflection.h: more code to handle runtime creation of
8523         types.
8524
8525 2002-09-09  Martin Baulig  <martin@gnome.org>
8526
8527         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
8528         signature with the pinvoke field being set for the actual call.
8529
8530 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8531
8532         * icall.c: removed some unused icalls. Start of map of glib charsets
8533         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
8534
8535 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8536
8537         * debug-helpers.c: break infinite loop (found and fixed by
8538         Holger Arnold <harnold@gmx.de>).
8539
8540 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8541
8542         * icall.c: target may be null in create_delegate.
8543
8544 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8545
8546         * marshal.c: handle a boolean return type.
8547
8548 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8549
8550         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
8551
8552 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8553
8554         * gc.c: fix weakreferences.
8555
8556 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8557
8558         * icall.c: added icall to get default codepage.
8559
8560 2002-09-03  Dick Porter  <dick@ximian.com>
8561
8562         * threads.h: 
8563         * threads.c: Use MonoThread instead of MonoObject where
8564         apropriate.
8565
8566         Store running thread objects in a hash table, so that we have all
8567         the info to hand when waiting for them to finish
8568         (means we don't need OpenThread() any more, so mingw builds should
8569         be fully functional again.)
8570
8571         * verify.c:
8572         * object.h: Added thread ID to MonoThread
8573
8574 2002-09-03  Martin Baulig  <martin@gnome.org>
8575
8576         * icall.c (System.Reflection.Assembly::get_location): New interncall.
8577
8578 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8579
8580         * icall.c: fixed leak in get_temp_path. Thanks lupus.
8581
8582 2002-09-03  Martin Baulig  <martin@gnome.org>
8583
8584         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
8585         argument to store the end address of the disassembled instruction.
8586
8587         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
8588         here from debug-symfile.h.
8589         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
8590         JIT into this struct.
8591         (MonoSymbolFile): Added `char *image_file' field.
8592         (MonoDebugGetMethodFunc): Removed.
8593         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
8594         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
8595         (mono_debug_find_method): New method.
8596
8597         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
8598         create a full symbol file.
8599         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
8600         and static symbol files.
8601         (mono_debug_find_method): The symbol file keeps an internal method hash,
8602         call this to get a MonoDebugMethodInfo from a MonoMethod.
8603
8604         * debug-symfile.[ch]: Removed.
8605
8606 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
8607
8608         * image.c (do_mono_image_open): Remove linker version check.
8609
8610 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
8611
8612         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
8613         wrappers for instance methods.
8614         
8615 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8616
8617         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
8618
8619 2002-08-28  Dick Porter  <dick@ximian.com>
8620
8621         * Makefile.am: Export HOST_CC for w32 builds
8622
8623 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8624
8625         * file-io.c process.c: MonoString are null terminated, no
8626         need for mono_string_to_utf16() anymore.
8627
8628 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8629
8630         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
8631
8632 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
8633
8634         * icall.c, reflection.h: speedup System.MonoType.
8635
8636 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8637
8638         * reflection.c: allow null as the value of a string argument in
8639         custom attributes constructors.
8640
8641 2002-08-27  Martin Baulig  <martin@gnome.org>
8642
8643         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
8644         `trampoline_address' field.
8645
8646 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
8647
8648         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
8649         check (fixes bug #29486) 
8650
8651 2002-08-27  Martin Baulig  <martin@gnome.org>
8652
8653         * debug-mono-symfile.c: Changed the file format in a way that allows us
8654         open it read-only and to use a specially malloced area for all the
8655         dynamic data.  We can now also generate a symbol file on-the-fly if we're
8656         debugging IL code and there is no MCS generated symbol file for it.
8657
8658 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8659
8660         * object.c: added a define for a good string and array
8661         creation speedup (not enabled by default because we need to deal with
8662         the synch stuff).
8663
8664 2002-08-26  Martin Baulig  <martin@gnome.org>
8665
8666         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
8667         function to create a dynamic symbol file.  This is used by the
8668         debugger to create a symbol file for IL code on-the-fly.
8669
8670 2002-08-26  Martin Baulig  <martin@gnome.org>
8671
8672         * loader.c (mono_lookup_pinvoke_call): Include the error message
8673         from g_module_error() in the error message.
8674
8675 2002-08-24  Martin Baulig  <martin@gnome.org>
8676
8677         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
8678         function to update the symbol file.  The symbol file is mmap()ed
8679         writable, but private.  This allows us to install the symbol file
8680         together with the assembly.
8681
8682 2002-08-24  Martin Baulig  <martin@gnome.org>
8683
8684         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
8685         but they can read the new symbol file format which mcs is now creating.
8686
8687         * debug-symfile.c (mono_debug_find_source_location): Moved to
8688         debug-mono-symfile.c; this is now operating on the new symbol file.
8689
8690 2002-08-23  Martin Baulig  <martin@gnome.org>
8691
8692         * debug-helpers.c (mono_method_desc_from_method): New function to get
8693         a MonoMethodDesc from a MonoMethod.
8694
8695 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8696
8697         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
8698         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
8699
8700 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8701
8702         * string-icalls.[ch]: make helper methods static.
8703
8704 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8705
8706         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
8707         types to it and to SetValueInternal.
8708
8709         * object.c: Moved handle_enum label to its proper place. This was the
8710         f... bug! ;-)
8711
8712         This time i compiled mcs and gtk-sharp and they both work.
8713
8714 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8715
8716         * icall.c: reverted partially my previous patch until 
8717         object.c:set_value handles enums correcly.
8718
8719 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8720
8721         * icall.c:
8722         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
8723         (ves_icall_System_Environment_get_MachineName): removed warning when
8724         compiling under cygwin.
8725
8726 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8727
8728         * object.c: fixed field_get_value() for reference types.
8729
8730 2002-08-22  Dick Porter  <dick@ximian.com>
8731
8732         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
8733         Don't free a buffer while it's still needed.  Patch from Jonathan
8734         Liger <Jonathan.liger@wanadoo.fr>
8735
8736 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
8737
8738         * icall.c (ves_icall_System_Environment_get_Platform): Add new
8739         internal call.
8740
8741 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
8742
8743         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
8744         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
8745
8746         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
8747         we call unmanaged code which throws exceptions.
8748
8749 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8750
8751         * appdomain.h: added per-domain entry_assembly.
8752         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
8753         arguments.
8754         * icall.c: Assembly::GetEntryAssembly icall.
8755         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
8756         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
8757
8758 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8759
8760         * appdomain.h, gc.c: added mono_domain_finalize ().
8761
8762 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8763
8764         * object.c:
8765         (mono_print_unhandled_exception): changed g_warning by g_printerr
8766         because g_log has a 1024 characters limit (yeah, i got a big stack
8767         trace). Don't print exception name, that should be in ToString 
8768         returned string.
8769
8770 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8771
8772         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
8773         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
8774
8775 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8776
8777         * object.c:
8778         (mono_print_unhandled_exception): after previous commit, i realized
8779         that MS calls ToString on the exception. I changed this function to
8780         do that. This way we get stack_trace for free.
8781
8782 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8783
8784         * object.c:
8785         (mono_print_unhandled_exception): invoke Message property instead of
8786         getting 'message' field from Exception. Don't allocate memory for
8787         'trace' and 'message' if not needed.
8788
8789 2002-08-18  Dick Porter  <dick@ximian.com>
8790
8791         * unicode.c: Fix asserts to match Encoder.cs checks
8792
8793 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8794
8795         * marshal.c: fix unaligned store issue and a few wrong
8796         opcode argument types.
8797
8798 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8799
8800         * icall.c: added GetUninitializedObjectInternal internal call.
8801
8802 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
8803
8804         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
8805         to the right domain.
8806
8807 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
8808
8809         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
8810
8811         * class.c (class_compute_field_layout): set blittable to false for Strings
8812
8813         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
8814
8815 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8816
8817         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
8818         first chunk of code to create types at runtime. Code to
8819         handle ReflectedType/DeclaringType. Make reflection handles
8820         domain specific.
8821
8822 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8823
8824         * class.c: set correct name in arrays.
8825
8826 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
8827
8828         * appdomain.c (mono_domain_transfer_object): make it work with
8829         valuetypes. bug fixes.
8830
8831 2002-08-12  Dick Porter  <dick@ximian.com>
8832
8833         * object.h: Rename some parameters to avoid c++ keywords (Patch
8834         from Joseph Wenninger <kde@jowenn.at>)
8835
8836 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
8837
8838         * icall.c: added icall to implement Assembly.GetFile*.
8839
8840 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8841
8842         * reflection.h, reflection.c: code to embed managed resources.
8843
8844 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8845
8846         * class.c: move all the type size stuff into
8847         class_compute_field_layout().
8848
8849 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8850
8851         * class.c: ensure enums have always the correct instance size.
8852         * unicode.c: remove wrong assert.
8853
8854 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8855
8856         * assembly.c: fix mem corruption issue.
8857         * image.h, image.c: added mono_image_get_resource () to access
8858         managed resources.
8859         * icall.c: implemented Assembly.EntryPoint property and some
8860         Managed Resources related internalcalls.
8861
8862
8863 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8864
8865         * image.c, image.h: impemented mono_image_get_entry_point ().
8866         * appdomain.c: use mono_image_get_entry_point.
8867
8868 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8869
8870         * reflection.c: support the object type argument when loading
8871         custom attributes.
8872
8873 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
8874
8875         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
8876         String as return type.
8877
8878 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
8879
8880         * reflection.c: fix encoding of named args for custom attrs to match
8881         the ms implementation. Read them back when instantiating custom
8882         attributes.
8883
8884 2002-08-02  Radek Doulik  <rodo@ximian.com>
8885
8886         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
8887         by Dietmar as quick fix
8888         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
8889         16 as stack size, used on more places as quick fix before Dietmar
8890         will fix it properly
8891
8892 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8893
8894         * object.h, object.c: added accessors for fields and properties.
8895
8896 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8897
8898         * class.c, class.h: made mono_class_get_field_from_name ()
8899         loop on parent types.
8900         Added mono_class_get_property_from_name ().
8901
8902 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8903
8904         * class.c, class.h: move the code to setup the type vtable in its own
8905         function so that it can be reused also for types created at runtime.
8906         Eliminate the "class" identifier from the header file.
8907         * reflection.c: setup the vtable for enums so that we can create
8908         objects for use in SetConstant ().
8909
8910 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
8911
8912         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
8913         instead of the delegate itself as this pointer (bug #28383)
8914
8915 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
8916
8917         * marshal.c (mono_marshal_get_managed_wrapper): added return type
8918         conversions.
8919
8920 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8921
8922         * loader.c: don't set the pinvoke bit on icalls.
8923
8924 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
8925
8926         * debug-helpers.c (mono_method_full_name): only print a number to
8927         indicate wrapper type (so that the output is more readable in traces).
8928
8929 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
8930
8931         * class.c (mono_class_init): include method override patch from Paolo
8932
8933 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
8934
8935         * icall.c: fixed GetTypeCode().
8936
8937 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
8938
8939         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
8940         use real delegate invoke function to make it work with multicast
8941         delegates (fix bug# 28291).
8942
8943 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8944
8945         * object.c: load constant strings.
8946
8947 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8948
8949         * reflection.c: no magic numbers.
8950         * tabledefs.h: security action enum.
8951
8952 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8953
8954         * assembly.c: fix possible memory corruption.
8955
8956 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8957
8958         * reflection.h, reflection.c: added support for linking resources.
8959         * verify.c: check we have an updated corlib.
8960
8961 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
8962
8963         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
8964         string arrays.
8965         (mono_marshal_string_array): null terminate unmanaged string arrays.
8966         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
8967
8968 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8969
8970         * icall.c: Type.GetType () can now return also types from the
8971         calling assembly.
8972
8973 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8974
8975         * loader.h, loader.c: stack walking support.
8976         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
8977         GetCallingAssembly.
8978
8979 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
8980
8981         * marshal.c: added optimisations for blittable types 
8982
8983         * class.c (mono_array_class_get): do not set blittable attribute on arrays
8984         (mono_class_setup_mono_type): set blittable attribute for single
8985         and double.
8986
8987         * marshal.c (mono_string_utf8_to_builder): impl.
8988         (mono_string_builder_to_utf8): impl.
8989         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
8990
8991 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
8992
8993         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
8994         (mono_marshal_get_managed_wrapper): impl. byref types
8995
8996 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8997
8998         * icall.c:
8999         (search_method): don't display debug message. 
9000
9001 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
9002
9003         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
9004
9005 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
9006
9007         * appdomain.c: set the missing filename when throwing exception.
9008
9009 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
9010
9011         * metadata.c (mono_type_size): code cleanup
9012         (mono_type_stack_size): removed some test code
9013
9014 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
9015
9016         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
9017         mono_get_exception_file_not_found now.
9018
9019         * exception.c (mono_exception_from_name_two_strings): New version
9020         that will call a constructor with two string arguments. 
9021         (mono_get_exception_file_not_found): New helper routine, used to
9022         report file-not-found errors.
9023
9024 2002-07-20  Dick Porter  <dick@ximian.com>
9025
9026         * process.h:
9027         * process.c: Pass file handles to CreateProcess
9028         
9029         * icall.c:
9030         * file-io.h:
9031         * file-io.c: Implemented CreatePipe
9032
9033 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
9034
9035         * metadata.c (mono_get_param_info): set alignment for value types
9036
9037 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9038
9039         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
9040         Constify mono_domain_assembly_open().
9041         * loader.c: handle null namespace in icalls.
9042
9043 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
9044
9045         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
9046         (emit_str_to_ptr_conv): marshal object as structs
9047
9048         * metadata.c (mono_type_to_unmanaged): marshal object as structs
9049
9050         * marshal.c (mono_marshal_get_runtime_invoke): support value types
9051
9052 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
9053
9054         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
9055         (mono_marshal_get_native_wrapper): we an now return value types
9056
9057 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9058
9059         * verify.c: more checks implemented.
9060
9061 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
9062
9063         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
9064         (fix bug #27695)
9065         (mono_marshal_get_native_wrapper): allow byref arguments
9066         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
9067         impl. PtrToStringXXX methods
9068         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
9069         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
9070         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
9071         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
9072         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
9073
9074 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9075
9076         * reflection.c: fix buglet in parsing an assembly name.
9077
9078 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
9079
9080         * marshal.c (emit_ptr_to_str_conv): first impl.
9081
9082 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9083
9084         * object.c, class.h: cache the vtable in the class as suggested by
9085         vargaz@freemail.hu (Zoltan Varga).
9086
9087 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9088
9089         * class.h, loader.c: added mono_field_from_token().
9090         * verify.c: first cut of type checking code.
9091
9092 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
9093
9094         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
9095
9096 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
9097
9098         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
9099         (fix bug #27782)
9100         (mono_marshal_get_remoting_invoke): impl.
9101         (mono_delegate_begin_invoke): impl.
9102         (mono_mb_emit_save_args): impl.
9103         (mono_delegate_end_invoke): impl.
9104         (mono_marshal_get_delegate_begin_invoke):
9105         (mono_marshal_get_delegate_end_invoke):
9106         (mono_marshal_get_delegate_invoke): generate a special name for
9107         those methods (including the signature) and associate them whith
9108         the delegate class. 
9109
9110 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
9111
9112         * reflection.[ch]: 
9113         (mono_reflection_type_from_name): now it has a MonoImage parameter
9114         which is used as the default image to search the type in. If the image
9115         is NULL or getting the type from it fails, it defaults to corlib.
9116
9117         * icall.c: changed 1 call to mono_reflection_type_from_name to match
9118         new parameter.
9119
9120 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9121
9122         * reflection.c: update the parameter table index.
9123
9124 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9125
9126         * domain.c: don't include the mark byte in the string hash.
9127
9128 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9129
9130         * icall.cs: icall for Type.GetTypeCode ().
9131         * verify: a couple of fixes and disabled local initialization checks.
9132
9133 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
9134
9135         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
9136
9137         * debug-helpers.c (mono_method_full_name): print the type of the
9138         runtime wrapper
9139
9140         * metadata.c (mono_signature_hash): a hash function for signatures
9141         (mono_signature_hash): better hash algorithm
9142
9143         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
9144
9145         * debug-helpers.c (mono_method_full_name): this can now generate
9146         method names with signatures
9147
9148         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
9149         method dont have this pointers.
9150
9151 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9152
9153         * reflection.c: fixup typebuilder tokens.
9154         * image.c: fix buglet.
9155         * marshal.h: remove whitespace.
9156         * metadata.h, metadata.c: reinstate code that was removed.
9157         * verify.c: handle catch directives and fix another couple of bugs.
9158
9159 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
9160
9161         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
9162         (mono_marshal_get_native_wrapper): make it comp. with the old code
9163         (mono_marshal_get_native_wrapper): support boolean
9164         (mono_marshal_get_managed_wrapper): support more types
9165
9166 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
9167
9168         * class.c (class_compute_field_layout): compute class->blittable attribute.
9169
9170 2002-07-09  Dick Porter  <dick@ximian.com>
9171
9172         * threads.c: Make the thread cleaning up cope with threads that
9173         call ExitThread()
9174
9175 2002-07-08  Radek Doulik  <rodo@ximian.com>
9176
9177         * reflection.c (method_encode_code): use non-translated values to
9178         compute finally_start, this fixes exception handling on ppc, yay!
9179
9180         * decimal.h (struct signscale): fix endianess
9181
9182 2002-07-07  Radek Doulik  <rodo@ximian.com>
9183
9184         * reflection.c: swap box_val and not val
9185
9186 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9187
9188         * reflection.c, reflection.h: handle full assembly info in type name.
9189         Handle Type arguments when loading custom attributes.
9190         * icall.c: updated to use new mono_reflection_type_from_name () method.
9191
9192 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9193
9194         * loader.c:
9195         (method_from_memberref): also print assembly name when method not found.
9196
9197 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9198
9199         * icall.c:
9200         (ves_icall_TypeGetProperties): fixed bug #27473. 
9201
9202 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9203
9204         * reflection.c: display image name and token when cannot find the
9205         .ctor for an attribute.
9206
9207 2002-07-05  Martin Baulig  <martin@gnome.org>
9208
9209         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
9210
9211 2002-07-04  Dick Porter  <dick@ximian.com>
9212
9213         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
9214         compile on mingw.  This will cause mingw builds to not wait for
9215         subthreads to terminate after the main thread does.  I've lodged a
9216         bug with the mingw developers for them to wrap OpenThread().
9217
9218 2002-07-03  Dick Porter  <dick@ximian.com>
9219
9220         * threads.c: Store thread IDs instead of handles, because
9221         GetCurrentThread() returns a pseudohandle and therefore stores
9222         useless values.  mono_thread_cleanup() continues checking the
9223         array of threads until it is empty, to cope with subthreads
9224         spawning new threads after the main thread has finished.
9225
9226         * profiler.h:
9227         * profiler.c:
9228         * profiler-private.h: Pass the thread ID to thread profiler
9229         functions, instead of a handle
9230
9231 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9232
9233         * verify.c: fixes to make it more usable.
9234         * pedump.c: added --verify code to verify IL code in an assembly.
9235
9236 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9237
9238         * reflection.c: turn errors into warnings to allow compiling corlib.
9239
9240 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
9241
9242         * reflection.c: add special cases to compile corlib.
9243
9244 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9245
9246         * reflection.c: handle properties with only a set method.
9247
9248 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9249
9250         * opcodes.h: add enum with opcodes in opval order.
9251
9252 2002-07-01  Dick Porter  <dick@ximian.com>
9253         
9254         * object.h:
9255         * object.c (mono_runtime_run_main): Removed unneeded argument
9256
9257 2002-06-28  Martin Baulig  <martin@gnome.org>
9258
9259         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
9260
9261 2002-06-27  Dick Porter  <dick@ximian.com>
9262
9263         * threads.c: Store the handle in both the parent thread and in the
9264         subthread, to minimise the time between starting a new thread and
9265         storing its ID.
9266
9267 2002-06-26  Dick Porter  <dick@ximian.com>
9268
9269         * appdomain.c (mono_runtime_cleanup): Close the socket library
9270         after all the threads have finished, not before
9271
9272 2002-06-26  Martin Baulig  <martin@gnome.org>
9273
9274         * debug-symfile.c (mono_debug_find_source_location): Added
9275         `guint32 *line_number' argument.  If it's not NULL, store the line number
9276         there and return the file name without the line number.
9277
9278 2002-06-25  Dick Porter  <dick@ximian.com>
9279
9280         * icall.c:
9281         * process.h:
9282         * process.c: Process forking and other support functions
9283
9284 2002-06-25  Dick Porter  <dick@ximian.com>
9285
9286         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
9287         things dont happen when the image is closed.
9288         (mono_image_lookup_resource): Walk the resource section looking
9289         for a particular entry
9290
9291         * cil-coff.h: PE resource section decoding
9292
9293 2002-06-25  Dick Porter  <dick@ximian.com>
9294         
9295         * assembly.h:
9296         * assembly.c: 
9297         (mono_assembly_foreach): Accessor functions to walk the list of
9298         loaded assemblies
9299         (mono_assembly_set_main):
9300         (mono_assembly_get_main): Process methods need to know which
9301         assembly is the "main" one
9302
9303         * object.c (mono_runtime_run_main): Record the main assembly
9304
9305         * debug-helpers.c: Fix typo
9306
9307 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
9308
9309         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
9310         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
9311
9312 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9313
9314         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
9315
9316 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
9317
9318         * image.c (do_mono_image_open): Initialize reference count,
9319         otherwise we leak the MonoImage.
9320
9321 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9322
9323         * reflection.c: small tweak to handle self-hosting.
9324
9325 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
9326
9327         * reflection.c: fix type name parse code.
9328
9329 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9330
9331         * reflection.c: break out of the loop.
9332         * image.c: special case corlib.
9333
9334 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9335
9336         * reflection.c: add all the custom attrs at the end to ensure the
9337         ctors have been properly initialized when the attributes are defined
9338         in the current assembly.
9339
9340 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9341
9342         * reflection.c: handle correctly multiple-nested types.
9343
9344 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
9345
9346         * row-indexes.h: fix typos.
9347         * reflection.c: adjust for typos and fix method_def_or_ref
9348         encoding in MethodImpl table.
9349
9350 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9351
9352         * reflection.c: fix entry point patching (thanks Serge!).
9353
9354 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
9355
9356         * verify.c: add check for System.Exception
9357
9358 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9359
9360         * image.c, class.c: minifix for code just c&p'ed.
9361         * reflection.c: warning fix.
9362         * object.h, loader.h, domain.c: load also StringBuilder.
9363
9364 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9365
9366         * marshal.h, marshal.c: some support code to handle complex marshaling.
9367
9368 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9369
9370         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
9371         Better signatures with vtable error dump.
9372
9373 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
9374
9375         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
9376
9377 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
9378
9379         * icall.c (ves_icall_Type_GetField): impl.
9380
9381 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9382
9383         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
9384         to retrieve a marshal description blob for a field or param.
9385
9386 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
9387
9388         * reflection.h, reflection.c: change order of nested type emission
9389         to avoid table corruption. The NestedTypes table is sorted.
9390         * icall.c: change order of GetConstructor results to workaround mcs bug.
9391
9392 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9393
9394         * reflection.h, reflection.c: handle field and param marshal
9395         information.
9396
9397 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9398
9399         * icall.c, marshal.c marshal.h: more Marshal class implementation.
9400
9401 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9402
9403         * reflection.c: fix call convention.
9404
9405 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9406
9407         * reflection.h, reflection.c: mono_image_get_memberref_token()
9408         takes a type instead of a class, now. Added
9409         mono_image_get_array_token() to create tokens for the special
9410         multi-dim array methods.
9411
9412 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9413
9414         * assembly.c: handle modules (no assembly table). Split
9415         loading references in its own function.
9416         * class.c: handle moduleref resolution scope.
9417         * image.c, image.h: cache module name in image.
9418
9419 2002-06-07  Martin Baulig  <martin@gnome.org>
9420
9421         * reflection.c (mono_image_get_type_info): Only add a class layout entry
9422         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
9423
9424 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9425
9426         * icall.c: more signature fixes that used uint instead of int.
9427
9428 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9429
9430         * reflection.c: fixed signature of field refs.
9431
9432 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9433
9434         * class.c, reflection.c: handle typerefs of nested types
9435         (both on read and when writing files).
9436
9437 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
9438
9439         * icall.c: fix method signatures that tried to workaround the previous
9440         typo, d'oh!
9441
9442 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9443
9444         * debug-helpers.c: fix typo.
9445
9446 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9447
9448         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
9449         rewrote the PE/COFF writing code (our programs are understood by the
9450         ms runtime, now).
9451
9452 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9453
9454         * gc.c, gc.h, icall.c: weakreference support.
9455
9456 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9457
9458         * Makefile.am, mono-config.c: use $(sysconfdir).
9459
9460 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9461
9462         * icall.c: changed default precision of Double.ToString() to 15.
9463         Fixed memory leak. Unified with Single.ToString.
9464
9465 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
9466
9467         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
9468
9469 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
9470
9471         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
9472         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
9473         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
9474         and myself.
9475
9476 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9477
9478         * debug-symfile.c, sysmath.c: yet more compilation fixes.
9479
9480 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9481
9482         * reflection.c, socket-io.c: more compilation fixes.
9483
9484 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9485
9486         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
9487         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
9488         unicode.c: warning and compiler compatibility fixes.
9489
9490 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9491
9492         * class.h, metadata.c: fixed warnings/compilation errors.
9493
9494 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9495
9496         * Makefile.am, mono-config.c, mono-config.h: configuration file
9497         support routines.
9498         * loader.c, loader.h: make Dll mapping configurable at runtime in the
9499         config file. Export methods to insert and lookup mappings.
9500
9501 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
9502
9503         * reflection.c: handle types and boxed objects in custom attr
9504         constructors.
9505
9506 2002-05-30  Martin Baulig  <martin@gnome.org>
9507
9508         * debug-symfile.c
9509         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
9510
9511 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
9512
9513         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
9514         to lookup the implmap row for a P/Invoke method.
9515         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
9516         P/Invoke method from the runtime on an as needed basis.
9517
9518 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
9519
9520         * metadata.c (mono_metadata_parse_signature): impl.
9521
9522 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9523
9524         * class.c: handle .pack directive.
9525
9526 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
9527
9528         * object.c: initialize static fields with RVA data.
9529
9530 2002-05-25  Martin Baulig  <martin@gnome.org>
9531
9532         * debug-symfile.c
9533         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
9534
9535 2002-05-24  Martin Baulig  <martin@gnome.org>
9536
9537         * debug-symfile.c
9538         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
9539         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
9540         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
9541
9542 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9543
9544         * object.c: special case string ctros in invoke.
9545         * gc.c: silly whitespace changes.
9546
9547 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
9548
9549         * threadpool.[ch]: impl. a threadpool that can
9550         be used by mint and mono.
9551
9552 2002-05-22  Martin Baulig  <martin@gnome.org>
9553
9554         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
9555         The first argument is now a `MonoReflectionModuleBuilder *', the return
9556         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
9557         `methods' field to get the method builder.  The `token' argument is the
9558         unfixed token.
9559
9560         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
9561         invalid characters instead of g_assert_not_reached()ing.  This seems
9562         to be the behaviour of mscorlib.
9563
9564 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
9565
9566         * object.c (mono_runtime_invoke_array): applied patch from Rachel
9567         Hestilow to fix bug #25104
9568
9569 2002-05-21  Martin Baulig  <martin@gnome.org>
9570
9571         * debug-symfile.c (mono_debug_find_source_location): New function.
9572         Looks up an IL offset in the line number table and returns the source
9573         location as a string.
9574
9575 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9576
9577         * icall.c:
9578         (mono_double_ToStringImpl): changed %f by %g until we have something
9579         better.
9580
9581 2002-05-21  Nick Drochak  <ndrochak@gol.com>
9582
9583         * icall.c : Use different name for Math.Pow's icall.  Needed to check
9584         parameters first in C#.
9585
9586 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9587
9588         * icall.c, reflection.h: added icall to get info about an event.
9589
9590 2002-05-20  Radek Doulik  <rodo@ximian.com>
9591
9592         * object.c (mono_value_box): don't use memcpy for boxing on BIG
9593         endian
9594         (mono_value_box): don't use memcpy for small sizes on
9595         architectures with unaligned access
9596
9597 2002-05-20  Martin Baulig  <martin@gnome.org>
9598
9599         * reflection.c (mono_reflection_setup_internal_class): Don't crash
9600         if `tb->parent == NULL'.
9601         (mono_reflection_create_internal_class): New function.  This is
9602         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
9603         for enum types.
9604
9605         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
9606         New interncall.
9607
9608 2002-05-19  Martin Baulig  <martin@gnome.org>
9609
9610         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
9611         argument to get the length, don't default to the array length.
9612
9613 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
9614
9615         * assembly.c (mono_assembly_setrootdir): New function used to
9616         override the MONO_ASSEMBLIES directory.
9617
9618 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9619
9620         * icall.c: ValueType_GetHashCode() initialize local var.
9621
9622 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9623
9624         * reflection.c: sort custom attributes table.
9625
9626 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9627
9628         * reflection.c: support named args in custom attributes (write support).
9629
9630 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9631
9632         * reflection.c: fix finally position calculation.
9633
9634 2002-05-15  Radek Doulik  <rodo@ximian.com>
9635
9636         * reflection.c: fixed endianess at many places
9637
9638         * icall.c (ves_icall_InitializeArray): comment out debug msg
9639
9640 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
9641
9642         * object.c (mono_unhandled_exception): new function to handle
9643         unhandled exceptions.
9644         (mono_unhandled_exception): call the UnhandledException event.
9645         (mono_runtime_delegate_invoke): impl.
9646
9647 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
9648
9649         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
9650         returns the RVA, not the direct pointer to the data. Handle the case
9651         when the class size is fixed.
9652
9653 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
9654
9655         * reflection.c: fix some endianess issues.
9656
9657 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
9658
9659         * object.c (mono_runtime_invoke): is now able to catch exceptions.
9660
9661         * threads.c (mono_thread_init): added a callback which is invoked
9662         at thread start.
9663
9664 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
9665         
9666         * icall.c: make GetHashCode return non-negative values.
9667
9668 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
9669
9670         * object.c, icall.c, gc.c: revert to address-based hashcode.
9671
9672 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
9673
9674         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
9675
9676 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9677
9678         * icall.c, class.c: special case <Module>.
9679
9680 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
9681
9682         * icall.c: fix bug in GetNow().
9683
9684 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
9685
9686         * object.c (mono_runtime_class_init): make sure that we call all
9687         static class constructors.
9688
9689 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9690
9691         * reflection.c: sort methodsemantics table.
9692
9693 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
9694
9695         * reflection.h, reflection.c: honour init locals setting.
9696
9697 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
9698
9699         * icall.c: copied Double ToStringImpl for Single ToStringImpl
9700
9701 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9702
9703         * reflection.c: support ContructorBuilders in attribute blob creation.
9704
9705 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9706
9707         * reflection.c: some changes to build a binary that can be run
9708         directly in windows.
9709
9710 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9711
9712         * loader.c: print a big message when an icall can't be found.
9713
9714 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9715
9716         * string-icalls.c: fix bug 24248.
9717
9718 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
9719
9720         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
9721         icall.c, reflection.h: separate assembly loading by pathname and by
9722         assembly name. Use the MONO_PATH env var to search for assemblies.
9723
9724 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9725
9726         * assembly.c, image.h: add some support for assemblies
9727         with multiple modules.
9728         * class.c, class.h: export mono_class_from_typeref().
9729         * loader.c: remove duplicated code and use mono_class_from_typeref(),
9730         instead.
9731
9732 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9733
9734         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
9735         documentation says (the ECMA one is correct).
9736
9737 2002-05-02  Dick Porter  <dick@ximian.com>
9738
9739         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
9740         Don't name the synchronisation mutex.
9741
9742 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
9743
9744         * rand.c
9745         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
9746         Make the prototypes match.
9747         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
9748         Same.
9749
9750         * icall.c
9751         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
9752         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
9753         all systems have tm.tm_zone, so use strftime() with %Z to print
9754         the timezone abreviation into a temp string.
9755
9756         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
9757         rather than mono_array_addr() on a MonoString on Big Endian
9758         machines.
9759
9760 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
9761
9762         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
9763         fix bug 24041
9764
9765 2002-04-30  Dick Porter  <dick@ximian.com>
9766
9767         * socket-io.c: Cope with SOCKET being an integer rather than a
9768         pointer now.
9769
9770         * threads.c: Added Thread_free_internal, to deal with thread
9771         handle cleanup.  Moved calls to handle_store() and handle_remove()
9772         to start_wrapper(), so each can only be called once.  Allocate
9773         synchronisation blocks with GC_malloc(), and use GC finalisation
9774         to close the handles.
9775
9776         * icall.c: added System.Threading.Thread::Thread_free_internal
9777
9778 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9779
9780         * icall.c: support Environment.Exit, CommandLineArgs().
9781
9782 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9783
9784         * object.c, object.h: added mono_runtime_run_main () and
9785         mono_runtime_get_main_args () for use in System.Environment.
9786
9787 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9788
9789         * gc.c: fix thinko, enable actual finalization since the jit is now
9790         fixed.
9791
9792 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9793
9794         * gc.c, object.c: take into account that an object may be offset wrt the address
9795         returned by GC_malloc().
9796
9797 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
9798
9799         * image.c: handle files without entries in the assembly table (modules).
9800
9801 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
9802
9803         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
9804         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
9805         allowed to be null when it's System.Object class setup.
9806
9807 2002-04-27  Martin Baulig  <martin@gnome.org>
9808
9809         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
9810         if `tb->parent == NULL' rather than crashing.
9811
9812 2002-04-28  Nick Drochak  <ndrochak@gol.com>
9813
9814         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
9815         calling acos() where asin() should have been called.
9816
9817 2002-04-26  Martin Baulig  <martin@gnome.org>
9818
9819         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
9820         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
9821         there's a subdirectory called `System', but we don't want to read that
9822         subdirectory as an assembly.
9823
9824 2002-04-25  Martin Baulig  <martin@gnome.org>
9825
9826         * debug-symfile.c: Reflect latest MonoString changes.
9827
9828 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9829
9830         * rand.c, rand.h: instance method icalls need to have an explicit
9831         this pointer as first argument in the C implementation.
9832
9833 2002-04-25  Nick Drochak <ndrochak@gol.com>
9834
9835         * icall.c: Fix typo in map for GetNonZeroBytes
9836
9837 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9838
9839         * string-icalls.c : String does now passes unit tests without any 
9840         errors, the following changes has been made:
9841         
9842         Implemented replace methods.
9843         Renaming of methods to (try) follow the standard.
9844         Fixed compare ordinal
9845         Made all memory allocated directly to function instead of via icall function.
9846         Small performance fix in is_in_array function
9847                         
9848  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
9849
9850         c (mono_string_Internal_ctor_charp_int_int):
9851         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
9852         sindex < 0, throw ArgumentOutOfRangeException instead of
9853         ArgumentNullException.
9854
9855         Added new check for length == 0, however
9856         I need to make it return String.Empty from the C code.
9857         
9858         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
9859         that calculate the length for us here.
9860         
9861         (mono_string_Internal_ctor_sbytep_int_int): Replaced
9862         mono_string_new_utf16 with mono_string_new, since value is utf8.
9863
9864 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9865
9866         * object.c: register the object for finalization if needed.
9867         Allocate one more char in the string for the terminating 0 char.
9868
9869 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9870
9871         * class.c, class.h, image.c: check if a type implemenst a destructor.
9872         Use the proper key for array class lookups.
9873         * icall.c: register the icalls in the System.GC class.
9874         * gc.c, gc.h: GC-related functions and icalls.
9875
9876 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9877
9878         * icall.c:
9879         * socket-io.c:
9880         * unicode.c: free some strings gotten from mono_string_to_utf8 and
9881         changed a couple of free () by g_free ().
9882
9883         * decimal.c: one-liner in the comments for decimal2string ().
9884
9885 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9886
9887         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
9888
9889 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
9890
9891         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
9892         * object.c (mono_runtime_invoke_array) : handle null in params
9893
9894 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9895
9896         * string-icalls.c: fixed bug in split (one off bug)
9897
9898 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9899
9900         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
9901         * icalls.c: added String::Equals as internal method
9902
9903 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
9904
9905         * threads.c: fixed bug in the double interlocked functions
9906
9907 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
9908
9909         * threads.c: implemented all of the new interlocked icalls.
9910         * string-icalls.c: fix a bug in insert.
9911         * icalls.c: added the icalls for interlocked, removed old string functions.
9912         
9913 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9914
9915         * loader.c: fix off-by-one error when reading argument names.
9916
9917 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9918
9919         * profiler.c: win32 counter implementation (untested).
9920         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
9921         (the latter needs testing and more complete impl. from win32 folks).
9922
9923 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
9924
9925         * object.c: mono_array_new_full workaround mono_array_class_get
9926         problem.
9927
9928 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9929
9930         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
9931         * object.h (mono_string_chars): Changed casting type.
9932
9933 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9934
9935         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
9936                            method signatures to use gunichar2 instead of gint16.
9937
9938 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
9939
9940         * object.h, object.c: domain-specific versions of mono_object_new and
9941         mono_array_new.
9942
9943 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
9944
9945         * object.c: changed String layout
9946
9947         * string-icalls.c (mono_string_Internal_ctor_chara): added
9948         internal string constructors.
9949
9950 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
9951
9952         * threads.c: pass 'this' to the thread start routine.
9953
9954 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9955
9956         * string-icalls.c: fix IndexOf and LastIndexOf. Now
9957         InternalCompareStr don't call twice mono_string_cmp_char for the last
9958         character. Improved performance in mono_string_cmp_char.
9959
9960 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9961
9962         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
9963         code into its own library: libmonoruntime.
9964
9965 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
9966
9967         * object.h, object.c: changed array format so that szarrays do not
9968         require a bounds structure.
9969         * icall.c, appdomain.c: support for new szarray format.
9970
9971 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9972
9973         * metadata.c: compare also the retuns type when comparing signatures:
9974         we didn't do this as an optimization since really overloaded methods
9975         must differ also in the arguments, but this doesn't work with
9976         low-level IL code (or when using explicit conversion operators: see
9977         bug#23498 for an example).
9978
9979 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9980
9981         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
9982
9983 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
9984
9985         * icall.c: make MonoType::GetElementType its own icall.
9986
9987 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9988
9989         * icall.c: remove MonoMethod_get_Name().
9990         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
9991         object.
9992
9993 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9994
9995         * string-icalls.c: optimized a few methods.
9996
9997 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
9998
9999         * icall.c: added all new string internal calls
10000         * string-icalls.c: added, new string internal call implementation.
10001         * object.c: added mono_string_new_size for allocating a string a size
10002
10003 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
10004
10005         * object.c (mono_object_isinst): use the same code as in the
10006         optimized x86 version.
10007
10008 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
10009
10010         * profiler.c: TSC-based timer code (faster and more accurate).
10011         Not hooked up in configure, yet (set USE_X86TSC to 1).
10012
10013 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
10014
10015         * profiler.c, profiler.h: track time spent compiling methods.
10016         * threads.c: track thread creation/destruction.
10017
10018 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
10019
10020         * profiler.c, profiler.h, profiler-private.h: profiling interface
10021         and sample implementation. Moved here so that it can be used also by
10022         the jit.
10023
10024 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
10025
10026         * reflection.c, reflection.h: keep types and other handles separate in
10027         the hash tables for referred tokens. Add guid for modules.
10028
10029 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
10030
10031         * assembly.c: fix bugs found with valgrind.
10032         * metadata.h, metadata.c: added mono_metadata_guid_heap().
10033
10034 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
10035
10036         * threads: added icall support for getting current domain for
10037                    the thread.
10038  
10039 2002-04-13  Martin Baulig  <martin@gnome.org>
10040
10041         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
10042         (MonoDebugVarInfo): Added `index' field for register based addresses.
10043         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
10044         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
10045         `MonoDebugVarInfo *params' and `guint32 this_offset' with
10046         `MonoDebugVarInfo *this_var'.
10047
10048         * debug-symfile.c (relocate_variable): New static function to write
10049         a location description for a local variable or method parameter.
10050
10051 2002-04-12  Martin Baulig  <martin@gnome.org>
10052
10053         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
10054         stack offset and begin/end scope address of a local variable.
10055         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
10056         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
10057         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
10058
10059         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
10060         Added new relocation types for start/end scope of a local variable.
10061
10062 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
10063
10064         * object.h: add mono_object_domain() macro.
10065         * reflection.c: handle typespecs.
10066         * icall.c: MonoMethod::get_Name() implementation.
10067
10068 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
10069
10070         * icall.c: String::GetHashCode() icall implementation.
10071
10072 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10073
10074         * icall.c: String::IndexOfAny icall.
10075         * object.c, object.h: make array->max_length more useful.
10076         Intrduced mono_object_class() and mono_string_length() macros.
10077
10078 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10079
10080         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
10081         instead of g_unichar_isdigit.
10082
10083 2002-04-11  Nick Drochak  <ndrochak@gol.com>
10084
10085         * icall.c: Implement a simple Double.ToString().
10086
10087 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
10088
10089         * appdomain.h: only io-layer.h is supposed to be included.
10090         * icall.c: explicitly import environ. Fix warning.
10091
10092 2002-04-10  Nick Drochak  <ndrochak@gol.com>
10093
10094         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
10095                 return true even if it's not Daylight Savings time.
10096                 Only return false for the case where the function isn't
10097                 implemented for a plaform (read Windows).
10098
10099 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10100
10101         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
10102         data with a mutex.
10103
10104 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
10105
10106         * mempool.c (mono_mempool_alloc): only use g_malloc when
10107         absolutely necessary.
10108
10109 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
10110
10111         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
10112
10113         * class.c (mono_class_vtable): use domain mempool to allocate vtable
10114         (mono_class_proxy_vtable): use domain mempool
10115
10116 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
10117
10118         * appdomain.h, appdomain.c: split initialization that requires the
10119         execution engine support into mono_runtime_init().
10120
10121 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
10122
10123         * class.c (mono_class_init): don't include vtable inside MonoClass
10124         to save some memory, gather some statistics.
10125         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
10126
10127 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
10128
10129         * icall.c: internalcall implementation for ValueType.Equals().
10130
10131 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
10132
10133         * object.c (mono_message_init): moved 
10134         (mono_runtime_exec_main): new arch. independent impl.
10135         (mono_runtime_invoke_array): new method - like
10136         mono_runtime_invoke, but you can pass an array of objects.
10137         (mono_remoting_invoke): new arch. independent impl.
10138         (mono_message_invoke): new arch. independent impl.
10139         (mono_runtime_class_init): new arch. independent impl.
10140         (mono_runtime_object_init): new arch. independent impl.
10141
10142 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
10143
10144         * metadata.c, object.c, reflection.c: documented the exported
10145         functions.
10146
10147 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
10148
10149         * icall.c: simpler code to pass the assembly builder data to corlib.
10150         Implement GetNestedTypes() internalcall.
10151
10152 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
10153
10154         * class.c: warn if a type can't be loaded.
10155
10156 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
10157
10158         * image.h: typedef MonoImageOpenStatus
10159         * types.h: removed unused file
10160         
10161 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
10162
10163         * icall.c: Enum_ToObject accepts enum value arguments.
10164
10165 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
10166
10167         * class.c: move initialization of properties, events and nested
10168         classes, so that they happen for interfaces, too.
10169
10170 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
10171
10172         * icall.c: cleanup some ugly casts in Array_SetValue*.
10173
10174 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
10175
10176         * icall.c: the values array fro enums is of the correct type, now.
10177         Implement (correctly) getFullName instead of assQualifiedName for
10178         MonoType.
10179         * reflection.h, reflection.c: added mono_type_get_name ().
10180
10181 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
10182
10183         * assembly.c, image.h: for each MonoImage, record from wich assembly
10184         it was loaded.
10185         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
10186         Make Type.Assembly work.
10187
10188 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
10189
10190         * debug-symfile.h: use char* instead of gpointer to avoid
10191         unnecessary casts.
10192
10193         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
10194
10195         * icall.c (ves_icall_InternalExecute): impl. FielSetter
10196         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
10197
10198 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
10199
10200         * icall.c (mono_message_init): impl. (code cleanup)
10201         (ves_icall_InternalExecute): impl. FieldGetter
10202
10203         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
10204         defined we call all (non-static)methods through the vtable. 
10205
10206 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
10207
10208         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
10209         finalizer even though the memory is still referenced (and the chunk of
10210         memory is not freed).
10211
10212 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
10213
10214         * assembly.c: fix brokeness.
10215
10216 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
10217
10218         * class.c: kill some warnings. Check explicit interface method
10219         implementation also without considering the namespace.
10220         Load also literal strings in static class data.
10221
10222 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
10223
10224         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
10225         (default_assembly_name_resolver): Make the resolver take the
10226         "base" directory where the assembly was originally defined, so we
10227         can load DLLs that are in the same directory as the assembly that
10228         is being referenced.
10229
10230 2002-03-28  Dick Porter  <dick@ximian.com>
10231
10232         * file-io.h: 
10233         * file-io.c:
10234         * socket-io.c: 
10235         * unicode.h: 
10236         * unicode.c: Warning cleanups
10237
10238 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
10239
10240         * object.h, reflection.h: use the correct type instead of MonoObject.
10241
10242 2002-03-28  Martin Baulig  <martin@gnome.org>
10243
10244         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
10245         (mono_debug_update_symbol_file): Initialize classes if necessary.
10246
10247 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10248
10249         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
10250         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
10251
10252 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
10253
10254         * assembly.h: fix function prototype.
10255         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
10256         * mono-endian.h: use const cast.
10257
10258 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
10259
10260         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
10261
10262 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10263
10264         * loader.c: don't assert when a typeref can't be loaded, give
10265         a chance to the runtime to trow an exception instead.
10266         * loader.h: fix warning.
10267
10268 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
10269
10270         * class.c (mono_class_proxy_vtable): added proxy support
10271
10272 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
10273
10274         * icall.c: removed last of PAL calls, added System.Environment
10275         * file-io.h, file-io.c: MonoIO implementation
10276         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
10277
10278 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10279
10280         * appdomain.c: do not use the byte marker in ldstr table lookup.
10281         * debug-helpers.c: allow two ':' to separate class and method name.
10282         * object.c: allocate arrays bounds with the GC, too.
10283         * verify: add a few more checks.
10284
10285 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
10286
10287         * reflection.c: output also literal strings. Allocate parameter data
10288         with GC_malloc() (thanks, Martin, for catching this!).
10289
10290 2002-03-26  Martin Baulig  <martin@gnome.org>
10291
10292         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
10293         include the `this' offset in the `param_offsets'.
10294
10295 2002-03-25  Martin Baulig  <martin@gnome.org>
10296
10297         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
10298         mono_debug_get_class() function to get the classes. Added new
10299         relocation types for arrays and strings.
10300         (mono_debug_get_class): New static function to search in all
10301         referenced assemblies for a metadata token.
10302
10303         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
10304
10305 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10306
10307         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
10308         hold gc-allocated objects. Make the string heap a stream like the
10309         others. Removed duplicated code when writing stream info.
10310         Added asserts to catch possible buffer overflows. Set the sorted map
10311         for tables that need sorting. Added some documentation.
10312
10313 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
10314
10315         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
10316         for interned strings and vtables.
10317
10318 2002-03-24  Martin Baulig  <martin@gnome.org>
10319
10320         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
10321         it in the array since it was created with g_slist_prepend().
10322
10323 2002-03-24  Martin Baulig  <martin@gnome.org>
10324
10325         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
10326         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
10327         (mono_debug_method_from_token): Renamed to
10328         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
10329         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
10330
10331         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
10332         relocation types.
10333
10334         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
10335
10336 2002-03-24  Martin Baulig  <martin@gnome.org>
10337
10338         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
10339         (mono_debug_method_from_token): New func.
10340
10341         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
10342         New interncall, calls mono_debug_local_type_from_signature().
10343         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
10344         calls mono_debug_method_from_token().
10345
10346 2002-03-23  Martin Baulig  <martin@gnome.org>
10347
10348         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
10349         specifies the number of bytes to be converted, not the array size.
10350         Return the number of chars, not the number of bytes.
10351         (ves_icall_iconv_get_chars): The `byteCount' argument
10352         specifies the number of bytes to be converted, not the array size.
10353
10354 2002-03-23  Martin Baulig  <martin@gnome.org>
10355
10356         * reflection.h (MonoReflectionSigHelper): New type.
10357
10358         * reflection.c (mono_reflection_sighelper_get_signature_local),
10359         (mono_reflection_sighelper_get_signature_local): New functions.
10360
10361         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
10362         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
10363         interncalls.
10364
10365 2002-03-23  Martin Baulig  <martin@gnome.org>
10366
10367         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
10368         is_writeable is set.
10369         (mono_raw_buffer_update): New function to write the modified map
10370         back to disk.
10371
10372         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
10373
10374         * debug-symfile.c (mono_debug_update_symbol_file): Call
10375         mono_raw_buffer_update() when done writing.
10376
10377 2002-03-23  Martin Baulig  <martin@gnome.org>
10378
10379         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
10380
10381         * debug-symfile.c: Added support for arguments and local variables.
10382
10383 2002-03-23  Dick Porter  <dick@ximian.com>
10384
10385         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
10386         protected by ifdefs, hence breaking the w32 build.
10387
10388 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10389
10390         * object.c: implement is_interned() the right way.
10391
10392 2002-03-21  Martin Baulig  <martin@gnome.org>
10393
10394         * debug-symfile.[ch]: New files to handle debugging information
10395         files. There's also support to dynamically update these symbol
10396         files to include machine dependent information.
10397
10398 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
10399
10400         * threads.c (mono_thread_create): new function to create thread
10401         from C
10402
10403 2002-03-20  Martin Baulig  <martin@gnome.org>
10404
10405         * icall.c (ves_icall_InternalInvoke): Create a new object if the
10406         method is a constructor.
10407         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
10408         points to ves_icall_InternalInvoke().
10409
10410 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
10411
10412         * file-io.c: Flush shouldn't throw exceptions.
10413
10414 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
10415
10416         * file-io.c: FileStream flush support; FileSetLength now
10417         restores file pointer.
10418
10419 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10420
10421         * class.c: set image for pointer classes.
10422
10423 2002/03/19  Nick Drochak <ndrochak@gol.com>
10424
10425         * sysmath.c: Forgot one.
10426
10427 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
10428
10429         * sysmath.c: Avoid redefining existing names.
10430
10431 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
10432
10433         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
10434         handled by runtime as icall rather than dllimport from libm.so
10435         * file-io.c, file-io.h: fixed handle argument type.
10436
10437 2002-03-18  Dick Porter  <dick@ximian.com>
10438
10439         * reflection.c (mono_image_get_type_info): rename interface to
10440         iface, because of "#define interface struct" on windows.
10441
10442 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
10443
10444         * class.c, class.h: rename and export mono_ptr_class_get().
10445         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
10446         * reflection.c, reflection.h, icall.c: better/saner type name
10447         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
10448         method signatures.
10449
10450 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
10451
10452         * class.c (mono_class_init): removed hardcoded GHC_SLOT
10453
10454         * icall.c (ves_icall_InternalInvoke): impl.
10455
10456 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10457
10458         * reflection.c: output the interface map table, too.
10459
10460 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
10461
10462         * class.c (class_compute_field_layout): separate computation of 
10463         static field layout
10464
10465 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
10466
10467         * icall.c: added System.Buffer support.
10468         * file-io.c: moved file icalls from PAL to FileStream.
10469
10470 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
10471
10472         * icall.c (ves_icall_System_Object_GetHashCode): impl.
10473
10474 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
10475
10476         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
10477
10478 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10479
10480         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
10481
10482 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10483
10484         * debug-helpers.{c,h}: moved here from monograph some useful functions
10485         to locate a method by name/signature in a class or image. Included
10486         also a small and flexible IL disassembler.
10487
10488 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10489
10490         * reflection.c: fixup tokens in methods with small header size, too.
10491
10492 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
10493
10494         * object.c (mono_string_to_utf8): remove assert(!error), instead
10495         print a warning. 
10496
10497 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
10498
10499         * icall.c: update to the new mono_Array_class_get interface.
10500
10501 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10502
10503         * appdomain.c, object.c: Boehm-GC enable.
10504         * icall.c: make get_data_chunk() support split data requests.
10505         Ensure a class is initialized in more cases. Return only the first
10506         property found in GetProperties() or the compiler gets confused. 
10507         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
10508         * reflection.h, reflection.c: add fixup mechanism for field and method
10509         tokens. Initialize assembly->typeref in a single place. Output
10510         properties after events. Support custom attributes for events, too.
10511         Typo fix for paramter custom attrs.
10512
10513 2002-03-07  Martin Baulig  <martin@gnome.org>
10514
10515         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
10516
10517 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
10518
10519         * class.c (mono_array_class_get): fix. for multi. dim. arrays
10520
10521 2002-03-06  Martin Baulig  <martin@gnome.org>
10522
10523         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
10524         non-zero lower bounds. See testcases #F10-#F13.
10525
10526 2002-03-05  Martin Baulig  <martin@gnome.org>
10527
10528         * exception.c (mono_get_exception_argument_out_of_range): New exception.
10529
10530         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
10531         ves_icall_System_Array_GetValue(), only calculate the absolute array position
10532         here.
10533         (ves_icall_System_Array_SetValue): Likewise.
10534         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
10535         as argument and does the actual work. This function is used when copying a
10536         multi-dimensional array.
10537         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
10538         now do all the widening conversions of value types.
10539         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
10540
10541 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10542
10543         * class.c: remove some magic numbers and use the smbolic names,
10544         instead. Added init_events() to load event info at class init time.
10545         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
10546         and mono_metadata_methods_from_event().
10547         * reflection.h, reflection.c: added support for writing out the evnets
10548         related information.
10549
10550 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10551
10552         * reflection.h, icall.c: use a different method (GetInterfaces)
10553         to gather interface info and add isbyref, isprimitive and
10554         ispointer to the ves_icall_get_type_info() return value.
10555
10556 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10557
10558         * class.h: stared adding support for events.
10559         * icall.c: split find_members implementation. Added debug icall to get
10560         the address of an object.
10561         * reflection.c: handle TypeBuilders in mono_type_get_object().
10562
10563 2002-03-01  Martin Baulig  <martin@gnome.org>
10564
10565         * icall.c (ves_icall_System_Array_GetLength): This must throw an
10566         ArgumentOutOfRangeException(), not an ArgumentException().
10567         (ves_icall_System_Array_GetLowerBound): Likewise.
10568         (ves_icall_System_Array_GetValue): Improved argument checking.
10569         (ves_icall_System_Array_SetValue): Improved argument checking.
10570
10571 2002-03-01  Martin Baulig  <martin@gnome.org>
10572
10573         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
10574         called with invalid arguments rather than just dying with g_assert().
10575         (ves_icall_System_Array_SetValue): Likewise.
10576         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
10577         raise a NotImplementedException instead.
10578         (ves_icall_System_Array_GetLength): Added argument checking.
10579         (ves_icall_System_Array_GetLowerBound): Added argument checking.
10580
10581 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
10582
10583         * object.h (mono_assert): new macros mono_assert and
10584         mono_assert_not_reached
10585
10586 2002-02-28  Martin Baulig  <martin@gnome.org>
10587
10588         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
10589         and "System::String::IsInterned" to "System::String::_IsInterned".
10590
10591 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
10592
10593         * icall.c: remove hacks for typebuilder. Added icall to create a
10594         modified type from a tybebuilder.
10595         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
10596         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
10597         to create a backing MonoClass for a TypeBuilder.
10598
10599 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10600
10601         * class.c, class.h: more refactoring of class init.
10602         Export mono_class_setup_mono_type() and mono_class_setup_parent().
10603
10604 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
10605
10606         * marshal.c, marshal.h: start of marshaling interface.
10607
10608 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10609
10610         * icall.c: fix order in assembly qualified name icall.
10611
10612 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10613
10614         * class.c: do not free str, since we store it in the hash table.
10615         * reflection.h: add label field to MonoILExceptionInfo.
10616         * reflection.c: handle references to more than one assembly. Handle
10617         case when there isn't a module created in the assembly.
10618
10619 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10620
10621         * class.c: Fix typo. Start refactoring of class init code.
10622
10623 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10624
10625         * appdomain.c: exit with 1 on error.
10626         * class.c: we already have the name in MonoClassField.
10627         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
10628         MonoStreamHeader instead of an offset of image->raw_metadata.
10629
10630 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
10631
10632         * appdomain.c (mono_init): Be even more descriptive about the error.
10633
10634 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
10635
10636         * appdomain.c: give the user an informative message when corlib can't
10637         be loaded.
10638
10639 2002-02-26  Martin Baulig  <martin@gnome.org>
10640
10641         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10642         New icall to get the time zone data.
10643
10644 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10645
10646         * reflection.c: set virtual and raw size of section correctly.
10647         * threads.c: transfer domain information to newly created threads.
10648
10649 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10650
10651         * class.c: when instancing a class in a domain, load the default
10652         vaules for static fields from the constant table. Fix System.Enum to
10653         not be an enum.
10654         * icall.c: implement Object::GetType() internalcall. Implemented
10655         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
10656         Fixed checking of binding flags in find_members().
10657         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
10658         * reflection.c: handle enumerations when writing to the constant
10659         table. Use a different object cache for types.
10660
10661
10662 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
10663
10664         * object.c (mono_object_isinst): fix for arrays
10665
10666         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
10667
10668 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10669
10670         * object.c: don't use mprotect ()  and fix intern pool hash table
10671         lookup for big endian systems.
10672
10673 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10674
10675         * icall.c: change type_is_subtype_of () signature.
10676
10677 2002-02-21  Mark Crichton  <crichton@gimp.org>
10678
10679         * rand.c, rand.h: Added random number generator for
10680         System.Security.Cryptography classes.
10681
10682         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
10683
10684         * icall.c: Added System.Security.Cryptography calls.
10685
10686 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10687
10688         * class.c, icall.c, metadata.c: better support for pointer types.
10689         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
10690         * reflection.c: Add support for getting custom attrs for properties
10691         and simplify some code.
10692
10693 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10694
10695         * icall.c: change getToken () and add custom attribute GetBlob()helper
10696         method.
10697         * reflection.h: add custom attrs array to the reflection builder structures.
10698         * reflection.c: encode and emit custom attributes for all the relevant
10699         reflection objects. Cache fieldref and methodref tokens. Change
10700         mono_image_create_token() interface to take a MonoDynamicAssembly.
10701         More complete custom attributes decoder. Load custom attributes for
10702         Assembly, Field, Method and Constructor objects, too. Make the
10703         returned array an Attribute[] one, not object[]. Added
10704         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
10705         custom attribute constructor.
10706
10707 2002-02-20  Dick Porter  <dick@ximian.com>
10708
10709         * icall.c:
10710         * rawbuffer.c:
10711         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
10712         problem code out for now).
10713
10714 2002-02-19  Radek Doulik  <rodo@ximian.com>
10715
10716         * object.c (mono_ldstr): use hash table to avoid multiple swapping
10717
10718 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
10719
10720         * icall.c: register the GetCustomAttributes method.
10721         * object.c, object.h: add mono_string_new_len ().
10722         * reflection.h, reflection.c: added mono_runtime_invoke(),
10723         mono_install_runtime_invoke(). Added
10724         mono_reflection_get_custom_attrs () to load custom attributes and
10725         create the attribute objects.
10726
10727 2002-02-19  Dick Porter  <dick@ximian.com>
10728         * threads-dummy-types.c:
10729         * threads-dummy-types.h:
10730         * threads-dummy.c:
10731         * threads-dummy.h:
10732         * threads-pthread-types.c:
10733         * threads-pthread-types.h:
10734         * threads-pthread.c:
10735         * threads-pthread.h:  Deleted obsolete files
10736
10737 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
10738
10739         * class.c (mono_class_vtable): runtime init the class when we
10740         allocate static class data.
10741
10742         * icall.c (ves_icall_System_Array_SetValue): check for null values.
10743
10744         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
10745         and String - but we will need generic marshalling support in the
10746         future. 
10747         (mono_init): set the domain name in a ms compatible way
10748
10749         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
10750         String[].
10751
10752 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
10753
10754         * object.c (mono_array_clone): use alloca() instead of g_malloc  
10755         for sizes
10756
10757         * appdomain.c (mono_domain_unload): impl.
10758
10759 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10760
10761         * appdomain.c, object.c: fix intern pool implementation.
10762         * class.c: fix alignment code.
10763
10764 2002-02-16  Radek Doulik  <rodo@ximian.com>
10765
10766         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
10767         and s2 > s1, just copy lower bytes to be compatible with little
10768         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
10769         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
10770
10771         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
10772         force big_endian to be 1 for big endian machines 
10773         (ves_icall_iconv_new_decoder): ditto
10774
10775 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
10776
10777         * socket-io.c (convert_sockopt_level_and_name): If the system
10778         doesn't define SOL_IP or SOL_TCP, get them by hand using
10779         getprotobyname() and caching the values (because this could be a
10780         slow operation).
10781         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
10782         Use the appropriate struct when the system does support it. Ie,
10783         not all systems have struct ip_mreqn so use struct ip_mreq when
10784         appropriate.
10785
10786 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
10787
10788         * reflection.c: handle finally clauses.
10789
10790 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
10791
10792         * socket-io.c: use g_snprintf() instead of snprintf.
10793
10794 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
10795
10796         * reflection.c (mono_param_get_objects): Cast second argument to
10797         mono_method_get_param_names to a const char** to silence the
10798         compiler warning.
10799
10800         * appdomain.c (mono_domain_assembly_open): Put parens around the
10801         truth statement in the for-loop.
10802
10803         * unicode.c (iconv_convert): Got rid of a compiler warning about
10804         int i being unused when the system has a new iconv.
10805         (iconv_get_length): Same.
10806
10807         * image.c (load_class_names): Cast the second argument to
10808         g_hash_table_insert() to char* to hush compiler warnings about the
10809         arg being a const.
10810         (mono_image_open): Same here.
10811
10812         * socket-io.c: Don't conditionally include sys/filio.h or
10813         sys/sockio.h here anymore since we now get them from
10814         io-layer/io-layer.h
10815         (inet_pton): If the system doesn't support inet_aton, implement
10816         using inet_addr and also #define INADDR_NONE if it isn't defined
10817         by the system.
10818
10819 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10820
10821         * metadata.c, metadata.h: added function to get packing and size info
10822         of a typedef.
10823         * reflection.h, reflection.c: handle field RVA data. Save info about
10824         the table layout if needed. Assign typedef indexes to all the types
10825         before dumping the info about them to avoid forward reference problems.
10826
10827 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
10828
10829         * socket-io.c (convert_sockopt_level_and_name): ifdef
10830         SO_ACCEPTCONN because it is not defined on my system (old debian)
10831
10832 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10833
10834         * opcode.c: use stddef.h to get NULL.
10835
10836 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
10837
10838         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
10839         for FIONBIO, FIONREAD and SIOCATMARK.
10840         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
10841         define INADDR_NONE and besides, inet_addr() is deprecated and
10842         should not be used. Use inet_pton() instead - it also has the
10843         added bonus that it can easily handle IPv6 addresses as well.
10844         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
10845
10846 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10847
10848         * decimal.c: remove _MSC_VER conditional.
10849
10850 2002-02-13  Dick Porter  <dick@ximian.com>
10851
10852         * socket-io.c: 
10853         * icall.c: Internal calls for Blocking, Select, Shutdown,
10854         GetSocketOption and SetSocketOption
10855
10856 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10857
10858         * assembly.cs: better resolver: use it instead of some kludgy
10859         code.
10860
10861 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
10862
10863         * reflection.c: the best way to speed-up the compiler is to avoid
10864         infinite loops.
10865
10866 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
10867
10868         * class.c (mono_class_vtable): changed the object layout
10869         (obj->vtable->class). 
10870         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
10871
10872 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10873
10874         * assembly.c: look for assemblies in the assembly dir, too.
10875
10876 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10877
10878         * class.c: fix thinko in mono_class_from_type().
10879
10880 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10881
10882         * exception.h, exception.c: added TypeLoadException.
10883         * object.h, object.c: added mono_array_clone ().
10884         * icall.c: handle throwOnError in AssemblyGetType().
10885         Added Array.Clone().
10886         * opcode.h, opcode.c: use a single value for the opcode val.
10887         Compile fix for non-gcc compilers.
10888
10889 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
10890
10891         * opcodes.c, opcodes.h: export interesting info about opcodes.
10892
10893 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
10894
10895         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
10896         icalls. 
10897
10898         * class.c (class_compute_field_layout): set element_class for enums
10899         (mono_class_create_from_typedef): set element_class for normal classes
10900
10901         * icall.c (ves_icall_System_Enum_get_value): impl.
10902
10903         * class.c (mono_class_create_from_typedef): do not set valuetype
10904         flag for System.ValueType and System.Enum
10905
10906 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
10907
10908         * unicode.c (iconv_convert): fix big endian problem.
10909
10910 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10911
10912         * class.c: add asserts if we are ever going to scribble over memory.
10913         * socket-io.c: not all systems have AF_IRDA defined.
10914
10915 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
10916
10917         * class.c (class_compute_field_layout): do not consider static
10918         fields to compute alignment
10919
10920 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
10921
10922         * appdomain.c (mono_appdomain_get): impl.
10923         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
10924
10925 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10926
10927         * icall.c: ignore "file://" prefix when loading an assembly.
10928
10929 2002-01-23  Dick Porter  <dick@ximian.com>
10930
10931         * socket-io.c:
10932         * icall.c:
10933         * Makefile.am: Added socket support
10934
10935 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
10936
10937         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
10938         code back.  This should return the assemblies that are loaded by
10939         the runtime on behalf of an application domain. 
10940
10941         The current implementation is still broken, it just returns every
10942         assembly loaded, but until we get real applications domain this
10943         will do.
10944
10945 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
10946
10947         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
10948         AppDomain object.
10949
10950 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
10951
10952         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
10953         the mono_class_from_name lookup.
10954         (ves_icall_get_parameter_info): ditto.
10955         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
10956         method.
10957         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
10958
10959 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10960
10961         * class.c: load also nested classes on class init.
10962         System.ValueType instance methods gets passed boxed
10963         values, unless methods in derived classed that get a pointer to the
10964         data.
10965         * icall.c: use better name parsing code in GetType().
10966         * image.c, image.h: add mono_image_loaded ().
10967         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
10968         * reflection.c, reflection.h: added mono_reflection_parse_type().
10969
10970 2002-01-22  Veronica De Santis <veron78@interfree.it>
10971
10972         * icall.c : Added mapping of internal calls for Manual and Auto reset events
10973         * threads.c : Added the implementation of internal calls for events
10974         * threads.h : Added prototypes of internal calls for events
10975         
10976 2002-01-21  Radek Doulik  <rodo@ximian.com>
10977
10978         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
10979
10980 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
10981
10982         * class.c (mono_class_init): set min_align to 1 (instead of 0)
10983         (mono_class_value_size): use min_align
10984
10985 2002-01-20  Dick Porter  <dick@ximian.com>
10986
10987         * threads.h:
10988         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
10989         so it compiles on w32.
10990
10991 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
10992
10993         * metadata.c (mono_type_stack_size): impl.
10994
10995         * class.c (mono_class_get_field): impl. memberref token
10996
10997 2002-01-16 Veronica De Santis <veron78@@interfree.it>
10998
10999         * icall.h : Added the internal calls mapping for CreateMutex_internal
11000                     and ReleaseMutex_internal.
11001         * threads.h : Added the prototype of mutexes internal calls.
11002         * threads.c : Added the implementations of mutexes internal calls.
11003
11004 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
11005
11006         * metaparse.h: removed unused file.
11007         * reflection.c, reflection.h: added stream_data_align () function 
11008         to align data in streams and keep stream aligned. Add support for
11009         exception support in method headers.
11010
11011 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
11012
11013         * unicode.c: make iconv_convert () return the number of bytess written
11014         in the output buffer.
11015
11016 2002-01-15  Dick Porter  <dick@ximian.com>
11017         * threads.c: Make the runtime's idea of infinite timeouts coincide
11018         with the class library's
11019
11020         Fix a particularly egregious bug in mono_thread_cleanup(). That
11021         code was so utterly bogus it must have been written on a Monday.
11022
11023 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
11024
11025         * reflection.h: add subtypes field to TypeBuilder.
11026         * reflection.c: encode constants for literal fields.
11027         Handle subtypes. Fix user string token (and add a zero byte)
11028         at the end.
11029         
11030 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
11031
11032         * class.c (mono_class_init): bug fix: assign slot numbers for
11033         abstract methods.
11034
11035 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
11036
11037         * reflection.c: don't try to output a code RVA for abstract methods.
11038         Small fixes for method header format. Output parameter info to the
11039         ParamDef table. Save method overriding info to MethodImpl table.
11040         Fix property support. Allow typedef.extends to be a type in the
11041         building assembly.
11042         * verify.c: fix off-by-one error.
11043
11044 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
11045
11046         * class.c: fix mono_class_from_mono_type () for szarray types.
11047         Remove unused cache check in mono_class_from_type_spec().
11048         * icall.c: *type_from_name () functions handle simple arrays and byref.
11049         * reflection.c: handle byref and szarray types. Handle methods without
11050         body (gets P/Invoke compilation working). Handle types and fields in
11051         get_token ().
11052         * reflection.h: add rank to MonoTypeInfo.
11053
11054 2002-01-10  Dick Porter  <dick@ximian.com>
11055
11056         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
11057         internal calls
11058
11059 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
11060
11061         * icall.c: initialize class in type_from_handle ().
11062         Loop also in parent classes for get_method ().
11063         * reflection.c: properly encode class and valuetype types.
11064         Start on encoding TypeBuilder types. Handle fieldrefs.
11065         Use correct length when registering a user string.
11066         Handle ConstructorBuilder and MonoMethod in get_token ().
11067         Make mono_type_get_object () aware of cached types.
11068         * object.c: back out change to mono_string_new ().
11069
11070 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
11071         * object.c: mono_string_new should return a NULL when the string 
11072         passed in is NULL -- not try to deference it.
11073         
11074 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
11075
11076         * icall.c: hack to make IsSubType work for TypeBuilders.
11077         * reflection.c: emit constructors before methods.
11078         Retrieve param names in mono_param_get_objects().
11079
11080 2002/01/05  Nick Drochak  <ndrochak@gol.com>
11081
11082         * Makefile.am: fix list of headers and sources so automake 1.5
11083         doesn't complain. Removed \# at end of list.
11084
11085 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
11086
11087         * reflection.c: get token for a method ref. Set return type of
11088         constructor to void.
11089         * loader.c: debug message.
11090         * class.c: typo fix.
11091
11092 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
11093
11094         * icall.c: fix array init with rank > 1. FindMembers
11095         loops in parent class as well.
11096         * image.c: do not insert nested types in name cache.
11097         * reflection.c: warning fix.
11098         * reflection.h: add override method (for interface impl).
11099
11100 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
11101
11102         * metadata.c: fix customattr decoding.
11103
11104 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
11105
11106         * rawbuffer.cs: Added native Win32 implementation, avoids using
11107         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
11108
11109 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
11110
11111         * class.c: make the low-level routines handle the cache.
11112
11113 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
11114
11115         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
11116
11117 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
11118
11119         * class.c: fix mono_array_element_size() for objects.
11120         * class.h, class.c: add properties to MonoClass and load them
11121         at init time.
11122         * icall.c: check with isinst() when assigning a value to an array
11123         instead of requiring the classes to match exactly.
11124         Implemented icall for System.Type::GetType().
11125         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
11126         enums. Handle bindingflags when looking for methods and fields.
11127         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
11128         and mono_metadata_methods_from_property().
11129         * reflection.h, reflection.c: added structures for propreties,
11130         parameters and enums. Implemented mono_property_get_object() and
11131         mono_param_get_objects().
11132
11133 2001-12-18  Dick Porter  <dick@ximian.com>
11134
11135         * file-io.c: Use mono_string_to_utf16() instead of
11136         mono_string_chars()
11137
11138         * object.c: Added mono_string_to_utf16(), which copies the non
11139         NULL-terminated MonoString into a new double-null-terminated
11140         buffer.
11141
11142 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
11143
11144         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
11145
11146 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
11147
11148         * file-io.c: raise exceptions if handle is invalid.
11149
11150 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
11151
11152         * assembly.c: yet another check for mscorlib.
11153         * class.c, class.h: load nesting info for classes.
11154         * icall.c: many new functions to support the Reflection classes.
11155         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
11156         * reflection.h, reflection.c: mono_image_create_token(),
11157         mono_assembly_get_object(), mono_type_get_object(),
11158         mono_method_get_object(), mono_field_get_object(): methods to return
11159         objects that parallel the C representation of assemblies, types,
11160         methods, fields.
11161
11162 2001-12-11  Dick Porter  <dick@ximian.com>
11163
11164         * icall.c:
11165         * file-io.c: Internal calls for file IO.
11166
11167 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
11168
11169         * tabledefs.h: missing FileAttributes.
11170         * verify.h, verify.c: use is_valid_string () to simplify and check for
11171         valid strings more correctly. Fix warnings and speeling.
11172         Check more tables: Filed, File, ModuleRef, StandAloneSig.
11173         Check code: branches, maxstack, method calls.
11174
11175 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
11176
11177         * object.c (mono_object_allocate): removed static, so that the jit
11178         can allocate value types.
11179
11180         * icall.c (ves_icall_System_DateTime_GetNow): impl.
11181
11182 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11183
11184         * class.c: init enum types right away and register the
11185         token->MonoClass map in mono_class_create_from_typedef ().
11186         * verify.h, verify.c: first cut of the verifier.
11187         * pedump.c: add --verify switch to verify metadata tables.
11188         * tabledefs.h: add some missing enums.
11189
11190 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
11191
11192         * class.c (mono_install_runtime_class_init): impl.
11193         (mono_class_init): renamed mono_class_metadata_init to
11194         mono_class_init, also removed the metadata_inited flag
11195
11196         * object.c (mono_object_isinst): use faster algorithm
11197
11198 2001-11-30  Radek Doulik  <rodo@ximian.com>
11199
11200         * mono-endian.h: reverted last change
11201         added function prototypes
11202
11203         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
11204         add mono-endian.c back
11205
11206         * mono-endian.c: returned back, as Paolo pointed out, it's needed
11207         for unaligned access, I've mistaked it with endianess. I am
11208         sorry.
11209         (mono_read16): fix reverted endianess
11210         (mono_read64): ditto
11211         (mono_read32): ditto
11212
11213 2001-11-30  Dick Porter  <dick@ximian.com>
11214
11215         * exception.c: Implement mono_exception_from_name()
11216
11217 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
11218
11219         * metadata.h, metadata.c: remove params_size and locals_size and their
11220         calculation from the metadata code: they are only usefult to the
11221         interp.
11222
11223 2001-11-29  Radek Doulik  <rodo@ximian.com>
11224
11225         * object.c (mono_ldstr): swap bytes here, it's probably not the
11226         best place, but works for me now, I'll redo it once I know mono
11227         better, also note that I add PROT_WRITE and don't reset back, also
11228         note that it's only affects big endians, so x86 should be OK
11229
11230         * mono-endian.h (read16): use just glib macros for both endians
11231
11232         * mono-endian.c: removed as glib macros are used in in
11233         mono-endian.h so we don't need to care about endianess for read
11234         macros as glib does that for us already
11235
11236 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
11237
11238         * class.h, class.h: take minimum alignment into consideration so
11239         that the fields of a class remain aligned also when in an array.
11240
11241 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11242
11243         * loader.h, loader.c: add mono_method_get_param_names().
11244         * class.c: 0-init class fields.
11245
11246 2001-11-26  Dick Porter  <dick@ximian.com>
11247
11248         * icall.c:
11249         * threads-types.h:
11250         * threads.c: New file that handles System.Threading on all platforms
11251
11252         * object.c: 
11253         * object.h: Remove the synchronisation struct from MonoObject,
11254         replace it with a pointer that gets initialised on demand
11255
11256         * Makefile.am: Replace all the system-specific threading code with
11257         a single file that uses the new wrapper library
11258
11259 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
11260
11261         * class.c, class.h: add mono_install_trampoline() so that the runtime
11262         can register a function to create a trampoline: removes the ugly
11263         requirement that a runtime needed to export arch_create_jit_trampoline.
11264         * object.h, object.c: added mono_install_handler() so that the runtime
11265         can install an handler for exceptions generated in C code (with
11266         mono_raise_exception()). Added C struct for System.Delegate.
11267         * pedump.c: removed arch_create_jit_trampoline.
11268         * reflection.c: some cleanups to allow registering user strings and
11269         later getting a token for methodrefs and fieldrefs before the assembly
11270         is built.
11271         * row-indexes.h: updates and fixes from the new ECMA specs.
11272
11273 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
11274
11275         * class.h, class.c: add enum_basetype field to MonoClass.
11276         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
11277         to get index in the constant table reated to a field, param or
11278         property.
11279         * reflection.h, reflection.c: handle constructors. Set public-key and
11280         version number of the built assembly to 0.
11281         * row-indexes.h: update from new ECMA spec.
11282
11283 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
11284
11285         * class.h, class.c: add a max_interface_id to MonoClass.
11286         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
11287         since it's used to do that. Added mono_type_type_from_obj().
11288         Make GetType() return NULL instead of segfaulting if the type was not
11289         found. Handle simple arrays in assQualifiedName.
11290         * object.h: add a struct to represent an Exception.
11291         * reflection.c: output call convention in method signature.
11292         Add code to support P/Invoke methods and fixed offsets for fields.
11293
11294 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
11295
11296         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
11297         the value.
11298         * icall.c: use mono_array_addr instead of array->vector: fixes the
11299         reflection image writing.
11300         * reflection.c: init call convention byte to 0 in method signature.
11301         Encode the property signature. Don't output property-related methods
11302         twice. Really process the properties for a type (don't cast a field to
11303         a property, my mom always told me that).
11304         Fix 64 bit issues in pointer alignment in a different and more
11305         readable way.
11306
11307 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
11308
11309         * loader.h: Removed type class from MonoDefaults, added monotype
11310
11311         * loader.c: Loaded MonoType, removed loading of Type
11312
11313         * icall.c (my_mono_new_object): Now returns a System.MonoType,
11314         and fills in System.Type._impl with a RuntimeTypeHandle rather
11315         than the actual MonoClass *
11316
11317         (ves_icall_type_from_handle): change from type_class to
11318         monotype_class
11319
11320         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
11321         implemented
11322
11323         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
11324         implemented
11325
11326         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
11327
11328         (ves_icall_System_Reflection_Assembly_GetType): implemented
11329
11330         (ves_icall_System_MonoType_assQualifiedName): implemented
11331
11332         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
11333
11334 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
11335
11336         * assembly.c (mono_assembly_open): Implement a cache for the
11337         assemblies. 
11338
11339         (mono_assembly_close): only destroy the assembly when the last
11340         reference is gone.
11341         
11342 2001-11-09  Dick Porter  <dick@ximian.com>
11343
11344         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
11345
11346 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
11347
11348         * class.c (mono_class_metadata_init): bug fix: compute the right slot
11349
11350 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
11351
11352         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
11353         from Martin Weindel.
11354         * object.h: add mono_string_chars ().
11355
11356 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
11357
11358         * reflection.c (build_compressed_metadata): Eliminates warnings
11359         and uses 64-bit clean code.
11360
11361         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
11362         (mono_type_equal): Change signature to eliminate warnings.
11363
11364 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11365
11366         * icall.c, loader.c: remove the internalcall array constructors.
11367         Changes to match the new MonoArray structure.
11368         * object.h, object.c: an array object doesn't allocate an extra
11369         vector. Add mono_array_new_full () to create jagged arrays easily.
11370
11371 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
11372
11373         * metadata.h, metadata.c: add mono_metadata_field_info () to
11374         retreive all the info about a field from vairous tables.
11375         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
11376         * class.h, class.c: augment MonoClassField with more info.
11377         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
11378         policy and load a field's RVA if needed.
11379
11380 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
11381
11382         * class.c (mono_class_metadata_init): create a trampoline for all
11383         virtual functions instead of actually compiling them.
11384
11385 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
11386
11387         * class.h, class.c: include name in MonoClassField.
11388         * class.c: fix fundamental type of System.Object and System.String.
11389         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
11390         tokens in ldtoken.
11391         * icall.c: remove internalcalls for the Reflection stuff that is now
11392         done in C# code.
11393         * loader.c: mono_field_from_memberref () implementation.
11394         * mono-endian.c: thinko (s/struct/union/g).
11395         * object.c, object.h: make the mono_string_* prototypes actually use
11396         MonoString instead of MonoObject.
11397         * reflection.c, reflection.h: updates for changes in the reflection
11398         code in corlib: we use C structures that map to the actual C# classes.
11399         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
11400         fat method header if needed and use the info from the ILGenerator for
11401         methods. Handle fields in types. Misc fixes.
11402
11403 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
11404
11405         * class.c (mono_class_metadata_init): bug fix: always allocate
11406         space for static class data
11407
11408 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
11409
11410         * class.c (mono_compute_relative_numbering): use relative
11411         numbering to support fast runtime type checks.
11412
11413 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
11414
11415         * class.c (mono_class_create_from_typeref): added debugging output
11416         to print class name when MonoDummy is returned instead of real class
11417
11418 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
11419
11420         * class.c (mono_class_metadata_init): interface offset table now
11421         contains pointers into the vtable - this is more efficient for the jit
11422
11423 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
11424
11425         * class.c (mono_class_metadata_init): use a temporary vtable (the
11426         old algorithm only worked for the interpreter, but not for the jit)
11427
11428 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
11429
11430         * loader.c (method_from_memberref): use mono_class_get to get the
11431         class of an array instead of using System.Array directly.
11432         (mono_get_method): also add MEMBERREF methods to the method cache
11433         which usefull for arrays.
11434
11435 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
11436
11437         * pedump.c (arch_compile_method): added to compute vtable entry
11438
11439         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
11440         number of interfaces.
11441         
11442         * class.h: merged MonoArrayClass into MonoClass
11443
11444         * class.c (mono_class_create_from_typedef): compute the vtable size and
11445         allocate space to include the vtable inside MonoClass
11446         (mono_class_metadata_init): initialize the vtable
11447
11448 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
11449
11450         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
11451         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
11452         * image.c: endian fixes by Laurent Rioux.
11453         * object.h, object.c: rename MonoStringObject to MonoString and
11454         MonoArrayObject to MonoArray. Change some function names to conform to
11455         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
11456         guint16* as first argument, so don't use char*.
11457         Provide macros to do the interesting things on arrays in a portable way.
11458         * threads-pthread.c: updates for the API changes and #include <sched.h>
11459         (required for sched_yield()).
11460         * icall.c: updates for the API changes above.
11461         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
11462         platforms that need them.
11463
11464 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11465
11466         * class.c: set the correct type for all the fundamental
11467         type when loading the class.
11468
11469 2001-10-05  Dick Porter  <dick@ximian.com>
11470
11471         * threads-pthread.c (pthread_mutex_timedlock): Simple
11472         compatibility version for C libraries that lack this call.
11473
11474 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11475
11476         * class.c: MonoTypes stored in MonoClass are stored as
11477         fundamental MonoTypes when the class represents a
11478         fundamental type (System.Int32, ...).
11479         The TypeHandle return by ldtoken is a MonoType*.
11480         * icall.c: ves_icall_get_data_chunk () write out all the
11481         PE/COFF stuff. Implement ves_icall_define_method (),
11482         ves_icall_set_method_body (), ves_icall_type_from_handle ().
11483         * image.c: properly skip unknown streams.
11484         * loader.h, loader.c: add type_class to mono_defaults.
11485         * metadata.c, metadata.h: export compute_size () as
11486         mono_metadata_compute_size () with a better interface.
11487         Typo and C&P fixes.
11488         * pedump.c: don't try to print the entry point RVA if there is no entry point.
11489         * reflection.c, reflection.h: many cleanups, fixes, output method
11490         signatures and headers, typedef and typeref info, compress the metadata
11491         tables, output all the heap streams, cli header etc.
11492         * row-indexes.h: typo fixes.
11493
11494 2001-10-04  Dick Porter  <dick@ximian.com>
11495
11496         * object.h: Add a synchronisation mutex struct to MonoObject
11497
11498         * object.c (mono_new_object): Initialise the object
11499         synchronisation mutexes
11500
11501         * icall.c: System.Threading.Monitor internal calls
11502         
11503         * threads-pthread.h:
11504         * threads-pthread.c: System.Threading.Monitor internal calls
11505
11506         * threads-types.h: New file, includes the system-specific thread
11507         structures
11508         
11509         * threads-pthread-types.h:
11510         * threads-pthread-types.c: New files, handle pthread-specific
11511         synchronisation types
11512
11513         * threads-dummy-types.h: 
11514         * threads-dummy-types.c: New files of dummy support for
11515         thread-specific types
11516
11517         * metadata.c:
11518         * image.c:
11519         * pedump.c: include mono-endian.h not endian.h
11520         
11521         * Makefile.am: More threads files.
11522         Name mono-endian.h not endian.h
11523
11524 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
11525
11526         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
11527         stuff and implement a few more bits.
11528         * icall.c: a field needs to be dereferenced twice. Do not use the same
11529         name for two variables in the same scope.
11530         * image.c, image.h: cleanups.
11531
11532 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
11533
11534         * class.c (mono_class_metadata_init): bug fix: compute the right size
11535
11536 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
11537
11538         * icall.c: implemented some of the Reflection internalcalls.
11539         * image.c, image.h: start writing out the PE/COFF image.
11540         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
11541         that does the reverse than decode_blob_size ().
11542         * object.c: use mono_metadata_encode_value (). Move here
11543         temporary implementation of mono_string_to_utf8 ().
11544         * rawbuffer.c: make malloc_map static.
11545
11546 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11547
11548         * metadata.c: fix type comparison for arrays.
11549         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
11550         Added a couple of new classes to monodefaults.
11551         * icall.c: added a couple of Reflection-related internalcalls.
11552         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
11553         Added a byval_arg MonoType to MonoClass.
11554
11555 2001-09-28  Dick Porter  <dick@ximian.com>
11556
11557         * icall.c:
11558         * threads-pthread.h: 
11559         * threads-pthread.c: Implemented internal calls for
11560         LocalDataStoreSlot operations.  Applied mutexes around all shared
11561         data.  Reworked the thread creation and Start() operations to
11562         avoid a race condition.
11563         
11564         * threads-dummy.h:
11565         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
11566
11567 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
11568
11569         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
11570
11571 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
11572
11573         * class.c, loader.c: warn and return NULL instead of erroring out.
11574         * icall.c: added System.AppDomain::getCurDomain().
11575         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
11576
11577 2001-09-25  Dick Porter  <dick@ximian.com>
11578
11579         * threads-pthread.h:
11580         * threads-pthread.c: Implemented timed thread joining and added
11581         System.Threading.Thread::Join_internal internal call
11582
11583         * icall.c: Added System.Threading.Thread::Join_internal internal call
11584
11585         * threads-dummy.h:
11586         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
11587
11588 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
11589
11590         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
11591         mono_string_intern () to implement the semantics of the ldstr opcode
11592         and the interning of System.Strings.
11593         * icall.c: provide hooks to make String::IsIntern and String::Intern
11594         internalcalls.
11595
11596 2001-09-23  Dick Porter  <dick@ximian.com>
11597
11598         * threads-dummy.c: 
11599         * threads-dummy.h: New files of dummy threading routines
11600
11601         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
11602         support code based on system specifics
11603
11604         Rename PTHREAD_LIBS to THREAD_LIBS
11605         
11606 2001-09-23  Dick Porter  <dick@ximian.com>
11607
11608         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
11609         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
11610         internal calls.
11611         (mono_thread_init): Set up a Thread object instance to return when
11612         the main thread calls Thread.CurrentThread
11613         (mono_thread_cleanup): Wait for all subthreads to exit
11614
11615         * icall.c: New internal calls for System.Threading.Thread::Sleep
11616         (including Schedule) and CurrentThread
11617
11618         * threads.h: New file, to insulate thread-specific stuff from the
11619         rest of the code
11620
11621 2001-09-21  Dick Porter  <dick@ximian.com>
11622
11623         * threads-pthread.h: 
11624         * threads-pthread.c: New file, for handling pthreads-style
11625         threading support.  Start() now starts a new thread and executes
11626         the ThreadStart delegate instance.
11627
11628         * icall.c: Added the internalcall for
11629         System.Threading.Thread::Start_internal
11630
11631         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
11632
11633 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
11634
11635         * loader.c: work around the different signatures for delegates
11636         constructors csc generates in compiled code vs the ones compiled in mscorlib.
11637
11638 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11639
11640         * class.h, class.c: add mono_class_get_field_from_name ().
11641         * *: Fix C comments and other ANSI C issues.
11642
11643 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
11644
11645         * endian.h, assembly.c: fix some endianness issues.
11646
11647 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
11648
11649         * loader.h, load.c: add delegate_class to mono_defaults.
11650         Handle runtime provided methods in mono_get_method ().
11651
11652 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
11653
11654         * loader.c (mono_get_method): use pinvoke for internal call
11655
11656         * icall.c: use pinvoke for internal call
11657
11658         * loader.c (method_from_memberref): set the method name
11659
11660 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
11661
11662         * metadata.c: help the compiler generate better code for
11663         mono_class_from_mono_type ().
11664
11665 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
11666
11667         * class.c (mono_class_metadata_init): delayed computing of the
11668         class size to mono_class_metadata_init ()
11669
11670 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
11671
11672         * class.c, class.h: add an interfaces member to MonoClass.
11673         * image.c, image.h: add assembly_name field to MonoImage
11674         from the assembly table.
11675         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
11676
11677 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11678
11679         * class.c: Handle Array in mono_class_from_mono_type ().
11680         * metadata.c, pedump.c: some endian fixes.
11681
11682 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11683
11684         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
11685         * metadata.c: fix small problem introduced with the latest commit.
11686
11687 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
11688
11689         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
11690         We don't need a MonoMetadata pointer anymore to compare signatures in
11691         mono_metadata_signature_equal (), update callers.
11692         Reduced memory usage an number of allocations for MonoMethodHeader and
11693         MonoMethodSignature.
11694
11695 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
11696
11697         * metadata.c: added compare for szarray.
11698
11699 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
11700
11701         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
11702         and add a couple more types to it and mono_defaults. Give an hint on
11703         classes that need implementing in our corlib and are referenced
11704         in mscorlib.
11705
11706 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
11707
11708         * class.h, class.c: keep track if a class is also an Enum.
11709         * loader.c: Implement a couple more types for use in libffi
11710         marshalling. Gives better diagnostics when failing to dlopen
11711         a library. Set method->klass for P/Invoke methods, too.
11712
11713 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
11714
11715         * class.c, class.h: add a MonoType this_arg to MonoClass that
11716         represents a pointer to an object of the class' type that
11717         can be used by the interpreter and later the type cache.
11718         Add best guess alignment info for valuetype objects.
11719
11720 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
11721
11722         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
11723         into MonoType: one less level of indirection and allocation and
11724         simplifies quite a bit of code. Added cache for MonoTypes that are
11725         used frequently, so that we don't need to allocate them all the time.
11726
11727 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
11728
11729         * class.c (mono_class_create_from_typedef): System.Enum is also a
11730         value type, although it does not derive from System.ValueType
11731         (maybe a bug in the ms compiler?)
11732
11733         * metadata.c (mono_type_size): return the right size for value types
11734
11735         * loader.c (mono_get_method): only initialize method header if not abstract
11736
11737         * class.c (mono_class_from_mono_type): use mono_default values. 
11738
11739 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
11740
11741         * *: use MonoClass pointers instead of <type_tokens>
11742         
11743         * class.h: new flag: metadata_inited.
11744
11745         * class.c (mono_class_metadata_init): impl.
11746         (mono_class_instance_size): impl.
11747         (mono_class_data_size): impl.
11748
11749 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11750
11751         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
11752         MonoClass now has the name and name_space fields. 
11753         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
11754         mono_get_method () takes and optional MonoClass as argument.
11755         Removed mono_typedef_from_name() and added mono_class_token_from_name()
11756         instead that takes advantage of a map from class names to typedef
11757         tokens in MonoImage.
11758
11759 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
11760
11761         * metadata.c: zero is not a valid alignment boundary.
11762         Merge MONO_TYPE_VOID in default decoding code.
11763
11764 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
11765
11766         * image.h: merged MonoMetadata into MonoImage
11767
11768         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
11769         identify the type of elements.
11770
11771 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
11772
11773         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
11774         * cil-coff.h: split MonoMSDOSHeader and add size info.
11775         * image.c: add some consistency checks.
11776         * metadata.c: fix row size computation: one programmer
11777         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
11778         add explanation for the locator routine.
11779         Fix decoding of size in method header.
11780         
11781 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
11782
11783         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
11784         (g_concat_dir_and_file): Bring g_concat_dir_and_file
11785         function from gnome-libs.  This uses the right path separator
11786         based on the OS, and also works around a bug in some systems where
11787         a double slash is not allowed. 
11788         (default_assembly_name_resolver): Use g_concat_dir_and_file
11789         (mono_assembly_open): ditto.
11790
11791 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
11792
11793         * metadata.c (mono_metadata_signature_equal): impl.
11794
11795         * *: void is now a realy MonoType (instead of using NULL)
11796         
11797         * metadata.c (do_mono_metadata_parse_type): use
11798         mono_metadata_parse_type to parse void value.
11799
11800 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
11801
11802         * metadata.c, metadata.h: in the signature and method header store
11803         only the space required for holding the loca vars and incoming arguments.
11804
11805 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
11806
11807         * metadata.c (do_mono_metadata_parse_type): treat void like any
11808         other type (instead of assigning NULL);
11809
11810 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
11811
11812         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
11813
11814 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
11815
11816         * image.c (do_mono_image_open): added a cache for arrays.
11817
11818 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11819
11820         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
11821         decode a single column from a row in a metadata table and changes
11822         to take advantage of it in the typedef locator (gives a nice speed up).
11823         Store offset info for function params.
11824
11825 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
11826
11827         * image.h (MONO_IMAGE_IS_CORLIB): removed 
11828
11829 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
11830
11831         * assembly.c: how could mono_assembly_close () had ever worked?
11832         * metadata.c, metadata.h: provide offset info for local vars.
11833         Implement mono_type_size () to take care of alignment as well
11834         as size (it was mono_field_type_size in cli/class.c before).
11835
11836 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
11837
11838         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
11839
11840         * assembly.h (CORLIB_NAME): set to corlib.dll
11841
11842         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
11843
11844 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11845
11846         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
11847         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
11848         tokentype.h: massive namespace cleanup.
11849
11850 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11851
11852         * metadata.h, metadata.c: decode exception clauses when parsing method header.
11853
11854 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
11855
11856         * metadata.c (mono_metadata_free_type): added check for type !=
11857         NULL (void) before calling mono_metadata_free_type()
11858
11859 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
11860
11861         * metadata.h, row_indexes.h: added header with enumerations to use
11862         to index in the columns from tables in metadata and to decode coded
11863         tokens: we should start using this instead of embedding magic numbers
11864         all over the code.
11865
11866 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
11867
11868         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
11869         Move metadata_t info from cli_image_info_t to MonoImage, where
11870         it's easily accessible. Changed all the uses accordingly.
11871         Added the method and class caches to MonoImage.
11872         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
11873         and mono_metadata_decode_value () signature to be more consistent
11874         with the other parse functions (and simplify code). Taken advantage
11875         of zero-length array allocation with GCC. Removed reduntant (and
11876         wrong) MonoFieldType struct and use MonoParam instead. Changed
11877         mono_metadata_parse_field_type () to use common code for parsing.
11878         Added mono_metadata_typedef_from_field () and
11879         mono_metadata_typedef_from_method () to lookup a typedef index from a
11880         field or method token.
11881         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
11882
11883 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
11884
11885         * metadata.c (mono_metadata_parse_field_type): Implement. 
11886         (do_mono_metadata_parse_type): Split engine from
11887         mono_metadata_parse_type, so that we can create smaller structures
11888         for things that just have one pointer to the MonoType (look at
11889         the MonoFieldType)
11890
11891 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
11892
11893         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
11894         as Jan Gray found out, it is incorrect. 
11895
11896 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
11897
11898         * assembly.c: Implement asssembly loading.  This loads an image
11899         and loads all the referenced assemblies.  Come to think of it, we
11900         could always do lazy loading of the assemblies. 
11901
11902         * image.c (mono_image_open): Keep loaded images in a hashtable.
11903
11904         * image.h (MonoImage): Add reference count.
11905
11906 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
11907
11908         * assembly.c (mono_assembly_open): Keep track of the file name in
11909         case the assembly has no ASSEMBLY table.
11910
11911         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
11912         from get.c here.
11913
11914 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
11915
11916         * metadata.c, metadata.h: decode local vars in method header
11917         parse function. Change callers accordingly.
11918
11919 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
11920
11921         * metadata.h, cil-coff.h: protect against multiple inclusion.
11922         Added some new structures to hold information decoded from metadata:
11923         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
11924         and relevant decoding/free functions.
11925         * metadata.c: implement decoding functions. Add warning for out of bounds
11926         index in mono_metadata_locate(). Implement mono_get_method () to retreive
11927         all the info about a method signature and invocation. Remove check on
11928         uninitialized local var in parse_mh() and fix memory leak.
11929
11930 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
11931
11932         * metadata.h: More macros.
11933
11934         * tokentype.h: New file.
11935
11936 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
11937
11938         * assembly.c: added a consistency check and initialize
11939         some structures with g_new0().
11940         * metadata.c: fixed a couple more bugs in table size computation
11941         and add other checks for out-of bound access to metadata.
11942
11943 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
11944
11945         * metatada.c: fix bugs computing table sizes. Spew a
11946         warning when index in string heap is out of bounds.
11947
11948 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
11949
11950         * metadata.h: Add a couple of macros to manipulate tokens. 
11951
11952 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11953
11954         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
11955         cli_section_tables).
11956
11957 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
11958
11959         * metadata.c (mono_metadata_user_string): New function, provides
11960         access to the UserString heap. 
11961
11962 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
11963
11964         * metadata.c: Add inline documentation.
11965
11966 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
11967
11968         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
11969         files. 
11970
11971 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
11972
11973         * typeattr.h: New file, TypeAttribute flags. 
11974
11975 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
11976
11977         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
11978         mono_assembly_ensure_section): Section loading code.
11979         (load_section_tables): Load the sections.
11980
11981         * mono/metadata/metadata.c (mono_metadata_locate_token,
11982         mono_metadata_locate): Functions to locate the information
11983         definition given a token or a table and an index.
11984         (mono_metadata_compute_table_bases): New.
11985         (compute_size): New function to compute the sizes of the various
11986         tables.
11987
11988         * mono/metadata/metadata.h: Finish listing the different index
11989         types. 
11990
11991         * mono/metadata/pedump.c: Improve to dump new information.
11992
11993 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
11994
11995         * mono/metadata/metadata.c: Entered all the tables matching
11996         Beta2. 
11997
11998         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
11999